Concrete Python
git-339c971
|
#include <concrete/pointer.hpp>
Classes | |
struct | RawAccess |
Public Member Functions | |
Pointer () throw () | |
Pointer (const Pointer &other) throw () | |
void | operator= (const Pointer &other) throw () |
bool | operator== (const Pointer &other) const throw () |
bool | operator!= (const Pointer &other) const throw () |
operator bool () const throw () | |
bool | operator! () const throw () |
template<typename PointerType > | |
PointerType | cast () const throw () |
unsigned int | address () const throw () |
Protected Member Functions | |
Pointer (unsigned int address) throw () | |
void | reset_address (unsigned int address) throw () |
template<typename DataType > | |
DataType * | data_cast () const |
template<typename DataType > | |
DataType * | nonthrowing_data_cast () const throw () |
template<typename DataType > | |
void | extend_data_access (size_t extension_size) const |
template<typename DataType > | |
bool | nonthrowing_extend_data_access (size_t extension_size) const throw () |
Static Protected Member Functions | |
template<typename PointerType , typename... Args> | |
static PointerType | NewPointer (Args...args) |
template<typename PointerType , typename... Args> | |
static PointerType | NewCustomSizePointer (size_t size, Args...args) |
template<typename PointerType > | |
static void | DestroyPointer (PointerType &pointer) throw () |
template<typename DataType > | |
static void | DestroyData (unsigned int address, DataType *data) throw () |
template<typename PointerType > | |
static void | DestroyExtendedPointer (PointerType &pointer, typename PointerType::Data *data, size_t extension_size) throw () |
template<typename DataType > | |
static void | DestroyExtendedData (unsigned int address, DataType *data, size_t extension_size) throw () |
template<typename DataType > | |
static DataType * | DataCast (unsigned int address) |
template<typename DataType > | |
static DataType * | NonthrowingDataCast (unsigned int address) throw () |
template<typename DataType > | |
static void | ExtendDataAccess (unsigned int address, size_t extension_size) |
template<typename DataType > | |
static bool | NonthrowingExtendDataAccess (unsigned int address, size_t extension_size) throw () |
Indirect pointer to arena memory. Non-abstract subclasses must declare a nested Data struct which represents the memory allocation. Data destructors must be non-throwing.
Pointer | ( | ) | throw () |
Null pointer.
Pointer | ( | unsigned int | address | ) | throw () [explicit, protected] |
Reference to the memory block at an explicit arena offset.
unsigned int address | ( | ) | const throw () |
PointerType cast | ( | ) | const throw () |
Get a typed reference.
DataType * data_cast | ( | ) | const [protected] |
Direct typed arena memory access to the fixed-size block.
IntegrityError |
DataType * DataCast | ( | unsigned int | address | ) | [static, protected] |
Direct typed arena memory access to a fixed-size block.
IntegrityError |
void DestroyData | ( | unsigned int | address, |
DataType * | data | ||
) | throw () [static, protected] |
Delete an instance.
address | must not be 0 |
data | must be a valid direct pointer to arena memory corresponding to address |
void DestroyExtendedData | ( | unsigned int | address, |
DataType * | data, | ||
size_t | extension_size | ||
) | throw () [static, protected] |
Delete an instance with extended data type.
address | must not be 0 |
data | must be a valid direct pointer to arena memory corresponding to address |
extension_size | doesn't include the DataType size |
void DestroyExtendedPointer | ( | PointerType & | pointer, |
typename PointerType::Data * | data, | ||
size_t | extension_size | ||
) | throw () [static, protected] |
Delete a PointerType instance with extended data type. The reference will be reset to null.
pointer | may be null |
data | must be a valid direct pointer to arena memory corresponding to pointer |
extension_size | doesn't include the Data struct size |
void DestroyPointer | ( | PointerType & | pointer | ) | throw () [static, protected] |
Delete a PointerType instance. The reference will be reset to null.
pointer | may be null |
void extend_data_access | ( | size_t | extension_size | ) | const [protected] |
Extend previously aquired access to the arena memory block.
extension_size | doesn't include the DataType size |
IntegrityError |
void ExtendDataAccess | ( | unsigned int | address, |
size_t | extension_size | ||
) | [static, protected] |
Extend an already aquired access to an arena memory block.
extension_size | doesn't include the DataType size |
IntegrityError |
PointerType NewCustomSizePointer | ( | size_t | size, |
Args... | args | ||
) | [static, protected] |
Create a PointerType instance.
size | of the memory allocation for extended data types (including the Data struct size) |
AllocationError | |
... |
PointerType NewPointer | ( | Args... | args | ) | [static, protected] |
DataType * nonthrowing_data_cast | ( | ) | const throw () [protected] |
Direct typed arena memory access to the fixed-size block.
bool nonthrowing_extend_data_access | ( | size_t | extension_size | ) | const throw () [protected] |
Extend previously aquired access to the arena memory block.
extension_size | doesn't include the DataType size |
DataType * NonthrowingDataCast | ( | unsigned int | address | ) | throw () [static, protected] |
Direct typed arena memory access to a fixed-size block.
bool NonthrowingExtendDataAccess | ( | unsigned int | address, |
size_t | extension_size | ||
) | throw () [static, protected] |
Extend an already aquired access to an arena memory block.
extension_size | doesn't include the DataType size |
operator bool | ( | ) | const throw () |
Reimplemented in Object.
void operator= | ( | const Pointer & | other | ) | throw () |
Replace the reference.
bool operator== | ( | const Pointer & | other | ) | const throw () |
Memory address comparison.
void reset_address | ( | unsigned int | address | ) | throw () [protected] |
Replace the reference.