KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SubSurfacePlatformAppearance.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: SubSurfacePlatformAppearance
32  created: 22/09/2008 - Updated March 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a sub surface platform.
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 
57  KUINT32 m_PaintScheme : 1; // 0
58  KUINT32 m_MobilityKill : 1; // 1
59  KUINT32 m_Unused1 : 1; // 2
60  KUINT32 m_Damage : 2; // 3-4
61  KUINT32 m_Smoke : 2; // 5-6
62  KUINT32 m_Unused2 : 2; // 7-8
63  KUINT32 m_HatchState : 3; // 9-11
64  KUINT32 m_RunningLights : 1; // 12
65  KUINT32 m_Unused3 : 2; // 13-14
66  KUINT32 m_FlamingEffectField : 1; // 15
67  KUINT32 m_Unused4 : 5; // 16-20
68  KUINT32 m_FrozenStatus : 1; // 21
69  KUINT32 m_PowerPlantStatus : 1; // 22
70  KUINT32 m_State : 1; // 23
71  KUINT32 m_Unused5 : 8; // 24-31
72 
73 public:
74 
75  //************************************
76  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityPaintScheme
77  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::GetEntityPaintScheme
78  //!Description: Describes the paint scheme of an entity.
79  // Parameter: EntityPaintScheme EPS
80  //************************************
81  void SetEntityPaintScheme( KDIS::DATA_TYPE::ENUMS::EntityPaintScheme EPS );
82  KDIS::DATA_TYPE::ENUMS::EntityPaintScheme GetEntityPaintScheme() const;
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityMobilityKill
86  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::DoesEntityMobilityKill
87  //!Description: Mobility/Propulsion Kill True/False?
88  // Parameter: KBOOL MK
89  //************************************
90  void SetEntityMobilityKill( KBOOL MK );
91  KBOOL DoesEntityMobilityKill() const;
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityDamage
95  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::GetEntityDamage
96  //!Description: Entity Damage State
97  // Parameter: EntityDamage ED
98  //************************************
99  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
100  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
101 
102  //************************************
103  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntitySmoke,
104  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::GetEntitySmoke
105  //!Description: Entity Smoke State
106  // Parameter: EntitySmoke ES
107  //************************************
108  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
109  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
110 
111  //************************************
112  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityCanopyState
113  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::GetEntityCanopyState
114  //!Description: Is the hatch open or closed? Note: Only PrimaryHatchIsClosed
115  // or PrimaryHatchIsOpen are acceptable values when using aircraft.
116  // Parameter: EntityHatchState EHS
117  //************************************
118  void SetEntityHatchState( KDIS::DATA_TYPE::ENUMS::EntityHatchState EHS );
119  KDIS::DATA_TYPE::ENUMS::EntityHatchState GetEntityHatchState() const;
120 
121  //************************************
122  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityRunningLights
123  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::IsEntityRunningLightsOn
124  //!Description: Are the vehicles running lights turned on? True = On, False = Off.
125  // Parameter: KBOOL RL
126  //************************************
127  void SetEntityRunningLights( KBOOL RL );
128  KBOOL IsEntityRunningLightsOn() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityFlamingEffect
132  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::IsEntityFlaming
133  //!Description: Are flames rising from the entity?
134  // Parameter: KBOOL EFE
135  //************************************
136  void SetEntityFlamingEffect( KBOOL EFE );
137  KBOOL IsEntityFlaming() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityFrozenStatus
141  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::IsEntityFrozen
142  //!Description: Is the entity frozen?
143  //! Note: Frozen entities should not be dead-reckoned, they should remain
144  //! frozen in place. You would likely freeze entites when your application is
145  //! in a paused state.
146  // Parameter: KBOOL EFS
147  //************************************
148  void SetEntityFrozenStatus( KBOOL EFS );
149  KBOOL IsEntityFrozen() const;
150 
151  //************************************
152  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityPowerPlantOn
153  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::IsEntityPowerPlantOn
154  //!Description: Power Plant On/Off. True = On, False = Off.
155  // Parameter: KBOOL EPPS
156  //************************************
157  void SetEntityPowerPlantOn( KBOOL EPPS );
158  KBOOL IsEntityPowerPlantOn() const;
159 
160  //************************************
161  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::SetEntityStateActive
162  // KDIS::DATA_TYPE::SubSurfacePlatformAppearance::IsEntityStateActive
163  //!Description: True = Active, False = Deactivated.
164  // Parameter: KBOOL ES
165  //************************************
166  void SetEntityStateActive( KBOOL ES );
167  KBOOL IsEntityStateActive() const;
168 
169  //************************************
170  // FullName: KDIS::DATA_TYPE::SubSurfacePlatformAppearance::GetAsString
171  //!Description: Returns a string representation
172  //************************************
173  KString GetAsString() const;
174 
175  KBOOL operator == ( const SubSurfacePlatformAppearance & Value ) const;
176  KBOOL operator != ( const SubSurfacePlatformAppearance & Value ) const;
177 };
178 
179 } // END namespace DATA_TYPES
180 } // END namespace KDIS
181 
unsigned int KUINT32
Definition: KDefines.h:103
EntityPaintScheme
Definition: EnumEntityInfoInteraction.h:630
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
EntityHatchState
Definition: EnumEntityInfoInteraction.h:680
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
Definition: SubSurfacePlatformAppearance.h:53
#define KDIS_EXPORT
Definition: KDefines.h:82