Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Data Structures | Typedefs | Functions
JSON Namespace Reference

Contains all objects related to JSON reading / writing. More...

Data Structures

class  AbstractLeaf
 Abstract class inherited from Object, from which all leafs will derive. This class only contains a pure virtual fucntion, that can then be called for a Leaf without knowing its exact type. More...
 
class  Leaf
 Template class inherited from Object that stores a parameter of a .json file. This class does not have any child or structure, simply contains final values (double, int, string, ...). More...
 
class  List
 A List is a particular Node of which all children are of the same type and have the same specifier. More...
 
class  Node
 Inherits from JSON::Object, specialized in JSON Node. A Node owns a vector of Object. The Node's children can either be Leaf or other Node objects. This allows to store the tree structure of a .json file. More...
 
class  Object
 Abstract object in JSON tree structure. Can be specialized either in Node or in Leaf<T> with a specific type T. More...
 
class  Parser
 Class for static purpose only (i.e. not constructible) that gather data from a tree (JSON::Node object) read by JSON::Reader in a .json file. More...
 
class  Reader
 Class for static purpose only (i.e. not constructible) that handles reading .json files. Once a file read, it can also rewrite its data in a file. However this functionnality is not used for now. More...
 

Typedefs

typedef std::unique_ptr< ObjectChild
 Type definition for unique_ptr<Object>. Lighten the vector of Object owned by Node objects.
 

Functions

void JSONAssert (bool condition, std::string const &spec)
 Assertion function for JSON reading / writing. More...
 

Detailed Description

Contains all objects related to JSON reading / writing.

Function Documentation

◆ JSONAssert()

void JSON::JSONAssert ( bool  condition,
std::string const &  spec 
)

Assertion function for JSON reading / writing.

void JSONAssert(bool condition, std::string const& spec)

Parameters
conditionConsition to test in assertion.
specString to display in case of error.