PVData C++  8.0.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
epics::pvData::SerializableControl Class Referenceabstract

Callback class for serialization. More...

#include <misc/pv/serialize.h>

Public Member Functions

virtual ~SerializableControl ()
 
virtual void flushSerializeBuffer ()=0
 
virtual void ensureBuffer (std::size_t size)=0
 
virtual void alignBuffer (std::size_t alignment)
 
virtual bool directSerialize (ByteBuffer *existingBuffer, const char *toSerialize, std::size_t elementCount, std::size_t elementSize)=0
 
virtual void cachedSerialize (std::tr1::shared_ptr< const Field > const &field, ByteBuffer *buffer)=0
 

Detailed Description

Callback class for serialization.

This must be provided by code that calls serialize.

Definition at line 42 of file serialize.h.

Constructor & Destructor Documentation

virtual epics::pvData::SerializableControl::~SerializableControl ( )
inlinevirtual

Destructor.

Definition at line 47 of file serialize.h.

Member Function Documentation

virtual void epics::pvData::SerializableControl::cachedSerialize ( std::tr1::shared_ptr< const Field > const &  field,
ByteBuffer buffer 
)
pure virtual

serialize via cache

Parameters
fieldinstance to be serialized
bufferbuffer to be serialized to
virtual bool epics::pvData::SerializableControl::directSerialize ( ByteBuffer existingBuffer,
const char *  toSerialize,
std::size_t  elementCount,
std::size_t  elementSize 
)
pure virtual

Method for serializing primitive array data. Hook for supplying custom serialization implementation. The serialization implementation need not be provided. Returns true if method performs serialization, false otherwise. This should only be used for arrays of primitive types, i. e. boolean, byte,..., double. It cannot be called for string, structure, or union arrays.

Parameters
existingBufferthe existing buffer from the caller.
toSerializelocation of data to be put into buffer.
elementCountnumber of elements.
elementSizeelement size.
Returns
true if serialization performed, else false.
virtual void epics::pvData::SerializableControl::ensureBuffer ( std::size_t  size)
pure virtual

Make sure buffer has at least size bytes remaining. If not flush existing buffer and provide a new one.

Parameters
sizeThe number of bytes.
virtual void epics::pvData::SerializableControl::flushSerializeBuffer ( )
pure virtual

Done with this buffer. Flush it.


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