Emergency 20 Dokumentation  4.2.0
em5::RightsManager Class Reference

EMERGENCY 5 rights manager. More...

#include <RightsManager.h>

Inheritance diagram for em5::RightsManager:
qsf::RightsManager qsf::UniqueInstance< RightsManager > qsf::PluginableManager qsf::Manager

Public Types

typedef std::unordered_set< uint32_t > RightIds
 
- Public Types inherited from qsf::RightsManager
typedef std::vector< const Right * > RightList
 
typedef boost::container::flat_map< uint32, const Right * > RightMap
 

Public Member Functions

 RightsManager ()
 Default constructor. More...
 
virtual ~RightsManager ()
 Destructor. More...
 
bool hasRight (const qsf::StringHash &id) const
 Check whether or not the requested right is set. More...
 
const RightIdsgetRightIds () const
 Return the rights. More...
 
void setRightIds (const RightIds &rightIds)
 Set the rights. More...
 
- Public Member Functions inherited from qsf::RightsManager
 RightsManager ()
 Default constructor. More...
 
const RightgetRightById (const StringHash &id) const
 Return a right instance by using its unique identifier. More...
 
const RightListgetRights () const
 Return the right list. More...
 
std::string rightIdToString (uint32 rightId) const
 Convert a right ID into a right string. More...
 
uint32 rightStringToId (const std::string &rightString) const
 Convert a right string into a right ID. More...
 
std::string getAllRightsAsString () const
 Return all rights as semicolon separated string. More...
 
- Public Member Functions inherited from qsf::PluginableManager
virtual ~PluginableManager ()
 Destructor. More...
 
const std::vector< PluginableBase * > & getPluginableList () const
 Return the list of all available pluginable instances. More...
 
template<typename T >
const std::vector< T * > & getList () const
 Return the list of all available pluginable instances. More...
 
PluginableBasegetPluginableByCampClass (const camp::Class &campClass) const
 Return a pluginable instance by using a given CAMP reflection class. More...
 
PluginableBasegetPluginableById (const StringHash &id) const
 Return a pointer to a pluginable instance by using its unique identifier. More...
 
template<typename T >
T * get () const
 Return a pointer to a pluginable instance of a certain type. More...
 
template<typename T >
T * getById (const StringHash &id) const
 Return a pointer to a pluginable instance by using its unique identifier. More...
 
template<typename T >
T & getSafe () const
 Return a reference to a pluginable instance of a certain type. More...
 
template<typename T >
T & getByIdSafe (const StringHash &id) const
 Return a reference to a pluginable instance by using its unique identifier. More...
 

Public Attributes

boost::signals2::signal< void(const RightsManager &)> RightsChange
 Boost signal emitted after a rights change has occurred. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from qsf::UniqueInstance< RightsManager >
static RightsManagergetInstance ()
 Return the global unique instance. More...
 
static RightsManagergetInstanceSafe ()
 Return the global unique instance. More...
 
- Protected Member Functions inherited from qsf::RightsManager
virtual void classAdded (const camp::Class &added) override
 Called after a new CAMP class has been registered. More...
 
- Protected Member Functions inherited from qsf::PluginableManager
 PluginableManager ()
 Default constructor. More...
 
void registerPluginables ()
 Register all known and supported CAMP pluginable classes. More...
 
PluginableBaseregisterPluginable (const camp::Class &added)
 Register the given CAMP pluginable class. More...
 
void injectPluginable (uint32 id, PluginableBase &pluginableBase)
 Insert the given pluginable in the internal data structure of the pluginable manager. More...
 
virtual void createPluginableInstance (const camp::Class &added, camp::UserObject &campUserObject)
 Create an instance of the given CAMP pluginable class. More...
 
virtual void unregisterPluginables ()
 Unregister all known and supported CAMP pluginable classes. More...
 
- Protected Member Functions inherited from qsf::Manager
 Manager ()
 Default constructor. More...
 
virtual ~Manager ()
 Destructor. More...
 
- Protected Member Functions inherited from qsf::UniqueInstance< RightsManager >
 UniqueInstance ()
 Default constructor. More...
 
virtual ~UniqueInstance ()
 Destructor. More...
 
- Protected Attributes inherited from qsf::PluginableManager
std::vector< PluginableBase * > mPluginables
 List of all available pluginable instances, we have to destroy the instances if we no longer need them. More...
 
boost::container::flat_map< uint32, PluginableBase * > mPluginableMap
 Pluginable map with unique pluginable identifier as key and pointer to the pluginable as value. More...
 

Detailed Description

EMERGENCY 5 rights manager.

Member Typedef Documentation

typedef std::unordered_set<uint32_t> em5::RightsManager::RightIds

Constructor & Destructor Documentation

em5::RightsManager::RightsManager ( )

Default constructor.

em5::RightsManager::~RightsManager ( )
inlinevirtual

Destructor.

Reimplemented from qsf::RightsManager.

Member Function Documentation

const RightsManager::RightIds & em5::RightsManager::getRightIds ( ) const
inline

Return the rights.

Returns
The rights
bool em5::RightsManager::hasRight ( const qsf::StringHash id) const
inline

Check whether or not the requested right is set.

Parameters
[in]idThe unique right identifier generated by "qsf::StringHash"
Returns
"true" if the requested right is set, else "false"
void em5::RightsManager::setRightIds ( const RightIds rightIds)
inline

Set the rights.

Parameters
[in]rightIdsThe new rights

Member Data Documentation

boost::signals2::signal<void (const RightsManager&)> em5::RightsManager::RightsChange

Boost signal emitted after a rights change has occurred.


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