Emergency 20 Dokumentation  4.2.0
em5::BuildingOverlayComponent Class Reference

EMERGENCY 5 building overlay component class. More...

#include <BuildingOverlayComponent.h>

Inheritance diagram for em5::BuildingOverlayComponent:
em5::OverlayComponent qsf::Component qsf::JobProxyMovableObjectRenderingListener qsf::InheritedObject qsf::WeakPtrTarget qsf::MovableObjectRenderingListener qsf::Object

Public Member Functions

 BuildingOverlayComponent (qsf::Prototype *prototype)
 Constructor. More...
 
virtual ~BuildingOverlayComponent ()
 Destructor. More...
 
const std::vector< BuildingOverlayProvider > & getRegisteredProviders () const
 
bool isEmpty () const
 
void registerOrUpdateProvider (uint64 providerEntityId, float progress)
 
void unregisterProvider (uint64 providerEntityId)
 
uint32 getNumberOfRequiredProviders () const
 
void setNumberOfRequiredProviders (uint32 numberOfRequiredProviders)
 
- Public Member Functions inherited from em5::OverlayComponent
virtual ~OverlayComponent ()
 Destructor. More...
 
- Public Member Functions inherited from qsf::Component
virtual ~Component ()
 Destructor. More...
 
PrototypegetPrototype () const
 Return the prototype this component is in. More...
 
EntitygetEntity () const
 Return a reference to the entity this component is in. More...
 
uint32 getId () const
 Return the unique component identifier. More...
 
ComponentManagergetComponentManager () const
 Return the component manager that's responsible for this component instance. More...
 
ComponentCollectiongetComponentCollection () const
 Return the component collection that's responsible for this component instance. More...
 
bool isSimulating () const
 Return whether or not the component is in simulating mode. More...
 
bool isActive () const
 Return whether or not the component is considered to be active. More...
 
void setActive (bool active)
 Set whether or not the component is considered to be active. More...
 
bool isDebug () const
 Return whether or not the component is considered to be in debug mode. More...
 
bool isHidden () const
 Return whether or not the component is hidden. More...
 
void setHidden (bool hidden)
 Set whether or not the component is hidden. More...
 
bool isGloballyHidden () const
 Return whether or not the component is globally hidden. More...
 
void setGloballyHidden (bool globallyHidden)
 Set whether or not the component is globally hidden. More...
 
bool isReallyHidden () const
 Return whether or not the component is really hidden. More...
 
bool startup (bool ownerIsRunning)
 Startup the component. More...
 
bool isRunning () const
 Return whether or not the component is up-and-running. More...
 
void shutdown ()
 Shutdown the component. More...
 
uint64 getPrototypeId () const
 Return the ID of the prototype this component is in. More...
 
uint64 getEntityId () const
 Return the ID of the entity this component is in. More...
 
virtual void onInvalidation ()
 Invalidate the component. More...
 
virtual void setDebug (bool debugMode)
 Set whether or not the component is considered to be in debug mode. More...
 
virtual void serialize (BinarySerializer &serializer)
 Serialize or deserialize the component using a binary serializer. More...
 
- Public Member Functions inherited from qsf::InheritedObject
void copyPropertyOverrideStateFrom (const InheritedObject &object, bool add=false)
 
void setAllPropertyOverrideFlags (bool value)
 
void autoCreatePropertyOverrideState ()
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const override
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const override
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState) override
 
- 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 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...
 
- Public Member Functions inherited from qsf::JobProxyMovableObjectRenderingListener
 JobProxyMovableObjectRenderingListener ()
 Constructor. More...
 
virtual ~JobProxyMovableObjectRenderingListener ()
 Destructor. More...
 
const TimegetNonvisibleUpdateTimeout () const
 Return the nonvisible update timeout. More...
 
void setNonvisibleUpdateTimeout (const Time &nonvisibleUpdateTimeout)
 Set the nonvisible update timeout. More...
 
- Public Member Functions inherited from qsf::MovableObjectRenderingListener
 MovableObjectRenderingListener ()
 Constructor. More...
 
virtual ~MovableObjectRenderingListener ()
 Destructor. More...
 
bool isMovableObjectRenderingListenerRegistered () const
 Return whether or not the movable object rendering listener is registered. More...
 
State getState () const
 Return the state of the listener. More...
 

Static Public Member Functions

static void showProgress (qsf::Entity &buildingEntity, uint32 numberOfRequiredProviders, const qsf::Entity &providerEntity, float progress)
 Show progress of the given provider entity. More...
 
static void hideOverlay (qsf::Entity &buildingEntity, const qsf::Entity &providerEntity)
 Hide overlay of the given provider entity. More...
 

Static Public Attributes

static const uint32 COMPONENT_ID
 "em5::BuildingOverlayComponent" unique component ID More...
 
