AbstractObjectSerializer Class Referenceabstract

#include <ArmarXCore/observers/AbstractObjectSerializer.h>

+ Inheritance diagram for AbstractObjectSerializer:

Public Member Functions

 AbstractObjectSerializer ()
 
 AbstractObjectSerializer (const Ice::CommunicatorPtr ic)
 
virtual void append (const AbstractObjectSerializerPtr &val)=0
 
virtual AbstractObjectSerializerPtr createElement () const =0
 
SerializablePtr deserializeIceObject ()
 
virtual bool getBool (const ::std::string &key) const =0
 
virtual double getDouble (const ::std::string &key) const =0
 
virtual void getDoubleArray (const ::std::string &key, std::vector< double > &result)=0
 
virtual AbstractObjectSerializerPtr getElement (const ::std::string &key) const =0
 
virtual AbstractObjectSerializerPtr getElement (unsigned int index) const =0
 
virtual std::vector< std::string > getElementNames () const =0
 
virtual ElementType getElementType (const ::Ice::Current &=Ice::emptyCurrent) const =0
 
virtual float getFloat (const ::std::string &key) const =0
 
virtual void getFloatArray (const ::std::string &key, std::vector< float > &result)=0
 
virtual SerializablePtr getIceObject (const ::std::string &key) const
 
virtual SerializablePtr getIceObject (int index) const
 
std::string getIdField () const
 
virtual int getInt (const ::std::string &key) const =0
 
virtual void getIntArray (const ::std::string &key, std::vector< int > &result)=0
 
int getIntId () const
 
virtual std::string getString (const ::std::string &key) const =0
 
virtual void getStringArray (const ::std::string &key, std::vector< std::string > &result)=0
 
std::string getStringId () const
 
virtual VariantPtr getVariant (const ::std::string &key) const
 
virtual VariantPtr getVariant (int index) const
 
virtual void getVariantArray (const ::std::string &key, std::vector< VariantPtr > &result)=0
 
virtual void getVariantMap (const ::std::string &key, StringVariantBaseMap &result)=0
 
virtual bool hasElement (const ::std::string &key) const =0
 
virtual void merge (const AbstractObjectSerializerPtr &val)=0
 
virtual void reset ()=0
 
void serializeIceObject (const SerializablePtr &obj)
 
virtual void setBool (const ::std::string &key, bool val)=0
 
virtual void setBool (unsigned int index, bool val)=0
 
virtual void setDouble (const ::std::string &key, double val)=0
 
virtual void setDouble (unsigned int index, double val)=0
 
virtual void setDoubleArray (const ::std::string &key, const std::vector< double > &val)=0
 
virtual void setElement (const ::std::string &key, const AbstractObjectSerializerPtr &val)=0
 
virtual void setElement (unsigned int index, const AbstractObjectSerializerPtr &val)=0
 
virtual void setElementType (ElementType elemType, const ::Ice::Current &=Ice::emptyCurrent)=0
 
virtual void setFloat (const ::std::string &key, float val)=0
 
virtual void setFloat (unsigned int index, float val)=0
 
virtual void setFloatArray (const ::std::string &key, const std::vector< float > &val)=0
 
void setIceCommunicator (Ice::CommunicatorPtr ic)
 
virtual void setIceObject (const ::std::string &key, const SerializablePtr &val)
 
virtual void setIceObject (unsigned int index, const SerializablePtr &val)
 
void setId (const std::string &val)
 
void setId (int val)
 
void setIdField (const std::string &fieldName)
 
virtual void setInt (const ::std::string &key, int val)=0
 
virtual void setInt (unsigned int index, int val)=0
 
virtual void setIntArray (const ::std::string &key, const std::vector< int > &val)=0
 
virtual void setString (const ::std::string &key, const std::string &val)=0
 
virtual void setString (unsigned int index, const std::string &val)=0
 
virtual void setStringArray (const ::std::string &key, const std::vector< std::string > &val)=0
 
virtual void setVariant (const ::std::string &key, const VariantPtr &val)
 
virtual void setVariant (unsigned int index, const VariantPtr &val)
 
virtual void setVariantArray (const ::std::string &key, const std::vector< VariantBasePtr > &val)=0
 
virtual void setVariantArray (const ::std::string &key, const std::vector< VariantPtr > &val)=0
 
virtual void setVariantMap (const ::std::string &key, const StringVariantBaseMap &val)=0
 
