ept::debtags::VocabularyIndexer Struct Reference

#include <vocabularyindexer.h>

Collaboration diagram for ept::debtags::VocabularyIndexer:

Collaboration graph
[legend]

List of all members.


Detailed Description

Infrastructure used to rebuild the vocabulary index when needed.

Public Member Functions

time_t sourceTimestamp () const
 Get the timestamp of the newest vocabulary data source.
bool needsRebuild () const
 Return true if the vocabulary index needs rebuilding.
bool rebuild (const std::string &vocfname, const std::string &idxfname)
 Rebuild the vocabulary index.
bool rebuildIfNeeded ()
 Rebuild the vocabulary if needed.
bool getUpToDateVocabulary (std::string &vocfname, std::string &idxfname)
 Get the names of the merged vocabulary and vocabulary index that can be used to access Debtags vocabulary data.
bool userIndexIsRedundant () const
 Returns true if the index in the user home directory is redundant and can be deleted.
bool deleteRedundantUserIndex ()
 Deletes the user index if it is redundant.
void rescan ()
 Rescan the various timestamps.
 VocabularyIndexer ()

Static Public Member Functions

static bool obtainWorkingVocabulary (std::string &vocfname, std::string &idxfname)
 Get the names of the merged vocabulary and vocabulary index that can be used to access Debtags vocabulary data.

Public Attributes

SourceDir mainSource
SourceDir userSource
time_t ts_main_src
time_t ts_user_src
time_t ts_main_voc
time_t ts_main_idx
time_t ts_user_voc
time_t ts_user_idx

Constructor & Destructor Documentation

ept::debtags::VocabularyIndexer::VocabularyIndexer (  ) 


Member Function Documentation

time_t ept::debtags::VocabularyIndexer::sourceTimestamp (  )  const [inline]

Get the timestamp of the newest vocabulary data source.

bool ept::debtags::VocabularyIndexer::needsRebuild (  )  const

Return true if the vocabulary index needs rebuilding.

bool ept::debtags::VocabularyIndexer::rebuild ( const std::string &  vocfname,
const std::string &  idxfname 
)

Rebuild the vocabulary index.

Parameters:
vocfname Full pathname of the merged vocabulary to create
idxfname Full pathname of the vocabulary index to create

bool ept::debtags::VocabularyIndexer::rebuildIfNeeded (  ) 

Rebuild the vocabulary if needed.

bool ept::debtags::VocabularyIndexer::getUpToDateVocabulary ( std::string &  vocfname,
std::string &  idxfname 
)

Get the names of the merged vocabulary and vocabulary index that can be used to access Debtags vocabulary data.

The system or the user index will be returned according to which one is up to date.

bool ept::debtags::VocabularyIndexer::userIndexIsRedundant (  )  const

Returns true if the index in the user home directory is redundant and can be deleted.

The user index is redundant if the system index is up to date.

bool ept::debtags::VocabularyIndexer::deleteRedundantUserIndex (  ) 

Deletes the user index if it is redundant.

void ept::debtags::VocabularyIndexer::rescan (  ) 

Rescan the various timestamps.

bool ept::debtags::VocabularyIndexer::obtainWorkingVocabulary ( std::string &  vocfname,
std::string &  idxfname 
) [static]

Get the names of the merged vocabulary and vocabulary index that can be used to access Debtags vocabulary data.

The system or the user index will be returned according to which one is up to date.

The files will be built or rebuilt if they are missing or outdated.


Member Data Documentation

SourceDir ept::debtags::VocabularyIndexer::mainSource

SourceDir ept::debtags::VocabularyIndexer::userSource

time_t ept::debtags::VocabularyIndexer::ts_main_src

time_t ept::debtags::VocabularyIndexer::ts_user_src

time_t ept::debtags::VocabularyIndexer::ts_main_voc

time_t ept::debtags::VocabularyIndexer::ts_main_idx

time_t ept::debtags::VocabularyIndexer::ts_user_voc

time_t ept::debtags::VocabularyIndexer::ts_user_idx


The documentation for this struct was generated from the following files:
Generated on Fri Sep 14 23:15:39 2007 for libept by  doxygen 1.5.3