VR-Forces Developer's Guide
 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) 2024 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrfGuiCore/vrfGuiCore.h>
12 #include <vlpi/entityType.h>
13 #include <string>
14 
15 class DtEntityType;
16 
17 namespace makVrf
18 {
19  class DT_DLL_VRFGUICORE DtEntityMapperKey : public DtEntityType
20  {
21  public:
22 
23  static const int DtAnyMatch;
24 
26 
27  DtEntityMapperKey(const char* p);
28 
29  DtEntityMapperKey(const DtEntityType&, int force = -1);
30 
32  (
33  int force,
34  int kind,
35  int domain,
36  int country,
37  int category,
38  int subcategory,
39  int specific,
40  int extra
41  );
42 
43  DtEntityMapperKey(int force, const DtEntityType&);
44 
47 
49  virtual ~DtEntityMapperKey() override;
50 
52  DtEntityMapperKey& operator=(const DtEntityMapperKey& rhs);
53  DtEntityMapperKey& operator=(const DtEntityType& rhs);
54 
56  DtEntityMapperKey& operator=(const char* rhs);
57 
58  const std::string& string() const;
59 
60  int force() const {return myForce;}
61  void setForce(int force){myForce = force;}
62 
63  static bool isIed(const DtEntityType& t) { return t.matchPattern(DtEntityType(2,2,0,3,1,1,-1)); };
64 
66 
67  bool operator==(const DtEntityMapperKey& rhs) const;
68  virtual bool matchPattern(const DtEntityMapperKey &pat) const;
69 
71  bool operator==(const DtEntityType& rhsEntityType) const;
73  bool operator!=(const DtEntityType& rhsEntityType) 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 
91  virtual bool exactMatch(const DtEntityMapperKey&) const;
92 
94  bool isNullEntityType() const;
95 
96  protected:
97 
98  mutable std::string myStringRep;
99  int myForce;
100  };
101 
102  inline int& DtEntityMapperKey::operator[](int i)
103  {
104  switch (i)
105  {
106  case 0:
107  return DtEntityKind;
108  case 1:
109  return DtDomain;
110  case 2:
111  return DtCountry;
112  case 3:
113  return DtCategory;
114  case 4:
115  return DtSubCategory;
116  case 5:
117  return DtSpecific;
118  case 6:
119  return DtExtra;
120  case 7:
121  return myForce;
122  }
123 
124  return myForce;
125  }
126 
127  inline const int DtEntityMapperKey::operator[](int i) const
128  {
129  switch (i)
130  {
131  case 0:
132  return kind();
133  case 1:
134  return domain();
135  case 2:
136  return country();
137  case 3:
138  return category();
139  case 4:
140  return subCategory();
141  case 5:
142  return specific();
143  case 6:
144  return extra();
145  case 7:
146  return force();
147  }
148 
149  return force();
150  }
151 }
static const int DtAnyMatch
Definition: entityMapperKey.h:23
Definition: entityMapperKey.h:19
int myForce
Definition: entityMapperKey.h:99
DT_DLL_VRFGUICORE bool operator==(const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &lhs, const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &rhs)
bool operator>(const DtTemporaryAgentManager::AgentParameters &lhs, const DtTemporaryAgentManager::AgentParameters &rhs)
Definition: DtTemporaryAgentManager.h:76
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
std::string myStringRep
Definition: entityMapperKey.h:98
int force() const
Definition: entityMapperKey.h:60
void setForce(int force)
Definition: entityMapperKey.h:61
DT_DLL_VRFGUICORE bool operator!=(const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &lhs, const std::vector< makArchives::DtEnvironmentRecord::DtElevationalConfigurationRecord > &rhs)
static bool isIed(const DtEntityType &t)
Definition: entityMapperKey.h:63
int & operator[](int)
Definition: entityMapperKey.h:102

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)