Luanti 5.16.0-dev
Loading...
Searching...
No Matches
ActiveObjectMgr< T > Class Template Referenceabstract

#include <activeobjectmgr.h>

Collaboration diagram for ActiveObjectMgr< T >:

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

Constructor & Destructor Documentation

◆ ActiveObjectMgr()

template<typename T>
ActiveObjectMgr< T >::ActiveObjectMgr ( )
default

Referenced by DISABLE_CLASS_COPY().

Here is the caller graph for this function:

◆ ~ActiveObjectMgr()

template<typename T>
virtual ActiveObjectMgr< T >::~ActiveObjectMgr ( )
inlinevirtual

Member Function Documentation

◆ clear()

template<typename T>
void ActiveObjectMgr< T >::clear ( )
inline

References m_active_objects, and removeObject().

Referenced by benchGetObjectsInArea(), benchGetObjectsInsideRadius(), TEST_CASE(), TEST_CASE(), and TestClientActiveObjectMgr::testGetActiveSelectableObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DISABLE_CLASS_COPY()

template<typename T>
ActiveObjectMgr< T >::DISABLE_CLASS_COPY ( ActiveObjectMgr< T > )

References ActiveObjectMgr().

Here is the call graph for this function:

◆ getActiveObject()

template<typename T>
T * ActiveObjectMgr< T >::getActiveObject ( u16 id)
inline

References m_active_objects.

Referenced by TEST_CASE().

Here is the caller graph for this function:

◆ getFreeId()

template<typename T>
u16 ActiveObjectMgr< T >::getFreeId ( ) const
inlineprotected

References isFreeId().

Here is the call graph for this function:

◆ isFreeId()

template<typename T>
bool ActiveObjectMgr< T >::isFreeId ( u16 id) const
inlineprotected

References m_active_objects.

Referenced by getFreeId().

Here is the caller graph for this function:

◆ registerObject()

template<typename T>
virtual bool ActiveObjectMgr< T >::registerObject ( std::unique_ptr< T > obj)
pure virtual

◆ removeObject()

template<typename T>
virtual void ActiveObjectMgr< T >::removeObject ( u16 id)
pure virtual

Implemented in client::ActiveObjectMgr, and server::ActiveObjectMgr.

Referenced by clear().

Here is the caller graph for this function:

◆ step()

template<typename T>
virtual void ActiveObjectMgr< T >::step ( float dtime,
const std::function< void(T *)> & f )
pure virtual

◆ ::TestServerActiveObjectMgr

template<typename T>
friend class ::TestServerActiveObjectMgr
friend

Member Data Documentation

◆ m_active_objects

template<typename T>
ModifySafeMap<u16, std::unique_ptr<T> > ActiveObjectMgr< T >::m_active_objects
protected

The documentation for this class was generated from the following file: