Files
pvData/pvDataApp/misc/serialize.h
Michael Davidsaver bb6cf7c00b avoid method resolution problem from diamond inheritance
Serializable -> SerializableArray
Serializable -> PVField
SerializableArray -> PVArray
PVField -> PVArray

Thus for PVArray the members of SerializeSerializable are reachable
by two paths.  This means that The vtable for PVArray has two seperate
entries for serialize.

Correct resolution is to use virtual inheritance to avoid the
ambiguity.
2011-02-15 11:39:38 -05:00

55 lines
1.5 KiB
C++

/* serialize.h */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef SERIALIZE_H
#define SERIALIZE_H
#include "byteBuffer.h"
namespace epics { namespace pvData {
class SerializableControl;
class DeserializableControl;
class Serializable;
class BitSetSerializable;
class SerializableArray;
class BitSet;
class SerializableControl {
public:
virtual void flushSerializeBuffer() =0;
virtual void ensureBuffer(int size) =0;
};
class DeserializableControl {
public:
virtual void ensureData(int size) =0;
};
class Serializable {
public:
virtual void serialize(ByteBuffer *buffer,
SerializableControl *flusher) = 0;
virtual void deserialize(ByteBuffer *buffer,
DeserializableControl *flusher) = 0;
};
class BitSetSerializable {
public:
virtual void serialize(ByteBuffer *buffer,
SerializableControl *flusher,BitSet *bitSet) = 0;
virtual void deserialize(ByteBuffer *buffer,
DeserializableControl *flusher,BitSet *bitSet) = 0;
};
class SerializableArray : virtual public Serializable {
public:
virtual void serialize(ByteBuffer *buffer,
SerializableControl *flusher, int offset, int count) = 0;
};
}}
#endif /* SERIALIZE_H */