libept
|
Access the on-disk Debtags tag database. More...
#include <debtags.h>
Public Types | |
typedef tagcoll::coll::Fast< std::string, std::string > | coll_type |
typedef std::pair< std::string, std::set< std::string > > | value_type |
Public Member Functions | |
Debtags () | |
Create a Debtags object, reading the system database. More... | |
Debtags (const std::string &pathname) | |
Create a Debtags object, reading the given database file. More... | |
~Debtags () | |
time_t | timestamp () const |
Get the timestamp of when the index was last updated. More... | |
bool | hasData () const |
Return true if this data source has data, false if it's empty. More... | |
coll_type & | tagdb () |
const coll_type & | tagdb () const |
Static Public Member Functions | |
static std::string | pathname () |
Return the default pathname for the debtags tags. More... | |
Protected Member Functions | |
void | load (const std::string &pathname) |
Protected Attributes | |
std::string | rcdir |
time_t | m_timestamp |
Access the on-disk Debtags tag database.
The database is normally found in /var/lib/debtags.
Tags and Facets are returned as std::strings. The objects follow the flyweight pattern and access the data contained in the Vocabulary instantiated inside Debtags.
It is possible to get a reference to the Vocabulary object using the vocabulary() method.
typedef tagcoll::coll::Fast<std::string, std::string> ept::debtags::Debtags::coll_type |
typedef std::pair< std::string, std::set<std::string> > ept::debtags::Debtags::value_type |
ept::debtags::Debtags::Debtags | ( | ) |
Create a Debtags object, reading the system database.
References load(), and pathname().
ept::debtags::Debtags::Debtags | ( | const std::string & | pathname | ) |
|
inline |
|
inline |
Return true if this data source has data, false if it's empty.
Referenced by TestDebtags::_4().
|
protected |
References m_timestamp, and ept::axi::timestamp().
Referenced by Debtags().
|
static |
|
inline |
|
inline |
|
inline |
Get the timestamp of when the index was last updated.
References m_timestamp.
Referenced by TestDebtags::_4().
|
protected |
Referenced by load(), and timestamp().
|
protected |