Utility class for fixed size binary data.
Maintains memory for the contained memory area. The memory is wiped (overwritten with zeros) when the instance is destroyed.
|
| | FixedSizeBinaryData (std::size_t length) |
| | Constructs new instance by allocating memory of length bytes.
|
| | FixedSizeBinaryData (std::unique_ptr< unsigned char[]> data, std::size_t length) |
| | Constructs new instance by taking ownership of given data.
|
| | FixedSizeBinaryData (const unsigned char *data, std::size_t length) |
| | Constructs new instance by copying the provided data.
|
| | FixedSizeBinaryData (const FixedSizeBinaryData ©) |
| | Copy constructs new instance.
|
| | FixedSizeBinaryData (const BinaryData ©) |
| | Copy constructs new instance.
|
| | FixedSizeBinaryData (const ::tenduke::utl::DataSpan ©) |
| | Copy constructs new instance.
|
|
| ~FixedSizeBinaryData () override |
| | Destructs the instance, frees contained data.
|
| unsigned char * | getData () const override |
| | Returns pointer to the data.
|
| std::size_t | getLength () const override |
| | Returns length of the data.
|
| 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.
|
| virtual const unsigned char * | data () const=0 |
| | Returns a pointer to the beginning of the underlying sequence.
|