Emergency 20 Dokumentation  4.2.0
InhabitantComponent-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 namespace em5
4 {
6  Component(prototype),
7  mActionPriority(0),
8  mDestinationEntityId(qsf::getUninitialized<uint64>()),
9  mHomeEntityId(qsf::getUninitialized<uint64>()),
10  mInhabitantMode(UNDEFINED)
11  {
12  }
13 
15  {
16  }
17 
19  {
20  return mActionPriority;
21  }
22 
24  {
25  assignAndPromoteChange(mActionPriority, priority, ACTION_PRIORITY);
26  }
27 
29  {
30  return mHomeEntityId;
31  }
32 
34  {
35  mHomeEntityId=entityId;
36  }
37 
39  {
40  return mDestinationEntityId;
41  }
42 
44  {
45  assignAndPromoteChange(mDestinationEntityId, entityId, DESTINATION_ENTITY_ID);
46  }
47 
49  {
50  return mInhabitantMode;
51  }
52 
53 }
Definition: ActionPriority.h:13
static const uint32 ACTION_PRIORITY
"ActionPriority" unique class property ID inside the class
Definition: InhabitantComponent.h:45
void setDestinationEntityId(uint64 entityId)
Definition: InhabitantComponent-inl.h:43
void setHomeEntityId(uint64 entityId)
Definition: InhabitantComponent-inl.h:33
unsigned int uint32
Definition: PlatformTypes.h:181
InhabitantMode getInhabitantMode() const
Definition: InhabitantComponent-inl.h:48
InhabitantMode
Definition: InhabitantComponent.h:48
uint64_t uint64
Definition: PlatformTypes.h:184
uint64 getHomeEntityId() const
Definition: InhabitantComponent-inl.h:28
Definition: PickupPersonByParamedicAction.h:21
static const uint32 DESTINATION_ENTITY_ID
"DestinationEntityId" unique class property ID inside the class
Definition: InhabitantComponent.h:46
T getUninitialized()
Definition: GetUninitialized.h:38
virtual ~InhabitantComponent()
Definition: InhabitantComponent-inl.h:14
InhabitantComponent(qsf::Prototype *prototype)
Definition: InhabitantComponent-inl.h:5
Prototype class.
Definition: Prototype.h:100
uint32 getActionPriority() const
Definition: InhabitantComponent-inl.h:18
uint64 getDestinationEntityId() const
Definition: InhabitantComponent-inl.h:38
void setActionPriority(uint32 priority)
Definition: InhabitantComponent-inl.h:23
bool assignAndPromoteChange(T &variable, const S &newValue, uint32 propertyId)
Comfort function for updating an exported member variable and promoting any change that happened...
Definition: Component-inl.h:141