diff options
Diffstat (limited to 'src/Real.cpp')
-rw-r--r-- | src/Real.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Real.cpp b/src/Real.cpp index 5416887..e527f6d 100644 --- a/src/Real.cpp +++ b/src/Real.cpp @@ -32,6 +32,17 @@ Real::Real(plist_t node) : Node(node) { } +Real::Real(PList::Real& d) : Node(PLIST_UINT) +{ + plist_set_real_val(_node, d.GetValue()); +} + +Real& Real::operator=(PList::Real& d) +{ + plist_free(_node); + _node = plist_copy(d.GetPlist()); +} + Real::Real(double d) : Node(PLIST_REAL) { plist_set_real_val(_node, d); @@ -41,6 +52,11 @@ Real::~Real() { } +Node* Real::Clone() +{ + return new Real(*this); +} + void Real::SetValue(double d) { plist_set_real_val(_node, d); |