ept::debtags::Debtags Class Reference

#include <debtags.h>

Collaboration diagram for ept::debtags::Debtags:

Collaboration graph
[legend]

List of all members.


Detailed Description

Access the Debtags tag database.

Public Types

typedef
tagcoll::coll::Patched
< tagcoll::coll::IntDiskIndex > 
coll_type
typedef std::pair
< std::string,
std::set< Tag > > 
value_type

Public Member Functions

const_iterator begin () const
const_iterator end () const
 Debtags (bool editable=false)
 Create a new accessor for the Debtags database.
 ~Debtags ()
time_t timestamp () const
 Get the timestamp of when the index was last updated.
bool hasData () const
 Return true if this data source has data, false if it's empty.
coll_typetagdb ()
const coll_typetagdb () const
tagcoll::PatchList
< std::string, Tag
changes () const
bool hasTag (const Tag &tag) const
std::set< TaggetTagsOfItem (const std::string &item) const
template<typename ITEMS>
std::set< TaggetTagsOfItems (const ITEMS &items) const
std::set< std::string > getItemsHavingTag (const Tag &tag) const
template<typename TAGS>
std::set< std::string > getItemsHavingTags (const TAGS &tags) const
std::set< TaggetAllTags () const
Vocabularyvocabulary ()
 Access the vocabulary in use.
const Vocabularyvocabulary () const
 Access the vocabulary in use.
PkgIdpkgid ()
 Access the PkgId in use.
const PkgIdpkgid () const
 Access the PkgId in use.
int getCardinality (const Tag &tag) const
void applyChange (const tagcoll::PatchList< std::string, Tag > &change)
void savePatch ()
 Check if the tag database has been created (i.e.
void savePatch (const tagcoll::PatchList< std::string, std::string > &patch)
 Save in the state storage directory a patch to turn the system database into the collection given.
void savePatch (const tagcoll::PatchList< std::string, Tag > &patch)
 Save in the state storage directory a patch to turn the system database into the collection given.
void sendPatch ()
 Send to the central archive a patch that can be used to turn the system database into the collection given.
void sendPatch (const tagcoll::PatchList< std::string, std::string > &patch)
 Send the given patch to the central archive.
void sendPatch (const tagcoll::PatchList< std::string, Tag > &patch)
 Send the given patch to the central archive.
template<typename OUT>
void outputSystem (const OUT &cons)
 Output the current Debian tags database to a consumer of <std::string, Tag>.
template<typename OUT>
void outputSystem (const std::string &filename, const OUT &out)
 Output the given tag file to a consumer of <std::string, Tag>.
template<typename OUT>
void outputPatched (const OUT &cons)
 Output the current Debian tags database, patched with local patch, to a Consumer of <std::string, Tag>.
template<typename OUT>
void outputPatched (const std::string &filename, const OUT &out)
 Output the given tag file, patched with local patch, to a Consumer of <std::string, Tag>.

Protected Member Functions

std::string packageByID (int id) const
template<typename IDS>
std::set< std::string > packagesById (const IDS &ids) const
int idByPackage (const std::string &pkg) const
template<typename PKGS>
std::set< int > idsByPackages (const PKGS &pkgs) const

Protected Attributes

tagcoll::diskindex::MasterMMap mastermmap
tagcoll::coll::IntDiskIndex m_rocoll
tagcoll::coll::Patched
< tagcoll::coll::IntDiskIndex > 
m_coll
PkgId m_pkgid
Vocabulary m_voc
std::string rcdir
time_t m_timestamp

Classes

class  const_iterator

Member Typedef Documentation

typedef tagcoll::coll::Patched< tagcoll::coll::IntDiskIndex > ept::debtags::Debtags::coll_type

typedef std::pair< std::string, std::set<Tag> > ept::debtags::Debtags::value_type


Constructor & Destructor Documentation

ept::debtags::Debtags::Debtags ( bool  editable = false  ) 

Create a new accessor for the Debtags database.

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.

ept::debtags::Debtags::~Debtags (  )  [inline]


Member Function Documentation

std::string ept::debtags::Debtags::packageByID ( int  id  )  const [inline, protected]

template<typename IDS>
std::set<std::string> ept::debtags::Debtags::packagesById ( const IDS &  ids  )  const [inline, protected]

int ept::debtags::Debtags::idByPackage ( const std::string &  pkg  )  const [inline, protected]

template<typename PKGS>
std::set<int> ept::debtags::Debtags::idsByPackages ( const PKGS &  pkgs  )  const [inline, protected]

const_iterator ept::debtags::Debtags::begin (  )  const [inline]

const_iterator ept::debtags::Debtags::end (  )  const [inline]

time_t ept::debtags::Debtags::timestamp (  )  const [inline]

Get the timestamp of when the index was last updated.

bool ept::debtags::Debtags::hasData (  )  const [inline]

Return true if this data source has data, false if it's empty.

coll_type& ept::debtags::Debtags::tagdb (  )  [inline]

const coll_type& ept::debtags::Debtags::tagdb (  )  const [inline]

tagcoll::PatchList< std::string, Tag > ept::debtags::Debtags::changes (  )  const

bool ept::debtags::Debtags::hasTag ( const Tag tag  )  const [inline]

std::set<Tag> ept::debtags::Debtags::getTagsOfItem ( const std::string &  item  )  const [inline]

template<typename ITEMS>
std::set<Tag> ept::debtags::Debtags::getTagsOfItems ( const ITEMS &  items  )  const [inline]

std::set<std::string> ept::debtags::Debtags::getItemsHavingTag ( const Tag tag  )  const [inline]

template<typename TAGS>
std::set<std::string> ept::debtags::Debtags::getItemsHavingTags ( const TAGS &  tags  )  const [inline]

std::set<Tag> ept::debtags::Debtags::getAllTags (  )  const [inline]

Vocabulary& ept::debtags::Debtags::vocabulary (  )  [inline]

Access the vocabulary in use.

const Vocabulary& ept::debtags::Debtags::vocabulary (  )  const [inline]

Access the vocabulary in use.

PkgId& ept::debtags::Debtags::pkgid (  )  [inline]

Access the PkgId in use.

Note:
Future implementations may not rely on a PkgId

const PkgId& ept::debtags::Debtags::pkgid (  )  const [inline]

Access the PkgId in use.

Note:
Future implementations may not rely on a PkgId

int ept::debtags::Debtags::getCardinality ( const Tag tag  )  const [inline]

void ept::debtags::Debtags::applyChange ( const tagcoll::PatchList< std::string, Tag > &  change  )  [inline]

void ept::debtags::Debtags::savePatch (  ) 

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

if something equivalend to debtags update has been run) Save in the state storage directory a patch that can be used to turn the system database into the collection given

