OpenDaVINCI  4.16.0
odcore::data::Container Class Reference

#include <Container.h>

Inheritance diagram for odcore::data::Container:
Inheritance graph

Public Types

enum  DATATYPE { UNDEFINEDDATA = 1, DMCP_CONFIGURATION_REQUEST = 5 }
 

Public Member Functions

 Container ()
 
 Container (const SerializableData &serializableData)
 
 Container (const SerializableData &serializableData, const int32_t &dataType)
 
 Container (const Container &obj)
 
virtual ~Container ()
 
Containeroperator= (const Container &obj)
 
int32_t getDataType () const
 
virtual ostream & operator<< (ostream &out) const
 
virtual istream & operator>> (istream &in)
 
template<class T >
getData ()
 
const TimeStamp getSentTimeStamp () const
 
void setSentTimeStamp (const TimeStamp &sentTimeStamp)
 
const TimeStamp getReceivedTimeStamp () const
 
void setReceivedTimeStamp (const TimeStamp &receivedTimeStamp)
 
const TimeStamp getSampleTimeStamp () const
 
void setSampleTimeStamp (const TimeStamp &sampleTimeStamp)
 
const string toString () const
 
void setSenderStamp (const uint32_t &senderStamp)
 
uint32_t getSenderStamp () const
 

Detailed Description

Container for all interchangeable data.

Member Enumeration Documentation

Enumerator
UNDEFINEDDATA 
DMCP_CONFIGURATION_REQUEST 

Constructor & Destructor Documentation

odcore::data::Container::Container ( )
odcore::data::Container::Container ( const SerializableData serializableData)

Constructor.

Parameters
serializableDataData to be serialized.
odcore::data::Container::Container ( const SerializableData serializableData,
const int32_t &  dataType 
)

Constructor.

Parameters
serializableDataData to be serialized.
dataTypeType of data inside this container.
odcore::data::Container::Container ( const Container obj)

Copy constructor.

Parameters
objReference to an object of this class.
odcore::data::Container::~Container ( )
virtual

Member Function Documentation

const TimeStamp odcore::data::Container::getReceivedTimeStamp ( ) const

This method returns the time stamp when this container was received.

Returns
Time stamp when this container was received.

Referenced by odtools::recorder::SharedDataListener::add(), and operator=().

uint32_t odcore::data::Container::getSenderStamp ( ) const

This methods returns the user-defined attribute.

Returns
user-defined attribute.

Referenced by operator=(), odcontext::base::ControlledContainerConferenceForSystemUnderTest::send(), and odcore::io::conference::UDPMultiCastContainerConference::send().

ostream & odcore::data::Container::operator<< ( ostream &  out) const
virtual

This method needs to be used to serialize data.

Parameters
outostream to serialize data to.
Returns
The ostream.

Implements odcore::serialization::Serializable.

References getDataType(), odcore::serialization::SerializationFactory::getInstance(), and odcore::serialization::SerializationFactory::getSerializer().

Container & odcore::data::Container::operator= ( const Container obj)

Assignment operator.

Parameters
objReference to an object of this class.
Returns
Reference to this instance.

References getDataType(), getReceivedTimeStamp(), getSampleTimeStamp(), getSenderStamp(), getSentTimeStamp(), setReceivedTimeStamp(), setSampleTimeStamp(), setSenderStamp(), and setSentTimeStamp().

istream & odcore::data::Container::operator>> ( istream &  in)
virtual

This method needs to be used to deserialize data.

Parameters
inistream to deserialize data from.
Returns
The istream.

Implements odcore::serialization::Serializable.

References odcore::serialization::SerializationFactory::getDeserializer(), and odcore::serialization::SerializationFactory::getInstance().

void odcore::data::Container::setReceivedTimeStamp ( const TimeStamp receivedTimeStamp)
void odcore::data::Container::setSenderStamp ( const uint32_t &  senderStamp)

This method sets a user-defined attribute.

Parameters
senderStampUser-defined attribute.

Referenced by operator=(), odcontext::base::ControlledContainerConferenceForSystemUnderTest::send(), and odcore::io::conference::UDPMultiCastContainerConference::send().

const string odcore::data::Container::toString ( ) const