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

#include <DataSpan.h>

Detailed Description

A span of binary data.

This interface represents a span of binary data, providing access to the data and its size.

The data is not guaranteed to be valid or accessible after the DataSpan object is destroyed.

This interface is modeled after std::span from C++ 20, but with a focus on binary data and read-only access.

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

Public Member Functions

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

Member Function Documentation

◆ data()

virtual const unsigned char * tenduke::utl::DataSpan::data ( ) const
pure virtual

Returns a pointer to the beginning of the underlying sequence.

This provides a read-only view of the data.

Implemented in BinaryData, tenduke::utl::BinaryData, and tenduke::utl::BinaryView.

◆ size_bytes()

virtual std::size_t tenduke::utl::DataSpan::size_bytes ( ) const
pure virtual

Returns the size of the span in bytes.

Returns
size of the span in bytes

Implemented in BinaryData, tenduke::utl::BinaryData, and tenduke::utl::BinaryView.


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