The ConstData object holds a pointer and size information to a read-only memory data location.
More...
#include <murl_data.h>
The ConstData object holds a pointer and size information to a read-only memory data location.
see also Data, BufferedData
◆ ConstData()
Murl::ConstData::ConstData |
( |
const void * |
data, |
|
|
UInt64 |
byteSize |
|
) |
| |
|
inline |
The constructor taking data and byte size.
- Parameters
-
data | Pointer to the memory data location. |
byteSize | Byte size of the memory data location. |
◆ AssignData()
virtual void Murl::ConstData::AssignData |
( |
const void * |
data, |
|
|
UInt64 |
byteSize |
|
) |
| |
|
inlinevirtual |
Assign a memory data location.
- Parameters
-
data | Pointer to the memory data location. |
byteSize | Byte size of the memory data location. |
Reimplemented in Murl::BufferedData, and Murl::Data.
◆ IsEmpty()
Bool Murl::ConstData::IsEmpty |
( |
| ) |
const |
|
inline |
Check if the data object is empty.
- Returns
- true if the data pointer is null.
◆ GetByteSize32()
UInt32 Murl::ConstData::GetByteSize32 |
( |
| ) |
const |
|
inline |
Get the 32 bit byte size of the memory data location.
- Returns
- The 32 bit byte size of the memory data location or zero if the memory data byte size does not fit into 32 bit.
◆ GetByteSize()
UInt64 Murl::ConstData::GetByteSize |
( |
| ) |
const |
|
inline |
Get the byte size of the memory data location.
- Returns
- The byte size of the memory data location.
◆ GetData() [1/4]
template<class DataType >
const DataType* Murl::ConstData::GetData |
( |
| ) |
const |
|
inline |
Get the pointer to the memory data location.
- Template Parameters
-
DataType | The type of the returned pointer. |
- Returns
- The pointer to the memory data location.
◆ GetData() [2/4]
const UInt8* Murl::ConstData::GetData |
( |
| ) |
const |
|
inline |
Get the pointer to the memory data location.
- Returns
- The pointer to the memory data location.
◆ GetData() [3/4]
template<class DataType >
const DataType* Murl::ConstData::GetData |
( |
UInt64 |
byteOffset | ) |
const |
|
inline |
Get the pointer to the memory data location including a byte offset.
A valid byte offset is in range [0 .. GetByteSize() - 1].
- Template Parameters
-
DataType | The type of the returned pointer. |
- Parameters
-
byteOffset | The byte offset. |
- Returns
- The pointer to the memory data location or null if the byte offset is out of range.
◆ GetData() [4/4]
const UInt8* Murl::ConstData::GetData |
( |
UInt64 |
byteOffset | ) |
const |
|
inline |
Get the pointer to the memory data location including a byte offset.
A valid byte offset is in range [0 .. GetByteSize() - 1].
- Parameters
-
byteOffset | The byte offset. |
- Returns
- The pointer to the memory data location or null if the byte offset is out of range.
◆ CopyTo()
UInt64 Murl::ConstData::CopyTo |
( |
void * |
destination, |
|
|
UInt64 |
byteSize, |
|
|
UInt64 |
byteOffset |
|
) |
| const |
|
inline |
Copy the memory data to a destination.
A valid byte offset is in range [0 .. GetByteSize() - 1].
- Parameters
-
destination | The pointer to the destination memory. |
byteSize | The destination byte size. |
byteOffset | The source byte offset. |
- Returns
- The number of bytes copied to the destination.
◆ GetString() [1/2]
String Murl::ConstData::GetString |
( |
| ) |
const |
|
inline |
Get a string from the memory data.
(!) This method does not take care of zero termination.
- Returns
- The string object containing the memory data.
◆ GetString() [2/2]
Get a string from the memory data with length.
(!) This method does not take care of zero termination.
- Parameters
-
length | The length of the string. |
- Returns
- The string object containing the memory data.
◆ GetHashValue()
UInt64 Murl::ConstData::GetHashValue |
( |
| ) |
const |
|
inline |
Calculate the data hash value.
- Returns
- The hash value.
◆ operator==() [1/2]
bool Murl::ConstData::operator== |
( |
const ConstData & |
rhs | ) |
const |
|
inline |
Equal to comparison operator.
- Parameters
-
rhs | The right hand side data to compare. |
- Returns
- true if the memory bytes are equal.
◆ operator!=() [1/2]
bool Murl::ConstData::operator!= |
( |
const ConstData & |
rhs | ) |
const |
|
inline |
Not equal to comparison operator.
- Parameters
-
rhs | The right hand side data to compare. |
- Returns
- true if the memory bytes are not equal.
◆ operator==() [2/2]
bool Murl::ConstData::operator== |
( |
const String & |
rhs | ) |
const |
|
inline |
Equal to comparison operator with string.
- Parameters
-
rhs | The right hand side string to compare. |
- Returns
- true if the memory and string bytes are equal.
◆ operator!=() [2/2]
bool Murl::ConstData::operator!= |
( |
const String & |
rhs | ) |
const |
|
inline |
Not equal to comparison operator with string.
- Parameters
-
rhs | The right hand side string to compare. |
- Returns
- true if the memory and string bytes are not equal.
The documentation for this class was generated from the following file: