23 #ifndef __ccxx_MemoryBlock_hxx 24 #define __ccxx_MemoryBlock_hxx 88 {
return(!
operator==(other)); }
95 byte_t operator[](
int index)
const;
102 byte_t& operator[](
int index);
138 {
return(_base == NULL); }
154 #endif // __ccxx_MemoryBlock_hxx virtual void setBase(byte_t *base)
Set the pointer to the beginning of the memory block.
Definition: MemoryBlock.h++:72
byte_t * getBase()
Get a pointer to the beginning of the memory block.
Definition: MemoryBlock.h++:64
An encapsulation of a block of memory.
Definition: MemoryBlock.h++:37
virtual ~MemoryBlock()
Destructor.
Definition: MemoryBlock.h++:53
size_t getSize() const
Get the size of the memory block.
Definition: MemoryBlock.h++:76
void setSize(size_t size)
Set the size of the memory block.
Definition: MemoryBlock.h++:80
bool operator==(const Blob &b1, const Blob &b2)
Definition: Blob.h++:344
void zero()
Zero the memory block.
Definition: MemoryBlock.h++:57
unsigned int uint_t
An alias for unsigned int.
Definition: Integers.h++:74
bool operator!() const
Test if the base of the block is NULL.
Definition: MemoryBlock.h++:137
size_t _size
The size of the memory block, in bytes.
Definition: MemoryBlock.h++:145
#define COMMONCPP_API
Definition: Common.h++:126
MemoryBlock(byte_t *base=NULL, size_t size=0)
Construct a new MemoryBlock.
Definition: MemoryBlock.h++:47
#define CCXX_COPY_DECLS(CLASS)
Inlines declarations of a copy constructor and assignment operator for the class CLASS.
Definition: Common.h++:295
byte_t * _base
A pointer to the beginning of the memory block.
Definition: MemoryBlock.h++:143
bool operator!=(const MemoryBlock &other) const
Inequality operator.
Definition: MemoryBlock.h++:87
Definition: AllocationMap.c++:25
const byte_t * getBase() const
Get a pointer to the beginning of the memory block.
Definition: MemoryBlock.h++:68
unsigned char byte_t
An unsigned 8-bit value.
Definition: Integers.h++:68