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);
 
  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);
 
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.
 
A base class for values that can be retrieved from the data access module.
 
A class for representing binary data.
 
ByteArray(std::size_t capacity)
It creates a new byte array and allocates size bytes.
 
ByteArray(const ByteArray &rhs)
Copy constructor.
 
std::size_t m_capacity
The number of bytes allocated by the internal buffer.
 
std::size_t capacity() const
It returns the size of the internal buffer.
 
void copy(char *data, std::size_t size, std::size_t offset)
It copies the data from the given pointer to the byte array.
 
int getTypeCode() const
The type code for byte array data: BYTE_ARRAY_TYPE.
 
void take(char *data, std::size_t size)
It takes the ownership of the external data buffer.
 
std::size_t m_bytesOccupied
The number of bytes occupied in the buffer.
 
std::size_t bytesUsed() const
It returns the number of used bytes in the internal buffer.
 
ByteArray()
It creates a new empty byte array.
 
char * m_data
The buffer data.
 
ByteArray(char *data, std::size_t size)
It creates a new byte array taking the ownership of the external data buffer.
 
ByteArray(char *data, std::size_t capacity, std::size_t usedBytes)
It creates a new byte array taking the ownership of the external data buffer.
 
void clear()
It clears the byte array.
 
ByteArray & operator=(const ByteArray &rhs)
Assignment operator.
 
void copy(char *data, std::size_t size)
It copies the data from the given pointer to the byte array.
 
void setBytesUsed(std::size_t size)
It sets the number of used bytes in the internal buffer.
 
void take(char *data, std::size_t capacity, std::size_t usedBytes)
It takes the ownership of the external data buffer.
 
char * getData() const
It returns the data array.
 
std::string toString() const
It returns the byte array in an string notation.
 
AbstractData * clone() const
It creates a new clone of the byte array.
 
#define TEDATATYPEEXPORT
You can use this macro in order to export/import classes and functions from this module.
 
Enumerations of XML module.