Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Protected Attributes
JSON::Object Class Reference

Abstract object in JSON tree structure. Can be specialized either in Node or in Leaf<T> with a specific type T. More...

#include <jsonObject.h>

Inheritance diagram for JSON::Object:
[legend]

Public Member Functions

 Object (std::string const &t_specifier)
 Construtor with one paramter that initializes specifier. More...
 
virtual ~Object ()
 Destructor.
 
std::string getSpecifier () const
 
virtual bool isNode () const
 Tells if the Object is a Node or not. This function is reimplemented in Node. More...
 
 Object (std::string const &t_specifier)
 Construtor with one paramter that initializes specifier. More...
 
virtual ~Object ()
 Destructor.
 
std::string getSpecifier () const
 
virtual bool isNode () const
 Tells if the Object is a Node or not. This function is reimplemented in Node. More...
 

Protected Attributes

std::string specifier
 String that represents the specifier of the object. For example: "name": "electron" is an object of which the specifier is the string "name".
 

Detailed Description

Abstract object in JSON tree structure. Can be specialized either in Node or in Leaf<T> with a specific type T.

Constructor & Destructor Documentation

◆ Object() [1/2]

JSON::Object::Object ( std::string const &  t_specifier)
inlineexplicit

Construtor with one paramter that initializes specifier.

Parameters
t_specifierName of the Object's specifier.

◆ Object() [2/2]

JSON::Object::Object ( std::string const &  t_specifier)
inlineexplicit

Construtor with one paramter that initializes specifier.

Parameters
t_specifierName of the Object's specifier.

Member Function Documentation

◆ getSpecifier() [1/2]

std::string JSON::Object::getSpecifier ( ) const
inline
Returns
specifier The Object's specifier.

◆ getSpecifier() [2/2]

std::string JSON::Object::getSpecifier ( ) const
inline
Returns
specifier The Object's specifier.

◆ isNode() [1/2]

virtual bool JSON::Object::isNode ( ) const
inlinevirtual

Tells if the Object is a Node or not. This function is reimplemented in Node.

Returns
False (default).

Reimplemented in JSON::Node, and JSON::Node.

◆ isNode() [2/2]

virtual bool JSON::Object::isNode ( ) const
inlinevirtual

Tells if the Object is a Node or not. This function is reimplemented in Node.

Returns
False (default).

Reimplemented in JSON::Node, and JSON::Node.


The documentation for this class was generated from the following file: