Emergency 20 Dokumentation  4.2.0
PersonSpawnPointComponent-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  CivilistSpawnPointComponent(prototype),
16  mSpawnPointType(PERSONSPAWNPOINTTYPE_GATE),
17  PersonList(*this)
18  {
19  // Nothing to do in here
20  }
21 
23  {
24  // Nothing to do in here
25  }
26 
28  {
29  return mSpawnPointType;
30  }
31 
33  {
34  mSpawnPointType = personSpawnPointType;
35  }
36 
37 
38  //[-------------------------------------------------------]
39  //[ Public virtual em5::SpawnPointComponent methods ]
40  //[-------------------------------------------------------]
42  {
43  return (mSpawnPointType == PERSONSPAWNPOINTTYPE_ENTRY || mSpawnPointType == PERSONSPAWNPOINTTYPE_GATE);
44  }
45 
47  {
48  return (mSpawnPointType == PERSONSPAWNPOINTTYPE_EXIT || mSpawnPointType == PERSONSPAWNPOINTTYPE_GATE);
49  }
50 
52  {
53  return (mSpawnPointType == PERSONSPAWNPOINTTYPE_TRANSIT);
54  }
55 
56 
57  //[-------------------------------------------------------]
58  //[ CAMP reflection system ]
59  //[-------------------------------------------------------]
60  inline std::size_t PersonSpawnPointComponent::PersonListInterface::size() const
61  {
62  return getOwner().mList.size();
63  }
64 
65  inline const std::string& PersonSpawnPointComponent::PersonListInterface::get(std::size_t index) const
66  {
67  return getOwner().mList.at(index);
68  }
69 
70  inline void PersonSpawnPointComponent::PersonListInterface::set(std::size_t index, const std::string& value)
71  {
72  getOwner().mList.at(index) = value;
73  }
74 
75  inline void PersonSpawnPointComponent::PersonListInterface::insert(std::size_t before, const std::string& value)
76  {
77  getOwner().mList.insert(getOwner().mList.begin() + before, value);
78  }
79 
80  inline void PersonSpawnPointComponent::PersonListInterface::remove(std::size_t index)
81  {
82  getOwner().mList.erase(getOwner().mList.begin() + index);
83  }
84 
85 
86 //[-------------------------------------------------------]
87 //[ Namespace ]
88 //[-------------------------------------------------------]
89 } // em5
Definition: ActionPriority.h:13
PersonSpawnPointType
Definition: PersonSpawnPointComponent.h:43
virtual bool isExit() const override
Definition: PersonSpawnPointComponent-inl.h:46
virtual bool isTransit() const override
Definition: PersonSpawnPointComponent-inl.h:51
Definition: PersonSpawnPointComponent.h:48
Definition: PersonSpawnPointComponent.h:46
virtual bool isEntry() const override
Definition: PersonSpawnPointComponent-inl.h:41
Definition: PersonSpawnPointComponent.h:45
PersonSpawnPointComponent(qsf::Prototype *prototype)
Constructor.
Definition: PersonSpawnPointComponent-inl.h:14
virtual ~PersonSpawnPointComponent()
Destructor.
Definition: PersonSpawnPointComponent-inl.h:22
PersonSpawnPointType getPersonSpawnPointType() const
Definition: PersonSpawnPointComponent-inl.h:27
void setPersonSpawnPointType(PersonSpawnPointType personSpawnPointType)
Definition: PersonSpawnPointComponent-inl.h:32
Definition: PersonSpawnPointComponent.h:47
EMERGENCY 5 civilist spawn point component base class.
Definition: CivilistSpawnPointComponent.h:32
Prototype class.
Definition: Prototype.h:100