virtual unsigned int size () const =0
 
 ~AbstractObjectSerializer () override
 

Protected Member Functions

VariantPtr deserializeVariant ()
 
AbstractObjectSerializerPtr serializeVariant (const VariantPtr &val) const
 

Protected Attributes

Ice::CommunicatorPtr ic
 
std::string idField
 

Detailed Description

Definition at line 52 of file AbstractObjectSerializer.h.

Constructor & Destructor Documentation

◆ AbstractObjectSerializer() [1/2]

Definition at line 39 of file AbstractObjectSerializer.cpp.

◆ AbstractObjectSerializer() [2/2]

◆ ~AbstractObjectSerializer()

~AbstractObjectSerializer ( )
override

Definition at line 50 of file AbstractObjectSerializer.cpp.

Member Function Documentation

◆ append()

virtual void append ( const AbstractObjectSerializerPtr val)
pure virtual

Implemented in JSONObject.

◆ createElement()

virtual AbstractObjectSerializerPtr createElement ( ) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ deserializeIceObject()

SerializablePtr deserializeIceObject ( )

Definition at line 297 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ deserializeVariant()

VariantPtr deserializeVariant ( )
protected

Definition at line 133 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ getBool()

virtual bool getBool ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getDouble()

virtual double getDouble ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getDoubleArray()

virtual void getDoubleArray ( const ::std::string &  key,
std::vector< double > &  result 
)
pure virtual

Implemented in JSONObject.

◆ getElement() [1/2]

virtual AbstractObjectSerializerPtr getElement ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

◆ getElement() [2/2]

virtual AbstractObjectSerializerPtr getElement ( unsigned int  index) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getElementNames()

virtual std::vector<std::string> getElementNames ( ) const
pure virtual

Implemented in JSONObject.

◆ getElementType()

virtual ElementType getElementType ( const ::Ice::Current &  = Ice::emptyCurrent) const
pure virtual

Implemented in JSONObject.

◆ getFloat()

virtual float getFloat ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getFloatArray()

virtual void getFloatArray ( const ::std::string &  key,
std::vector< float > &  result 
)
pure virtual

Implemented in JSONObject.

◆ getIceObject() [1/2]

SerializablePtr getIceObject ( const ::std::string &  key) const
virtual

Definition at line 262 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ getIceObject() [2/2]

SerializablePtr getIceObject ( int  index) const
virtual

Definition at line 268 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ getIdField()

std::string getIdField ( ) const
inline

Definition at line 126 of file AbstractObjectSerializer.h.

+ Here is the caller graph for this function:

◆ getInt()

virtual int getInt ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getIntArray()

virtual void getIntArray ( const ::std::string &  key,
std::vector< int > &  result 
)
pure virtual

Implemented in JSONObject.

◆ getIntId()

int getIntId ( ) const
inline

Definition at line 135 of file AbstractObjectSerializer.h.

+ Here is the call graph for this function:

◆ getString()

virtual std::string getString ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ getStringArray()

virtual void getStringArray ( const ::std::string &  key,
std::vector< std::string > &  result 
)
pure virtual

Implemented in JSONObject.

◆ getStringId()

std::string getStringId ( ) const
inline

Definition at line 139 of file AbstractObjectSerializer.h.

+ Here is the call graph for this function:

◆ getVariant() [1/2]

VariantPtr getVariant ( const ::std::string &  key) const
virtual

Definition at line 244 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ getVariant() [2/2]

VariantPtr getVariant ( int  index) const
virtual

Definition at line 253 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ getVariantArray()

virtual void getVariantArray ( const ::std::string &  key,
std::vector< VariantPtr > &  result 
)
pure virtual

Implemented in JSONObject.

◆ getVariantMap()

virtual void getVariantMap ( const ::std::string &  key,
StringVariantBaseMap result 
)
pure virtual

Implemented in JSONObject.

◆ hasElement()

virtual bool hasElement ( const ::std::string &  key) const
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ merge()

virtual void merge ( const AbstractObjectSerializerPtr val)
pure virtual

Implemented in JSONObject.

◆ reset()

virtual void reset ( )
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ serializeIceObject()

void serializeIceObject ( const SerializablePtr &  obj)

Definition at line 290 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ serializeVariant()

AbstractObjectSerializerPtr serializeVariant ( const VariantPtr val) const
protected

Definition at line 59 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBool() [1/2]

virtual void setBool ( const ::std::string &  key,
bool  val 
)
pure virtual

