|
The Vish Visualization Shell 0.3
Vish
|
Encapsuled pointer class for pointers pointing to derived classes. More...
#include <elementary/memcore/DynPtr.hpp>
Public Types | |
| typedef Object | object_t |
| Type of the associated object. | |
Public Member Functions | |
| const DynPtr & | getDynPtr () const noexcept |
| Convenience type cast to dynamic pointer class. | |
| const type_info & | getType () const noexcept |
| Return type info of associated object, typeid(NullPtr) or typeid(void) if none. | |
| bool | isAssignable (const DynPtr< ObjectBase, ObjectBase > &Other) const noexcept |
| Check whether a given pointer to a base class may be assigned to a pointer of the derived class. | |
Static Public Member Functions | |
| static const DynPtr & | getNullPtr () noexcept |
| Associated static NullPtr - avoids creation of a temporary object when a reference is needed. | |
Protected Member Functions | |
| template<class AnyObject > | |
| DynPtr (const DynPtr< AnyObject, ObjectBase > &Other) noexcept | |
| Implicit type conversion within the same class hierarchy Any pointer. | |
| DynPtr (const std::nullptr_t &) noexcept | |
| Assign from nullptr. | |
Validity Operators | |
| operator void * () const noexcept | |
| Check if the pointer is valid. | |
| bool | operator! () const noexcept |
| Check if the pointer is invalid. | |
| void | speak (const char *s, const char *prefix="") const noexcept |
| Print some debug messages to the console. | |
| void | Speak (const char *s, const char *prefix="") const |
| Verbose information printing for this pointer. | |
Encapsuled pointer class for pointers pointing to derived classes.
It performs a native dynamic_cast<> on assignment and construction and caches the result.
|
inlinenoexcept |
Check whether a given pointer to a base class may be assigned to a pointer of the derived class.
This function doesn't need to create a new pointer and is thus little lighter than pointer assignment, it basically just involves a dynamic_cast.
|
inlinenoexcept |
Check if the pointer is valid.
Note that the referred object might still exist, but not be of the appropriate type.
|
inlinenoexcept |
Check if the pointer is invalid.
Note that the referred object might still exist, but not be of the appropriate type.