Blue Brain BioExplorer
jsonSerialization.h File Reference
Include dependency graph for jsonSerialization.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  core::GetInstances
 
struct  core::SchemaParam
 
struct  core::EnvironmentMapParam
 
struct  core::VideoStreamParam
 
struct  core::ObjectID
 
struct  core::ModelProperties
 
struct  core::ModelTransferFunction
 
struct  core::RPCLight
 
struct  core::InputPath
 
struct  core::FileStats
 
struct  core::FileType
 
struct  core::FileContent
 
struct  core::FileRoot
 
struct  core::DirectoryFiles
 
struct  core::DirectoryFileList
 
struct  core::ImageStreamingMethod
 
struct  core::ExitLaterSchedule
 

Namespaces

 core
 
 staticjson
 

Functions

 STATICJSON_DECLARE_ENUM (core::GeometryQuality, {"low", core::GeometryQuality::low}, {"medium", core::GeometryQuality::medium}, {"high", core::GeometryQuality::high})
 
 STATICJSON_DECLARE_ENUM (core::MemoryMode, {"shared", core::MemoryMode::shared}, {"replicated", core::MemoryMode::replicated})
 
 STATICJSON_DECLARE_ENUM (core::TextureType, {"diffuse", core::TextureType::diffuse}, {"normals", core::TextureType::normals}, {"bump", core::TextureType::bump}, {"specular", core::TextureType::specular}, {"emissive", core::TextureType::emissive}, {"opacity", core::TextureType::opacity}, {"reflection", core::TextureType::reflection}, {"refraction", core::TextureType::refraction}, {"occlusion", core::TextureType::occlusion})
 
template<size_t M, typename T >
auto toArray (glm::vec< M, T > &vec)
 
template<typename T >
auto toArray (glm::tquat< T > &quat)
 
template<size_t M, typename T >
auto toArray (std::vector< glm::vec< M, T >> &vecVec)
 
void staticjson::init (core::PropertyMap *, ObjectHandler *h)
 
void staticjson::init (core::ObjectID *s, ObjectHandler *h)
 
void staticjson::init (core::ModelProperties *s, ObjectHandler *h)
 
void staticjson::init (core::ModelTransferFunction *s, ObjectHandler *h)
 
void staticjson::init (core::GetInstances *g, ObjectHandler *h)
 
void staticjson::init (core::SchemaParam *s, ObjectHandler *h)
 
void staticjson::init (core::EnvironmentMapParam *s, ObjectHandler *h)
 
void staticjson::init (core::VideoStreamParam *s, ObjectHandler *h)
 
void staticjson::init (core::Chunk *c, ObjectHandler *h)
 
void staticjson::init (core::BinaryParam *s, ObjectHandler *h)
 
void staticjson::init (core::SnapshotParams *s, ObjectHandler *h)
 
void staticjson::init (core::Statistics *s, ObjectHandler *h)
 
void staticjson::init (core::Renderer::PickResult *p, ObjectHandler *h)
 
void staticjson::init (core::Camera *c, ObjectHandler *h)
 
void staticjson::init (core::Renderer *r, ObjectHandler *h)
 
void staticjson::init (core::ImageGenerator::ImageBase64 *i, ObjectHandler *h)
 
void staticjson::init (core::ColorMap *t, ObjectHandler *h)
 
void staticjson::init (core::TransferFunction *t, ObjectHandler *h)
 
void staticjson::init (core::Boxd *b, ObjectHandler *h)
 
void staticjson::init (core::Material *m, ObjectHandler *h)
 
void staticjson::init (core::Transformation *g, ObjectHandler *h)
 
void staticjson::init (core::ModelInstance *i, ObjectHandler *h)
 
void staticjson::init (core::ModelParams *g, ObjectHandler *h)
 
void staticjson::init (core::ModelDescriptor *g, ObjectHandler *h)
 
void staticjson::init (core::ClipPlane *g, ObjectHandler *h)
 
