#include <activeobjectmgr.h>
Public Member Functions | |
ActiveObjectMgr ()=default | |
DISABLE_CLASS_COPY (ActiveObjectMgr) | |
virtual | ~ActiveObjectMgr () |
virtual void | step (float dtime, const std::function< void(T *)> &f)=0 |
virtual bool | registerObject (std::unique_ptr< T > obj)=0 |
virtual void | removeObject (u16 id)=0 |
void | clear () |
T * | getActiveObject (u16 id) |
Protected Member Functions | |
u16 | getFreeId () const |
bool | isFreeId (u16 id) const |
Protected Attributes | |
ModifySafeMap< u16, std::unique_ptr< T > > | m_active_objects |
Friends | |
class | ::TestServerActiveObjectMgr |
|
default |
|
inlinevirtual |
Reimplemented in client::ActiveObjectMgr, and server::ActiveObjectMgr.
References ModifySafeMap< K, V >::empty(), ActiveObjectMgr< T >::m_active_objects, and SANITY_CHECK.
|
inline |
References ModifySafeMap< K, V >::empty(), ModifySafeMap< K, V >::iter(), ActiveObjectMgr< T >::m_active_objects, and ModifySafeMap< K, V >::remove().
Referenced by ClientEnvironment::~ClientEnvironment(), benchGetObjectsInArea(), benchGetObjectsInsideRadius(), TEST_CASE(), TestServerActiveObjectMgr::testFreeID(), TestClientActiveObjectMgr::testGetActiveSelectableObjects(), TestServerActiveObjectMgr::testGetAddedActiveObjectsAroundPos(), TestServerActiveObjectMgr::testGetObjectsInsideRadius(), TestServerActiveObjectMgr::testRegisterObject(), and TestServerActiveObjectMgr::testRemoveObject().
ActiveObjectMgr< T >::DISABLE_CLASS_COPY | ( | ActiveObjectMgr< T > | ) |
|
inline |
References ModifySafeMap< K, V >::get(), and ActiveObjectMgr< T >::m_active_objects.
Referenced by ClientEnvironment::getActiveObject(), ServerEnvironment::getActiveObject(), ServerEnvironment::setStaticForActiveObjectsInBlock(), TEST_CASE(), TestServerActiveObjectMgr::testRegisterObject(), and TestServerActiveObjectMgr::testRemoveObject().
|
inlineprotected |
References ActiveObjectMgr< T >::isFreeId().
Referenced by TestServerActiveObjectMgr::testFreeID().
|
inlineprotected |
References ModifySafeMap< K, V >::get(), and ActiveObjectMgr< T >::m_active_objects.
Referenced by ActiveObjectMgr< T >::getFreeId().
|
pure virtual |
Implemented in client::ActiveObjectMgr, and server::ActiveObjectMgr.
|
pure virtual |
Implemented in client::ActiveObjectMgr, and server::ActiveObjectMgr.
|
pure virtual |
Implemented in client::ActiveObjectMgr, and server::ActiveObjectMgr.
|
friend |
|
protected |