LibreOffice Module vcl (master) 1
|
Container for the binary data, whose responsibility is to manage the make it as simple as possible to manage the binary data. More...
#include <BinaryDataContainer.hxx>
Classes | |
struct | Impl |
Public Member Functions | |
BinaryDataContainer ()=default | |
BinaryDataContainer (SvStream &stream, size_t size) | |
BinaryDataContainer (const BinaryDataContainer &rBinaryDataContainer)=default | |
BinaryDataContainer (BinaryDataContainer &&rBinaryDataContainer) noexcept=default | |
BinaryDataContainer & | operator= (const BinaryDataContainer &rBinaryDataContainer)=default |
BinaryDataContainer & | operator= (BinaryDataContainer &&rBinaryDataContainer) noexcept=default |
size_t | getSize () const |
bool | isEmpty () const |
const sal_uInt8 * | getData () const |
css::uno::Sequence< sal_Int8 > | getCopyAsByteSequence () const |
std::shared_ptr< SvStream > | getAsStream () |
css::uno::Reference< css::io::XInputStream > | getAsXInputStream () |
std::size_t | writeToStream (SvStream &rStream) const |
writes the contents to the given stream More... | |
std::size_t | getSizeBytes () const |
return the in-memory size in bytes as of now. More... | |
void | swapOut () const |
swap out to disk for now More... | |
size_t | calculateHash () const |
Private Member Functions | |
void | ensureSwappedIn () const |
Private Attributes | |
std::shared_ptr< Impl > | mpImpl |
Container for the binary data, whose responsibility is to manage the make it as simple as possible to manage the binary data.
The binary data can be anything, but typically it is a in-memory data from files (i.e. files of graphic formats).
Definition at line 29 of file BinaryDataContainer.hxx.
|
default |
BinaryDataContainer::BinaryDataContainer | ( | SvStream & | stream, |
size_t | size | ||
) |
Definition at line 72 of file BinaryDataContainer.cxx.
|
default |
|
defaultnoexcept |
size_t BinaryDataContainer::calculateHash | ( | ) | const |
Definition at line 77 of file BinaryDataContainer.cxx.
References getSize(), o3tl::hash_combine(), and mpImpl.
Referenced by GfxLink::GetHash().
|
private |
Definition at line 175 of file BinaryDataContainer.cxx.
References mpImpl.
Referenced by getAsStream(), getAsXInputStream(), getData(), getSize(), isEmpty(), and writeToStream().
std::shared_ptr< SvStream > BinaryDataContainer::getAsStream | ( | ) |
Definition at line 134 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), and mpImpl.
Referenced by vcl::ExternalPDFStream::getPDFDocument(), and GraphicFilter::ImportUnloadedGraphic().
css::uno::Reference< css::io::XInputStream > BinaryDataContainer::getAsXInputStream | ( | ) |
Definition at line 140 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), and mpImpl.
Referenced by VectorGraphicData::ensureSequenceAndRange().
css::uno::Sequence< sal_Int8 > BinaryDataContainer::getCopyAsByteSequence | ( | ) | const |
Definition at line 89 of file BinaryDataContainer.cxx.
References aData, getSize(), isEmpty(), and mpImpl.
Referenced by UnoBinaryDataContainer::getCopyAsByteSequence().
const sal_uInt8 * BinaryDataContainer::getData | ( | ) | const |
Definition at line 169 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), and mpImpl.
Referenced by VectorGraphicData::ensurePdfReplacement(), VectorGraphicData::GetChecksum(), GfxLink::GetData(), VectorGraphicData::operator==(), vcl::ExternalPDFStreams::store(), and writeToStream().
size_t BinaryDataContainer::getSize | ( | ) | const |
Definition at line 152 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), and mpImpl.
Referenced by calculateHash(), VectorGraphicData::ensurePdfReplacement(), VectorGraphicData::GetChecksum(), getCopyAsByteSequence(), GfxLink::GetDataSize(), VectorGraphicData::getSizeBytes(), VectorGraphicData::operator==(), vcl::ExternalPDFStreams::store(), and writeToStream().
size_t BinaryDataContainer::getSizeBytes | ( | ) | const |
return the in-memory size in bytes as of now.
Definition at line 158 of file BinaryDataContainer.cxx.
References mpImpl.
Referenced by GfxLink::getSizeBytes().
bool BinaryDataContainer::isEmpty | ( | ) | const |
Definition at line 163 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), and mpImpl.
Referenced by VectorGraphicData::ensureSequenceAndRange(), getCopyAsByteSequence(), VectorGraphicData::getSizeBytes(), GraphicFilter::ImportGraphic(), vcl::ImportPDFUnloaded(), vcl::importPdfVectorGraphicData(), GraphicFilter::ImportUnloadedGraphic(), GfxLink::LoadNative(), vcl::loadVectorGraphic(), and GraphicFilter::readPNG().
|
defaultnoexcept |
|
default |
void BinaryDataContainer::swapOut | ( | ) | const |
swap out to disk for now
Definition at line 181 of file BinaryDataContainer.cxx.
References comphelper::LibreOfficeKit::isActive(), and mpImpl.
std::size_t BinaryDataContainer::writeToStream | ( | SvStream & | rStream | ) | const |
writes the contents to the given stream
Definition at line 146 of file BinaryDataContainer.cxx.
References ensureSwappedIn(), getData(), getSize(), and SvStream::WriteBytes().
|
private |
Definition at line 33 of file BinaryDataContainer.hxx.
Referenced by calculateHash(), ensureSwappedIn(), getAsStream(), getAsXInputStream(), getCopyAsByteSequence(), getData(), getSize(), getSizeBytes(), isEmpty(), and swapOut().