void staticjson::init (core::Scene *s, ObjectHandler *h)
 
void staticjson::init (core::ApplicationParameters *a, ObjectHandler *h)
 
void staticjson::init (core::RenderingParameters *r, ObjectHandler *h)
 
void staticjson::init (core::GeometryParameters *r, ObjectHandler *h)
 
void staticjson::init (core::VolumeParameters *v, ObjectHandler *h)
 
void staticjson::init (core::FieldParameters *v, ObjectHandler *h)
 
void staticjson::init (core::AnimationParameters *a, ObjectHandler *h)
 
void staticjson::init (core::LoaderInfo *a, ObjectHandler *h)
 
void staticjson::init (core::Light *a, ObjectHandler *h)
 
void staticjson::init (core::DirectionalLight *a, ObjectHandler *h)
 
void staticjson::init (core::SphereLight *a, ObjectHandler *h)
 
void staticjson::init (core::QuadLight *a, ObjectHandler *h)
 
void staticjson::init (core::SpotLight *a, ObjectHandler *h)
 
void staticjson::init (core::AmbientLight *a, ObjectHandler *h)
 
void staticjson::init (core::RPCLight *a, ObjectHandler *h)
 
void staticjson::init (core::InputPath *a, ObjectHandler *h)
 
void staticjson::init (core::FileType *a, ObjectHandler *h)
 
void staticjson::init (core::FileContent *a, ObjectHandler *h)
 
void staticjson::init (core::FileRoot *a, ObjectHandler *h)
 
void staticjson::init (core::DirectoryFiles *a, ObjectHandler *h)
 
void staticjson::init (core::DirectoryFileList *a, ObjectHandler *h)
 
void staticjson::init (core::ImageStreamingMethod *a, ObjectHandler *h)
 
void staticjson::init (core::ExitLaterSchedule *a, ObjectHandler *h)
 
template<class T >
std::string to_json (const T &obj)
 
template<>
std::string to_json (const core::PropertyMap &obj)
 
template<>
std::string to_json (const core::Version &obj)
 
template<>
std::string to_json (const core::Scene &scene)
 
template<typename T >
std::string toJSONReplacePropertyMap (const T &params, const std::string &propertyMapName, const core::PropertyMap &properties)
 
template<>
std::string to_json (const core::ModelProperties &props)
 
template<>
std::string to_json (const core::ModelParams &params)
 
template<>
std::string to_json (const core::BinaryParam &params)
 
template<>
std::string to_json (const core::RPCLight &light)
 
template<class T >
bool from_json (T &obj, const std::string &json)
 
template<>
bool from_json (core::Vector2d &obj, const std::string &json)
 
core::PropertyMap jsonToPropertyMap (const std::string &json)
 
template<typename T >
std::pair< bool, core::PropertyMapfromJSONWithPropertyMap (T &params, const std::string &json, const std::string &propertyMapName)
 
template<typename T >
bool modelBinaryParamsFromJson (T &params, const std::string &json)
 
template<>
bool from_json (core::BinaryParam &params, const std::string &json)
 
template<>
bool from_json (core::ModelParams &params, const std::string &json)
 
template<>
bool from_json (core::RPCLight &light, const std::string &json)
 

Function Documentation

◆ from_json() [1/5]

template<>
bool from_json ( core::BinaryParam params,
const std::string &  json 
)
inline

Definition at line 739 of file jsonSerialization.h.

◆ from_json() [2/5]

template<>
bool from_json ( core::ModelParams params,
const std::string &  json 
)
inline

Definition at line 745 of file jsonSerialization.h.

◆ from_json() [3/5]

template<>
bool from_json ( core::RPCLight light,
const std::string &  json 
)
inline

Definition at line 751 of file jsonSerialization.h.

◆ from_json() [4/5]

template<>
bool from_json ( core::Vector2d obj,
const std::string &  json 
)
inline

Definition at line 688 of file jsonSerialization.h.

◆ from_json() [5/5]

