apt @VERSION@
Public Member Functions

pkgDepCache::ActionGroup Class Reference

Represents an active action group. More...

#include <depcache.h>

List of all members.

Public Member Functions

 ActionGroup (pkgDepCache &cache)
 Create a new ActionGroup.
void release ()
 Clean up the action group before it is destroyed.
 ~ActionGroup ()
 Destroy the action group.

Detailed Description

Represents an active action group.

An action group is a group of actions that are currently being performed. While an active group is active, certain routine clean-up actions that would normally be performed after every cache operation are delayed until the action group is completed. This is necessary primarily to avoid inefficiencies when modifying a large number of packages at once.

This class represents an active action group. Creating an instance will create an action group; destroying one will destroy the corresponding action group.

The following operations are suppressed by this class:

Note:
This can be used in the future to easily accumulate atomic actions for undo or to display "what apt did anyway"; e.g., change the counter of how many action groups are active to a std::set of pointers to them and use those to store information about what happened in a group in the group.

Constructor & Destructor Documentation

ActionGroup ( pkgDepCache cache)

Create a new ActionGroup.

Parameters:
cacheThe cache that this ActionGroup should manipulate.

As long as this object exists, no automatic cleanup operations will be undertaken.

Destroy the action group.

If this is the last action group, the automatic cache cleanup operations will be undertaken.


Member Function Documentation

void release ( )

Clean up the action group before it is destroyed.

If it is destroyed later, no second cleanup wil be run.


The documentation for this class was generated from the following files: