5#ifndef EILE_MIT_WEILE_VALUE_TYPE_HELPERS_HPP
6#define EILE_MIT_WEILE_VALUE_TYPE_HELPERS_HPP
8#include <unordered_map>
11#include "rapidjson/document.h"
42 {
"int", ValueType::intType },
43 {
"uint", ValueType::uintType},
44 {
"bool", ValueType::boolType},
45 {
"float", ValueType::floatType},
46 {
"double", ValueType::doubleType},
47 {
"int64t", ValueType::int64tType},
48 {
"uint64t", ValueType::uint64tType},
49 {
"string", ValueType::stringType}
58 { ValueType::intType,
"int" },
59 { ValueType::uintType,
"uint"},
60 { ValueType::boolType,
"bool"},
61 { ValueType::floatType,
"float"},
62 { ValueType::doubleType,
"double"},
63 { ValueType::int64tType,
"int64t"},
64 { ValueType::uint64tType,
"uint64t"},
65 { ValueType::stringType,
"string"},
A serializable value, used for writing values into json.
Definition serializable_value.hpp:28
SerializableValue(T val)
Definition serializable_value.hpp:30
Helper functions for serializing and deserializing instances of SerializableValue.
rapidjson::Value get_json_value< unsigned int >(unsigned int val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for unsigned int.
Definition value_type_helpers.hpp:129
rapidjson::Value get_json_value_type< unsigned int >(unsigned int val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for unsigned int.
Definition value_type_helpers.hpp:203
rapidjson::Value get_json_value< std::string >(std::string val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for string.
Definition value_type_helpers.hpp:156
rapidjson::Value get_json_value_type< float >(float val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for float.
Definition value_type_helpers.hpp:185
rapidjson::Value get_json_value< float >(float val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for float.
Definition value_type_helpers.hpp:111
rapidjson::Value get_json_value< bool >(bool val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for bool.
Definition value_type_helpers.hpp:93
rapidjson::Value get_json_value_type< int64_t >(int64_t val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for int64_t.
Definition value_type_helpers.hpp:212
rapidjson::Value get_json_value_type< uint64_t >(uint64_t val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for uint64_t.
Definition value_type_helpers.hpp:221
rapidjson::Value get_json_value_type< int >(int val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for int.
Definition value_type_helpers.hpp:176
const std::unordered_map< ValueType, std::string > _value_type_to_string
Converts a value type to a string.
Definition value_type_helpers.hpp:57
rapidjson::Value get_json_value_type< double >(double val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for double.
Definition value_type_helpers.hpp:194
ValueType
Enum for the supported value types.
Definition value_type_helpers.hpp:24
rapidjson::Value get_json_value< uint64_t >(uint64_t val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for uint64_t.
Definition value_type_helpers.hpp:147
rapidjson::Value get_json_value< double >(double val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for double.
Definition value_type_helpers.hpp:120
rapidjson::Value get_json_value_type< std::string >(std::string val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for string.
Definition value_type_helpers.hpp:230
rapidjson::Value get_json_value_type< bool >(bool val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value_type for bool.
Definition value_type_helpers.hpp:167
rapidjson::Value get_json_value< int64_t >(int64_t val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for int64_t.
Definition value_type_helpers.hpp:138
rapidjson::Value get_json_value< int >(int val, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator)
specialization of get_json_value for int.
Definition value_type_helpers.hpp:102
const std::unordered_map< std::string, ValueType > _string_to_value_type
Converts a string to a value type.
Definition value_type_helpers.hpp:41