LibreOffice Module vcl (master)  1
Public Member Functions | Private Attributes | List of all members
BinaryDataContainer Class Referencefinal

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>

Public Member Functions

 BinaryDataContainer ()
 
 BinaryDataContainer (const sal_uInt8 *pData, size_t nSize)
 
 BinaryDataContainer (std::unique_ptr< std::vector< sal_uInt8 >> rData)
 
 BinaryDataContainer (const BinaryDataContainer &rBinaryDataContainer)
 
 BinaryDataContainer (BinaryDataContainer &&rBinaryDataContainer) noexcept
 
BinaryDataContaineroperator= (const BinaryDataContainer &rBinaryDataContainer)
 
BinaryDataContaineroperator= (BinaryDataContainer &&rBinaryDataContainer) noexcept
 
size_t getSize () const
 
bool isEmpty () const
 
const sal_uInt8getData () const
 
size_t calculateHash () const
 
auto cbegin ()
 
auto cend ()
 

Private Attributes

std::shared_ptr< std::vector< sal_uInt8 > > mpData
 

Detailed Description

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 22 of file BinaryDataContainer.hxx.

Constructor & Destructor Documentation

BinaryDataContainer::BinaryDataContainer ( )
default
BinaryDataContainer::BinaryDataContainer ( const sal_uInt8 pData,
size_t  nSize 
)

Definition at line 16 of file BinaryDataContainer.cxx.

References make_shared(), and mpData.

BinaryDataContainer::BinaryDataContainer ( std::unique_ptr< std::vector< sal_uInt8 >>  rData)

Definition at line 22 of file BinaryDataContainer.cxx.

References aData.

BinaryDataContainer::BinaryDataContainer ( const BinaryDataContainer rBinaryDataContainer)
inline

Definition at line 33 of file BinaryDataContainer.hxx.

BinaryDataContainer::BinaryDataContainer ( BinaryDataContainer &&  rBinaryDataContainer)
inlinenoexcept

Definition at line 38 of file BinaryDataContainer.hxx.

Member Function Documentation

size_t BinaryDataContainer::calculateHash ( ) const

Definition at line 27 of file BinaryDataContainer.cxx.

References getSize(), o3tl::hash_combine(), and mpData.

Referenced by GfxLink::GetHash().

auto BinaryDataContainer::cbegin ( )
inline

Definition at line 61 of file BinaryDataContainer.hxx.

Referenced by VectorGraphicData::ensureSequenceAndRange().

auto BinaryDataContainer::cend ( )
inline

Definition at line 63 of file BinaryDataContainer.hxx.

Referenced by VectorGraphicData::ensureSequenceAndRange().

const sal_uInt8* BinaryDataContainer::getData ( ) const
inline
size_t BinaryDataContainer::getSize ( ) const
inline
bool BinaryDataContainer::isEmpty ( ) const
inline
BinaryDataContainer& BinaryDataContainer::operator= ( const BinaryDataContainer rBinaryDataContainer)
inline

Definition at line 43 of file BinaryDataContainer.hxx.

References mpData.

BinaryDataContainer& BinaryDataContainer::operator= ( BinaryDataContainer &&  rBinaryDataContainer)
inlinenoexcept

Definition at line 49 of file BinaryDataContainer.hxx.

Member Data Documentation

std::shared_ptr<std::vector<sal_uInt8> > BinaryDataContainer::mpData
private

Definition at line 26 of file BinaryDataContainer.hxx.

Referenced by BinaryDataContainer(), calculateHash(), and operator=().


The documentation for this class was generated from the following files: