summaryrefslogtreecommitdiff
path: root/src/nodetree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nodetree.h')
-rw-r--r--src/nodetree.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nodetree.h b/src/nodetree.h
index 8052389..2ab9ec7 100644
--- a/src/nodetree.h
+++ b/src/nodetree.h
@@ -49,16 +49,17 @@ public:
class NodeTree
{
- friend class XmlParser;
public:
NodeTree();
~NodeTree();
nodeid_t createId();
- NodeIdList insertAsChild(nodeid_t parentid, nodeid_t id, node_t data) throw (std::exception);
+ NodeIdList insertAsChild(nodeid_t parentid, nodeid_t id, node_t data,
+ nodeid_t insertBeforeId) throw (std::exception);
NodeIdList remove(nodeid_t id) throw (std::exception);
- NodeIdList move(nodeid_t id, nodeid_t newParentId) throw (std::exception);
+ NodeIdList move(nodeid_t id, nodeid_t newParentId,
+ nodeid_t insertBeforeId) throw (std::exception);
NodeIdList updateData(nodeid_t id, const std::string &name,
const std::string &value) throw (std::exception);
node_t data(nodeid_t id) throw (std::exception);
@@ -70,13 +71,14 @@ public:
void toStdOut();
std::string toXML();
- void fromXML(std::string xml);
+ void fromXML(const std::string& xml);
nodeid_t nextid;
private:
+ friend class XmlParser;
Node* createNode(nodeid_t id);
- void insertChild(Node* parent, Node* child);
+ void insertChild(Node* parent, Node* child, nodeid_t insertBeforeId);
Node* root;
std::map<int, Node*> id2node;