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