- Static Public Attributes inherited from em5::OverlayComponent
static const uint32 COMPONENT_ID
 "em5::OverlayComponent" unique component ID More...
 
- Static Public Attributes inherited from qsf::Component
static const uint32 COMPONENT_ID
 "qsf::Component" unique component ID More...
 

Protected Member Functions

virtual bool isContentEmpty () const override
 Check whether or not there is any content to show inside the overlay. More...
 
virtual void updateContent (Rocket::Core::ElementDocument &document) override
 
virtual const glm::vec3 & getContentWorldSpaceOffset () const override
 
virtual const glm::vec2 & getContentWindowSize () const override
 
virtual const glm::vec2 & getContentWindowOffset () const override
 
virtual void updateAnimation (const qsf::JobArguments &jobArguments) override
 
- Protected Member Functions inherited from em5::OverlayComponent
 OverlayComponent (qsf::Prototype *prototype, OverlayWindowManager &overlayWindowManager)
 Constructor. More...
 
void checkEmptyStateChanged ()
 
void makeDirty ()
 
void avoidDelayedDestruction ()
 
void triggerDelayedDestruction ()
 
void onPreCompositorWorkspaceUpdate (const Ogre::Camera &ogreCamera)
 
virtual void onSetSimulating (bool simulating) override
 Set whether or not the component is in simulating mode. More...
 
virtual qsf::ComponentgetMovableObjectRenderingListenerComponent () override
 Return the component the listener will spy on. More...
 
virtual void onObjectRenderingStartup () override
 Called when an OGRE movable object is about to be rendered for the first time after it has not been rendered for some time. More...
 
virtual void onObjectRendering (const qsf::Component &component, const Ogre::Camera &ogreCamera) override
 Called when an OGRE movable object of the camera to be used for rendering. More...
 
virtual void onObjectRenderingShutdown () override
 Called when an OGRE movable object is no longer be rendered for some time. More...
 
- Protected Member Functions inherited from qsf::Component
 Component (Prototype *prototype)
 Constructor. More...
 
void promotePropertyChange (uint32 propertyId)
 A component property value was changed. More...
 
template<typename T , typename S >
bool assignAndPromoteChange (T &variable, const S &newValue, uint32 propertyId)
 Comfort function for updating an exported member variable and promoting any change that happened. More...
 
void setRegisterForSimulationTransformChanges (bool enable)
 Register or unregister this component as simulation transform listener. More...
 
void setRegisterForAnimationTransformChanges (bool enable)
 Register or unregister this component as animation transform listener. More...
 
virtual const ObjectgetPropertyDefaultsProvider () const override
 
virtual bool ignoreOwnerRunningState () const
 Return whether or not the component will only startup if the owner is in running state. More...
 
virtual bool implementsOnComponentPropertyChange () const
 Signal whether this component needs the "onComponentPropertyChange" callback at all. More...
 
virtual void onComponentPropertyChange (const Component &component, uint32 propertyId)
 Called in case a component property value was changed. More...
 
virtual void onComponentTransformChange (const Transform &transform, TransformChangeFlags flags)
 Called in case a component transformation value was changed. More...
 
virtual void onSetActive (bool active)
 Set whether or not the component is considered to be active. More...
 
virtual void onSetDebug (bool debug)
 Set whether or not the component is considered to be in debug mode. More...
 
virtual void onSetHidden (bool hidden)
 Set whether or not the component is considered to be hidden. More...
 
virtual bool onStartup ()
 Startup the component. More...
 
virtual void onShutdown ()
 Shutdown the component. More...
 
- Protected Member Functions inherited from qsf::InheritedObject
 InheritedObject ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 
- Protected Member Functions inherited from qsf::WeakPtrTarget
 WeakPtrTarget ()
 Default constructor. More...
 
 WeakPtrTarget (const WeakPtrTarget &other)
 Copy constructor. More...
 
 WeakPtrTarget (WeakPtrTarget &&)=delete
 Delete the move constructor, as WeakPtrTarget would need a proper move constructor-implementation that ensures that its pointer gets updated in the WeakPtrBase as well. More...
 
 ~WeakPtrTarget ()
 Destructor. More...
 
void invalidateAllWeakPtr ()
 Invalidate all weak pointers to this object. More...
 
void operator= (const WeakPtrTarget &other)
 Copy operator. More...
 
- Protected Member Functions inherited from qsf::JobProxyMovableObjectRenderingListener
virtual void onUpdateMovableObjectRenderingJob (const JobArguments &jobArguments)
 Main update function that is passed to the job manager. More...
 
- Protected Member Functions inherited from qsf::MovableObjectRenderingListener
virtual void registerMovableObjectRenderingListener ()
 Register movable object rendering listener. More...
 
virtual void unregisterMovableObjectRenderingListener ()
 Unregister movable object rendering listener. More...
 
virtual void onObjectDestroyed ()
 Movable object has been destroyed. More...
 

