XmlData |
![]() ![]() |
#include <DbXml.hpp>class DbXml::XmlData { public: XmlData::XmlData() XmlData::XmlData(const Dbt &dbt) XmlData::XmlData(void *data, size_t size) XmlData::XmlData(const XmlData &o) XmlData &operator = (const XmlData &o) virtual XmlData::~XmlData() ...
void set(const void *data, size_t size); void append(const void *data, size_t size);
void * get_data() const;
size_t get_size() const; void set_size(size_t size);
size_t reserve(size_t size); void getReservedSize() const;
void adoptBuffer(XmlData &src); };
The XmlData class encapsulates a buffer for storing and retrieving binary data (uninterpreted bytes). The default and copy constructors for XmlData manage their own memory and the application need not be aware of it. The constructors, XmlData(const Dbt &dbt) and XmlData(void *data, size_t size), create "wrapper" objects for the memory passed in and in those instances it is up to the application to own and manage the memory. If a wrapper object is assigned data that is larger than its memory buffer an exception will be thrown.
Returns the data buffer.
Copies size bytes from data to the start of the underlying buffer, which will expand to fit the data if it is not a wrapper, otherwise an exception will be thrown. This method will change the size of the data.
ParametersCopies size bytes from data to the end of the existing data in the underlying buffer, which will expand to fit the data if it is not a wrapper, otherwise an exception will be thrown. This method will change the size of the data.
ParametersReturns the size of the real data in the buffer.
Sets the size of the data held in the buffer. An exception will be thrown if the size is larger than the buffer.
ParametersEnsures that the underlying buffer has at least size bytes, starting at offset 0. Existing data is not affected. If buffer expansion is needed and the object is a wrapper an exception is thrown.
ParametersReturns the size of the underlying buffer. This is at least the size of the actual data stored.
Takes ownership of the buffer in src, leaving src with an empty buffer.
Parameters
![]() ![]() |
Copyright (c) 1996-2009 Oracle. All rights reserved.