Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

InstalledPackage Class Reference

Details a PackageVersion that is installed. More...

#include <installedpackage.h>

Inheritance diagram for InstalledPackage:

PackageVersion Package List of all members.

Public Member Functions

 InstalledPackage ()
 Default Constructor.
 InstalledPackage (const InstalledPackage &copy)
 Copy Constructor.
 InstalledPackage (const PackageVersion &copy)
 Copy Constructor.
 InstalledPackage (const Package &copy)
 Copy Constructor.
virtual ~InstalledPackage ()
 Destructor.
bool operator== (const InstalledPackage &param)
 Equality operator.
bool operator!= (const InstalledPackage &param)
 Non equality operator.
bool operator== (const PackageVersion &param)
 Equality operator - with PackageVersion.
bool operator!= (const PackageVersion &param)
 Non equality operator - with PackageVersion.
bool operator== (const Package &param)
 Equality operator - with Package.
bool operator!= (const Package &param)
 Non equality operator - with Package.
virtual Dbt GetKey ()
 Get DB Key.
virtual Dbt GetData ()
 Get DB Data.
virtual void ReadData (Dbt data)
 Read DB Data.
virtual void ReadKey (Dbt key)
 Read DB Key.

Public Attributes

bool inWorld
 Is the package in World?.
std::vector< PMStringvirtuals
 The virtuals provided by the installed package.
PMString useFlags
 The useFlags the package was installed with.

Protected Member Functions

int _VectorSize (std::vector< PMString > stringVector)
 Utility function to get the size of a vector.

Detailed Description

Details a PackageVersion that is installed. Inherits from PackageVersion. Doesn't have many functions, other than DB related ones, essentially just adds extra info to PackageVersion


Constructor & Destructor Documentation

InstalledPackage::InstalledPackage  ) 
 

Constructor - sets package not in world.

InstalledPackage::InstalledPackage const InstalledPackage copy  ) 
 

Copy constructor for InstalledPackage.

Parameters:
copy The InstalledPackage to make a copy of.

InstalledPackage::InstalledPackage const PackageVersion copy  ) 
 

Copy constructor for PackageVersion.

Parameters:
copy The PackageVersion to make a copy of.

InstalledPackage::InstalledPackage const Package copy  ) 
 

Copy constructor for Package.

Parameters:
copy The Package to make a copy of.

InstalledPackage::~InstalledPackage  )  [virtual]
 

Destructor.


Member Function Documentation

int InstalledPackage::_VectorSize std::vector< PMString stringVector  )  [protected]
 

Utility function that returns the size in bytes of a vector of strings, if you extract each one as a bunch of chars ( using .c_str() ).

Parameters:
stringVector The vector whose size is to be calculated.
Returns:
The size of the vector, in bytes.

Dbt InstalledPackage::GetData  )  [virtual]
 

Get the Data for storing in the Berkeley DB. Stores virtuals provided, version, whether the package is inWorld and the useflags used at the time of install.

Returns:
The Dbt Data for the InstalledDatabase.
Exceptions:
PortageException(eNotEnoughMem,category/name-version) if we run out of memory.

Reimplemented from PackageVersion.

Dbt InstalledPackage::GetKey  )  [virtual]
 

Get the Key for storing in the Berkeley DB. Stored as category then name.

Returns:
The Dbt Key for the InstalledDatabase.
Exceptions:
PortageException(eNotEnoughMem,category/name-version) if we run out of memory.

Reimplemented from PackageVersion.

bool InstalledPackage::operator!= const Package param  ) 
 

Non Equality operator - with Package.

Parameters:
param The Package to test against.
Returns:
true if the two Packages are not equal.

Reimplemented from PackageVersion.

bool InstalledPackage::operator!= const PackageVersion param  ) 
 

Non Equality operator - with PackageVersion.

Parameters:
param The PackageVersion to test against.
Returns:
true if the two PackageVersions are not equal.

Reimplemented from PackageVersion.

bool InstalledPackage::operator!= const InstalledPackage param  ) 
 

Non Equality operator.

Parameters:
param The InstalledPackage to test against.
Returns:
true if the two InstalledPackages are not equal.

bool InstalledPackage::operator== const Package param  ) 
 

Equality operator - with Package.

Parameters:
param The Package to test against.
Returns:
true if the two Packages are equal.

Reimplemented from PackageVersion.

bool InstalledPackage::operator== const InstalledPackage param  ) 
 

Equality operator.

Parameters:
param The InstalledPackage to test against.
Returns:
true if the two InstalledPackages are equal.

void InstalledPackage::ReadData Dbt  data  )  [virtual]
 

Read the DB Data stored in the DB.

Parameters:
data The Dbt data to be read in from the InstalledDatabase.

Reimplemented from PackageVersion.

void InstalledPackage::ReadKey Dbt  key  )  [virtual]
 

Read the DB Key stored in the DB.

Parameters:
key The Dbt key to be read in from the InstalledDatabase.

Reimplemented from PackageVersion.


The documentation for this class was generated from the following files:
Generated on Wed May 25 15:29:54 2005 for Package Management System for Gentoo Linux by  doxygen 1.4.1