summaryrefslogtreecommitdiff
path: root/src/core/script/Variant.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-10-18 00:56:14 +0000
committerandreas <andreas@daaaf23c-2e50-4459-9457-1e69db5a47bf>2014-10-18 00:56:14 +0000
commit25fb41044ca080b794cbf4e85ff10e74e571ea24 (patch)
tree59c5d648d32a2655778cefc26532c72efea963ea /src/core/script/Variant.cpp
parent14982ab94391bf9ec0b2ddba7f4517a0c834d0b1 (diff)
improved Variant.cpp, added ScriptEngine.hpp containing the script engine abstraction layer
git-svn-id: file:///var/local/svn/basicwriter@72 daaaf23c-2e50-4459-9457-1e69db5a47bf
Diffstat (limited to 'src/core/script/Variant.cpp')
-rw-r--r--src/core/script/Variant.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/script/Variant.cpp b/src/core/script/Variant.cpp
index 623b396..a379735 100644
--- a/src/core/script/Variant.cpp
+++ b/src/core/script/Variant.cpp
@@ -24,9 +24,12 @@ namespace script {
std::ostream& operator<< (std::ostream& os, const Variant &v)
{
switch (v.type) {
- case VariantType::none:
+ case VariantType::null:
os << "null";
break;
+ case VariantType::boolean:
+ os << (v.booleanValue ? "true" : "false");
+ break;
case VariantType::integer:
os << v.integerValue;
break;
@@ -34,12 +37,12 @@ std::ostream& operator<< (std::ostream& os, const Variant &v)
os << v.numberValue;
break;
case VariantType::string:
- os << "\"" << v.stringValue << "\"";
+ os << "\"" << v.getStringValue() << "\"";
break;
case VariantType::array: {
bool first = true;
os << "[";
- for (auto &v2 : v.arrayValue) {
+ for (auto &v2 : v.getArrayValue()) {
if (!first) {
os << ", ";
}
@@ -52,7 +55,7 @@ std::ostream& operator<< (std::ostream& os, const Variant &v)
case VariantType::map: {
bool first = true;
os << "{";
- for (auto &v2 : v.mapValue) {
+ for (auto &v2 : v.getMapValue()) {
if (!first) {
os << ", ";
}