#include <entityptr.h>
Public Member Functions | |
EntityPtr ()=default | |
EntityPtr (Entity *entity) | |
const std::string & | getInstancePath () const |
std::string | toString () const |
Entity * | toObject () const |
void | assign (const std::string &targetPath, rtti::Object *targetObject) |
Entity * | get () const |
Entity * | get () |
const Entity & | operator* () const |
Entity & | operator* () |
const Entity * | operator-> () const |
Entity * | operator-> () |
bool | operator== (const EntityPtr &other) const |
bool | operator== (std::nullptr_t) const |
bool | operator!= (const EntityPtr &other) const |
bool | operator!= (std::nullptr_t) const |
bool | operator< (const EntityPtr &other) const |
bool | operator> (const EntityPtr &other) const |
bool | operator<= (const EntityPtr &other) const |
bool | operator>= (const EntityPtr &other) const |
Static Public Member Functions | |
static std::string | translateTargetID (const std::string &targetID) |
Stores the path and the pointer to the target entity.
|
default |
void assign | ( | const std::string & | targetPath, |
rtti::Object * | targetObject | ||
) |
Assign the path to the entity (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 | The path including ID to the target entity, empty to clear |
targetObject | The entity to assign, nullptr to clear |
Entity* get | ( | ) |
Entity* get | ( | ) | const |
const std::string& getInstancePath | ( | ) | const |
bool operator!= | ( | const EntityPtr & | other | ) | const |
bool operator!= | ( | std::nullptr_t | ) | const |
Entity& operator* | ( | ) |
const Entity& operator* | ( | ) | const |
Entity* operator-> | ( | ) |
const Entity* operator-> | ( | ) | const |
bool operator< | ( | const EntityPtr & | other | ) | const |
bool operator<= | ( | const EntityPtr & | other | ) | const |
bool operator== | ( | const EntityPtr & | other | ) | const |
bool operator== | ( | std::nullptr_t | ) | const |
bool operator> | ( | const EntityPtr & | other | ) | const |
bool operator>= | ( | const EntityPtr & | other | ) | const |
Entity* toObject | ( | ) | const |
Returns the assigned entity
std::string toString | ( | ) | const |
Convert the pointer to a string for serialization
|
static |
Convert the full target ID as specified to an ID that can be resolved to an object
targetID | The target ID to translate |