summaryrefslogtreecommitdiffstats
path: root/src/Integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Integer.cpp')
-rw-r--r--src/Integer.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Integer.cpp b/src/Integer.cpp
index 2a7429a..cf1ad33 100644
--- a/src/Integer.cpp
+++ b/src/Integer.cpp
@@ -32,6 +32,17 @@ Integer::Integer(plist_t node) : Node(node)
{
}
+Integer::Integer(PList::Integer& i) : Node(PLIST_UINT)
+{
+ plist_set_uint_val(_node, i.GetValue());
+}
+
+Integer& Integer::operator=(PList::Integer& i)
+{
+ plist_free(_node);
+ _node = plist_copy(i.GetPlist());
+}
+
Integer::Integer(uint64_t i) : Node(PLIST_UINT)
{
plist_set_uint_val(_node, i);
@@ -41,6 +52,11 @@ Integer::~Integer()
{
}
+Node* Integer::Clone()
+{
+ return new Integer(*this);
+}
+
void Integer::SetValue(uint64_t i)
{
plist_set_uint_val(_node, i);