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

Debtags::Tags< ITEM > Class Template Reference

Access the local Debtags tag database. More...

#include <Tags.h>

Inheritance diagram for Debtags::Tags< ITEM >:

Inheritance graph
[legend]
Collaboration diagram for Debtags::Tags< ITEM >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Tags (Converter< ITEM, std::string > &fromitem, Converter< std::string, ITEM > &toitem, bool editable=false)
 Create a new accessor for the Debtags database.
 ~Tags ()
void savePatch ()
 Save in the state storage directory a patch that can be used to turn the system database into the collection given.
void savePatch (const PatchList< ITEM, 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 PatchList< ITEM, Tag > &patch)
 Send the given patch to the central archive.
void outputSystem (Tagcoll::Consumer< std::string, std::string > &cons)
 Output the current Debian tags database to a TagcollConsumer.
void outputSystem (Tagcoll::Consumer< ITEM, Tag > &cons)
 Output the current Debian tags database to a TagcollConsumer.
void outputPatched (Tagcoll::Consumer< std::string, std::string > &cons)
 Output the current Debian tags database, patched with local patch, to a TagcollConsumer.
void outputPatched (Tagcoll::Consumer< ITEM, Tag > &cons)
 Output the current Debian tags database, patched with local patch, to a TagcollConsumer.
const Vocabularyvocabulary () const
 Access the vocabulary.
Vocabularyvocabulary ()
 Access the vocabulary.

Static Public Member Functions

static bool hasTagDatabase ()
 Check if the tag database has been created (i.e.

Protected Attributes

Vocabulary voc
Converter< ITEM, std::string > & fromitem
Converter< Tag, std::string > fromtag
Converter< std::string, ITEM > & toitem
Converter< std::string, Tagtotag

Detailed Description

template<class ITEM>
class Debtags::Tags< ITEM >

Access the local Debtags tag database.


Constructor & Destructor Documentation

template<class ITEM>
Debtags::Tags< ITEM >::Tags Converter< ITEM, std::string > &  fromitem,
Converter< std::string, ITEM > &  toitem,
bool  editable = false
 

Create a new accessor for the Debtags database.

Parameters:
fromitem,fromtag,toitem,totag The serializers to use to serialize Package and Tag object into strings.
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.

template<class ITEM>
Debtags::Tags< ITEM >::~Tags  )  [inline]
 


Member Function Documentation

template<class ITEM>
bool Debtags::Tags< ITEM >::hasTagDatabase  )  [static]
 

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

if something equivalend to debtags update has been run)

template<class ITEM>
void Debtags::Tags< ITEM >::outputPatched Tagcoll::Consumer< ITEM, Tag > &  cons  ) 
 

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

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

template<class ITEM>
void Debtags::Tags< ITEM >::outputPatched Tagcoll::Consumer< std::string, std::string > &  cons  ) 
 

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

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

template<class ITEM>
void Debtags::Tags< ITEM >::outputSystem Tagcoll::Consumer< ITEM, Tag > &  cons  ) 
 

Output the current Debian tags database to a TagcollConsumer.

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

template<class ITEM>
void Debtags::Tags< ITEM >::outputSystem Tagcoll::Consumer< std::string, std::string > &  cons  ) 
 

Output the current Debian tags database to a TagcollConsumer.

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

template<class ITEM>
void Debtags::Tags< ITEM >::savePatch const PatchList< ITEM, Tag > &  patch  ) 
 

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

template<class ITEM>
void Debtags::Tags< ITEM >::savePatch  ) 
 

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

template<class ITEM>
void Debtags::Tags< ITEM >::sendPatch const PatchList< ITEM, Tag > &  patch  ) 
 

Send the given patch to the central archive.

template<class ITEM>
void Debtags::Tags< ITEM >::sendPatch  ) 
 

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

template<class ITEM>
Vocabulary& Debtags::Tags< ITEM >::vocabulary  )  [inline]
 

Access the vocabulary.

template<class ITEM>
const Vocabulary& Debtags::Tags< ITEM >::vocabulary  )  const [inline]
 

Access the vocabulary.


Member Data Documentation

template<class ITEM>
Converter<ITEM, std::string>& Debtags::Tags< ITEM >::fromitem [protected]
 

template<class ITEM>
Converter<Tag, std::string> Debtags::Tags< ITEM >::fromtag [protected]
 

template<class ITEM>
Converter<std::string, ITEM>& Debtags::Tags< ITEM >::toitem [protected]
 

template<class ITEM>
Converter<std::string, Tag> Debtags::Tags< ITEM >::totag [protected]
 

template<class ITEM>
Vocabulary Debtags::Tags< ITEM >::voc [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 10 03:47:46 2005 for libdebtags by  doxygen 1.4.4