Emergency 20 Dokumentation  4.2.0
em5::GangsterTypeManager Class Reference

Manager for gangster type definitions. More...

#include <GangsterTypeManager.h>

Inheritance diagram for em5::GangsterTypeManager:
qsf::ElementManager< uint32, GangsterType > qsf::Manager

Public Member Functions

 GangsterTypeManager ()
 Default constructor. More...
 
virtual ~GangsterTypeManager ()
 Destructor. More...
 
void loadAssets ()
 Load definitions from assets. More...
 
const GangsterTypegetGangsterTypeById (const qsf::StringHash &id) const
 Find gangster type by ID. More...
 
- Public Member Functions inherited from qsf::ElementManager< uint32, GangsterType >
 ElementManager ()
 Default constructor. More...
 
virtual ~ElementManager ()
 Destructor. More...
 
const ElementMapgetElements () const
 Return map of elements. More...
 
GangsterType * findElement (const uint32 &key) const
 Find a specific element by its key in either the element map. More...
 
void reserveElements (size_t numberOfElements)
 Reserve elements. More...
 
GangsterType * createElement ()
 Create a new element. More...
 
GangsterType * createElementById (const uint32 &key)
 Create a new element with an enforced given unique element identifier. More...
 
bool insertElement (const uint32 &key, GangsterType &element)
 Insert an element with an enforced given unique element identifier. More...
 
bool destroyElement (const uint32 &key)
 Destroy an element by its key. More...
 
ElementManager< uint32, GangsterType, detail::DirectAllocator< GangsterType >, ConsecutiveIdGenerator< uint32 > >::ElementMap::iterator destroyElement (typename ElementMap::iterator iterator)
 Destroy an element by iterator. More...
 
void destroyAllElements ()
 Destroy all elements. More...
 
GangsterType * grabElement (const uint32 &key)
 Remove an element from the element manager without destroying it. More...
 
uint32 generateId ()
 Generate a new, unused key. More...
 

Additional Inherited Members

- Public Types inherited from qsf::ElementManager< uint32, GangsterType >
typedef boost::container::flat_map< uint32, GangsterType * > ElementMap
 
- Protected Member Functions inherited from qsf::ElementManager< uint32, GangsterType >
ElementMapgetElementsWritable ()
 Return map of elements. More...
 
virtual void onElementInsertion (const uint32 &key, GangsterType &element)
 Called whenever an element is inserted into the element map. More...
 
virtual void onElementRemoval (const uint32 &key, GangsterType &element)
 Called whenever an element is actually going to be destroyed. More...
 
- Protected Member Functions inherited from qsf::Manager
 Manager ()
 Default constructor. More...
 
virtual ~Manager ()
 Destructor. More...
 

Detailed Description

Manager for gangster type definitions.

Constructor & Destructor Documentation

em5::GangsterTypeManager::GangsterTypeManager ( )

Default constructor.

virtual em5::GangsterTypeManager::~GangsterTypeManager ( )
virtual

Destructor.

Member Function Documentation

const GangsterType* em5::GangsterTypeManager::getGangsterTypeById ( const qsf::StringHash id) const

Find gangster type by ID.

Parameters
[in]idID to search for
Returns
The gangster type if there is one with the given ID, a null pointer otherwise; do not destroy the instance
void em5::GangsterTypeManager::loadAssets ( )

Load definitions from assets.


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