Friends

class BuildingOverlayWindowManager
 For GUI hot-reloading. More...
 

Additional Inherited Members

- Public Types inherited from qsf::Component
enum  TransformChangeFlag {
  TRANSFORM_CHANGE_POSITION = 0x01, TRANSFORM_CHANGE_ROTATION = 0x02, TRANSFORM_CHANGE_SCALE = 0x04, TRANSFORM_CHANGE_TRANSFORM = 0x07,
  TRANSFORM_CHANGE_FOR_SIMULATION = 0x08, TRANSFORM_CHANGE_FOR_ANIMATION = 0x10
}
 
typedef BitFlagSet< uint8, TransformChangeFlagTransformChangeFlags
 
- 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 Types inherited from qsf::MovableObjectRenderingListener
enum  State { SLEEPING, AWAKE }
 State of the listener. More...
 
- Protected Attributes inherited from em5::OverlayComponent
qsf::WeakPtr< OverlayWindowManagermOverlayWindowManager
 
- Protected Attributes inherited from qsf::InheritedObject
std::bitset< 128 > mPropertyOverrideFlags
 One bit for each property; if set, the property is overridden. More...
 
- Protected Attributes inherited from qsf::JobProxyMovableObjectRenderingListener
JobProxy mAnimationJobProxy
 Regular animation job proxy; for updates once a frame. More...
 
- Protected Attributes inherited from qsf::MovableObjectRenderingListener
bool mAllowRegistration
 Actually only for internal builds (additional check to find erroneous behavior), but we need to make sure end-user SDK is the same with or without ENDUSER define. More...
 

Detailed Description

EMERGENCY 5 building overlay component class.

Constructor & Destructor Documentation

em5::BuildingOverlayComponent::BuildingOverlayComponent ( qsf::Prototype prototype)
explicit

Constructor.

Parameters
[in]prototypeThe prototype this component is in, no null pointer allowed
em5::BuildingOverlayComponent::~BuildingOverlayComponent ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual const glm::vec2& em5::BuildingOverlayComponent::getContentWindowOffset ( ) const
overrideprotectedvirtual

Implements em5::OverlayComponent.

virtual const glm::vec2& em5::BuildingOverlayComponent::getContentWindowSize ( ) const
overrideprotectedvirtual

Implements em5::OverlayComponent.

virtual const glm::vec3& em5::BuildingOverlayComponent::getContentWorldSpaceOffset ( ) const
overrideprotectedvirtual

Implements em5::OverlayComponent.

uint32 em5::BuildingOverlayComponent::getNumberOfRequiredProviders ( ) const
inline
const std::vector< BuildingOverlayProvider > & em5::BuildingOverlayComponent::getRegisteredProviders ( ) const
inline
static void em5::BuildingOverlayComponent::hideOverlay ( qsf::Entity buildingEntity,
const qsf::Entity providerEntity 
)
static

Hide overlay of the given provider entity.

Parameters
[in]buildingEntityOverlay owner building entity
[in]providerEntityOverlay information providing entity (e.g. a firefighter entity)
virtual bool em5::BuildingOverlayComponent::isContentEmpty ( ) const
overrideprotectedvirtual

Check whether or not there is any content to show inside the overlay.

Reimplemented from em5::OverlayComponent.

bool em5::BuildingOverlayComponent::isEmpty ( ) const
inline
void em5::BuildingOverlayComponent::registerOrUpdateProvider ( uint64  providerEntityId,
float  progress 
)
void em5::BuildingOverlayComponent::setNumberOfRequiredProviders ( uint32  numberOfRequiredProviders)
static void em5::BuildingOverlayComponent::showProgress ( qsf::Entity buildingEntity,
uint32  numberOfRequiredProviders,
const qsf::Entity providerEntity,
float  progress 
)
static

Show progress of the given provider entity.

Parameters
[in]buildingEntityOverlay owner building entity
[in]numberOfRequiredProvidersNumber of required providers which requested the visualization of a progress
[in]providerEntityOverlay information providing entity (e.g. a firefighter entity)
[in]progressProgress (range [0-1] where 1 is a full bar)
void em5::BuildingOverlayComponent::unregisterProvider ( uint64  providerEntityId)
virtual void em5::BuildingOverlayComponent::updateAnimation ( const qsf::JobArguments jobArguments)
overrideprotectedvirtual

Reimplemented from em5::OverlayComponent.

virtual void em5::BuildingOverlayComponent::updateContent ( Rocket::Core::ElementDocument &  document)
overrideprotectedvirtual

Reimplemented from em5::OverlayComponent.

Friends And Related Function Documentation

friend class BuildingOverlayWindowManager
friend

For GUI hot-reloading.

Member Data Documentation

const uint32 em5::BuildingOverlayComponent::COMPONENT_ID
static

"em5::BuildingOverlayComponent" unique component ID


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