Header.
More...
#include <json/value.h>
Go to the source code of this file.
|
| osvr |
| The main namespace for all C++ elements of the framework, internal and external.
|
|
|
#define | OSVR_DECLARE_JSON_TYPE_GETTER(TYPENAME, METHOD) |
|
|
template<typename T > |
T | osvr::vbtracker::json_cast (Json::Value const &val) |
|
template<typename T > |
void | osvr::vbtracker::getOptionalParameter (T &dest, Json::Value const &obj, const char *key) |
| Gets an optional parameter from a JSON object: if it's not present, the existing value is left there. More...
|
|
template<typename T , Json::Value::ArrayIndex N> |
void | osvr::vbtracker::getOptionalParameter (T(&dest)[N], Json::Value const &obj, const char *key) |
| Gets an optional array parameter from a JSON object: if it's not present and the exact size, the existing value is left there. More...
|
|
Header.
- Date
- 2015
- Author
- Sensics, Inc. http://sensics.com/osvr
§ OSVR_DECLARE_JSON_TYPE_GETTER
#define OSVR_DECLARE_JSON_TYPE_GETTER |
( |
|
TYPENAME, |
|
|
|
METHOD |
|
) |
| |
Value:template <> struct JsonTypeGetter<TYPENAME> { \
static TYPENAME
apply(Json::Value
const &val) {
return val.METHOD(); } \
};
typename F::template apply< Args... > apply
Apply an alias class.
Definition: Apply.h:44
§ getOptionalParameter() [1/2]
template<typename T >
void osvr::vbtracker::getOptionalParameter |
( |
T & |
dest, |
|
|
Json::Value const & |
obj, |
|
|
const char * |
key |
|
) |
| |
|
inline |
Gets an optional parameter from a JSON object: if it's not present, the existing value is left there.
§ getOptionalParameter() [2/2]
template<typename T , Json::Value::ArrayIndex N>
void osvr::vbtracker::getOptionalParameter |
( |
T(&) |
dest[N], |
|
|
Json::Value const & |
obj, |
|
|
const char * |
key |
|
) |
| |
|
inline |
Gets an optional array parameter from a JSON object: if it's not present and the exact size, the existing value is left there.