#include <vocabulary.h>
|
| Vocabulary (bool empty=false) |
| Instantiate the Debtags vocabulary. More...
|
|
| ~Vocabulary () |
|
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...
|
|
bool | empty () const |
| Check if there is any data in the merged vocabulary. More...
|
|
bool | hasFacet (const std::string &name) const |
| Check if the vocabulary contains the facet `name'. More...
|
|
bool | hasTag (const std::string &name) const |
| Check if the vocabulary contains the tag `fullname'. More...
|
|
const voc::FacetData * | facetData (const std::string &name) const |
| Return the facet with the given name. More...
|
|
const voc::TagData * | tagData (const std::string &fullname) const |
| Return the tag with the given full name. More...
|
|
std::set< std::string > | facets () const |
| Return all the facets in the vocabulary. More...
|
|
std::set< std::string > | tags () const |
| Return all the tags in the vocabulary. More...
|
|
std::set< std::string > | tags (const std::string &facet) const |
| Return the tags in the given facet. More...
|
|
void | read (tagcoll::input::Input &input) |
| Parse and import the vocabulary from `input', merging the data with the previously imported ones. More...
|
|
void | write () |
| Atomically update the system vocabulary. More...
|
|
void | write (const std::string &fname) |
| Atomically write the vocabulary data to the given file. More...
|
|
void | write (FILE *out) |
| Write the vocabulary data to the given output stream. More...
|
|
ept::debtags::Vocabulary::Vocabulary |
( |
bool |
empty = false | ) |
|
ept::debtags::Vocabulary::~Vocabulary |
( |
| ) |
|
bool ept::debtags::Vocabulary::empty |
( |
| ) |
const |
|
inline |
Check if there is any data in the merged vocabulary.
const voc::FacetData * ept::debtags::Vocabulary::facetData |
( |
const std::string & |
name | ) |
const |
Return the facet with the given name.
std::set< std::string > ept::debtags::Vocabulary::facets |
( |
| ) |
const |
bool ept::debtags::Vocabulary::hasData |
( |
| ) |
const |
|
inline |
bool ept::debtags::Vocabulary::hasFacet |
( |
const std::string & |
name | ) |
const |
Check if the vocabulary contains the facet `name'.
bool ept::debtags::Vocabulary::hasTag |
( |
const std::string & |
name | ) |
const |
voc::FacetData & ept::debtags::Vocabulary::obtainFacet |
( |
const std::string & |
name | ) |
|
|
protected |
voc::TagData & ept::debtags::Vocabulary::obtainTag |
( |
const std::string & |
fullname | ) |
|
|
protected |
void ept::debtags::Vocabulary::parseVocBuf |
( |
std::map< std::string, std::string > & |
res, |
|
|
size_t |
ofs, |
|
|
size_t |
len |
|
) |
| const |
|
protected |
void ept::debtags::Vocabulary::read |
( |
tagcoll::input::Input & |
input | ) |
|
const voc::TagData * ept::debtags::Vocabulary::tagData |
( |
const std::string & |
fullname | ) |
const |
std::set< std::string > ept::debtags::Vocabulary::tags |
( |
| ) |
const |
std::set< std::string > ept::debtags::Vocabulary::tags |
( |
const std::string & |
facet | ) |
const |
time_t ept::debtags::Vocabulary::timestamp |
( |
| ) |
const |
|
inline |
Get the timestamp of when the index was last updated.
References m_timestamp.
void ept::debtags::Vocabulary::write |
( |
| ) |
|
void ept::debtags::Vocabulary::write |
( |
const std::string & |
fname | ) |
|
Atomically write the vocabulary data to the given file.
void ept::debtags::Vocabulary::write |
( |
FILE * |
out | ) |
|
Write the vocabulary data to the given output stream.
std::map<std::string, std::string> ept::debtags::Vocabulary::emptyData |
|
protected |
std::map<std::string, voc::FacetData> ept::debtags::Vocabulary::m_facets |
|
protected |
time_t ept::debtags::Vocabulary::m_timestamp |
|
protected |
The documentation for this class was generated from the following files: