26 #ifndef EPT_DEBTAGS_DEBTAGS_H
27 #define EPT_DEBTAGS_DEBTAGS_H
29 #include <tagcoll/coll/base.h>
30 #include <tagcoll/coll/fast.h>
55 class Debtags :
public tagcoll::coll::Fast<std::string, std::string>
65 typedef tagcoll::coll::Fast<std::string, std::string>
coll_type;
66 typedef std::pair< std::string, std::set<std::string> >
value_type;
83 bool hasData()
const {
return m_timestamp != 0; }
85 coll_type&
tagdb() {
return *
this; }
86 const coll_type&
tagdb()
const {
return *
this; }
87 tagcoll::PatchList<std::string, std::string>
changes()
const;
93 const Patches&
changes()
const {
return m_changes; }
98 void resetChanges() { m_changes.clear(); }
103 void setChanges(
const Patches&
changes);
108 void addChanges(
const Patches&
changes);
112 ItemSet getTaggedItems()
const;
132 void savePatch(
const tagcoll::PatchList<std::string, std::string>& patch);
143 void sendPatch(
const tagcoll::PatchList<std::string, std::string>& patch);
150 template<
typename OUT>
158 template<
typename OUT>
159 void outputSystem(
const std::string& filename,
const OUT& out);
167 template<
typename OUT>
176 template<
typename OUT>
177 void outputPatched(
const std::string& filename,
const OUT& out);