Class DeserializableControl

Class Documentation

class DeserializableControl

Callback class for deserialization.

This must be provided by code that calls deserialize.

Public Functions

inline virtual ~DeserializableControl()

Destructor.

virtual void ensureData(std::size_t size) = 0

Helper method. Ensures specified size of bytes, provides it if necessary.

Parameters

size – The number of bytes.

inline virtual void alignData (std::size_t alignment) EPICS_DEPRECATED
virtual bool directDeserialize(ByteBuffer *existingBuffer, char *deserializeTo, std::size_t elementCount, std::size_t elementSize) = 0

Method for deserializing array data. Hook for supplying custom deserialization implementation. The deserialization implementation need not be provided. Returns true if method performs deserialization, 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
  • existingBuffer – the existing buffer from the caller.

  • deserializeTo – location of data.

  • elementCount – number of elements.

  • elementSize – element size.

Returns

true if deserialization performed, else false.

virtual std::tr1::shared_ptr<const Field> cachedDeserialize(ByteBuffer *buffer) = 0

deserialize via cache

Parameters

buffer – buffer to be deserialized from