VR-Link API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
entityType.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 1992-2025 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vlutil/vlMachineTypes.h>
13 #include "netStructs.h"
14 #include "disEnums.h"
15 #include <sstream>
16 #include <string>
17 
18 #define DtAny -1
19 
27 {
28 public:
29 
31  DtEntityType(const char* p);
32 
34  DtEntityType(int kind, int domain, int country, int category,
35  int subCategory, int specific, int extra);
36 
38  DtEntityType();
39 
42 
44  DtEntityType(const DtEntityType& orig);
45 
47  virtual ~DtEntityType();
48 
51  void setFromNet(const DtNetEntityType &netType);
52 
54  operator DtNetEntityType() const;
55 
57  const char *string() const;
58 
60  static const DtEntityType& defaultType();
61 
63  static const DtEntityType& nullType();
64 
65 public:
66 
70  int DtDomain;
72  int DtCountry;
80  int DtExtra;
81 
82 public:
83 
84  int kind() const {return(DtEntityKind);}
85  int domain() const {return(DtDomain);}
86  int country() const {return(DtCountry);}
87  int category() const {return(DtCategory);}
88  int subCategory() const {return(DtSubCategory);}
89  int specific() const {return(DtSpecific);}
90  int extra() const {return(DtExtra);}
91 
92  void setKind(int val){DtEntityKind = val;}
93  void setDomain(int val){DtDomain = val;}
94  void setCountry(int val){DtCountry = val;}
95  void setCategory(int val){DtCategory = val;}
96  void setSubCategory(int val){DtSubCategory = val;}
97  void setSpecific(int val){DtSpecific = val;}
98  void setExtra(int val){DtExtra = val;}
99 
100  bool matchPattern(const DtEntityType &pat) const;
101  bool DtTypeMatchPattern(const DtEntityType &pat) const { return matchPattern(pat); }
102 
103  int match(const DtEntityType &type) const {return operator==(type);}
104 
105  int operator==(const DtEntityType &type) const;
106  int operator!=(const DtEntityType &type) const;
107 
110  bool operator<(const DtEntityType &type) const;
111 
112 protected:
113 
119  mutable std::string myMutableStringRep;
120 
121 };
122 
123 DT_DLL_VLPROTIND std::ostream& operator<< (std::ostream& stream, const DtEntityType& object);
124 
125 
127 {
128 public:
129 
131  DtRadioEntityType(const char* p);
132  DtRadioEntityType(int kind, int domain, int country, int category,
133  int nomenclatureVersion, int nomenclature);
135  void setFromNet(DtNetRadioEntityType netType);
136 
137  int nomenclatureVersion() const;
138  int nomenclature() const;
139 
140  void setNomenclatureVersion(int version);
141  void setNomenclature(int nom);
142 
143  const char *string() const;
144 
145  static const DtRadioEntityType& nullType();
146 
147  operator DtNetRadioEntityType() const;
148 
149 protected:
150 
156  mutable std::string myMutableString;
157 
158 };
159 
160 #define entityType_inl_
161 #include "entityType.inl"
162 #undef entityType_inl_
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
int domain() const
Definition: entityType.h:85
std::ostream & operator<<(std::ostream &os, const Dt3dChord &chord)
Definition: entityType.h:126
int specific() const
Definition: entityType.h:89
class DT_DLL_VLPROTIND DtRadioEntityType
Definition: netStructs.h:23
DtEntityKind
We use enumerated types instead of manifest constants so that cross-type assignment mistakes can be c...
Definition: entityTypes.h:22
int subCategory() const
Definition: entityType.h:88
void setCategory(int val)
Definition: entityType.h:95
static const DtEntityType & nullType()
returns an instance of 0:0:0:0:0:0:0
int DtCountry
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:72
int DtCategory
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:74
int DtDomain
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:70
int DtSubCategory
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:76
int extra() const
Definition: entityType.h:90
int category() const
Definition: entityType.h:87
void setSpecific(int val)
Definition: entityType.h:97
void setExtra(int val)
Definition: entityType.h:98
int kind() const
Definition: entityType.h:84
const char * string() const
returns a string representation of this instance in the form 1:2:3:4:5:6:7
void setCountry(int val)
Definition: entityType.h:94
int DtExtra
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:80
void setDomain(int val)
Definition: entityType.h:93
#define DT_DLL_VLPROTIND
Definition: vlMachineTypes.h:110
bool DtTypeMatchPattern(const DtEntityType &pat) const
Definition: entityType.h:101
Definition: netStructs.h:55
int DtEntityKind
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:68
void setFromNet(const DtNetEntityType &netType)
Sets the instance equal to the value in netType prefer the DtNetEntityType constructor to this functi...
bool operator<(const DtTimeReflectedObjectIdKey &left, const DtTimeReflectedObjectIdKey &right)
Compare 2 time ID keys.
Definition: reflectedObjectListHLA.h:548
Contains the standard DIS enumerations.
class DT_DLL_VLPROTIND DtEntityType
Definition: netStructs.h:22
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
std::string myMutableStringRep
This member is: 1) mutable because it is changed in const methods and used as a char buffer 2) protec...
Definition: entityType.h:119
std::string myMutableString
This member is: 1) mutable because it is changed in const methods and used as a char buffer 2) protec...
Definition: entityType.h:156
Definition: netStructs.h:70
int match(const DtEntityType &type) const
Definition: entityType.h:103
void setKind(int val)
Definition: entityType.h:92
void setSubCategory(int val)
Definition: entityType.h:96
int country() const
Definition: entityType.h:86
int DtSpecific
Public for historical reasons, will be made protected in future versions.
Definition: entityType.h:78
This file contains typedefs for machine dependant types.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)