MongoSerializer Class Reference

#include <MemoryX/core/MongoSerializer.h>

+ Inheritance diagram for MongoSerializer:

Public Member Functions

void deserialize (const DBStorableData &objData, const armarx::SerializablePtr &obj, const ::Ice::Current &=Ice::emptyCurrent) override
 Uses the JSON content of DBStorableDate objData and deserializes it into the obj pointer. More...
 
armarx::SerializablePtr deserializeIceObject (const DBStorableData &objData, const ::Ice::Current &=Ice::emptyCurrent)
 Deserializes the objData DBStorableData object into an instance of Serializable and returns it. More...
 
 MongoSerializer (const Ice::CommunicatorPtr ic=Ice::CommunicatorPtr(), bool useMongoObjectIds=false)
 
DBStorableData serialize (const armarx::SerializablePtr &obj, const ::Ice::Current &=Ice::emptyCurrent) override
 Takes a SerializablePtr and transforms it into a JSON object using the JSONObject serialization mechanism. More...
 
DBStorableData serializeIceObject (const armarx::SerializablePtr &obj, const ::Ice::Current &=Ice::emptyCurrent)
 Serialize an Ice object passed in the obj parameter. More...
 
 ~MongoSerializer () override
 

Detailed Description

Definition at line 40 of file MongoSerializer.h.

Constructor & Destructor Documentation

◆ MongoSerializer()

MongoSerializer ( const Ice::CommunicatorPtr  ic = Ice::CommunicatorPtr(),
bool  useMongoObjectIds = false 
)

Definition at line 39 of file MongoSerializer.cpp.

◆ ~MongoSerializer()

~MongoSerializer ( )
overridedefault

Member Function Documentation

◆ deserialize()

void deserialize ( const DBStorableData &  objData,
const armarx::SerializablePtr &  obj,
const ::Ice::Current &  c = Ice::emptyCurrent 
)
override

Uses the JSON content of DBStorableDate objData and deserializes it into the obj pointer.

Definition at line 63 of file MongoSerializer.cpp.

◆ deserializeIceObject()

armarx::SerializablePtr deserializeIceObject ( const DBStorableData &  objData,
const ::Ice::Current &  = Ice::emptyCurrent 
)

Deserializes the objData DBStorableData object into an instance of Serializable and returns it.

Definition at line 93 of file MongoSerializer.cpp.

◆ serialize()

DBStorableData serialize ( const armarx::SerializablePtr &  obj,
const ::Ice::Current &  c = Ice::emptyCurrent 
)
override

Takes a SerializablePtr and transforms it into a JSON object using the JSONObject serialization mechanism.

The result is returned in a new DBStorableData which contains the result in its JSON field.

Definition at line 49 of file MongoSerializer.cpp.

◆ serializeIceObject()

DBStorableData serializeIceObject ( const armarx::SerializablePtr &  obj,
const ::Ice::Current &  = Ice::emptyCurrent 
)

Serialize an Ice object passed in the obj parameter.

The result is stored in the JSON field of a new DBStorableData instance and returned.

Definition at line 79 of file MongoSerializer.cpp.


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