- Add History::clear() to empty an existing history (equivalent
to removing all of its resources and all of its processes, but faster) git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@887 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
0933d63344
commit
0b4db098eb
3 changed files with 14 additions and 0 deletions
|
@ -290,6 +290,17 @@ ConcreteHistory::remove(SubRequest& subrequest)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
ConcreteHistory::clear()
|
||||
{
|
||||
for_each(_snapshots.begin(), _snapshots.end(),
|
||||
deletor<ConcreteEnvironment>());
|
||||
_snapshots.clear();
|
||||
_snapshots.push_back(new ConcreteEnvironment());
|
||||
assert(_snapshots.size() == 1);
|
||||
}
|
||||
|
||||
|
||||
ConcreteHistory::ResourcePair
|
||||
ConcreteHistory::add_resource(const Glib::ustring& name,
|
||||
bool preemptable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue