|
10Duke Enterprise C++ SDK
|
#include <BinaryView.h>
A read-only view of binary data.
This class represents a read-only view of binary data, providing access to the data and its size.
The class can wrap various sources of binary data, including raw pointers, fixed-size arrays, and strings.
As a "view" it does not manage the contained data.
You can use factory functions to create instances of BinaryView from various sources, for example:
Public Member Functions | |
| BinaryView (const unsigned char *data, const std::size_t size) | |
| Constructs a new instance. | |
| const unsigned char * | data () const override |
| Returns a pointer to the beginning of the underlying sequence.This provides a read-only view of the data. | |
| std::size_t | size_bytes () const override |
Returns the size of the span in bytes.
| |
|
inline |
Constructs a new instance.
| data | the binary data |
| size | the size of the binary data in bytes |
|
inlineoverridevirtual |
Returns a pointer to the beginning of the underlying sequence.This provides a read-only view of the data.
Implements tenduke::utl::DataSpan.
|
inlineoverridevirtual |
Returns the size of the span in bytes.
Implements tenduke::utl::DataSpan.