Implemented in JSONObject.

◆ setBool() [2/2]

virtual void setBool ( unsigned int  index,
bool  val 
)
pure virtual

Implemented in JSONObject.

◆ setDouble() [1/2]

virtual void setDouble ( const ::std::string &  key,
double  val 
)
pure virtual

Implemented in JSONObject.

◆ setDouble() [2/2]

virtual void setDouble ( unsigned int  index,
double  val 
)
pure virtual

Implemented in JSONObject.

◆ setDoubleArray()

virtual void setDoubleArray ( const ::std::string &  key,
const std::vector< double > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setElement() [1/2]

virtual void setElement ( const ::std::string &  key,
const AbstractObjectSerializerPtr val 
)
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ setElement() [2/2]

virtual void setElement ( unsigned int  index,
const AbstractObjectSerializerPtr val 
)
pure virtual

Implemented in JSONObject.

◆ setElementType()

virtual void setElementType ( ElementType  elemType,
const ::Ice::Current &  = Ice::emptyCurrent 
)
pure virtual

Implemented in JSONObject.

◆ setFloat() [1/2]

virtual void setFloat ( const ::std::string &  key,
float  val 
)
pure virtual

Implemented in JSONObject.

◆ setFloat() [2/2]

virtual void setFloat ( unsigned int  index,
float  val 
)
pure virtual

Implemented in JSONObject.

◆ setFloatArray()

virtual void setFloatArray ( const ::std::string &  key,
const std::vector< float > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setIceCommunicator()

void setIceCommunicator ( Ice::CommunicatorPtr  ic)

Definition at line 54 of file AbstractObjectSerializer.cpp.

◆ setIceObject() [1/2]

void setIceObject ( const ::std::string &  key,
const SerializablePtr &  val 
)
virtual

Definition at line 274 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ setIceObject() [2/2]

void setIceObject ( unsigned int  index,
const SerializablePtr &  val 
)
virtual

Definition at line 282 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ setId() [1/2]

void setId ( const std::string &  val)
inline

Definition at line 148 of file AbstractObjectSerializer.h.

+ Here is the call graph for this function:

◆ setId() [2/2]

void setId ( int  val)
inline

Definition at line 144 of file AbstractObjectSerializer.h.

+ Here is the call graph for this function:

◆ setIdField()

void setIdField ( const std::string &  fieldName)
inline

Definition at line 130 of file AbstractObjectSerializer.h.

+ Here is the caller graph for this function:

◆ setInt() [1/2]

virtual void setInt ( const ::std::string &  key,
int  val 
)
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ setInt() [2/2]

virtual void setInt ( unsigned int  index,
int  val 
)
pure virtual

Implemented in JSONObject.

◆ setIntArray()

virtual void setIntArray ( const ::std::string &  key,
const std::vector< int > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setString() [1/2]

virtual void setString ( const ::std::string &  key,
const std::string &  val 
)
pure virtual

Implemented in JSONObject.

+ Here is the caller graph for this function:

◆ setString() [2/2]

virtual void setString ( unsigned int  index,
const std::string &  val 
)
pure virtual

Implemented in JSONObject.

◆ setStringArray()

virtual void setStringArray ( const ::std::string &  key,
const std::vector< std::string > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setVariant() [1/2]

void setVariant ( const ::std::string &  key,
const VariantPtr val 
)
virtual

Definition at line 230 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVariant() [2/2]

void setVariant ( unsigned int  index,
const VariantPtr val 
)
virtual

Definition at line 237 of file AbstractObjectSerializer.cpp.

+ Here is the call graph for this function:

◆ setVariantArray() [1/2]

virtual void setVariantArray ( const ::std::string &  key,
const std::vector< VariantBasePtr > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setVariantArray() [2/2]

virtual void setVariantArray ( const ::std::string &  key,
const std::vector< VariantPtr > &  val 
)
pure virtual

Implemented in JSONObject.

◆ setVariantMap()

virtual void setVariantMap ( const ::std::string &  key,
const StringVariantBaseMap val 
)
pure virtual

Implemented in JSONObject.

◆ size()

virtual unsigned int size ( ) const
pure virtual

Implemented in JSONObject.

Member Data Documentation

◆ ic

Ice::CommunicatorPtr ic
protected

Definition at line 166 of file AbstractObjectSerializer.h.

◆ idField

std::string idField
protected

Definition at line 167 of file AbstractObjectSerializer.h.


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