|
EvolvingObjects
|
#include <Object.h>
Public Types | |
|
typedef std::map< std::string, eoserial::Entity * > | JsonValues |
Public Member Functions | |
| void | add (const std::string &key, eoserial::Entity *json) |
| Adds a pair into the JSON object. | |
| void | add (const std::string &key, const eoserial::Printable *obj) |
| Adds a pair into the JSON object. | |
| void | deserialize (eoserial::Persistent &obj) |
| Deserializes a Serializable class instance from this JSON object. | |
| ~Object () | |
| Dtor. | |
| virtual std::ostream & | print (std::ostream &out) const |
| Prints the content of a JSON object into a stream. | |
JSON Object.
This class represents a JSON object, which is basically a dictionnary of keys (strings) and values (JSON entities).
| void eoserial::Object::add | ( | const std::string & | key, |
| eoserial::Entity * | json | ||
| ) | [inline] |
| void eoserial::Object::add | ( | const std::string & | key, |
| const eoserial::Printable * | obj | ||
| ) | [inline] |
Adds a pair into the JSON object.
| key | The key associated with the eoserial object |
| obj | A JSON-serializable object |
Definition at line 61 of file Object.h.
References eoserial::Printable::pack().
| void eoserial::Object::deserialize | ( | eoserial::Persistent & | obj | ) | [inline] |
Deserializes a Serializable class instance from this JSON object.
| obj | The object we want to rebuild. |
Definition at line 70 of file Object.h.
References eoserial::Persistent::unpack().