SerUt  1.1.1 (development version)
Public Member Functions | List of all members
serut::VectorSerializer Class Reference

A serializer which uses an STL vector, which can grow in size. More...

#include <vectorserializer.h>

Inheritance diagram for serut::VectorSerializer:
Inheritance graph
[legend]
Collaboration diagram for serut::VectorSerializer:
Collaboration graph
[legend]

Public Member Functions

 VectorSerializer ()
 Construct an instance with no predefined data - what you read is only what you've written. More...
 
 VectorSerializer (const std::vector< uint8_t > &initialBuffer)
 Construct an instance which will copy the specified initial data - new writes will append, reads will start from this initial data. More...
 
const std::vector< uint8_t > & getBuffer () const
 Returns the vector instance that's being used for reading and writing. More...
 
const unsigned char * getBufferPointer ()
 Returns a pointer to the first element of the internal buffer (do not use if no data is available!). More...
 
int getBufferSize () const
 Returns the current size of the internal buffer. More...
 
- Public Member Functions inherited from serut::SerializationInterface
bool writeLongDouble (double x)
 Write a long double. More...
 
bool writeDouble (double x)
 Write a double. More...
 
bool writeFloat (float x)
 Write a float. More...
 
bool writeInt32 (int32_t x)
 Write a 32-bit integer. More...
 
bool writeLongDoubles (const long double *pX, size_t amount)
 Write an array of doubles. More...
 
bool writeDoubles (const double *pX, size_t amount)
 Write an array of doubles. More...
 
bool writeFloats (const float *pX, size_t amount)
 Write an array of floats. More...
 
bool writeInt32s (const int32_t *pX, size_t amount)
 Write an array of 32-bit integers. More...
 
bool writeLongDoubles (const std::vector< long double > &x)
 Write the long doubles stored in the vector. More...
 
bool writeDoubles (const std::vector< double > &x)
 Write the doubles stored in the vector. More...
 
bool writeFloats (const std::vector< float > &x)
 Write the floats stored in the vector. More...
 
bool writeInt32s (const std::vector< int32_t > &x)
 Write the 32-bit integers which are stored in the vector. More...
 
bool writeString (const std::string &x)
 Write a string. More...
 
bool readLongDouble (long double *pX)
 Read a long double. More...
 
bool readDouble (double *pX)
 Read a double. More...
 
bool readFloat (float *pX)
 Read a float. More...
 
bool readInt32 (int32_t *pX)
 Read a 32-bit integer. More...
 
bool readLongDoubles (long double *pX, size_t amount)
 Read an array of long doubles. More...
 
bool readDoubles (double *pX, size_t amount)
 Read an array of doubles. More...
 
bool readFloats (float *pX, size_t amount)
 Read an array of floats. More...
 
bool readInt32s (int32_t *pX, size_t amount)
 Read an array of 32-bit integers. More...
 
bool readLongDoubles (std::vector< long double > &x)
 Read a vector of long doubles (the current size of the vector specifies the amount). More...
 
bool readDoubles (std::vector< double > &x)
 Read a vector of doubles (the current size of the vector specifies the amount). More...
 
bool readFloats (std::vector< float > &x)
 Read a vector of floats (the current size of the vector specifies the amount). More...
 
bool readInt32s (std::vector< int32_t > &x)
 Read a vector of 32-bit integers (the current size of the vector specifies the amount). More...
 
bool readString (std::string &x)
 Read a string. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ VectorSerializer() [1/2]

serut::VectorSerializer::VectorSerializer ( )

◆ VectorSerializer() [2/2]

serut::VectorSerializer::VectorSerializer ( const std::vector< uint8_t > &  initialBuffer)

Member Function Documentation

◆ getBuffer()

const std::vector<uint8_t>& serut::VectorSerializer::getBuffer ( ) const
inline

◆ getBufferPointer()

const unsigned char* serut::VectorSerializer::getBufferPointer ( )
inline

◆ getBufferSize()

int serut::VectorSerializer::getBufferSize ( ) const
inline

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