KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LifeFormAppearance.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: LifeFormAppearance
32  created: 22/09/2008 - Updated May 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a life form.
36  Implemented as struct so as to prevent the size from
37  changing due to RTTI etc. This struct will be part of a
38  union with all specific appearance values so it is implemented
39  slightly different.
40  No constructors to prevent C2620 error caused by union of
41  classes/structs
42  size: 32 Bits / 4 Octet
43 *********************************************************************/
44 
45 #pragma once
46 
47 #include "./../KDefines.h"
48 #include "./Enums/KDISEnums.h"
49 
50 namespace KDIS {
51 namespace DATA_TYPE {
52 
54 {
55 protected:
56  // Bits
57  KUINT32 m_PaintScheme : 1; // 0
58  KUINT32 m_Unused1 : 2; // 1-2
59  KUINT32 m_Damage : 2; // 3-4
60  KUINT32 m_Compliance : 4; // 5-8
61  KUINT32 m_Unused2 : 3; // 9-11
62  KUINT32 m_Flashlight : 1; // 12
63  KUINT32 m_Unused3 : 3; // 13-15
64  KUINT32 m_LifeformState : 4; // 16-19
65  KUINT32 m_Unused4 : 1; // 20
66  KUINT32 m_FrozenStatus : 1; // 21
67  KUINT32 m_Unused5 : 1; // 22
68  KUINT32 m_State : 1; // 23
69  KUINT32 m_Weapon1 : 2; // 24-25
70  KUINT32 m_Weapon2 : 2; // 26-27
71  KUINT32 m_Camouflage : 2; // 28-29
72  KUINT32 m_ConcealedStationary : 1; // 30
73  KUINT32 m_ConcealedMovement : 1; // 31
74 
75 public:
76 
77  //************************************
78  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityPaintScheme
79  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityPaintScheme
80  //!Description: Describes the paint scheme of an entity.
81  // Parameter: EntityPaintScheme EPS
82  //************************************
83  void SetEntityPaintScheme( KDIS::DATA_TYPE::ENUMS::EntityPaintScheme EPS );
84  KDIS::DATA_TYPE::ENUMS::EntityPaintScheme GetEntityPaintScheme() const;
85 
86  //************************************
87  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityDamage
88  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityDamage
89  //!Description: Entity Damage/Health State.
90  // Parameter: EntityDamage ED
91  //************************************
92  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
93  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
94 
95  //************************************
96  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityEntityCompliance
97  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityEntityCompliance
98  //!Description: Describes compliance of life form.
99  // Parameter: EntityCompliance EC
100  //************************************
101  void SetEntityEntityCompliance( KDIS::DATA_TYPE::ENUMS::EntityCompliance EC );
102  KDIS::DATA_TYPE::ENUMS::EntityCompliance GetEntityEntityCompliance() const;
103 
104  //************************************
105  // FullName: KDIS::DATA_TYPE::AirPlatformAppearance::SetEntityFlashLights
106  // KDIS::DATA_TYPE::AirPlatformAppearance::IsEntityFlashLightsOn
107  //!Description: Describes whether Flash Lights are on or off. True - On. False - Off.
108  // Parameter: KBOOL FL
109  //************************************
110  void SetEntityFlashLights( KBOOL FL );
111  KBOOL IsEntityFlashLightsOn() const;
112 
113  //************************************
114  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityLifeformState
115  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityLifeformState
116  //!Description: Entities state/appearance. I.E Posture.
117  // Parameter: EntityLifeformAppearance EA
118  //************************************
119  void SetEntityLifeformState( KDIS::DATA_TYPE::ENUMS::EntityLifeformAppearance EA );
120  KDIS::DATA_TYPE::ENUMS::EntityLifeformAppearance GetEntityLifeformState() const;
121 
122  //************************************
123  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityFrozenStatus
124  // KDIS::DATA_TYPE::LifeFormAppearance::IsEntityFrozen
125  //!Description: Is the entity frozen?
126  //! Note: Frozen entities should not be dead-reckoned.
127  // Parameter: KBOOL EFS
128  //************************************
129  void SetEntityFrozenStatus( KBOOL EFS );
130  KBOOL IsEntityFrozen() const;
131 
132  //************************************
133  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityStateActive
134  // KDIS::DATA_TYPE::LifeFormAppearance::IsEntityStateActive
135  //!Description: Active(true) / De active(false)
136  // Parameter: KBOOL ES
137  //************************************
138  void SetEntityStateActive( KBOOL ES );
139  KBOOL IsEntityStateActive() const;
140 
141  //************************************
142  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityLifeformWeapon
143  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityLifeformWeapon
144  //!Description: Weapon Status. E.G Stowed.
145  // Parameter: EntityLifeformWeapon ELW
146  //************************************
147  void SetEntityLifeformWeapon1( KDIS::DATA_TYPE::ENUMS::EntityLifeformWeapon ELW );
148  KDIS::DATA_TYPE::ENUMS::EntityLifeformWeapon GetEntityLifeformWeapon1() const;
149  void SetEntityLifeformWeapon2( KDIS::DATA_TYPE::ENUMS::EntityLifeformWeapon ELW );
150  KDIS::DATA_TYPE::ENUMS::EntityLifeformWeapon GetEntityLifeformWeapon2() const;
151 
152  //************************************
153  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetEntityCamouflage
154  // KDIS::DATA_TYPE::LifeFormAppearance::GetEntityCamouflage
155  //!Description: camouflage type worn.
156  // Parameter: EntityCamouflage EC
157  //************************************
158  void SetEntityCamouflage( KDIS::DATA_TYPE::ENUMS::EntityCamouflage EC );
159  KDIS::DATA_TYPE::ENUMS::EntityCamouflage GetEntityCamouflage() const;
160 
161  //************************************
162  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetConcealedStationary
163  // KDIS::DATA_TYPE::LifeFormAppearance::IsConcealedStationary
164  //!Description: Describes the type of stationary concealment.
165  //! False - Not concealed. True - Entity in a prepared concealed position.
166  // Parameter: KBOOL CS
167  //************************************
168  void SetConcealedStationary( KBOOL CS );
169  KBOOL IsConcealedStationary() const;
170 
171  //************************************
172  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::SetConcealedStationary
173  // KDIS::DATA_TYPE::LifeFormAppearance::IsConcealedStationary
174  //!Description: Describes the type of movement concealment.
175  //! False - Open movement. True - Rushes between covered positions.
176  // Parameter: KBOOL CM
177  //************************************
178  void SetConcealedMovement( KBOOL CM );
179  KBOOL IsConcealedMovement() const;
180 
181  //************************************
182  // FullName: KDIS::DATA_TYPE::LifeFormAppearance::GetAsString
183  //!Description: Returns a string representation
184  //************************************
185  KString GetAsString() const;
186 
187  KBOOL operator == ( const LifeFormAppearance & Value ) const;
188  KBOOL operator != ( const LifeFormAppearance & Value ) const;
189 };
190 
191 } // END namespace DATA_TYPES
192 } // END namespace KDIS
193 
unsigned int KUINT32
Definition: KDefines.h:103
EntityPaintScheme
Definition: EnumEntityInfoInteraction.h:630
EntityCamouflage
Definition: EnumEntityInfoInteraction.h:722
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntityLifeformAppearance
Definition: EnumEntityInfoInteraction.h:734
EntityLifeformWeapon
Definition: EnumEntityInfoInteraction.h:758
EntityCompliance
Definition: EnumEntityInfoInteraction.h:785
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: LifeFormAppearance.h:53