26 #ifndef __TERRALIB_DATATYPE_INTERNAL_BYTEARRAY_H 27 #define __TERRALIB_DATATYPE_INTERNAL_BYTEARRAY_H 34 #include <boost/cstdint.hpp> 84 ByteArray(
char* data, std::size_t capacity, std::size_t usedBytes);
112 char* getData()
const;
124 void take(
char* data, std::size_t size);
137 void take(
char* data, std::size_t capacity, std::size_t usedBytes);
147 void copy(
char* data, std::size_t size);
160 void copy(
char* data, std::size_t size, std::size_t offset);
167 std::size_t capacity()
const;
174 std::size_t bytesUsed()
const;
181 void setBytesUsed(std::size_t size);
207 std::string toString()
const;
235 #endif // __TERRALIB_DATATYPE_INTERNAL_BYTEARRAY_H A base class for objects that can be retrieved from the data access module.
te::dt::ByteArray & operator<<(te::dt::ByteArray &barray, T val)
It writes the bytes from val to the byte array.
std::size_t bytesUsed() const
It returns the number of used bytes in the internal buffer.
#define TEDATATYPEEXPORT
You can use this macro in order to export/import classes and functions from this module.
char * m_data
The buffer data.
A base class for values that can be retrieved from the data access module.
int getTypeCode() const
The type code for byte array data: BYTE_ARRAY_TYPE.
General enumerations for the data type module.
std::size_t m_bytesOccupied
The number of bytes occupied in the buffer.
std::size_t m_capacity
The number of bytes allocated by the internal buffer.
void copy(char *data, std::size_t size)
It copies the data from the given pointer to the byte array.
A class for representing binary data.