summaryrefslogtreecommitdiffstats
path: root/src/Dictionary.cpp
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-10-15 19:28:30 +0200
committerGravatar Jonathan Beck2009-10-15 19:28:30 +0200
commit8186a9d371b2a31122643f75c65cef4e438ac97b (patch)
treef059e0199ac4b8b0425c910a11f595b42490448a /src/Dictionary.cpp
parenta922b714c9b75fdc67735d674758d4eaedfd32f9 (diff)
downloadlibplist-8186a9d371b2a31122643f75c65cef4e438ac97b.tar.gz
libplist-8186a9d371b2a31122643f75c65cef4e438ac97b.tar.bz2
Fix various mistakes in C++ bindings.
Diffstat (limited to 'src/Dictionary.cpp')
-rw-r--r--src/Dictionary.cpp45
1 files changed, 42 insertions, 3 deletions
diff --git a/src/Dictionary.cpp b/src/Dictionary.cpp
index 5bace76..6879e33 100644
--- a/src/Dictionary.cpp
+++ b/src/Dictionary.cpp
@@ -21,6 +21,12 @@
#include <stdlib.h>
#include <plist/Dictionary.h>
#include <plist/Array.h>
+#include <plist/Boolean.h>
+#include <plist/Integer.h>
+#include <plist/Real.h>
+#include <plist/String.h>
+#include <plist/Date.h>
+#include <plist/Data.h>
namespace PList
{
@@ -50,13 +56,24 @@ Dictionary::Dictionary(plist_t node) : Structure()
_map[std::string(key)] = new Array(subnode);
break;
case PLIST_BOOLEAN:
+ _map[std::string(key)] = new Boolean(subnode);
+ break;
case PLIST_UINT:
+ _map[std::string(key)] = new Integer(subnode);
+ break;
case PLIST_REAL:
+ _map[std::string(key)] = new Real(subnode);
+ break;
case PLIST_STRING:
+ _map[std::string(key)] = new String(subnode);
+ break;
case PLIST_DATE:
+ _map[std::string(key)] = new Date(subnode);
+ break;
case PLIST_DATA:
+ _map[std::string(key)] = new Data(subnode);
+ break;
default:
- _map[std::string(key)] = new Node(subnode);
break;
}
@@ -96,13 +113,24 @@ Dictionary::Dictionary(Dictionary& d)
_map[std::string(key)] = new Array(subnode);
break;
case PLIST_BOOLEAN:
+ _map[std::string(key)] = new Boolean(subnode);
+ break;
case PLIST_UINT:
+ _map[std::string(key)] = new Integer(subnode);
+ break;
case PLIST_REAL:
+ _map[std::string(key)] = new Real(subnode);
+ break;
case PLIST_STRING:
+ _map[std::string(key)] = new String(subnode);
+ break;
case PLIST_DATE:
+ _map[std::string(key)] = new Date(subnode);
+ break;
case PLIST_DATA:
+ _map[std::string(key)] = new Data(subnode);
+ break;
default:
- _map[std::string(key)] = new Node(subnode);
break;
}
@@ -142,13 +170,24 @@ Dictionary& Dictionary::operator=(const Dictionary& d)
_map[std::string(key)] = new Array(subnode);
break;
case PLIST_BOOLEAN:
+ _map[std::string(key)] = new Boolean(subnode);
+ break;
case PLIST_UINT:
+ _map[std::string(key)] = new Integer(subnode);
+ break;
case PLIST_REAL:
+ _map[std::string(key)] = new Real(subnode);
+ break;
case PLIST_STRING:
+ _map[std::string(key)] = new String(subnode);
+ break;
case PLIST_DATE:
+ _map[std::string(key)] = new Date(subnode);
+ break;
case PLIST_DATA:
+ _map[std::string(key)] = new Data(subnode);
+ break;
default:
- _map[std::string(key)] = new Node(subnode);
break;
}