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.
More...
#include <smart_ptr.h>
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.
◆ SmartPtrInfo() [1/2]
System::SmartPtrInfo::SmartPtrInfo |
( |
| ) |
|
|
inline |
◆ SmartPtrInfo() [2/2]
template<typename T >
System::SmartPtrInfo::SmartPtrInfo |
( |
const SmartPtr< T > & |
ptr | ) |
|
|
inlineexplicit |
Creates SmartPtrInfo object with information on specific smart pointer.
- Template Parameters
-
- Parameters
-
ptr | Smart pointer to create info for. |
◆ getInternalPtr()
const void * System::SmartPtrInfo::getInternalPtr |
( |
| ) |
const |
|
inline |
Gets raw object referenced pointer points to.
- Returns
- Raw pointer to object referenced smart pointer points to.
◆ getObject()
Object * System::SmartPtrInfo::getObject |
( |
| ) |
const |
|
inline |
Gets object referenced pointer points to.
- Returns
- Raw pointer to object referenced smart pointer points to.
◆ getOwned()
Object * System::SmartPtrInfo::getOwned |
( |
| ) |
const |
|
inline |
Gets object owned pointer.
- Returns
- Raw pointer to object owned smart pointer.
◆ operator bool()
System::SmartPtrInfo::operator bool |
( |
| ) |
const |
|
inline |
Checks if info object points to non-null pointer.
- Returns
- True if info object points to the pointer and this pointer is not null, false otherwise.
◆ operator!()
bool System::SmartPtrInfo::operator! |
( |
| ) |
const |
|
inline |
Checks if info object does not point to non-null pointer.
- Returns
- False if info object doesn't point to any pointer or if referenced pointer is null, true otherwise.
◆ operator->()
Object * System::SmartPtrInfo::operator-> |
( |
| ) |
const |
|
inline |
Allows to call methods of Object pointed by the referenced pointer.
- Returns
- Poinee object of referenced pointer.
◆ operator<()
bool System::SmartPtrInfo::operator< |
( |
const SmartPtrInfo & |
other | ) |
const |
|
inline |
Less-compares values of pointers referenced by two info objects.
- Parameters
-
other | Information on pointer to compare with. |
- Returns
- True if value of pointer referenced by current info object preceeds the value of other one, false otherwise..