From 8186a9d371b2a31122643f75c65cef4e438ac97b Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Thu, 15 Oct 2009 19:28:30 +0200 Subject: Fix various mistakes in C++ bindings. --- src/Dictionary.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'src/Dictionary.cpp') 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 #include #include +#include +#include +#include +#include +#include +#include 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; } -- cgit v1.1-32-gdbae