![]() |
VR-Link API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00006 #ifndef entityType_H_ 00007 #define entityType_H_ 00008 00012 00013 #include <vlutil/vlMachineTypes.h> 00014 #include "NetStructs.h" 00015 #include "disEnums.h" 00016 #include <sstream> 00017 #include <string> 00018 00022 #define DtAny -1 00023 00030 class DT_DLL_VLPROTIND DtEntityType 00031 { 00032 public: 00034 DtEntityType(const char* p); 00035 00037 DtEntityType(int kind, int domain, int country, int category, 00038 int subCategory, int specific, int extra); 00039 00041 DtEntityType(); 00042 00044 DtEntityType(DtNetEntityType netType); 00045 00047 DtEntityType(const DtEntityType& orig); 00048 00050 virtual ~DtEntityType(); 00051 00054 void setFromNet(const DtNetEntityType &netType); 00055 00057 operator DtNetEntityType() const; 00058 00060 const char *string() const; 00061 00063 static const DtEntityType& defaultType(); 00064 00066 static const DtEntityType& nullType(); 00067 00068 public: 00070 int DtEntityKind; 00072 int DtDomain; 00074 int DtCountry; 00076 int DtCategory; 00078 int DtSubCategory; 00080 int DtSpecific; 00082 int DtExtra; 00083 00084 public: 00085 int kind() const {return(DtEntityKind);} 00086 int domain() const {return(DtDomain);} 00087 int country() const {return(DtCountry);} 00088 int category() const {return(DtCategory);} 00089 int subCategory() const {return(DtSubCategory);} 00090 int specific() const {return(DtSpecific);} 00091 int extra() const {return(DtExtra);} 00092 00093 void setKind(int val){DtEntityKind = val;} 00094 void setDomain(int val){DtDomain = val;} 00095 void setCountry(int val){DtCountry = val;} 00096 void setCategory(int val){DtCategory = val;} 00097 void setSubCategory(int val){DtSubCategory = val;} 00098 void setSpecific(int val){DtSpecific = val;} 00099 void setExtra(int val){DtExtra = val;} 00100 00101 bool matchPattern(const DtEntityType &pat) const; 00102 bool DtTypeMatchPattern(const DtEntityType &pat) const { return matchPattern(pat); } 00103 00104 int match(const DtEntityType &type) const {return operator==(type);} 00105 00106 int operator==(const DtEntityType &type) const; 00107 int operator!=(const DtEntityType &type) const; 00108 00111 bool operator<(const DtEntityType &type) const; 00112 00113 protected: 00119 mutable std::string myMutableStringRep; 00120 }; 00121 00122 DT_DLL_VLPROTIND std::ostream& operator<< (std::ostream& stream, const DtEntityType& object); 00123 00124 00125 class DT_DLL_VLPROTIND DtRadioEntityType : public DtEntityType 00126 { 00127 public: 00128 DtRadioEntityType(); 00129 DtRadioEntityType(const char* p); 00130 DtRadioEntityType(int kind, int domain, int country, int category, 00131 int nomenclatureVersion, int nomenclature); 00132 DtRadioEntityType(DtNetRadioEntityType netType); 00133 void setFromNet(DtNetRadioEntityType netType); 00134 00135 int nomenclatureVersion() const; 00136 int nomenclature() const; 00137 00138 void setNomenclatureVersion(int version); 00139 void setNomenclature(int nom); 00140 00141 const char *string() const; 00142 00143 static const DtRadioEntityType& nullType(); 00144 00145 operator DtNetRadioEntityType() const; 00146 00147 00148 protected: 00154 mutable std::string myMutableString; 00155 }; 00156 00157 #define entityType_inl_ 00158 #include "entityType.inl" 00159 #undef entityType_inl_ 00160 00161 #endif 00162