apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pkgDepCache::ActionGroup Class Reference

Represents an active action group. More...

#include <depcache.h>

Collaboration diagram for pkgDepCache::ActionGroup:
[legend]

Public Member Functions

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

Private Member Functions

APT_HIDDEN ActionGroup (const ActionGroup &other)
 

Private Attributes

void *const d
 
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.

Definition at line 165 of file depcache.h.

Constructor & Destructor Documentation

◆ ActionGroup() [1/2]

APT_HIDDEN ActionGroup ( const ActionGroup other)
private

Action groups are noncopyable.

◆ ActionGroup() [2/2]

ActionGroup ( pkgDepCache cache)
explicit

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.

Definition at line 84 of file depcache.cc.

References cache, and pkgDepCache::group_level.

◆ ~ActionGroup()

~ActionGroup ( )
virtual

Destroy the action group.

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

Definition at line 108 of file depcache.cc.

Member Function Documentation

◆ release()

void release ( )

Clean up the action group before it is destroyed.

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

Definition at line 90 of file depcache.cc.

Referenced by DoAutomaticRemove().

Member Data Documentation

◆ cache

pkgDepCache& cache
private

Definition at line 168 of file depcache.h.

Referenced by ActionGroup().

◆ d

void* const d
private

Definition at line 167 of file depcache.h.

◆ released

bool released
private

Definition at line 170 of file depcache.h.


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