Pioneer
Loading...
Searching...
No Matches
Namespaces | Functions
JsonUtils.h File Reference
#include "Color.h"
#include "FrameId.h"
#include "Json.h"
#include "Quaternion.h"
#include "RefCounted.h"
#include "fixed.h"
#include "matrix3x3.h"
#include "matrix4x4.h"
#include "vector3.h"
Include dependency graph for JsonUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  FileSystem
 
namespace  JsonUtils
 

Functions

Json JsonUtils::LoadJson (RefCountedPtr< FileSystem::FileData > fd)
 
Json JsonUtils::LoadJsonFile (const std::string &filename, FileSystem::FileSource &source)
 
Json JsonUtils::LoadJsonDataFile (const std::string &filename, bool with_merge)
 
Json JsonUtils::LoadJsonSaveFile (const std::string &filename, FileSystem::FileSource &source)
 
void VectorToJson (Json &jsonObj, const vector2f &vec)
 
void VectorToJson (Json &jsonObj, const vector2d &vec)
 
void VectorToJson (Json &jsonObj, const vector3f &vec)
 
void VectorToJson (Json &jsonObj, const vector3d &vec)
 
void QuaternionToJson (Json &jsonObj, const Quaternionf &quat)
 
void QuaternionToJson (Json &jsonObj, const Quaterniond &quat)
 
void MatrixToJson (Json &jsonObj, const matrix3x3f &mat)
 
void MatrixToJson (Json &jsonObj, const matrix3x3d &mat)
 
void MatrixToJson (Json &jsonObj, const matrix4x4f &mat)
 
void MatrixToJson (Json &jsonObj, const matrix4x4d &mat)
 
void ColorToJson (Json &jsonObj, const Color3ub &col)
 
void ColorToJson (Json &jsonObj, const Color4ub &col)
 
void BinStrToJson (Json &jsonObj, const std::string &str)
 
template<typename T >
void to_json (Json &obj, const vector2< T > &vec)
 
template<typename T >
void to_json (Json &obj, const vector3< T > &vec)
 
template<typename T >
void to_json (Json &obj, const Quaternion< T > &vec)
 
template<typename T >
void to_json (Json &obj, const matrix3x3< T > &mat)
 
template<typename T >
void to_json (Json &obj, const matrix4x4< T > &mat)
 
void to_json (Json &obj, const Color3ub &col)
 
void to_json (Json &obj, const Color4ub &col)
 
void to_json (Json &obj, const FrameId &t)
 
void from_json (const Json &obj, fixed &n)
 
void to_json (Json &obj, const fixed &n)
 
void JsonToVector (vector2f *vec, const Json &jsonObj)
 
void JsonToVector (vector2d *vec, const Json &jsonObj)
 
void JsonToVector (vector3f *vec, const Json &jsonObj)
 
void JsonToVector (vector3d *vec, const Json &jsonObj)
 
void JsonToQuaternion (Quaternionf *pQuat, const Json &jsonObj)
 
void JsonToQuaternion (Quaterniond *pQuat, const Json &jsonObj)
 
void JsonToMatrix (matrix3x3f *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix3x3d *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix4x4f *pMat, const Json &jsonObj)
 
void JsonToMatrix (matrix4x4d *pMat, const Json &jsonObj)
 
void JsonToColor (Color3ub *pCol, const Json &jsonObj)
 
void JsonToColor (Color4ub *pCol, const Json &jsonObj)
 
std::string JsonToBinStr (const Json &jsonObj)
 
template<typename T >
void from_json (const Json &obj, vector2< T > &vec)
 
template<typename T >
void from_json (const Json &obj, vector3< T > &vec)
 
template<typename T >
void from_json (const Json &obj, Quaternion< T > &vec)
 
template<typename T >
void from_json (const Json &obj, matrix3x3< T > &vec)
 
template<typename T >
void from_json (const Json &obj, matrix4x4< T > &vec)
 
void from_json (const Json &obj, Color3ub &col)
 
void from_json (const Json &obj, Color4ub &col)
 
void from_json (const Json &obj, FrameId &id)
 

Function Documentation

◆ BinStrToJson()

void BinStrToJson ( Json jsonObj,
const std::string &  str 
)

◆ ColorToJson() [1/2]

void ColorToJson ( Json jsonObj,
const Color3ub col 
)

◆ ColorToJson() [2/2]

void ColorToJson ( Json jsonObj,
const Color4ub col 
)

◆ from_json() [1/9]

void from_json ( const Json obj,
Color3ub col 
)
inline
Here is the call graph for this function:

◆ from_json() [2/9]

void from_json ( const Json obj,
Color4ub col 
)
inline
Here is the call graph for this function:

◆ from_json() [3/9]

void from_json ( const Json obj,
fixed n 
)
Here is the call graph for this function:

