Library: Data
Package: DataCore
Header: Poco/Data/LOB.h
Representation of a Large OBject.
A LOB can hold arbitrary data. The maximum size depends on the underlying database.
The LOBInputStream and LOBOutputStream classes provide a convenient way to access the data in a LOB.
Member Functions: appendRaw, assignRaw, assignVal, begin, clear, compact, content, end, operator !=, operator =, operator ==, rawContent, size, swap
typedef typename std::vector < T > Container;
typedef Poco::SharedPtr < Container > ContentPtr;
typedef typename std::vector < T >::const_iterator Iterator;
typedef T ValueType;
LOB();
Creates an empty LOB.
LOB(
const std::vector < T > & content
);
Creates the LOB, content is deep-copied.
LOB(
const std::basic_string < T > & content
);
Creates a LOB from a string.
Creates a LOB by copying another one.
LOB(
const T * const pContent,
std::size_t size
);
Creates the LOB by deep-copying pContent.
~LOB();
Destroys the LOB.
void appendRaw(
const T * pChar,
std::size_t count
);
Assigns raw content to internal storage.
void assignRaw(
const T * ptr,
std::size_t count
);
Assigns raw content to internal storage.
void assignVal(
std::size_t count,
const T & val
);
Assigns raw content to internal storage.
Iterator begin() const;
void clear(
bool doCompact = false
);
Clears the content of the blob. If doCompact is true, trims the excess capacity.
void compact();
Trims the internal storage excess capacity.
const std::vector < T > & content() const;
Returns the content.
Iterator end() const;
bool operator != (
const LOB & other
) const;
Compares for inequality LOB by value.
LOB & operator = (
const LOB & other
);
Assignment operator.
bool operator == (
const LOB & other
) const;
Compares for equality LOB by value.
const T * rawContent() const;
Returns the raw content.
If the LOB is empty, returns NULL.
std::size_t size() const;
Returns the size of the LOB in bytes.
void swap(
LOB & other
);
Swaps the LOB with another one.