summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/plist/Array.h4
-rw-r--r--include/plist/Boolean.h4
-rw-r--r--include/plist/Data.h4
-rw-r--r--include/plist/Date.h4
-rw-r--r--include/plist/Dictionary.h4
-rw-r--r--include/plist/Integer.h4
-rw-r--r--include/plist/Node.h9
-rw-r--r--include/plist/Real.h4
-rw-r--r--include/plist/String.h4
-rw-r--r--include/plist/Structure.h4
-rw-r--r--include/plist/Utils.h1
11 files changed, 25 insertions, 21 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h
index de4860e..8fd07cd 100644
--- a/include/plist/Array.h
+++ b/include/plist/Array.h
@@ -31,8 +31,8 @@ namespace PList
class Array : public Structure
{
public :
- Array();
- Array(plist_t node);
+ Array(Node* parent = NULL);
+ Array(plist_t node, Node* parent = NULL);
Array(Array& a);
Array& operator=(Array& a);
virtual ~Array();
diff --git a/include/plist/Boolean.h b/include/plist/Boolean.h
index b902171..149f8da 100644
--- a/include/plist/Boolean.h
+++ b/include/plist/Boolean.h
@@ -30,8 +30,8 @@ namespace PList
class Boolean : public Node
{
public :
- Boolean();
- Boolean(plist_t node);
+ Boolean(Node* parent = NULL);
+ Boolean(plist_t node, Node* parent = NULL);
Boolean(Boolean& b);
Boolean& operator=(Boolean& b);
Boolean(bool b);
diff --git a/include/plist/Data.h b/include/plist/Data.h
index 3db98f7..59a0096 100644
--- a/include/plist/Data.h
+++ b/include/plist/Data.h
@@ -31,8 +31,8 @@ namespace PList
class Data : public Node
{
public :
- Data();
- Data(plist_t node);
+ Data(Node* parent = NULL);
+ Data(plist_t node, Node* parent = NULL);
Data(Data& d);
Data& operator=(Data& d);
Data(const std::vector<char>& buff);
diff --git a/include/plist/Date.h b/include/plist/Date.h
index d3cd605..22565ef 100644
--- a/include/plist/Date.h
+++ b/include/plist/Date.h
@@ -31,8 +31,8 @@ namespace PList
class Date : public Node
{
public :
- Date();
- Date(plist_t node);
+ Date(Node* parent = NULL);
+ Date(plist_t node, Node* parent = NULL);
Date(Date& d);
Date& operator=(Date& d);
Date(timeval t);
diff --git a/include/plist/Dictionary.h b/include/plist/Dictionary.h
index dbb27d1..38604c8 100644
--- a/include/plist/Dictionary.h
+++ b/include/plist/Dictionary.h
@@ -32,8 +32,8 @@ namespace PList
class Dictionary : public Structure
{
public :
- Dictionary();
- Dictionary(plist_t node);
+ Dictionary(Node* parent = NULL);
+ Dictionary(plist_t node, Node* parent = NULL);
Dictionary(Dictionary& d);
Dictionary& operator=(Dictionary& d);
virtual ~Dictionary();
diff --git a/include/plist/Integer.h b/include/plist/Integer.h
index a86d0ca..fefcea1 100644
--- a/include/plist/Integer.h
+++ b/include/plist/Integer.h
@@ -30,8 +30,8 @@ namespace PList
class Integer : public Node
{
public :
- Integer();
- Integer(plist_t node);
+ Integer(Node* parent = NULL);
+ Integer(plist_t node, Node* parent = NULL);
Integer(Integer& i);
Integer& operator=(Integer& i);
Integer(uint64_t i);
diff --git a/include/plist/Node.h b/include/plist/Node.h
index 702d018..6e5411a 100644
--- a/include/plist/Node.h
+++ b/include/plist/Node.h
@@ -33,15 +33,18 @@ class Node
virtual ~Node();
virtual Node* Clone() = 0;
+ Node * GetParent();
+ void SetParent(Node* parent);
plist_type GetType();
plist_t GetPlist();
protected:
- Node();
- Node(plist_t node);
- Node(plist_type type);
+ Node(Node* parent = NULL);
+ Node(plist_t node, Node* parent = NULL);
+ Node(plist_type type, Node* parent = NULL);
plist_t _node;
+ Node* _parent;
};
};
diff --git a/include/plist/Real.h b/include/plist/Real.h
index b011c7a..755842e 100644
--- a/include/plist/Real.h
+++ b/include/plist/Real.h
@@ -30,8 +30,8 @@ namespace PList
class Real : public Node
{
public :
- Real();
- Real(plist_t node);
+ Real(Node* parent = NULL);
+ Real(plist_t node, Node* parent = NULL);
Real(Real& d);
Real& operator=(Real& d);
Real(double d);
diff --git a/include/plist/String.h b/include/plist/String.h
index 64181f3..58b8619 100644
--- a/include/plist/String.h
+++ b/include/plist/String.h
@@ -31,8 +31,8 @@ namespace PList
class String : public Node
{
public :
- String();
- String(plist_t node);
+ String(Node* parent = NULL);
+ String(plist_t node, Node* parent = NULL);
String(String& s);
String& operator=(String& s);
String(const std::string& s);
diff --git a/include/plist/Structure.h b/include/plist/Structure.h
index 4910439..6f100cc 100644
--- a/include/plist/Structure.h
+++ b/include/plist/Structure.h
@@ -40,8 +40,8 @@ class Structure : public Node
std::vector<char> ToBin();
protected:
- Structure();
- Structure(plist_type type);
+ Structure(Node* parent = NULL);
+ Structure(plist_type type, Node* parent = NULL);
private:
Structure(Structure& s);
diff --git a/include/plist/Utils.h b/include/plist/Utils.h
index 54baf02..65bec7e 100644
--- a/include/plist/Utils.h
+++ b/include/plist/Utils.h
@@ -30,6 +30,7 @@ namespace PList
class Utils
{
public:
+ static Node* FromPlist(plist_t node, Node* parent = NULL);
static Structure* FromXml(const std::string& in);
static Structure* FromBin(const std::vector<char>& in);