19 friend class ::TestServerActiveObjectMgr;
32 virtual void step(
float dtime,
const std::function<
void(T *)> &f) = 0;
57 static thread_local u16 last_used_id = 0;
58 u16 startid = last_used_id;
60 if (last_used_id == startid)
Definition activeobjectmgr.h:18
DISABLE_CLASS_COPY(ActiveObjectMgr)
virtual bool registerObject(std::unique_ptr< T > obj)=0
void clear()
Definition activeobjectmgr.h:36
virtual void step(float dtime, const std::function< void(T *)> &f)=0
ActiveObjectMgr()=default
virtual ~ActiveObjectMgr()
Definition activeobjectmgr.h:25
ModifySafeMap< u16, std::unique_ptr< T > > m_active_objects
Definition activeobjectmgr.h:73
T * getActiveObject(u16 id)
Definition activeobjectmgr.h:48
bool isFreeId(u16 id) const
Definition activeobjectmgr.h:67
u16 getFreeId() const
Definition activeobjectmgr.h:54
virtual void removeObject(u16 id)=0
Definition container.h:324
const V & get(const K &key) const
Definition container.h:350
auto iter()
Definition container.h:457
bool empty() const
Definition container.h:445
bool remove(const K &key)
Definition container.h:424
Definition test_clientactiveobjectmgr.cpp:42
Definition test_serveractiveobjectmgr.cpp:16
#define SANITY_CHECK(expr)
Definition debug.h:51