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

Debtags::TagDB Class Reference

Access the local Debtags tag database. More...

#include <TagDB.h>

Inheritance diagram for Debtags::TagDB:

Tagcoll::InputMerger< Package, Tag > Tagcoll::TagcollConsumer< Package, Tag > List of all members.

Public Member Functions

 TagDB (bool editable=false) throw (SystemException, ConsistencyCheckException)
 Create a new TagDB.
 ~TagDB () throw ()
TagSet getTags () const throw ()
 Get all the tags mentioned in the database.
void load (bool facet_only=true) throw (FileException, ParserException)
 Load the database from disk if facet_only is set to true, then all tags without facets will be stripped on loading; if facet_only is set to false, then for all tags with a facet the loader will add a new tag with only the facet name.
void savePatch () throw (FileException, ParserException, SystemException)
 Save in the state storage directory a patch that can be used to turn the system database into the collection given.
void savePatch (const InputMerger< Package, Tag > &collection) throw (FileException, ParserException, SystemException)
 Save in the state storage directory a patch to turn the system database into the collection given.
void sendPatch () throw (FileException, ParserException, SystemException, ConsistencyCheckException)
 Send to the central archive a patch that can be used to turn the system database into the collection given.
void sendPatch (const InputMerger< Package, Tag > &collection) throw (FileException, ParserException, SystemException, ConsistencyCheckException)
 Send to the central archive a patch to turn the system database into the collection given.

Static Public Member Functions

static const std::string & statedir () throw ()
 Return the full path of the state storage directory (usually ~/.debtags).
static const std::string & path_tagdb () throw ()
 Returns the path to the current tag database (usually /var/lib/debtags/package-tags).
static bool hasTagDatabase () throw ()
 Check if the tag database has been created (i.e.
static void outputFile (const std::string &name, TagcollConsumer< std::string, std::string > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the database in the given file to a TagcollConsumer.
static void outputFile (const std::string &name, TagcollConsumer< std::string, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the database in the given file to a TagcollConsumer.
static void outputFile (const std::string &name, TagcollConsumer< Package, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the database in the given file to a TagcollConsumer.
static void outputSystem (TagcollConsumer< std::string, std::string > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database to a TagcollConsumer.
static void outputSystem (TagcollConsumer< std::string, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database to a TagcollConsumer.
static void outputSystem (TagcollConsumer< Package, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database to a TagcollConsumer.
static void outputPatched (TagcollConsumer< std::string, std::string > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database, patched with local patch, to a TagcollConsumer.
static void outputPatched (TagcollConsumer< std::string, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database, patched with local patch, to a TagcollConsumer.
static void outputPatched (TagcollConsumer< Package, Tag > &cons, bool facet_only=true) throw (FileException, ParserException)
 Output the current Debian tags database, patched with local patch, to a TagcollConsumer.

Detailed Description

Access the local Debtags tag database.

TadDB provides read access to the local Debtags tag database via its various output* methods.


Constructor & Destructor Documentation

TagDB::TagDB bool  editable = false  )  throw (SystemException, ConsistencyCheckException)
 

Create a new TagDB.

Parameters:
editable Specifies if recording of modifications should be enabled. If editable is true, then the local state directory will be created when the object is instantiated

TagDB::~TagDB  )  throw ()
 


Member Function Documentation

Debtags::TagSet TagDB::getTags  )  const throw ()
 

Get all the tags mentioned in the database.

bool TagDB::hasTagDatabase  )  throw () [static]
 

Check if the tag database has been created (i.e.

if something equivalend to debtags update has been run)

void TagDB::load bool  facet_only = true  )  throw (FileException, ParserException)
 

Load the database from disk if facet_only is set to true, then all tags without facets will be stripped on loading; if facet_only is set to false, then for all tags with a facet the loader will add a new tag with only the facet name.

void TagDB::outputFile const std::string &  name,
TagcollConsumer< Package, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the database in the given file to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

void TagDB::outputFile const std::string &  name,
TagcollConsumer< std::string, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the database in the given file to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

void TagDB::outputFile const std::string &  name,
TagcollConsumer< std::string, std::string > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the database in the given file to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

void TagDB::outputPatched TagcollConsumer< Package, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database, patched with local patch, to a TagcollConsumer.

void TagDB::outputPatched TagcollConsumer< std::string, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database, patched with local patch, to a TagcollConsumer.

void TagDB::outputPatched TagcollConsumer< std::string, std::string > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database, patched with local patch, to a TagcollConsumer.

void TagDB::outputSystem TagcollConsumer< Package, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

void TagDB::outputSystem TagcollConsumer< std::string, Tag > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

void TagDB::outputSystem TagcollConsumer< std::string, std::string > &  cons,
bool  facet_only = true
throw (FileException, ParserException) [static]
 

Output the current Debian tags database to a TagcollConsumer.

Note:
The collection is sent to 'cons' without merging repeated items

const std::string & TagDB::path_tagdb  )  throw () [static]
 

Returns the path to the current tag database (usually /var/lib/debtags/package-tags).

void TagDB::savePatch const InputMerger< Package, Tag > &  collection  )  throw (FileException, ParserException, SystemException)
 

Save in the state storage directory a patch to turn the system database into the collection given.

void TagDB::savePatch  )  throw (FileException, ParserException, SystemException)
 

Save in the state storage directory a patch that can be used to turn the system database into the collection given.

void TagDB::sendPatch const InputMerger< Package, Tag > &  collection  )  throw (FileException, ParserException, SystemException, ConsistencyCheckException)
 

Send to the central archive a patch to turn the system database into the collection given.

void TagDB::sendPatch  )  throw (FileException, ParserException, SystemException, ConsistencyCheckException)
 

Send to the central archive a patch that can be used to turn the system database into the collection given.

const std::string & TagDB::statedir  )  throw () [static]
 

Return the full path of the state storage directory (usually ~/.debtags).


The documentation for this class was generated from the following files:
Generated on Sat Mar 19 11:45:37 2005 for libdebtags by  doxygen 1.4.1