Parser module
Scene parser and JSON serialization/deserialization
Files
Classes
-
template<typename Object, typename... Args>class Factory
- Abstract factory used to construct objects by name.
-
template<typename T>class DartsFactory
- A specialization of the Factory for darts objects read from json.
Typedefs
- using json = nlohmann::json
- Bring nlohmann::json into scope.
Functions
Defines
- #define DARTS_REGISTER_CLASS_IN_FACTORY(T, cls, name)
- Macro for registering an object constructor with a DartsFactory.
Typedef documentation
using json = nlohmann::json
#include <darts/json.h>
Bring nlohmann::json into scope.
Function documentation
void from_json(const json& j,
Transform& v)
#include <darts/json.h>
Parse a Transform from json.
void to_json(json& j,
const Transform& t)
#include <darts/json.h>
Serialize a Transform to json.
static SharedT create(const nlohmann:: json& j)
#include <darts/factory.h>
Allows creating a shared_ptr to a darts object, deducing the type from a "type" field in j
.
Define documentation
#define DARTS_REGISTER_CLASS_IN_FACTORY(T,
cls,
name)
#include <darts/factory.h>
Macro for registering an object constructor with a DartsFactory.