VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
entityMapperKey.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1997 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: entityMapperKey.h,v $ $Revision: 1.2 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #pragma once
13 
14 #include <vrfGuiCore/vrfGuiCore.h>
16 #include <vlpi/entityType.h>
17 #include <string>
18 
19 class DtEntityType;
20 
21 namespace makVrf
22 {
23  class DT_DLL_VRFGUICORE DtEntityMapperKey : public DtEntityType
24  {
25  public:
26 
27  static const int DtAnyMatch;
28 
30 
31  DtEntityMapperKey(const char* p);
32 
33  DtEntityMapperKey(const DtEntityType&, int force = -1);
34 
36  (
37  int force,
38  int kind,
39  int domain,
40  int country,
41  int category,
42  int subcategory,
43  int specific,
44  int extra
45  );
46 
47  DtEntityMapperKey(int force, const DtEntityType&);
48 
51 
53  virtual ~DtEntityMapperKey();
54 
56  DtEntityMapperKey& operator=(const DtEntityMapperKey& rhs);
57  DtEntityMapperKey& operator=(const DtObjectType& rhs);
58  DtEntityMapperKey& operator=(const DtEntityType& rhs);
59 
61  DtEntityMapperKey& operator=(const char* rhs);
62 
63  const std::string& string() const;
64 
65  int force() const {return myForce;}
66  void setForce(int force){myForce = force;}
67 
68  static bool isIed(const DtEntityType& t) { return t.matchPattern(DtEntityType(2,2,0,3,1,1,-1)); };
69 
71 
72  bool operator==(const DtEntityMapperKey& rhs) const;
73  virtual bool matchPattern(const DtEntityMapperKey &pat) const;
74 
76 
77  bool operator!=(const DtEntityMapperKey& rhs) const;
78 
80 
81  bool operator<(const DtEntityMapperKey& rhs) const;
82 
84 
85  bool operator>(const DtEntityMapperKey& rhs) const;
86 
87  int& operator[](int);
88  const int operator[](int) const;
89 
90  operator DtObjectType() const;
91 
93  virtual bool exactMatch(const DtEntityMapperKey&) const;
94 
95  protected:
96 
97  mutable std::string myStringRep;
98  int myForce;
99  };
100 
101  inline int& DtEntityMapperKey::operator[](int i)
102  {
103  switch (i)
104  {
105  case 0:
106  return DtEntityKind;
107  case 1:
108  return DtDomain;
109  case 2:
110  return DtCountry;
111  case 3:
112  return DtCategory;
113  case 4:
114  return DtSubCategory;
115  case 5:
116  return DtSpecific;
117  case 6:
118  return DtExtra;
119  case 7:
120  return myForce;
121  }
122 
123  return myForce;
124  }
125 
126  inline const int DtEntityMapperKey::operator[](int i) const
127  {
128  switch (i)
129  {
130  case 0:
131  return kind();
132  case 1:
133  return domain();
134  case 2:
135  return country();
136  case 3:
137  return category();
138  case 4:
139  return subCategory();
140  case 5:
141  return specific();
142  case 6:
143  return extra();
144  case 7:
145  return force();
146  }
147 
148  return force();
149  }
150 }
static const int DtAnyMatch
Definition: entityMapperKey.h:27
Definition: entityMapperKey.h:23
int myForce
Definition: entityMapperKey.h:98
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
std::string myStringRep
Definition: entityMapperKey.h:97
Definition: objectType.h:27
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1236
int force() const
Definition: entityMapperKey.h:65
void setForce(int force)
Definition: entityMapperKey.h:66
static bool isIed(const DtEntityType &t)
Definition: entityMapperKey.h:68
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
int & operator[](int)
Definition: entityMapperKey.h:101

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)