Go to the source code of this file.
◆ JSON_ARRAY_OBJECT_ACCESSORS
#define JSON_ARRAY_OBJECT_ACCESSORS |
( |
| type, |
|
|
| name ) |
Value: inline type add_##
name() { \
JsonObject& new_element = AddObjectElementToArrayProperty(#name); \
return type(new_element); \
} \
inline std::size_t name##_size() { return GetArrayProperty(#name).size(); } \
inline type
name(
size_t idx) { \
CHECK(idx < name##_size()); \
return type(GetArrayProperty(#name)[idx].ToObject()); \
}
Definition at line 43 of file message-macros.h.
◆ JSON_BOOL_ACCESSORS
#define JSON_BOOL_ACCESSORS |
( |
| name | ) |
|
Value: inline bool name()
const {
return object().at(#name).ToBool(); } \
inline void set_##
name(
bool b) { object()[#
name] = JsonValue::From(b); }
ZoneVector< InstructionOperand > * set_
Definition at line 24 of file message-macros.h.
◆ JSON_DYNAMIC_OBJECT_ACCESSORS
#define JSON_DYNAMIC_OBJECT_ACCESSORS |
( |
| name | ) |
|
Value: template <class T> \
return GetObject<T>(#name); \
}
Definition at line 37 of file message-macros.h.
◆ JSON_INT_ACCESSORS
#define JSON_INT_ACCESSORS |
( |
| name | ) |
|
Value: inline int name()
const {
return object().at(#name).ToNumber(); } \
object()[#
name] = JsonValue::From(
static_cast<double>(n)); \
}
Definition at line 28 of file message-macros.h.
◆ JSON_OBJECT_ACCESSORS
#define JSON_OBJECT_ACCESSORS |
( |
| type, |
|
|
| name ) |
◆ JSON_STRING_ACCESSORS
#define JSON_STRING_ACCESSORS |
( |
| name | ) |
|
Value: inline const std::string&
name()
const { \
return object().at(#name).ToString(); \
} \
inline void set_##
name(
const std::string& str) { \
object()[#
name] = JsonValue::From(str); \
} \
inline bool has_##
name()
const { \
return object().find(#name) != object().end(); \
}
Definition at line 13 of file message-macros.h.