12 #include <epicsTypes.h>
14 #include <pv/byteBuffer.h>
19 #if defined(PVD_INTERNAL)
20 # define PVD_DEPRECATED(msg)
21 #elif __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 5
22 # define PVD_DEPRECATED(msg) __attribute__((deprecated(msg)))
24 # define PVD_DEPRECATED(msg) EPICS_DEPRECATED
27 namespace epics {
namespace pvData {
29 class SerializableControl;
30 class DeserializableControl;
32 class BitSetSerializable;
33 class SerializableArray;
51 virtual void flushSerializeBuffer() =0;
57 virtual void ensureBuffer(std::size_t
size) =0;
58 virtual void alignBuffer(std::size_t alignment) PVD_DEPRECATED(
"Deprecated for lack of use") {}
73 virtual bool directSerialize(
74 ByteBuffer *existingBuffer,
75 const char* toSerialize,
76 std::size_t elementCount,
77 std::size_t elementSize) = 0;
83 virtual void cachedSerialize(
84 std::tr1::shared_ptr<const Field>
const & field,
85 ByteBuffer* buffer) = 0;
104 virtual void ensureData(std::size_t
size) =0;
106 virtual void alignData(std::size_t alignment) PVD_DEPRECATED(
"Deprecated for lack of use") {};
121 virtual bool directDeserialize(
122 ByteBuffer *existingBuffer,
124 std::size_t elementCount,
125 std::size_t elementSize) = 0;
130 virtual std::tr1::shared_ptr<const Field> cachedDeserialize(
131 ByteBuffer* buffer) = 0;
243 virtual void serialize(
247 std::size_t
count)
const = 0;
virtual ~BitSetSerializable()
virtual ~SerializableArray()
valarray< size_t > size() const
void serializeToVector(const Serializable *S, int byteOrder, std::vector< epicsUInt8 > &out)
Push serialize and append to the provided byte vector. No caching is done. Only complete serializatio...
Callback class for serialization.
void deserializeFromVector(Serializable *S, int byteOrder, const std::vector< epicsUInt8 > &in)
deserializeFromBuffer Deserialize into S from provided vector
This class implements a Bytebuffer that is like the java.nio.ByteBuffer.
constexpr iterator_traits< _InputIterator >::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp &__value)
constexpr size_type size() const noexcept
virtual void serialize(ByteBuffer *buffer, SerializableControl *flusher) const =0
Callback class for deserialization.
virtual ~SerializableControl()
void deserializeFromBuffer(Serializable *S, ByteBuffer &in)
deserializeFromBuffer Deserialize into S from provided vector
Class for serializing arrays.
Class for serializing bitSets.
virtual ~DeserializableControl()
Base class for serialization.