10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
tenduke::utl::BinaryData Class Referenceabstract

#include <BinaryData.h>

Detailed Description

A holder of binary data.

Inheritance diagram for tenduke::utl::BinaryData:
tenduke::utl::MutableDataSpan tenduke::utl::DataSpan tenduke::utl::FixedSizeBinaryData tenduke::utl::SimpleBuffer

Public Member Functions

virtual unsigned char * getData () const =0
 Returns the data.
virtual std::size_t getLength () const =0
 Returns the length of data in bytes.
unsigned char * data () override
 Returns a mutable view of the underlying data.
const unsigned char * data () const override
 Returns a pointer to the beginning of the underlying sequence.
std::size_t size_bytes () const override
 Returns the size of the span in bytes.

Member Function Documentation

◆ data() [1/2]

const unsigned char * tenduke::utl::BinaryData::data ( ) const
inlineoverridevirtual

Returns a pointer to the beginning of the underlying sequence.

This provides a read-only view of the data.

Implements tenduke::utl::DataSpan.

◆ data() [2/2]

unsigned char * tenduke::utl::BinaryData::data ( )
inlineoverridevirtual

Returns a mutable view of the underlying data.

This provides a writable view of the data, allowing modification of the data.

Returns
the mutable view

Implements tenduke::utl::MutableDataSpan.

◆ getData()

virtual unsigned char * tenduke::utl::BinaryData::getData ( ) const
pure virtual

Returns the data.

DO NOT free() or delete() this: The class maintains the data. The data is mutable.

Implemented in FixedSizeBinaryData, SimpleBuffer, tenduke::utl::FixedSizeBinaryData, and tenduke::utl::SimpleBuffer.

◆ getLength()

virtual std::size_t tenduke::utl::BinaryData::getLength ( ) const
pure virtual

Returns the length of data in bytes.

Implemented in FixedSizeBinaryData, SimpleBuffer, tenduke::utl::FixedSizeBinaryData, and tenduke::utl::SimpleBuffer.

◆ size_bytes()

std::size_t tenduke::utl::BinaryData::size_bytes ( ) const
inlineoverridevirtual

Returns the size of the span in bytes.

Returns
size of the span in bytes

Implements tenduke::utl::DataSpan.


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