apt: Var Struct Reference

apt 3.3.3 commandline package manager

Public Member Functions | Public Attributes | List of all members
Var Struct Reference

Tagged union holding either a package, version, or nothing; representing the reason for installing something. More...

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

## Public Member Functions
constexpr | Var (uint32_t value=0) noexcept
| Var (pkgCache::PkgIterator const &Pkg) noexcept
| Var (pkgCache::VerIterator const &Ver) noexcept
constexpr bool | isVersion () const noexcept
constexpr uint32_t | mapPtr () const noexcept
constexpr map_pointer< pkgCache::Package > | Pkg () const noexcept
constexpr map_pointer< pkgCache::Version > | Ver () const noexcept
constexpr pkgCache::PkgIterator | Pkg (pkgCache &cache) const noexcept
constexpr pkgCache::VerIterator | Ver (pkgCache &cache) const noexcept
constexpr pkgCache::PkgIterator | CastPkg (pkgCache &cache) const noexcept
constexpr bool | empty () const noexcept
constexpr bool | operator!= (Var const other) const noexcept
constexpr bool | operator== (Var const other) const noexcept
constexpr Lit | operator~ () const noexcept
| Negate.
std::string | toString (pkgCache &cache) const

## Public Attributes
uint32_t | value

## Detailed Description

Tagged union holding either a package, version, or nothing; representing the reason for installing something.

We want to keep track of the reason why things are being installed such that we can have sensible debugging abilities; and we want to generically refer to both packages and versions as variables, hence this class was added.

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

- apt-pkg/solver3.h