29 #ifndef NOMLIB_JSON_VALUE_HPP
30 #define NOMLIB_JSON_VALUE_HPP
38 #include "nomlib/config.hpp"
39 #include "nomlib/json/config_json.hpp"
60 uint32 size (
void )
const;
64 JSONValueType type (
const std::string& key,
int index )
const;
66 JSONMemberType members (
int index )
const;
68 int get_int (
int index );
70 std::vector<int>
get_ints (
const std::string& key,
int index );
71 int get_int (
const std::string& key,
int index );
73 uint get_uint (
int index );
75 std::vector<uint>
get_uints (
int index );
76 uint get_uint (
const std::string& key );
80 const char* c_str (
int index );
81 std::string get_string (
int index );
84 const char* c_str (
const std::string& key );
85 std::string get_string (
const std::string& key,
int index );
87 bool get_bool (
int index );
89 std::vector<bool>
get_bools (
int index );
90 bool get_bool (
const std::string& key );
93 std::vector<ValueType> values (
int index );
95 ValueType value (
const std::string& key );
100 void insert (
const std::string& key,
int index );
105 void insert (
const std::string& key,
int value,
int index );
106 void insert (
const std::string& key, std::vector<int> values );
111 void insert (
const std::string& key, uint value,
int index );
112 void insert (
const std::string& key,
const std::vector<uint>& values );
117 void insert (
const std::string& key,
double value,
int index );
122 void insert (
const std::string& key,
float value,
int index );
127 void insert (
const std::string& key,
const char* value,
int index );
132 void insert (
const std::string& key,
const std::string& value,
int index );
133 void insert (
const std::string& key,
const std::vector<std::string>& values );
138 void insert (
const std::string& key,
bool value,
int index );
143 void insert (
const std::string& key,
const std::vector<ValueType>& values );
158 #endif // include guard defined
std::vector< bool > get_bools(int index)
Get bool array values by index.
void insert(const std::string &key, int index)
std::vector< int > get_ints(const std::string &key, int index)
Get signed integer array values by key, index.
std::vector< uint > get_uints(int index)
Get unsigned integer array values by index.
std::vector< std::string > get_strings(int index)
Get C++ string array values by index.
Interface class for JSON data types.
Value & operator=(const ValueType &other)
Copy assignment operator.
std::string key_
Identifying access string for an object node.
ValueType
Type of the value held by a Value object.