apt: pkgDepCache::ActionGroup Class Reference

apt 3.0.1 commandline package manager

Public Member Functions | List of all members
pkgDepCache::ActionGroup Class Reference

Represents an active action group. More...

`#include <apt-pkg/depcache.h>`

## Public Member Functions
| ActionGroup (pkgDepCache &cache)
| Create a new ActionGroup.
void | release ()
| Clean up the action group before it is destroyed.
virtual | ~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:

- 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

## ◆ ActionGroup()

ActionGroup | ( | pkgDepCache & | cache | ) |
| explicit

Create a new ActionGroup.

Parameters

  cache | The cache that this ActionGroup should manipulate.

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

## ◆ ~ActionGroup()

~ActionGroup | ( |  | ) |
| virtual

Destroy the action group.

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

References release().

## 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.

Referenced by ~ActionGroup().

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

- apt-pkg/depcache.h
- apt-pkg/depcache.cc