Library: Data
Package: DataCore
Header: Poco/Data/LOB.h
Description
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 Summary
Member Functions: appendRaw, assignRaw, assignVal, begin, capacity, clear, compact, content, end, operator !=, operator =, operator ==, rawContent, reserve, resize, size, swap
Types Aliases
Container
using Container = std::vector < T >;
ContentPtr
using ContentPtr = Poco::SharedPtr < Container >;
Iterator
using Iterator = typename std::vector < T >::const_iterator;
ValueType
using ValueType = T;
Constructors
LOB
LOB();
Creates an empty LOB.
LOB
LOB(
const std::vector < T > & content
);
Creates the LOB, content is deep-copied.
LOB
LOB(
const std::basic_string < T > & content
);
Creates a LOB from a string.
LOB
Creates a LOB by copying another one.
LOB
LOB
LOB(
const T * const pContent,
std::size_t size
);
Creates the LOB by deep-copying pContent.
Destructor
~LOB
~LOB();
Destroys the LOB.
Member Functions
appendRaw
void appendRaw(
const T * pChar,
std::size_t count
);
Assigns raw content to internal storage.
assignRaw
void assignRaw(
const T * ptr,
std::size_t count
);
Assigns raw content to internal storage.
assignVal
void assignVal(
std::size_t count,
const T & val
);
Assigns raw content to internal storage.
begin
Iterator begin() const;
capacity
std::size_t capacity() const;
Returns the capacity of the underlying buffer.
clear
void clear(
bool doCompact = false
);
Clears the content of the blob. If doCompact is true, trims the excess capacity.
compact
void compact();
Trims the internal storage excess capacity.
content
const std::vector < T > & content() const;
Returns the content.
end
Iterator end() const;
operator !=
bool operator != (
const LOB & other
) const;
Compares for inequality LOB by value.
operator =
LOB & operator = (
const LOB & other
);
Assignment operator.
operator =
LOB & operator = (
LOB && other
) noexcept;
operator ==
bool operator == (
const LOB & other
) const;
Compares for equality LOB by value.
rawContent
const T * rawContent() const;
Returns the raw content.
If the LOB is empty, returns NULL.
rawContent
T * rawContent();
Returns the raw content.
If the LOB is empty, returns NULL.
reserve
void reserve(
std::size_t size
);
Sets the capacity of the internal buffer.
resize
void resize(
std::size_t size
);
Resizes the internal buffer.
size
std::size_t size() const;
Returns the size of the LOB in bytes.
swap
void swap(
LOB & other
) noexcept;
Swaps the LOB with another one.