Emergency 20 Dokumentation  4.2.0
PersonComponent-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Namespace ]
6 //[-------------------------------------------------------]
7 namespace em5
8 {
9 
10 
11  //[-------------------------------------------------------]
12  //[ Public methods ]
13  //[-------------------------------------------------------]
15  {
16  return mPersonFlags.isSet(flag);
17  }
18 
20  {
21  mPersonFlags.set(flag, value);
22  }
23 
25  {
26  return mPersonFlags.isSet(FLAG_MARKED_AS_GANGSTER);
27  }
28 
30  {
31  return mPersonFlags.isSet(FLAG_HANDCUFFED);
32  }
33 
35  {
36  QSF_ASSERT(nullptr != mPersonAnimationController, "The person animation controller instance is invalid, don't try to retrieve it if person component is not running", QSF_REACT_THROW);
37  return *mPersonAnimationController;
38  }
39 
40 
41 //[-------------------------------------------------------]
42 //[ Namespace ]
43 //[-------------------------------------------------------]
44 } // em5
Marked with the gangster icon.
Definition: PersonComponent.h:76
Definition: ActionPriority.h:13
void set(ENUM flag)
Set a single flag.
Definition: EnumBitmask.h:187
#define QSF_REACT_THROW
Definition: ErrorHandling.h:203
PersonFlags
Definition: PersonComponent.h:73
Person animation class, handles the move cycle animation for persons.
Definition: PersonAnimationController.h:48
PersonAnimationController & getPersonAnimationController()
Definition: PersonComponent-inl.h:34
bool getGangsterFlag() const
Quick getter in order to expose the gangster flag to CAMP.
Definition: PersonComponent-inl.h:24
bool getHandcuffedFlag() const
Quick getter for the handcuffed flag.
Definition: PersonComponent-inl.h:29
bool getPersonFlags(PersonComponent::PersonFlags flag) const
Quick getter for the person flags.
Definition: PersonComponent-inl.h:14
void setPersonFlags(PersonComponent::PersonFlags flag, bool value)
Quick setter for the person flags.
Definition: PersonComponent-inl.h:19
bool isSet(ENUM flag) const
Check whether a certain flag is set.
Definition: EnumBitmask.h:118
#define QSF_ASSERT(condition, explanation, reaction)
Definition: ErrorHandling.h:138
Person is already handcuffed.
Definition: PersonComponent.h:78