template<class T >
bool from_json ( T &  obj,
const std::string &  json 
)
inline

Definition at line 683 of file jsonSerialization.h.

◆ fromJSONWithPropertyMap()

template<typename T >
std::pair<bool, core::PropertyMap> fromJSONWithPropertyMap ( T &  params,
const std::string &  json,
const std::string &  propertyMapName 
)
inline

Definition at line 696 of file jsonSerialization.h.

◆ jsonToPropertyMap()

core::PropertyMap jsonToPropertyMap ( const std::string &  json)

Definition at line 669 of file jsonPropertyMap.h.

◆ modelBinaryParamsFromJson()

template<typename T >
bool modelBinaryParamsFromJson ( T &  params,
const std::string &  json 
)
inline

Definition at line 728 of file jsonSerialization.h.

◆ STATICJSON_DECLARE_ENUM() [1/3]

STATICJSON_DECLARE_ENUM ( core::GeometryQuality  ,
{"low", core::GeometryQuality::low}  ,
{"medium", core::GeometryQuality::medium}  ,
{"high", core::GeometryQuality::high}   
)

◆ STATICJSON_DECLARE_ENUM() [2/3]

STATICJSON_DECLARE_ENUM ( core::MemoryMode  ,
{"shared", core::MemoryMode::shared}  ,
{"replicated", core::MemoryMode::replicated}   
)

◆ STATICJSON_DECLARE_ENUM() [3/3]

STATICJSON_DECLARE_ENUM ( core::TextureType  ,
{"diffuse", core::TextureType::diffuse}  ,
{"normals", core::TextureType::normals}  ,
{"bump", core::TextureType::bump}  ,
{"specular", core::TextureType::specular}  ,
{"emissive", core::TextureType::emissive}  ,
{"opacity", core::TextureType::opacity}  ,
{"reflection", core::TextureType::reflection}  ,
{"refraction", core::TextureType::refraction}  ,
{"occlusion", core::TextureType::occlusion}   
)

◆ to_json() [1/8]

template<>
std::string to_json ( const core::BinaryParam params)
inline

Definition at line 671 of file jsonSerialization.h.

◆ to_json() [2/8]

template<>
std::string to_json ( const core::ModelParams params)
inline

Definition at line 665 of file jsonSerialization.h.

◆ to_json() [3/8]

template<>
std::string to_json ( const core::ModelProperties props)
inline

Definition at line 659 of file jsonSerialization.h.

◆ to_json() [4/8]

template<>
std::string to_json ( const core::PropertyMap obj)
inline

Definition at line 517 of file jsonPropertyMap.h.

◆ to_json() [5/8]

template<>
std::string to_json ( const core::RPCLight light)
inline

Definition at line 677 of file jsonSerialization.h.

◆ to_json() [6/8]

template<>
std::string to_json ( const core::Scene scene)
inline

Definition at line 639 of file jsonSerialization.h.

◆ to_json() [7/8]

template<>
std::string to_json ( const core::Version &  obj)
inline

Definition at line 633 of file jsonSerialization.h.

◆ to_json() [8/8]

template<class T >
std::string to_json ( const T &  obj)
inline

Definition at line 624 of file jsonSerialization.h.

◆ toArray() [1/3]

template<typename T >
auto toArray ( glm::tquat< T > &  quat)

Definition at line 184 of file jsonSerialization.h.

◆ toArray() [2/3]

template<size_t M, typename T >
auto toArray ( glm::vec< M, T > &  vec)

Definition at line 178 of file jsonSerialization.h.

◆ toArray() [3/3]

template<size_t M, typename T >
auto toArray ( std::vector< glm::vec< M, T >> &  vecVec)

Definition at line 190 of file jsonSerialization.h.

◆ toJSONReplacePropertyMap()

template<typename T >
std::string toJSONReplacePropertyMap ( const T &  params,
const std::string &  propertyMapName,
const core::PropertyMap properties 
)
inline

Definition at line 646 of file jsonSerialization.h.