#include <pkgid.h>
This is used in building the Debtags fast index, which works representing tags and packages as int IDs
Public Member Functions | |
PkgId () | |
PkgId (const tagcoll::diskindex::MasterMMap &master, size_t idx) | |
PkgId (const char *buf, int size) | |
time_t | timestamp () const |
Get the timestamp of when the index was last updated. | |
size_t | size () const |
Get the number of packages in the index. | |
int | byName (const std::string &name) const |
Get the ID of a package given its name. | |
std::string | byID (int id) const |
Get a package name given its ID. | |
int | size (int id) const |
Get the number of packages in the index. |
ept::debtags::PkgId::PkgId | ( | ) |
ept::debtags::PkgId::PkgId | ( | const tagcoll::diskindex::MasterMMap & | master, | |
size_t | idx | |||
) |
ept::debtags::PkgId::PkgId | ( | const char * | buf, | |
int | size | |||
) |
time_t ept::debtags::PkgId::timestamp | ( | ) | const [inline] |
Get the timestamp of when the index was last updated.
size_t ept::debtags::PkgId::size | ( | ) | const [inline] |
Get the number of packages in the index.
int ept::debtags::PkgId::byName | ( | const std::string & | name | ) | const |
Get the ID of a package given its name.
If not found, returns -1.
std::string ept::debtags::PkgId::byID | ( | int | id | ) | const [inline] |
Get a package name given its ID.
If not found, returns the empty string.
int ept::debtags::PkgId::size | ( | int | id | ) | const [inline] |
Get the number of packages in the index.