Luanti 5.19.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

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

References ModifySafeMap< K, V >::empty(), m_active_objects, and SANITY_CHECK.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

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

References ModifySafeMap< K, V >::empty(), ModifySafeMap< K, V >::iter(), m_active_objects, and removeObject().

Referenced by ClientEnvironment::~ClientEnvironment(), benchGetObjectsInArea(), benchGetObjectsInsideRadius(), TestServerActiveObjectMgr::clear(), 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 ModifySafeMap< K, V >::get(), and m_active_objects.

Referenced by ClientEnvironment::getActiveObject(), ServerEnvironment::getActiveObject(), TestServerActiveObjectMgr::getActiveObject(), ServerEnvironment::setStaticForActiveObjectsInBlock(), TEST_CASE(), and TestServerActiveObjectMgr::updateObjectPos().

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

◆ getFreeId()

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

References isFreeId().

Referenced by TestServerActiveObjectMgr::getFreeId().

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

◆ isFreeId()

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

References ModifySafeMap< K, V >::get(), and m_active_objects.

Referenced by getFreeId().

Here is the call graph for this function:
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


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