BloombergLP::bdlma::MemoryBlockDescriptor

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. The behavior is undefined for a descriptor whose address is 0, but whose size if not also 0.

Synopsis

Declared in <bdlma_memoryblockdescriptor.h>

class MemoryBlockDescriptor;

Type Aliases

NameDescription
size_type This typedef is an alias for the block size type.

Member Functions

NameDescription
MemoryBlockDescriptor [constructor]Constructors
operator= Assign to this memory block descriptor the value of the specified rhs descriptor and return a reference to this modifiable descriptor.
address Return the address of the modifiable memory block described by this object, or 0 if this is a null descriptor.
isNull 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.
print Format the attributes of this memory block descriptor to stdout in some reasonable (single-line) format.
setAddressAndSize Set the address and size of the memory block described by this object to the specified address and size. The behavior is undefined if address' is 0 but size` is not also 0.
size Return the size of the memory block described by this object.

Non-Member Functions

NameDescription
operator!=Return true if the specified lhs and rhs memory block descriptors do not have the same value and false otherwise. Two descriptors differ in value if they differ in either their address or size.
operator==Return true if the specified lhs and rhs memory block descriptors have the same value and false otherwise. Two descriptors have the same value if and only if they have the same address and size.