Facilitate tracking of all Ptr objects in this run.
More...
#include <Ptr.h>
|
| ~PtrTracker () |
|
PtrInfo & | GetInfo (const void *ptr) |
| Get the info associated with an existing pointer. More...
|
|
PtrInfo & | GetInfo (size_t id) |
|
bool | HasPtr (const void *ptr) const |
| Determine if a pointer is being tracked. More...
|
|
size_t | GetCurID (const void *ptr) |
| Retrive the ID associated with a pointer. More...
|
|
size_t | GetNumIDs () const |
| Lookup how many pointers are being tracked. More...
|
|
size_t | GetArrayBytes (size_t id) const |
| How big is an array associated with an ID? More...
|
|
bool | IsDeleted (size_t id) const |
| Check if an ID is for a pointer that has been deleted. More...
|
|
bool | IsActive (const void *ptr) |
| Is a pointer active and ready to be used? More...
|
|
bool | IsActiveID (size_t id) |
| Is a pointer id associated with a pointer that's active and ready to be used? More...
|
|
bool | IsArrayID (size_t id) |
| Is an ID associated with an array? More...
|
|
int | GetIDCount (size_t id) const |
| How many Ptr objects are associated with an ID? More...
|
|
size_t | New (const void *ptr) |
| This pointer was just created as a Ptr! More...
|
|
size_t | NewArray (const void *ptr, size_t array_bytes) |
| This pointer was just created as a Ptr ARRAY! More...
|
|
void | IncID (size_t id) |
| Increment the nuber of Pointers associated with an ID. More...
|
|
void | DecID (size_t id) |
| Decrement the nuber of Pointers associated with an ID. More...
|
|
void | MarkDeleted (size_t id) |
| Mark the pointers associated with this ID as deleted. More...
|
|
Facilitate tracking of all Ptr objects in this run.
emp::PtrTracker::~PtrTracker |
( |
| ) |
|
|
inline |
void emp::PtrTracker::DecID |
( |
size_t |
id | ) |
|
|
inline |
Decrement the nuber of Pointers associated with an ID.
Treat this class as a singleton with a single Get() method to retrieve it.
size_t emp::PtrTracker::GetArrayBytes |
( |
size_t |
id | ) |
const |
|
inline |
How big is an array associated with an ID?
size_t emp::PtrTracker::GetCurID |
( |
const void * |
ptr | ) |
|
|
inline |
Retrive the ID associated with a pointer.
int emp::PtrTracker::GetIDCount |
( |
size_t |
id | ) |
const |
|
inline |
How many Ptr objects are associated with an ID?
PtrInfo& emp::PtrTracker::GetInfo |
( |
const void * |
ptr | ) |
|
|
inline |
Get the info associated with an existing pointer.
PtrInfo& emp::PtrTracker::GetInfo |
( |
size_t |
id | ) |
|
|
inline |
size_t emp::PtrTracker::GetNumIDs |
( |
| ) |
const |
|
inline |
Lookup how many pointers are being tracked.
bool emp::PtrTracker::HasPtr |
( |
const void * |
ptr | ) |
const |
|
inline |
Determine if a pointer is being tracked.
void emp::PtrTracker::IncID |
( |
size_t |
id | ) |
|
|
inline |
Increment the nuber of Pointers associated with an ID.
bool emp::PtrTracker::IsActive |
( |
const void * |
ptr | ) |
|
|
inline |
Is a pointer active and ready to be used?
bool emp::PtrTracker::IsActiveID |
( |
size_t |
id | ) |
|
|
inline |
Is a pointer id associated with a pointer that's active and ready to be used?
bool emp::PtrTracker::IsArrayID |
( |
size_t |
id | ) |
|
|
inline |
Is an ID associated with an array?
bool emp::PtrTracker::IsDeleted |
( |
size_t |
id | ) |
const |
|
inline |
Check if an ID is for a pointer that has been deleted.
void emp::PtrTracker::MarkDeleted |
( |
size_t |
id | ) |
|
|
inline |
Mark the pointers associated with this ID as deleted.
size_t emp::PtrTracker::New |
( |
const void * |
ptr | ) |
|
|
inline |
This pointer was just created as a Ptr!
size_t emp::PtrTracker::NewArray |
( |
const void * |
ptr, |
|
|
size_t |
array_bytes |
|
) |
| |
|
inline |
This pointer was just created as a Ptr ARRAY!
The documentation for this class was generated from the following file: