index f727219d5c249b54ed68d5d9642a39ccfeddb09d..64c8207329b6aaa35499dc7a8e6736d32a47acb1 100644 (file)
#include <vector>
#include "xml/node.h"
-
+#include "jabber_whiteboard/defines.h"
namespace Inkscape
{
namespace Whiteboard
{
-
class KeyNodePair
{
public:
- KeyNodePair(const Glib::ustring &keyArg, const XML::Node *nodeArg)
- {
- key = keyArg;
- node = (XML::Node *)nodeArg;
- }
- KeyNodePair(const KeyNodePair &other)
- {
- key = other.key;
- node = other.node;
- }
- virtual ~KeyNodePair()
- {}
- Glib::ustring key;
- XML::Node *node;
+
+ KeyNodePair(const Glib::ustring &keyArg, const XML::Node *nodeArg)
+ {
+ this->key = keyArg;
+ this->node = (XML::Node *)nodeArg;
+ this->version = 0;
+ this->index = 0;
+ this->history.push_back(Configure("",""));
+ }
+
+ KeyNodePair(const Glib::ustring &keyArg, const XML::Node *nodeArg,
+ unsigned int version, signed int index)
+ {
+ this->key = keyArg;
+ this->node = (XML::Node *)nodeArg;
+ this->version = version;
+ this->index = index;
+ this->history.push_back(Configure("",""));
+ }
+
+ KeyNodePair(const KeyNodePair &other)
+ {
+ this->key = other.key;
+ this->node = other.node;
+ this->version = other.version;
+ this->index = other.index;
+ this->history = other.history;
+ }
+
+ virtual ~KeyNodePair() {}
+
+ Glib::ustring key;
+ XML::Node *node;
+ unsigned int version;
+ signed int index;
+ std::list< Configure > history;
};
class KeyNodeTable
virtual Glib::ustring generateKey(Glib::ustring);
+ virtual unsigned int getVersion(XML::Node *node);
+
+ virtual unsigned int incrementVersion(XML::Node *node);
+
+ virtual void addHistory(XML::Node *node, Glib::ustring attribute, Glib::ustring value);
+
+ virtual Glib::ustring getLastHistory(XML::Node *node, Glib::ustring attribute);
+
private:
std::vector<KeyNodePair> items;