The MutableData object holds a pointer and size information to a mutable memory data location. More...
#include "murl_data.h"
Public Member Functions | |
| MutableData () | |
| The default constructor. | |
| MutableData (void *data, UInt64 byteSize) | |
| The constructor taking data and byte size. More... | |
| ~MutableData () override | |
| The destructor. | |
| template<class DataType > | |
| DataType * | GetMutableData () const |
| Get the pointer to the mutable memory data location. More... | |
| UInt8 * | GetMutableData () const |
| Get the pointer to the mutable memory data location. More... | |
| template<class DataType > | |
| DataType * | GetMutableData (UInt64 byteOffset) const |
| Get the pointer to the mutable memory data location including a byte offset. More... | |
| UInt8 * | GetMutableData (UInt64 byteOffset) const |
| Get the pointer to the mutable memory data location including a byte offset. More... | |
| UInt64 | CopyDataTo (MutableData &destination, UInt64 byteOffset) const |
| Copy the memory data to a destination data object. More... | |
| UInt64 | CopyFrom (const void *source, UInt64 byteSize, UInt64 byteOffset) const |
| Copy the memory data from a source memory location. More... | |
| UInt64 | CopyDataFrom (const ConstData &source, UInt64 byteOffset) const |
| Copy the memory data from a source data object. More... | |
Public Member Functions inherited from Murl::ConstData | |
| ConstData () | |
| The default constructor. | |
| ConstData (const void *data, const UInt64 byteSize) | |
| The constructor taking data and byte size. More... | |
| ~ConstData () override=default | |
| The destructor. | |
| virtual void | ReleaseData () |
| Release the data, set data pointer to null and size to zero. | |
| virtual void | AssignData (const void *data, UInt64 byteSize) |
| Assign a memory data location. More... | |
| Bool | IsEmpty () const |
| Check if the data object is empty. More... | |
| UInt32 | GetByteSize32 () const |
| Get the 32 bit byte size of the memory data location. More... | |
| UInt64 | GetByteSize () const |
| Get the byte size of the memory data location. More... | |
| template<class DataType > | |
| const DataType * | GetData () const |
| Get the pointer to the memory data location. More... | |
| const UInt8 * | GetData () const |
| Get the pointer to the memory data location. More... | |
| template<class DataType > | |
| const DataType * | GetData (UInt64 byteOffset) const |
| Get the pointer to the memory data location including a byte offset. More... | |
| const UInt8 * | GetData (UInt64 byteOffset) const |
| Get the pointer to the memory data location including a byte offset. More... | |
| UInt64 | CopyTo (void *destination, UInt64 byteSize, UInt64 byteOffset) const |
| Copy the memory data to a destination. More... | |
| String | GetString () const |
| Get a string from the memory data. More... | |
| String | GetString (UInt64 length) const |
| Get a string from the memory data with length. More... | |
| UInt64 | GetHashValue () const |
| Calculate the data hash value. More... | |
| bool | operator== (const ConstData &rhs) const |
| Equal to comparison operator. More... | |
| bool | operator!= (const ConstData &rhs) const |
| Not equal to comparison operator. More... | |
| bool | operator== (const String &rhs) const |
| Equal to comparison operator with string. More... | |
| bool | operator!= (const String &rhs) const |
| Not equal to comparison operator with string. More... | |
| void | CollectObjectStatistics (IObjectStatistics *stat) const override |
| Implementation of IStatisticsObject::CollectObjectStatistics(). More... | |
Detailed Description
The MutableData object holds a pointer and size information to a mutable memory data location.
Constructor & Destructor Documentation
◆ MutableData()
|
inline |
The constructor taking data and byte size.
- Parameters
-
data Pointer to the memory data location. byteSize Byte size of the memory data location.
Member Function Documentation
◆ GetMutableData() [1/4]
|
inline |
Get the pointer to the mutable memory data location.
- Template Parameters
-
DataType The type of the returned pointer.
- Returns
- The pointer to the mutable memory data location.
◆ GetMutableData() [2/4]
|
inline |
Get the pointer to the mutable memory data location.
- Returns
- The pointer to the mutable memory data location.
◆ GetMutableData() [3/4]
|
inline |
Get the pointer to the mutable 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 mutable memory data location or null if the byte offset is out of range.
◆ GetMutableData() [4/4]
Get the pointer to the mutable 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 mutable memory data location or null if the byte offset is out of range.
◆ CopyDataTo()
|
inline |
Copy the memory data to a destination data object.
The destination data object must have already assigned memory. A valid byte offset is in range [0 .. GetByteSize() - 1].
- Parameters
-
destination The the destination data object. byteOffset The source byte offset.
- Returns
- The number of bytes copied to the destination.
References Murl::ConstData::CopyTo().
◆ CopyFrom()
|
inline |
Copy the memory data from a source memory location.
The data object must have already assigned memory. A valid byte offset is in range [0 .. GetByteSize() - 1].
- Parameters
-
source The pointer to the source memory. byteSize The source byte size. byteOffset The destination byte offset.
- Returns
- The number of bytes copied to the destination.
References Murl::Util::MemCopy().
Referenced by Murl::BufferedData::AppendData(), and CopyDataFrom().
◆ CopyDataFrom()
Copy the memory data from a source data object.
The data object must have already assigned memory. A valid byte offset is in range [0 .. GetByteSize() - 1].
- Parameters
-
source The source data object. byteOffset The destination byte offset.
- Returns
- The number of bytes copied to the destination.
References CopyFrom().
The documentation for this class was generated from the following file:
- murl_data.h
Public Member Functions inherited from