◆ from_json() [4/9]

void from_json ( const Json obj,
FrameId id 
)
inline

◆ from_json() [5/9]

template<typename T >
void from_json ( const Json obj,
matrix3x3< T > &  vec 
)
Here is the call graph for this function:

◆ from_json() [6/9]

template<typename T >
void from_json ( const Json obj,
matrix4x4< T > &  vec 
)
Here is the call graph for this function:

◆ from_json() [7/9]

template<typename T >
void from_json ( const Json obj,
Quaternion< T > &  vec 
)
Here is the call graph for this function:

◆ from_json() [8/9]

template<typename T >
void from_json ( const Json obj,
vector2< T > &  vec 
)
Here is the call graph for this function:

◆ from_json() [9/9]

template<typename T >
void from_json ( const Json obj,
vector3< T > &  vec 
)
Here is the call graph for this function:

◆ JsonToBinStr()

std::string JsonToBinStr ( const Json jsonObj)

◆ JsonToColor() [1/2]

void JsonToColor ( Color3ub pCol,
const Json jsonObj 
)

◆ JsonToColor() [2/2]

void JsonToColor ( Color4ub pCol,
const Json jsonObj 
)

◆ JsonToMatrix() [1/4]

void JsonToMatrix ( matrix3x3d pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [2/4]

void JsonToMatrix ( matrix3x3f pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [3/4]

void JsonToMatrix ( matrix4x4d pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToMatrix() [4/4]

void JsonToMatrix ( matrix4x4f pMat,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToQuaternion() [1/2]

void JsonToQuaternion ( Quaterniond pQuat,
const Json jsonObj 
)

◆ JsonToQuaternion() [2/2]

void JsonToQuaternion ( Quaternionf pQuat,
const Json jsonObj 
)

◆ JsonToVector() [1/4]

void JsonToVector ( vector2d vec,
const Json jsonObj 
)

◆ JsonToVector() [2/4]

void JsonToVector ( vector2f vec,
const Json jsonObj 
)

◆ JsonToVector() [3/4]

void JsonToVector ( vector3d vec,
const Json jsonObj 
)
Here is the call graph for this function:

◆ JsonToVector() [4/4]

void JsonToVector ( vector3f vec,
const Json jsonObj 
)
Here is the call graph for this function:

◆ MatrixToJson() [1/4]

void MatrixToJson ( Json jsonObj,
const matrix3x3d mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [2/4]

void MatrixToJson ( Json jsonObj,
const matrix3x3f mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [3/4]

void MatrixToJson ( Json jsonObj,
const matrix4x4d mat 
)
Here is the call graph for this function:

◆ MatrixToJson() [4/4]

void MatrixToJson ( Json jsonObj,
const matrix4x4f mat 
)
Here is the call graph for this function:

◆ QuaternionToJson() [1/2]

void QuaternionToJson ( Json jsonObj,
const Quaterniond quat 
)

◆ QuaternionToJson() [2/2]

void QuaternionToJson ( Json jsonObj,
const Quaternionf quat 
)

◆ to_json() [1/9]

void to_json ( Json obj,
const Color3ub col 
)
inline
Here is the call graph for this function:

◆ to_json() [2/9]

void to_json ( Json obj,
const Color4ub col 
)
inline
Here is the call graph for this function:

◆ to_json() [3/9]

void to_json ( Json obj,
const fixed n 
)

◆ to_json() [4/9]

void to_json ( Json obj,
const FrameId t 
)
inline
Here is the call graph for this function:

◆ to_json() [5/9]

template<typename T >
void to_json ( Json obj,
const matrix3x3< T > &  mat 
)
Here is the call graph for this function:

◆ to_json() [6/9]

template<typename T >
void to_json ( Json obj,
const matrix4x4< T > &  mat 
)
Here is the call graph for this function:

◆ to_json() [7/9]

template<typename T >
void to_json ( Json obj,
const Quaternion< T > &  vec 
)
Here is the call graph for this function:

◆ to_json() [8/9]

template<typename T >
void to_json ( Json obj,
const vector2< T > &  vec 
)
Here is the call graph for this function:

◆ to_json() [9/9]

template<typename T >
void to_json ( Json obj,
const vector3< T > &  vec 
)
Here is the call graph for this function:

◆ VectorToJson() [1/4]

void VectorToJson ( Json jsonObj,
const vector2d vec 
)

◆ VectorToJson() [2/4]

void VectorToJson ( Json jsonObj,
const vector2f vec 
)

◆ VectorToJson() [3/4]

void VectorToJson ( Json jsonObj,
const vector3d vec 
)
Here is the call graph for this function:

◆ VectorToJson() [4/4]

void VectorToJson ( Json jsonObj,
const vector3f vec 
)
Here is the call graph for this function: