1 2 3 4 5 6 7 8 9 10
class IComponent { public: virtual ~IComponent() {} IEntity &getEntity() const { return *__entity; } };
This is the only function you should care about. It returns a reference to the pointer.