|
BDE 4.39.x Production Release
|
#include <bdlma_memoryblockdescriptor.h>
This is an in-core value-semantic class describing the size and address of a block of memory. A null block descriptor is defined as a descriptor having an address and size of 0.
Public Types | |
| typedef bsls::Types::size_type | size_type |
Public Member Functions | |
| MemoryBlockDescriptor () | |
| MemoryBlockDescriptor (void *address, size_type size) | |
| MemoryBlockDescriptor (const MemoryBlockDescriptor &original) | |
| ~MemoryBlockDescriptor ()=default | |
| MemoryBlockDescriptor & | operator= (const MemoryBlockDescriptor &rhs) |
| void | setAddressAndSize (void *address, size_type size) |
| bool | isNull () const |
| void * | address () const |
| size_type | size () const |
| void | print () const |
|
inline |
Create a memory block descriptor having an address and size of 0.
|
inline |
Create a memory block descriptor having the specified address and size.
address is 0 but size is not also 0.
|
inline |
Create a memory block descriptor having the same value as the specified original descriptor. Two descriptors have the same value if and only if they have the same address and size.
|
default |
Destroy this object.
|
inline |
Return the address of the modifiable memory block described by this object, or 0 if this is a null descriptor.
|
inline |
Return true if this memory block descriptor describes a null memory block and false otherwise. A null memory block has an address and size of 0.
|
inline |
Assign to this memory block descriptor the value of the specified rhs descriptor and return a reference to this modifiable descriptor.
| void bdlma::MemoryBlockDescriptor::print | ( | ) | const |
Format the attributes of this memory block descriptor to stdout in some reasonable (single-line) format.
|
inline |
Set the address and size of the memory block described by this object to the specified address and size.
size is not also 0.
|
inline |
Return the size of the memory block described by this object.