cpp-mate  0.7
Helpful library for C++.
CppMate::BinaryData Class Referenceabstract

Represents interface of abstract binary data. More...

#include <BinaryData.hpp>

Inheritance diagram for CppMate::BinaryData:

Classes

class  Empty
 Represents implementation of BinaryData interface for empty data. More...
 
class  Window
 Represents window within provided BinaryData. More...
 
class  Wrapper
 Represents implementation of BinaryData interface for exisitng data. More...
 

Public Member Functions

virtual ~BinaryData ()=default
 
virtual const uint8_t * getData () const =0
 Returns address of data. More...
 
virtual uint64_t getSize () const =0
 Returns size of data in bytes. More...
 
bool hasData () const
 Returns status of a data presence. More...
 
bool operator== (const BinaryData &other) const
 operator == More...
 
bool operator!= (const BinaryData &other) const
 operator != More...
 

Detailed Description

Represents interface of abstract binary data.

Constructor & Destructor Documentation

◆ ~BinaryData()

virtual CppMate::BinaryData::~BinaryData ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ getData()

virtual const uint8_t* CppMate::BinaryData::getData ( ) const
pure virtual

Returns address of data.

Returns
address of data.

Implemented in CppMate::BinarySink::Memory, CppMate::BinaryData::Window, CppMate::BinaryData::Empty, and CppMate::BinaryData::Wrapper.

◆ getSize()

virtual uint64_t CppMate::BinaryData::getSize ( ) const
pure virtual

Returns size of data in bytes.

Returns
size of data.

Implemented in CppMate::BinarySink::Memory, CppMate::BinaryData::Window, CppMate::BinaryData::Empty, and CppMate::BinaryData::Wrapper.

◆ hasData()

bool CppMate::BinaryData::hasData ( ) const
inline

Returns status of a data presence.

Returns
returns true if data address is not null and size of data greater than zero; false otherwise.

◆ operator!=()

bool CppMate::BinaryData::operator!= ( const BinaryData other) const
inline

operator !=

Parameters
otherthe instance to compare.
Returns
false if instances is equal; true otherwise.

◆ operator==()

bool CppMate::BinaryData::operator== ( const BinaryData other) const
inline

operator ==

Parameters
otherthe instance to compare.
Returns
true if instances is equal; false otherwise.

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