Emergency 20 Dokumentation  4.2.0
em5::SelectionManager Class Reference

EMERGENCY 5 selection manager class. More...

#include <SelectionManager.h>

Inheritance diagram for em5::SelectionManager:
qsf::EntitySelectionManager qsf::SelectionManagerTemplate< uint64 > qsf::SelectionManager qsf::Pluginable< SelectionSystem > qsf::PluginableBase qsf::Object

Public Member Functions

 SelectionManager ()
 Default constructor. More...
 
virtual ~SelectionManager ()
 Destructor. More...
 
void serialize (qsf::BinarySerializer &serializer)
 Serialization of the selection. More...
 
void startup ()
 
void shutdown ()
 
void setAutomaticSpawnedUnitSelection (bool automaticSelection)
 Enable/disable the automatic selection of spawned units; default is enabled. More...
 
void setSelectionById (uint64 id)
 
void setSelectionByIdSet (const boost::container::flat_set< uint64 > &idSet)
 
- Public Member Functions inherited from qsf::EntitySelectionManager
 EntitySelectionManager ()
 Default constructor. More...
 
 EntitySelectionManager (SelectionSystem *selectionSystem)
 Constructor. More...
 
virtual ~EntitySelectionManager ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::SelectionManagerTemplate< uint64 >
 SelectionManagerTemplate ()
 Default constructor. More...
 
virtual ~SelectionManagerTemplate ()
 Destructor. More...
 
uint64 getSelectedId () const
 Return the first selected ID. More...
 
const IdSetgetSelectedIdSet () const
 Return whole selection as set of IDs. More...
 
size_t getSelectionSize () const
 Return the number of currently selected IDs. More...
 
bool isIdSelected (uint64 id) const
 Check whether or not the given ID is currently selected. More...
 
void clearSelection ()
 Clear the current selection. More...
 
void setSelectionById (uint64 id)
 Set the current selection by using an ID. More...
 
void setSelectionByIdSet (const IdSet &idSet)
 Set the current selection by using an ID set. More...
 
void addIdToSelection (uint64 id)
 Add an ID to the current selection. More...
 
void addIdSetToSelection (const IdSet &idSet)
 Add multiple IDs to the current selection. More...
 
void removeIdFromSelection (uint64 id)
 Remove an ID from the current selection. More...
 
void removeIdSetFromSelection (const IdSet &idSet)
 Remove multiple IDs from the current selection. More...
 
uint64 getCurrentId () const
 Return the current ID (the focus of attention) More...
 
void setCurrentId (uint64 id)
 Set the current ID (the focus of attention) More...
 
- Public Member Functions inherited from qsf::Pluginable< SelectionSystem >
virtual ~Pluginable ()
 Destructor. More...
 
SelectionSystemgetManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::PluginableBase
virtual ~PluginableBase ()
 Destructor. More...
 
template<typename T >
T & getPluginableManager () const
 Return the pluginable manager this pluginable is in. More...
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Additional Inherited Members

- Public Types inherited from qsf::SelectionManagerTemplate< uint64 >
typedef boost::container::flat_set< uint64IdSet
 
- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 
- Public Attributes inherited from qsf::SelectionManagerTemplate< uint64 >
boost::signals2::signal< void(uint64)> Selected
 This Boost signal is emitted once for each ID selected. More...
 
boost::signals2::signal< void(uint64)> Deselected
 This Boost signal is emitted once for each ID deselected. More...
 
- Static Public Attributes inherited from qsf::EntitySelectionManager
static const uint32 PLUGINABLE_ID
 "qsf::EntitySelectionManager" unique pluginable selection manager ID More...
 
- Protected Member Functions inherited from qsf::SelectionManagerTemplate< uint64 >
 SelectionManagerTemplate (SelectionSystem *selectionSystem)
 Constructor. More...
 
virtual bool isSelectionValid (uint64 id) const
 Check whether or not the given selection is valid. More...
 
virtual void onSelect (uint64 id)
 This method is called whenever there's a newly selected ID. More...
 
virtual void onDeselect (uint64 id)
 This method is called whenever a previously selected ID is selected no more. More...
 
virtual void onCurrentChange (uint64 id)
 This method is called whenever the current ID has been changed. More...
 
- Protected Member Functions inherited from qsf::SelectionManager
 SelectionManager ()
 Default constructor. More...
 
 SelectionManager (SelectionSystem *selectionSystem)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Pluginable< SelectionSystem >
 Pluginable (SelectionSystem *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::PluginableBase
 PluginableBase (PluginableManager *pluginableManager)
 Constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Detailed Description

EMERGENCY 5 selection manager class.

Constructor & Destructor Documentation

em5::SelectionManager::SelectionManager ( )
inline

Default constructor.

em5::SelectionManager::~SelectionManager ( )
inlinevirtual

Destructor.

Reimplemented from qsf::SelectionManager.

Member Function Documentation

void em5::SelectionManager::serialize ( qsf::BinarySerializer serializer)
inline

Serialization of the selection.

void em5::SelectionManager::setAutomaticSpawnedUnitSelection ( bool  automaticSelection)

Enable/disable the automatic selection of spawned units; default is enabled.

void em5::SelectionManager::setSelectionById ( uint64  id)
void em5::SelectionManager::setSelectionByIdSet ( const boost::container::flat_set< uint64 > &  idSet)
void em5::SelectionManager::shutdown ( )
void em5::SelectionManager::startup ( )

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