SmartPtrInfo

SmartPtrInfo class

Service class to test and alter SmartPtr’s contents without knowing final type. Used for garbage collection and loop references detection, etc. Think of it as of ‘pointer to pointer’. We can’t use SmartPtr’s basetype as it doesn’t have any; instead, we use this ‘info’ class.

class SmartPtrInfo

Methods

MethodDescription
const void * getInternalPtr() constGets raw object referenced pointer points to.
Object * getObject() constGets object referenced pointer points to.
Object * getOwned() constGets object owned pointer.
operator bool() constChecks if info object points to non-null pointer.
bool operator!() constChecks if info object does not point to non-null pointer.
Object * operator->() constAllows to call methods of Object pointed by the referenced pointer.
bool operator<(const SmartPtrInfo&) constLess-compares values of pointers referenced by two info objects.
SmartPtrInfo()Creates empty SmartPtrInfo object.
explicit SmartPtrInfo(const SmartPtr<T>&)Creates SmartPtrInfo object with information on specific smart pointer.

See Also