#include <componentptr.h>
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.
◆ ~ComponentPtrBase()
◆ assign()
| virtual void assign |
( |
const std::string & |
targetPath, |
|
|
rtti::Object * |
targetObject |
|
) |
| |
|
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)
- Parameters
-
| targetPath | path to the target component including ID |
| targetObject | The pointer to be assigned |
◆ toObject()
Returns the assigned component
- Returns
- The rtti object, nullptr if it doesn't exist
◆ toString()
| virtual std::string toString |
( |
| ) |
const |
|
pure virtual |
Convert the path to a string for serialization
- Returns
- The string representation of this object
◆ translateTargetID()
| static std::string translateTargetID |
( |
const std::string & |
targetID | ) |
|
|
static |
Convert the full target path to an ID that can be resolved against an object
- Parameters
-
| targetID | The target ID to translate |
- Returns
- The translated ID