#include <componentptr.h>
Public Member Functions | |
virtual | ~ComponentPtrBase ()=default |
virtual std::string | toString () const =0 |
virtual Component * | toObject () const =0 |
virtual void | assign (const std::string &targetPath, rtti::Object *targetObject)=0 |
Static Public Member Functions | |
static std::string | translateTargetID (const std::string &targetID) |
This class serves as the base for typed ComponentPtrs and is only here so that we can check whether a pointer is a ComponentPtr through RTTI. The reason we can't do that with ComponentPtr itself is because ComponentPtr is a template class and RTTI has difficulties dealing with that.
|
virtualdefault |
|
pure virtual |
Assign the path to the component (including ID) and object to this pointer. Used for pointer resolving by the ResourceManager. Should not be called manually (is only public so that we can register it in RTTI)
targetPath | path to the target component including ID |
targetObject | The pointer to be assigned |
|
pure virtual |
Returns the assigned component
|
pure virtual |
Convert the path to a string for serialization
|
static |
Convert the full target path to an ID that can be resolved against an object
targetID | The target ID to translate |