Emergency 20 Dokumentation  4.2.0
em5::MedicalCareManager Class Reference

Manager for medical care definitions. More...

#include <MedicalCareManager.h>

Inheritance diagram for em5::MedicalCareManager:
qsf::ElementManager< uint32, MedicalCare > qsf::Manager

Public Member Functions

 MedicalCareManager ()
 Default constructor. More...
 
virtual ~MedicalCareManager ()
 Destructor. More...
 
void loadAssets ()
 Load definitions from assets. More...
 
bool saveByFilename (const std::string &filename)
 Save medical care JSON file. More...
 
const MedicalCaregetMedicalCareById (const qsf::StringHash &id) const
 Find medical care by ID. More...
 
- Public Member Functions inherited from qsf::ElementManager< uint32, MedicalCare >
 ElementManager ()
 Default constructor. More...
 
virtual ~ElementManager ()
 Destructor. More...
 
const ElementMapgetElements () const
 Return map of elements. More...
 
MedicalCare * 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...
 
MedicalCare * createElement ()
 Create a new element. More...
 
MedicalCare * createElementById (const uint32 &key)
 Create a new element with an enforced given unique element identifier. More...
 
bool insertElement (const uint32 &key, MedicalCare &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, MedicalCare, detail::DirectAllocator< MedicalCare >, ConsecutiveIdGenerator< uint32 > >::ElementMap::iterator destroyElement (typename ElementMap::iterator iterator)
 Destroy an element by iterator. More...
 
void destroyAllElements ()
 Destroy all elements. More...
 
MedicalCare * 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, MedicalCare >
typedef boost::container::flat_map< uint32, MedicalCare * > ElementMap
 
- Protected Member Functions inherited from qsf::ElementManager< uint32, MedicalCare >
ElementMapgetElementsWritable ()
 Return map of elements. More...
 
virtual void onElementInsertion (const uint32 &key, MedicalCare &element)
 Called whenever an element is inserted into the element map. More...
 
virtual void onElementRemoval (const uint32 &key, MedicalCare &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 medical care definitions.

Constructor & Destructor Documentation

em5::MedicalCareManager::MedicalCareManager ( )

Default constructor.

virtual em5::MedicalCareManager::~MedicalCareManager ( )
virtual

Destructor.

Member Function Documentation

const MedicalCare* em5::MedicalCareManager::getMedicalCareById ( const qsf::StringHash id) const

Find medical care by ID.

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

Load definitions from assets.

bool em5::MedicalCareManager::saveByFilename ( const std::string &  filename)

Save medical care JSON file.

Parameters
[in]filenamePath of the file to save

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