summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Aaron Burghardt2014-08-15 21:59:01 -0400
committerGravatar Nikias Bassen2014-09-20 00:10:46 +0200
commitccd6f05fe1e6cd5a1611b0df78974fa39869013d (patch)
tree3c9e2c431d85cfb683de1724b121819aa16d29aa
parentbc147d80b5a608b8a0478041e5198093ecd767b8 (diff)
downloadlibplist-ccd6f05fe1e6cd5a1611b0df78974fa39869013d.tar.gz
libplist-ccd6f05fe1e6cd5a1611b0df78974fa39869013d.tar.bz2
Change Clone() to be const, which required constructors with const references and a const GetValue().
-rw-r--r--include/plist/Array.h4
-rw-r--r--include/plist/Boolean.h6
-rw-r--r--include/plist/Data.h6
-rw-r--r--include/plist/Date.h6
-rw-r--r--include/plist/Dictionary.h7
-rw-r--r--include/plist/Integer.h6
-rw-r--r--include/plist/Key.h6
-rw-r--r--include/plist/Node.h8
-rw-r--r--include/plist/Real.h6
-rw-r--r--include/plist/String.h6
-rw-r--r--include/plist/Uid.h6
-rw-r--r--src/Array.cpp4
-rw-r--r--src/Boolean.cpp6
-rw-r--r--src/Data.cpp6
-rw-r--r--src/Date.cpp6
-rw-r--r--src/Dictionary.cpp11
-rw-r--r--src/Integer.cpp6
-rw-r--r--src/Key.cpp6
-rw-r--r--src/Node.cpp6
-rw-r--r--src/Real.cpp6
-rw-r--r--src/String.cpp6
-rw-r--r--src/Uid.cpp6
22 files changed, 71 insertions, 65 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h
index 5c65588..69ff26f 100644
--- a/include/plist/Array.h
+++ b/include/plist/Array.h
@@ -33,11 +33,11 @@ class Array : public Structure
33public : 33public :
34 Array(Node* parent = NULL); 34 Array(Node* parent = NULL);
35 Array(plist_t node, Node* parent = NULL); 35 Array(plist_t node, Node* parent = NULL);
36 Array(Array& a); 36 Array(const Array& a);
37 Array& operator=(Array& a); 37 Array& operator=(Array& a);
38 virtual ~Array(); 38 virtual ~Array();
39 39
40 Node* Clone(); 40 Node* Clone() const;
41 41
42 Node* operator[](unsigned int index); 42 Node* operator[](unsigned int index);
43 void Append(Node* node); 43 void Append(Node* node);
diff --git a/include/plist/Boolean.h b/include/plist/Boolean.h
index 48489da..307a1ff 100644
--- a/include/plist/Boolean.h
+++ b/include/plist/Boolean.h
@@ -32,15 +32,15 @@ class Boolean : public Node
32public : 32public :
33 Boolean(Node* parent = NULL); 33 Boolean(Node* parent = NULL);
34 Boolean(plist_t node, Node* parent = NULL); 34 Boolean(plist_t node, Node* parent = NULL);
35 Boolean(Boolean& b); 35 Boolean(const Boolean& b);
36 Boolean& operator=(Boolean& b); 36 Boolean& operator=(Boolean& b);
37 Boolean(bool b); 37 Boolean(bool b);
38 virtual ~Boolean(); 38 virtual ~Boolean();
39 39
40 Node* Clone(); 40 Node* Clone() const;
41 41
42 void SetValue(bool b); 42 void SetValue(bool b);
43 bool GetValue(); 43 bool GetValue() const;
44}; 44};
45 45
46}; 46};
diff --git a/include/plist/Data.h b/include/plist/Data.h
index 3eb6031..c9c089b 100644
--- a/include/plist/Data.h
+++ b/include/plist/Data.h
@@ -33,15 +33,15 @@ class Data : public Node
33public : 33public :
34 Data(Node* parent = NULL); 34 Data(Node* parent = NULL);
35 Data(plist_t node, Node* parent = NULL); 35 Data(plist_t node, Node* parent = NULL);
36 Data(Data& d); 36 Data(const Data& d);
37 Data& operator=(Data& d); 37 Data& operator=(Data& d);
38 Data(const std::vector<char>& buff); 38 Data(const std::vector<char>& buff);
39 virtual ~Data(); 39 virtual ~Data();
40 40
41 Node* Clone(); 41 Node* Clone() const;
42 42
43 void SetValue(const std::vector<char>& buff); 43 void SetValue(const std::vector<char>& buff);
44 std::vector<char> GetValue(); 44 std::vector<char> GetValue() const;
45}; 45};
46 46
47}; 47};
diff --git a/include/plist/Date.h b/include/plist/Date.h
index e505b53..510a349 100644
--- a/include/plist/Date.h
+++ b/include/plist/Date.h
@@ -34,15 +34,15 @@ class Date : public Node
34public : 34public :
35 Date(Node* parent = NULL); 35 Date(Node* parent = NULL);
36 Date(plist_t node, Node* parent = NULL); 36 Date(plist_t node, Node* parent = NULL);
37 Date(Date& d); 37 Date(const Date& d);
38 Date& operator=(Date& d); 38 Date& operator=(Date& d);
39 Date(timeval t); 39 Date(timeval t);
40 virtual ~Date(); 40 virtual ~Date();
41 41
42 Node* Clone(); 42 Node* Clone() const;
43 43
44 void SetValue(timeval t); 44 void SetValue(timeval t);
45 timeval GetValue(); 45 timeval GetValue() const;
46}; 46};
47 47
48}; 48};
diff --git a/include/plist/Dictionary.h b/include/plist/Dictionary.h
index c270de3..7a29f14 100644
--- a/include/plist/Dictionary.h
+++ b/include/plist/Dictionary.h
@@ -34,11 +34,11 @@ class Dictionary : public Structure
34public : 34public :
35 Dictionary(Node* parent = NULL); 35 Dictionary(Node* parent = NULL);
36 Dictionary(plist_t node, Node* parent = NULL); 36 Dictionary(plist_t node, Node* parent = NULL);
37 Dictionary(Dictionary& d); 37 Dictionary(const Dictionary& d);
38 Dictionary& operator=(Dictionary& d); 38 Dictionary& operator=(Dictionary& d);
39 virtual ~Dictionary(); 39 virtual ~Dictionary();
40 40
41 Node* Clone(); 41 Node* Clone() const;
42 42
43 typedef std::map<std::string,Node*>::iterator iterator; 43 typedef std::map<std::string,Node*>::iterator iterator;
44 44
@@ -46,7 +46,8 @@ public :
46 iterator Begin(); 46 iterator Begin();
47 iterator End(); 47 iterator End();
48 iterator Find(const std::string& key); 48 iterator Find(const std::string& key);
49 iterator Set(const std::string& key, Node* node); 49 iterator Set(const std::string& key, const Node* node);
50 iterator Set(const std::string& key, const Node& node);
50 iterator Insert(const std::string& key, Node* node) PLIST_WARN_DEPRECATED("use Set() instead"); 51 iterator Insert(const std::string& key, Node* node) PLIST_WARN_DEPRECATED("use Set() instead");
51 void Remove(Node* node); 52 void Remove(Node* node);
52 void Remove(const std::string& key); 53 void Remove(const std::string& key);
diff --git a/include/plist/Integer.h b/include/plist/Integer.h
index 86af0dd..adbc39a 100644
--- a/include/plist/Integer.h
+++ b/include/plist/Integer.h
@@ -32,15 +32,15 @@ class Integer : public Node
32public : 32public :
33 Integer(Node* parent = NULL); 33 Integer(Node* parent = NULL);
34 Integer(plist_t node, Node* parent = NULL); 34 Integer(plist_t node, Node* parent = NULL);
35 Integer(Integer& i); 35 Integer(const Integer& i);
36 Integer& operator=(Integer& i); 36 Integer& operator=(Integer& i);
37 Integer(uint64_t i); 37 Integer(uint64_t i);
38 virtual ~Integer(); 38 virtual ~Integer();
39 39
40 Node* Clone(); 40 Node* Clone() const;
41 41
42 void SetValue(uint64_t i); 42 void SetValue(uint64_t i);
43 uint64_t GetValue(); 43 uint64_t GetValue() const;
44}; 44};
45 45
46}; 46};
diff --git a/include/plist/Key.h b/include/plist/Key.h
index 3de09cf..c680f1c 100644
--- a/include/plist/Key.h
+++ b/include/plist/Key.h
@@ -33,15 +33,15 @@ class Key : public Node
33public : 33public :
34 Key(Node* parent = NULL); 34 Key(Node* parent = NULL);
35 Key(plist_t node, Node* parent = NULL); 35 Key(plist_t node, Node* parent = NULL);
36 Key(Key& s); 36 Key(const Key& s);
37 Key& operator=(Key& s); 37 Key& operator=(Key& s);
38 Key(const std::string& s); 38 Key(const std::string& s);
39 virtual ~Key(); 39 virtual ~Key();
40 40
41 Node* Clone(); 41 Node* Clone() const;
42 42
43 void SetValue(const std::string& s); 43 void SetValue(const std::string& s);
44 std::string GetValue(); 44 std::string GetValue() const;
45}; 45};
46 46
47}; 47};
diff --git a/include/plist/Node.h b/include/plist/Node.h
index fdd26ee..9068880 100644
--- a/include/plist/Node.h
+++ b/include/plist/Node.h
@@ -32,11 +32,11 @@ class Node
32public : 32public :
33 virtual ~Node(); 33 virtual ~Node();
34 34
35 virtual Node* Clone() = 0; 35 virtual Node* Clone() const = 0;
36 36
37 Node * GetParent(); 37 Node * GetParent() const;
38 plist_type GetType(); 38 plist_type GetType() const;
39 plist_t GetPlist(); 39 plist_t GetPlist() const;
40 40
41 static Node* FromPlist(plist_t node, Node* parent = NULL); 41 static Node* FromPlist(plist_t node, Node* parent = NULL);
42 42
diff --git a/include/plist/Real.h b/include/plist/Real.h
index a89eb4a..c2d55f8 100644
--- a/include/plist/Real.h
+++ b/include/plist/Real.h
@@ -32,15 +32,15 @@ class Real : public Node
32public : 32public :
33 Real(Node* parent = NULL); 33 Real(Node* parent = NULL);
34 Real(plist_t node, Node* parent = NULL); 34 Real(plist_t node, Node* parent = NULL);
35 Real(Real& d); 35 Real(const Real& d);
36 Real& operator=(Real& d); 36 Real& operator=(Real& d);
37 Real(double d); 37 Real(double d);
38 virtual ~Real(); 38 virtual ~Real();
39 39
40 Node* Clone(); 40 Node* Clone() const;
41 41
42 void SetValue(double d); 42 void SetValue(double d);
43 double GetValue(); 43 double GetValue() const;
44}; 44};
45 45
46}; 46};
diff --git a/include/plist/String.h b/include/plist/String.h
index a1906aa..80290b3 100644
--- a/include/plist/String.h
+++ b/include/plist/String.h
@@ -33,15 +33,15 @@ class String : public Node
33public : 33public :
34 String(Node* parent = NULL); 34 String(Node* parent = NULL);
35 String(plist_t node, Node* parent = NULL); 35 String(plist_t node, Node* parent = NULL);
36 String(String& s); 36 String(const String& s);
37 String& operator=(String& s); 37 String& operator=(String& s);
38 String(const std::string& s); 38 String(const std::string& s);
39 virtual ~String(); 39 virtual ~String();
40 40
41 Node* Clone(); 41 Node* Clone() const;
42 42
43 void SetValue(const std::string& s); 43 void SetValue(const std::string& s);
44 std::string GetValue(); 44 std::string GetValue() const;
45}; 45};
46 46
47}; 47};
diff --git a/include/plist/Uid.h b/include/plist/Uid.h
index e11b022..2d8375b 100644
--- a/include/plist/Uid.h
+++ b/include/plist/Uid.h
@@ -32,15 +32,15 @@ class Uid : public Node
32public : 32public :
33 Uid(Node* parent = NULL); 33 Uid(Node* parent = NULL);
34 Uid(plist_t node, Node* parent = NULL); 34 Uid(plist_t node, Node* parent = NULL);
35 Uid(Uid& i); 35 Uid(const Uid& i);
36 Uid& operator=(Uid& i); 36 Uid& operator=(Uid& i);
37 Uid(uint64_t i); 37 Uid(uint64_t i);
38 virtual ~Uid(); 38 virtual ~Uid();
39 39
40 Node* Clone(); 40 Node* Clone() const;
41 41
42 void SetValue(uint64_t i); 42 void SetValue(uint64_t i);
43 uint64_t GetValue(); 43 uint64_t GetValue() const;
44}; 44};
45 45
46}; 46};
diff --git a/src/Array.cpp b/src/Array.cpp
index a4ea02a..3036476 100644
--- a/src/Array.cpp
+++ b/src/Array.cpp
@@ -43,7 +43,7 @@ Array::Array(plist_t node, Node* parent) : Structure(parent)
43 } 43 }
44} 44}
45 45
46Array::Array(PList::Array& a) : Structure() 46Array::Array(const PList::Array& a) : Structure()
47{ 47{
48 _array.clear(); 48 _array.clear();
49 _node = plist_copy(a.GetPlist()); 49 _node = plist_copy(a.GetPlist());
@@ -85,7 +85,7 @@ Array::~Array()
85 _array.clear(); 85 _array.clear();
86} 86}
87 87
88Node* Array::Clone() 88Node* Array::Clone() const
89{ 89{
90 return new Array(*this); 90 return new Array(*this);
91} 91}
diff --git a/src/Boolean.cpp b/src/Boolean.cpp
index e58472f..4608eaf 100644
--- a/src/Boolean.cpp
+++ b/src/Boolean.cpp
@@ -32,7 +32,7 @@ Boolean::Boolean(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Boolean::Boolean(PList::Boolean& b) : Node(PLIST_BOOLEAN) 35Boolean::Boolean(const PList::Boolean& b) : Node(PLIST_BOOLEAN)
36{ 36{
37 plist_set_bool_val(_node, b.GetValue()); 37 plist_set_bool_val(_node, b.GetValue());
38} 38}
@@ -53,7 +53,7 @@ Boolean::~Boolean()
53{ 53{
54} 54}
55 55
56Node* Boolean::Clone() 56Node* Boolean::Clone() const
57{ 57{
58 return new Boolean(*this); 58 return new Boolean(*this);
59} 59}
@@ -63,7 +63,7 @@ void Boolean::SetValue(bool b)
63 plist_set_bool_val(_node, b); 63 plist_set_bool_val(_node, b);
64} 64}
65 65
66bool Boolean::GetValue() 66bool Boolean::GetValue() const
67{ 67{
68 uint8_t b = 0; 68 uint8_t b = 0;
69 plist_get_bool_val(_node, &b); 69 plist_get_bool_val(_node, &b);
diff --git a/src/Data.cpp b/src/Data.cpp
index df5c1c7..2e93007 100644
--- a/src/Data.cpp
+++ b/src/Data.cpp
@@ -32,7 +32,7 @@ Data::Data(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Data::Data(PList::Data& d) : Node(PLIST_DATA) 35Data::Data(const PList::Data& d) : Node(PLIST_DATA)
36{ 36{
37 std::vector<char> b = d.GetValue(); 37 std::vector<char> b = d.GetValue();
38 plist_set_data_val(_node, &b[0], b.size()); 38 plist_set_data_val(_node, &b[0], b.size());
@@ -54,7 +54,7 @@ Data::~Data()
54{ 54{
55} 55}
56 56
57Node* Data::Clone() 57Node* Data::Clone() const
58{ 58{
59 return new Data(*this); 59 return new Data(*this);
60} 60}
@@ -64,7 +64,7 @@ void Data::SetValue(const std::vector<char>& buff)
64 plist_set_data_val(_node, &buff[0], buff.size()); 64 plist_set_data_val(_node, &buff[0], buff.size());
65} 65}
66 66
67std::vector<char> Data::GetValue() 67std::vector<char> Data::GetValue() const
68{ 68{
69 char* buff = NULL; 69 char* buff = NULL;
70 uint64_t length = 0; 70 uint64_t length = 0;
diff --git a/src/Date.cpp b/src/Date.cpp
index 2430184..4b5e0a1 100644
--- a/src/Date.cpp
+++ b/src/Date.cpp
@@ -32,7 +32,7 @@ Date::Date(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Date::Date(PList::Date& d) : Node(PLIST_DATE) 35Date::Date(const PList::Date& d) : Node(PLIST_DATE)
36{ 36{
37 timeval t = d.GetValue(); 37 timeval t = d.GetValue();
38 plist_set_date_val(_node, t.tv_sec, t.tv_usec); 38 plist_set_date_val(_node, t.tv_sec, t.tv_usec);
@@ -54,7 +54,7 @@ Date::~Date()
54{ 54{
55} 55}
56 56
57Node* Date::Clone() 57Node* Date::Clone() const
58{ 58{
59 return new Date(*this); 59 return new Date(*this);
60} 60}
@@ -64,7 +64,7 @@ void Date::SetValue(timeval t)
64 plist_set_date_val(_node, t.tv_sec, t.tv_usec); 64 plist_set_date_val(_node, t.tv_sec, t.tv_usec);
65} 65}
66 66
67timeval Date::GetValue() 67timeval Date::GetValue() const
68{ 68{
69 int32_t tv_sec = 0; 69 int32_t tv_sec = 0;
70 int32_t tv_usec = 0; 70 int32_t tv_usec = 0;
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp
index 6009ea4..98eeb93 100644
--- a/src/Dictionary.cpp
+++ b/src/Dictionary.cpp
@@ -49,7 +49,7 @@ Dictionary::Dictionary(plist_t node, Node* parent) : Structure(parent)
49 free(it); 49 free(it);
50} 50}
51 51
52Dictionary::Dictionary(PList::Dictionary& d) : Structure() 52Dictionary::Dictionary(const PList::Dictionary& d) : Structure()
53{ 53{
54 for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++) 54 for (Dictionary::iterator it = _map.begin(); it != _map.end(); it++)
55 { 55 {
@@ -115,7 +115,7 @@ Dictionary::~Dictionary()
115 _map.clear(); 115 _map.clear();
116} 116}
117 117
118Node* Dictionary::Clone() 118Node* Dictionary::Clone() const
119{ 119{
120 return new Dictionary(*this); 120 return new Dictionary(*this);
121} 121}
@@ -140,7 +140,7 @@ Dictionary::iterator Dictionary::Find(const std::string& key)
140 return _map.find(key); 140 return _map.find(key);
141} 141}
142 142
143Dictionary::iterator Dictionary::Set(const std::string& key, Node* node) 143Dictionary::iterator Dictionary::Set(const std::string& key, const Node* node)
144{ 144{
145 if (node) 145 if (node)
146 { 146 {
@@ -154,6 +154,11 @@ Dictionary::iterator Dictionary::Set(const std::string& key, Node* node)
154 return iterator(this->_map.end()); 154 return iterator(this->_map.end());
155} 155}
156 156
157Dictionary::iterator Dictionary::Set(const std::string& key, const Node& node)
158{
159 return Set(key, &node);
160}
161
157Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node) 162Dictionary::iterator Dictionary::Insert(const std::string& key, Node* node)
158{ 163{
159 return this->Set(key, node); 164 return this->Set(key, node);
diff --git a/src/Integer.cpp b/src/Integer.cpp
index fed03f6..04315d7 100644
--- a/src/Integer.cpp
+++ b/src/Integer.cpp
@@ -32,7 +32,7 @@ Integer::Integer(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Integer::Integer(PList::Integer& i) : Node(PLIST_UINT) 35Integer::Integer(const PList::Integer& i) : Node(PLIST_UINT)
36{ 36{
37 plist_set_uint_val(_node, i.GetValue()); 37 plist_set_uint_val(_node, i.GetValue());
38} 38}
@@ -53,7 +53,7 @@ Integer::~Integer()
53{ 53{
54} 54}
55 55
56Node* Integer::Clone() 56Node* Integer::Clone() const
57{ 57{
58 return new Integer(*this); 58 return new Integer(*this);
59} 59}
@@ -63,7 +63,7 @@ void Integer::SetValue(uint64_t i)
63 plist_set_uint_val(_node, i); 63 plist_set_uint_val(_node, i);
64} 64}
65 65
66uint64_t Integer::GetValue() 66uint64_t Integer::GetValue() const
67{ 67{
68 uint64_t i = 0; 68 uint64_t i = 0;
69 plist_get_uint_val(_node, &i); 69 plist_get_uint_val(_node, &i);
diff --git a/src/Key.cpp b/src/Key.cpp
index 4145f05..e3ccbe6 100644
--- a/src/Key.cpp
+++ b/src/Key.cpp
@@ -32,7 +32,7 @@ Key::Key(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Key::Key(PList::Key& k) : Node(PLIST_UINT) 35Key::Key(const PList::Key& k) : Node(PLIST_UINT)
36{ 36{
37 plist_set_key_val(_node, k.GetValue().c_str()); 37 plist_set_key_val(_node, k.GetValue().c_str());
38} 38}
@@ -53,7 +53,7 @@ Key::~Key()
53{ 53{
54} 54}
55 55
56Node* Key::Clone() 56Node* Key::Clone() const
57{ 57{
58 return new Key(*this); 58 return new Key(*this);
59} 59}
@@ -63,7 +63,7 @@ void Key::SetValue(const std::string& s)
63 plist_set_key_val(_node, s.c_str()); 63 plist_set_key_val(_node, s.c_str());
64} 64}
65 65
66std::string Key::GetValue() 66std::string Key::GetValue() const
67{ 67{
68 char* s = NULL; 68 char* s = NULL;
69 plist_get_key_val(_node, &s); 69 plist_get_key_val(_node, &s);
diff --git a/src/Node.cpp b/src/Node.cpp
index 516d1ae..aaadd52 100644
--- a/src/Node.cpp
+++ b/src/Node.cpp
@@ -93,7 +93,7 @@ Node::~Node()
93 _parent = NULL; 93 _parent = NULL;
94} 94}
95 95
96plist_type Node::GetType() 96plist_type Node::GetType() const
97{ 97{
98 if (_node) 98 if (_node)
99 { 99 {
@@ -102,12 +102,12 @@ plist_type Node::GetType()
102 return PLIST_NONE; 102 return PLIST_NONE;
103} 103}
104 104
105plist_t Node::GetPlist() 105plist_t Node::GetPlist() const
106{ 106{
107 return _node; 107 return _node;
108} 108}
109 109
110Node* Node::GetParent() 110Node* Node::GetParent() const
111{ 111{
112 return _parent; 112 return _parent;
113} 113}
diff --git a/src/Real.cpp b/src/Real.cpp
index 768d07c..ec300c9 100644
--- a/src/Real.cpp
+++ b/src/Real.cpp
@@ -32,7 +32,7 @@ Real::Real(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Real::Real(PList::Real& d) : Node(PLIST_UINT) 35Real::Real(const PList::Real& d) : Node(PLIST_UINT)
36{ 36{
37 plist_set_real_val(_node, d.GetValue()); 37 plist_set_real_val(_node, d.GetValue());
38} 38}
@@ -53,7 +53,7 @@ Real::~Real()
53{ 53{
54} 54}
55 55
56Node* Real::Clone() 56Node* Real::Clone() const
57{ 57{
58 return new Real(*this); 58 return new Real(*this);
59} 59}
@@ -63,7 +63,7 @@ void Real::SetValue(double d)
63 plist_set_real_val(_node, d); 63 plist_set_real_val(_node, d);
64} 64}
65 65
66double Real::GetValue() 66double Real::GetValue() const
67{ 67{
68 double d = 0.; 68 double d = 0.;
69 plist_get_real_val(_node, &d); 69 plist_get_real_val(_node, &d);
diff --git a/src/String.cpp b/src/String.cpp
index bf65605..09b47b5 100644
--- a/src/String.cpp
+++ b/src/String.cpp
@@ -32,7 +32,7 @@ String::String(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35String::String(PList::String& s) : Node(PLIST_UINT) 35String::String(const PList::String& s) : Node(PLIST_UINT)
36{ 36{
37 plist_set_string_val(_node, s.GetValue().c_str()); 37 plist_set_string_val(_node, s.GetValue().c_str());
38} 38}
@@ -53,7 +53,7 @@ String::~String()
53{ 53{
54} 54}
55 55
56Node* String::Clone() 56Node* String::Clone() const
57{ 57{
58 return new String(*this); 58 return new String(*this);
59} 59}
@@ -63,7 +63,7 @@ void String::SetValue(const std::string& s)
63 plist_set_string_val(_node, s.c_str()); 63 plist_set_string_val(_node, s.c_str());
64} 64}
65 65
66std::string String::GetValue() 66std::string String::GetValue() const
67{ 67{
68 char* s = NULL; 68 char* s = NULL;
69 plist_get_string_val(_node, &s); 69 plist_get_string_val(_node, &s);
diff --git a/src/Uid.cpp b/src/Uid.cpp
index 02a59b3..440dec4 100644
--- a/src/Uid.cpp
+++ b/src/Uid.cpp
@@ -32,7 +32,7 @@ Uid::Uid(plist_t node, Node* parent) : Node(node, parent)
32{ 32{
33} 33}
34 34
35Uid::Uid(PList::Uid& i) : Node(PLIST_UID) 35Uid::Uid(const PList::Uid& i) : Node(PLIST_UID)
36{ 36{
37 plist_set_uid_val(_node, i.GetValue()); 37 plist_set_uid_val(_node, i.GetValue());
38} 38}
@@ -53,7 +53,7 @@ Uid::~Uid()
53{ 53{
54} 54}
55 55
56Node* Uid::Clone() 56Node* Uid::Clone() const
57{ 57{
58 return new Uid(*this); 58 return new Uid(*this);
59} 59}
@@ -63,7 +63,7 @@ void Uid::SetValue(uint64_t i)
63 plist_set_uid_val(_node, i); 63 plist_set_uid_val(_node, i);
64} 64}
65 65
66uint64_t Uid::GetValue() 66uint64_t Uid::GetValue() const
67{ 67{
68 uint64_t i = 0; 68 uint64_t i = 0;
69 plist_get_uid_val(_node, &i); 69 plist_get_uid_val(_node, &i);