CFEL - ASG Software Suite
2.5.0
CASS
|
#include <serializable.hpp>
Public Member Functions | |
Serializable (uint16_t version) | |
constructor initializing the version More... | |
virtual | ~Serializable () |
virtual destructor to avoid warning with gcc 4.1.2 More... | |
virtual void | serialize (SerializerBackend &) const =0 |
pure virtual function that needs to be defined by the derived class. More... | |
virtual bool | deserialize (SerializerBackend &)=0 |
pure virtual function that needs to be defined by the derived class. More... | |
uint16_t | ver () const |
retrieve the version of the serializer More... | |
virtual void | writeVersion (SerializerBackend &out) const |
write the version to the stream More... | |
virtual void | checkVersion (SerializerBackend &in) const |
check the version More... | |
Protected Attributes | |
uint16_t | _version |
the version for de/serializing More... | |
pure virtual class that all serializable classes should inherit from. This makes sure that all classes that should be serializable
Definition at line 29 of file serializable.hpp.
|
inlineexplicit |
constructor initializing the version
Definition at line 33 of file serializable.hpp.
|
inlinevirtual |
virtual destructor to avoid warning with gcc 4.1.2
Definition at line 38 of file serializable.hpp.
|
inlinevirtual |
check the version
asserts that the version of this class corresponsed to the one read from the stream
in | the stream to read the version from |
Definition at line 71 of file serializable.hpp.
References _version, and cass::SerializerBackend::retrieve().
Referenced by cass::IdList::deserialize(), cass::CASSEvent::deserialize(), cass::ACQIRIS::Instrument::deserialize(), cass::ACQIRISTDC::Channel::deserialize(), cass::ACQIRIS::Channel::deserialize(), cass::MachineData::Device::deserialize(), cass::pixeldetector::Detector::deserialize(), cass::ACQIRISTDC::Instrument::deserialize(), cass::ACQIRIS::Device::deserialize(), cass::pixeldetector::Device::deserialize(), and cass::ACQIRISTDC::Device::deserialize().
|
pure virtual |
pure virtual function that needs to be defined by the derived class.
will deserialize an object from the Serializer class
Implemented in cass::ACQIRISTDC::Device, cass::pixeldetector::Device, cass::ACQIRIS::Device, cass::ACQIRISTDC::Instrument, cass::MachineData::Device, cass::pixeldetector::Detector, cass::ACQIRIS::Channel, cass::ACQIRIS::Instrument, cass::ACQIRISTDC::Channel, jocassview::IdList, cass::CASSEvent, cass::IdList, cass::IdList, and cass::DeviceBackend.
|
pure virtual |
pure virtual function that needs to be defined by the derived class.
will serialize an object to the Serializer class
Implemented in cass::ACQIRISTDC::Device, cass::pixeldetector::Device, cass::ACQIRIS::Device, cass::ACQIRISTDC::Instrument, cass::pixeldetector::Detector, cass::MachineData::Device, cass::ACQIRIS::Channel, cass::ACQIRIS::Instrument, cass::IdList, cass::ACQIRISTDC::Channel, cass::CASSEvent, jocassview::IdList, cass::IdList, and cass::DeviceBackend.
|
inline |
retrieve the version of the serializer
Definition at line 53 of file serializable.hpp.
References _version.
Referenced by jocassview::IdList::deserialize().
|
inlinevirtual |
write the version to the stream
out | the stream to write the version to |
Definition at line 59 of file serializable.hpp.
References _version, and cass::SerializerBackend::add().
Referenced by cass::ACQIRISTDC::Channel::serialize(), jocassview::IdList::serialize(), cass::CASSEvent::serialize(), cass::IdList::serialize(), cass::ACQIRIS::Instrument::serialize(), cass::ACQIRIS::Channel::serialize(), cass::MachineData::Device::serialize(), cass::pixeldetector::Detector::serialize(), cass::ACQIRISTDC::Instrument::serialize(), cass::ACQIRIS::Device::serialize(), cass::pixeldetector::Device::serialize(), and cass::ACQIRISTDC::Device::serialize().
|
protected |
the version for de/serializing
Definition at line 85 of file serializable.hpp.
Referenced by checkVersion(), jocassview::IdList::deserialize(), ver(), and writeVersion().