20 virtual void ResetReadPosition() = 0;
33 virtual void SetData(
const byte* data, int64 count) = 0;
72 SMARTENGINE_EXPORT ObjPtr MemoryBuffer_CreateInstance();
73 SMARTENGINE_EXPORT
void MemoryBuffer_ResetReadPosition(ObjPtr
object);
74 SMARTENGINE_EXPORT
void MemoryBuffer_ClearData(ObjPtr
object);
75 SMARTENGINE_EXPORT
const byte* MemoryBuffer_GetData(ObjPtr
object);
76 SMARTENGINE_EXPORT int64 MemoryBuffer_GetCount(ObjPtr
object);
77 SMARTENGINE_EXPORT
void MemoryBuffer_SetData(ObjPtr
object,
byte* data, int64 count);
78 SMARTENGINE_EXPORT
int MemoryBuffer_ReadBool(ObjPtr
object);
79 SMARTENGINE_EXPORT
void MemoryBuffer_WriteBool(ObjPtr
object,
int value);
80 SMARTENGINE_EXPORT
int MemoryBuffer_ReadInt(ObjPtr
object);
81 SMARTENGINE_EXPORT
void MemoryBuffer_WriteInt(ObjPtr
object,
int value);
82 SMARTENGINE_EXPORT
float MemoryBuffer_ReadFloat(ObjPtr
object);
83 SMARTENGINE_EXPORT
void MemoryBuffer_WriteFloat(ObjPtr
object,
float value);
84 SMARTENGINE_EXPORT
void MemoryBuffer_ReadBuffer(ObjPtr
object,
byte* data, int64 len);
85 SMARTENGINE_EXPORT
void MemoryBuffer_WriteBuffer(ObjPtr
object,
byte* data, int64 len);
virtual void WriteInt64(int64 value)=0
virtual void WriteFloat(float value)=0
virtual int64 GetCount() const =0
Returns the byte count of the data array
SMARTENGINE_EXPORT ObjectPtr< IMemoryBuffer > CreateMemoryBuffer()
Creates an instance of IMemoryBuffer
virtual void WriteInt(int value)=0
virtual void SetData(const byte *data, int64 count)=0
Directly sets the buffer's data.
Smart pointer to an IObject. Automatic ref counting.
Definition: ObjectPtr.h:16
Definition: A2CTrainer.h:10
Base class for SmartEngine AI objects. It is not common to deal with this class directly.
Definition: Object.h:19
virtual void ReadBuffer(byte *data, int64 len)=0
virtual float ReadFloat()=0
virtual void WriteBool(bool value)=0
virtual void WriteString(const char *value)=0
virtual bool ReadBool()=0
virtual const byte * GetData() const =0
Returns the buffer's data as a byte array.
virtual int64 ReadInt64()=0
virtual void ClearData()=0
Clears all data from the buffer.
Simple in memory buffer. Used for serialization, but can be used as a generic buffer too.
Definition: MemoryBuffer.h:15
virtual void WriteBuffer(byte *data, int64 len)=0