void ept::debtags::Debtags::savePatch ( const tagcoll::PatchList< std::string, std::string > &  patch  ) 

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

void ept::debtags::Debtags::savePatch ( const tagcoll::PatchList< std::string, Tag > &  patch  ) 

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

void ept::debtags::Debtags::sendPatch (  ) 

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

void ept::debtags::Debtags::sendPatch ( const tagcoll::PatchList< std::string, std::string > &  patch  ) 

Send the given patch to the central archive.

void ept::debtags::Debtags::sendPatch ( const tagcoll::PatchList< std::string, Tag > &  patch  ) 

Send the given patch to the central archive.

template<typename OUT>
void ept::debtags::Debtags::outputSystem ( const OUT &  cons  )  [inline]

Output the current Debian tags database to a consumer of <std::string, Tag>.

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

template<typename OUT>
void ept::debtags::Debtags::outputSystem ( const std::string &  filename,
const OUT &  out 
) [inline]

Output the given tag file to a consumer of <std::string, Tag>.

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

template<typename OUT>
void ept::debtags::Debtags::outputPatched ( const OUT &  cons  )  [inline]

Output the current Debian tags database, patched with local patch, to a Consumer of <std::string, Tag>.

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

template<typename OUT>
void ept::debtags::Debtags::outputPatched ( const std::string &  filename,
const OUT &  out 
) [inline]

Output the given tag file, patched with local patch, to a Consumer of <std::string, Tag>.

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


Member Data Documentation

tagcoll::diskindex::MasterMMap ept::debtags::Debtags::mastermmap [protected]

tagcoll::coll::IntDiskIndex ept::debtags::Debtags::m_rocoll [protected]

tagcoll::coll::Patched< tagcoll::coll::IntDiskIndex > ept::debtags::Debtags::m_coll [protected]

PkgId ept::debtags::Debtags::m_pkgid [protected]

Vocabulary ept::debtags::Debtags::m_voc [protected]

std::string ept::debtags::Debtags::rcdir [protected]

time_t ept::debtags::Debtags::m_timestamp [protected]


The documentation for this class was generated from the following files:
Generated on Sat Sep 15 21:33:01 2007 for libept by  doxygen 1.5.3