Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef EPT_DEBTAGS_DEBTAGS_H
00027 #define EPT_DEBTAGS_DEBTAGS_H
00028
00029 #include <tagcoll/coll/base.h>
00030 #include <tagcoll/coll/fast.h>
00031 #include <string>
00032
00033 namespace ept {
00034 namespace debtags {
00035 class Debtags;
00036 }
00037 }
00038
00039 namespace ept {
00040 namespace debtags {
00041
00054 class Debtags : public tagcoll::coll::Fast<std::string, std::string>
00055 {
00056 protected:
00057
00058 std::string rcdir;
00059
00060
00061 time_t m_timestamp;
00062
00063 public:
00064 typedef tagcoll::coll::Fast<std::string, std::string> coll_type;
00065 typedef std::pair< std::string, std::set<std::string> > value_type;
00066
00075 Debtags(bool editable = false);
00076 ~Debtags() {}
00077
00079 time_t timestamp() const { return m_timestamp; }
00080
00082 bool hasData() const { return m_timestamp != 0; }
00083
00084 coll_type& tagdb() { return *this; }
00085 const coll_type& tagdb() const { return *this; }
00086 tagcoll::PatchList<std::string, std::string> changes() const;
00087
00088 #if 0
00089
00092 const Patches& changes() const { return m_changes; }
00093
00097 void resetChanges() { m_changes.clear(); }
00098
00102 void setChanges(const Patches& changes);
00103
00107 void addChanges(const Patches& changes);
00108 #endif
00109
00110 #if 0
00111 ItemSet getTaggedItems() const;
00112 #endif
00113
00118
00119
00120
00125 void savePatch();
00126
00131 void savePatch(const tagcoll::PatchList<std::string, std::string>& patch);
00132
00137 void sendPatch();
00138
00142 void sendPatch(const tagcoll::PatchList<std::string, std::string>& patch);
00143
00149 template<typename OUT>
00150 void outputSystem(const OUT& cons);
00151
00157 template<typename OUT>
00158 void outputSystem(const std::string& filename, const OUT& out);
00159
00166 template<typename OUT>
00167 void outputPatched(const OUT& cons);
00168
00175 template<typename OUT>
00176 void outputPatched(const std::string& filename, const OUT& out);
00177 };
00178
00179
00180 }
00181 }
00182
00183
00184 #endif