libapt-pkg-dev  v0.9.7.5ubuntu5.4
Debian+Ubuntu APT Package Management
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pkgDepCache::ActionGroup Class Reference

Represents an active action group. More...

#include <depcache.h>

Collaboration diagram for pkgDepCache::ActionGroup:

Public Member Functions

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

Private Member Functions

 ActionGroup (const ActionGroup &other)
 Action groups are noncopyable. More...
 

Private Attributes

pkgDepCachecache
 
bool released
 

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:

  • Keeping the Marked and Garbage flags up to date.
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

pkgDepCache::ActionGroup::ActionGroup ( const ActionGroup other)
private

Action groups are noncopyable.

pkgDepCache::ActionGroup::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.

pkgDepCache::ActionGroup::~ActionGroup ( )

Destroy the action group.

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

Member Function Documentation

void pkgDepCache::ActionGroup::release ( )

Clean up the action group before it is destroyed.

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

Member Data Documentation

pkgDepCache& pkgDepCache::ActionGroup::cache
private
bool pkgDepCache::ActionGroup::released
private

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