|
@@ -32,6 +32,8 @@
|
|
#if WIN32
|
|
#if WIN32
|
|
#include <string>
|
|
#include <string>
|
|
#endif
|
|
#endif
|
|
|
|
+#include <vector>
|
|
|
|
+
|
|
namespace artis { namespace context {
|
|
namespace artis { namespace context {
|
|
|
|
|
|
class Value
|
|
class Value
|
|
@@ -99,6 +101,21 @@ public:
|
|
|
|
|
|
get_content(v);
|
|
get_content(v);
|
|
return v ? "true" : "false";
|
|
return v ? "true" : "false";
|
|
|
|
+ } if (is_double_vector()) {
|
|
|
|
+ std::vector < double > v;
|
|
|
|
+
|
|
|
|
+ get_content(v);
|
|
|
|
+ return "";
|
|
|
|
+ } else if (is_int_vector()) {
|
|
|
|
+ std::vector < int > v;
|
|
|
|
+
|
|
|
|
+ get_content(v);
|
|
|
|
+ return "";
|
|
|
|
+ } else if (is_bool_vector()) {
|
|
|
|
+ std::vector < bool > v;
|
|
|
|
+
|
|
|
|
+ get_content(v);
|
|
|
|
+ return "";
|
|
} else {
|
|
} else {
|
|
assert(false);
|
|
assert(false);
|
|
}
|
|
}
|
|
@@ -107,12 +124,21 @@ public:
|
|
bool is_bool() const
|
|
bool is_bool() const
|
|
{ return _type_id == typeid(bool).hash_code(); }
|
|
{ return _type_id == typeid(bool).hash_code(); }
|
|
|
|
|
|
|
|
+ bool is_bool_vector() const
|
|
|
|
+ { return _type_id == typeid(std::vector < bool >).hash_code(); }
|
|
|
|
+
|
|
bool is_int() const
|
|
bool is_int() const
|
|
{ return _type_id == typeid(int).hash_code(); }
|
|
{ return _type_id == typeid(int).hash_code(); }
|
|
|
|
|
|
|
|
+ bool is_int_vector() const
|
|
|
|
+ { return _type_id == typeid(std::vector < int >).hash_code(); }
|
|
|
|
+
|
|
bool is_double() const
|
|
bool is_double() const
|
|
{ return _type_id == typeid(double).hash_code(); }
|
|
{ return _type_id == typeid(double).hash_code(); }
|
|
|
|
|
|
|
|
+ bool is_double_vector() const
|
|
|
|
+ { return _type_id == typeid(std::vector < double >).hash_code(); }
|
|
|
|
+
|
|
private:
|
|
private:
|
|
void assign(const void* content, size_t size, size_t type_id)
|
|
void assign(const void* content, size_t size, size_t type_id)
|
|
{
|
|
{
|