VR-Forces 4.6 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 
59  DtEntityMapperKey& operator=(const char* rhs);
60 
61  const std::string& string() const;
62 
63  int force() const {return myForce;}
64  void setForce(int force){myForce = force;}
65 
66  static bool isIed(const DtEntityType& t) { return t.matchPattern(DtEntityType(2,2,0,3,1,1,-1)); };
67 
69 
70  bool operator==(const DtEntityMapperKey& rhs) const;
71  virtual bool matchPattern(const DtEntityMapperKey &pat) const;
72 
74 
75  bool operator!=(const DtEntityMapperKey& rhs) const;
76 
78 
79  bool operator<(const DtEntityMapperKey& rhs) const;
80 
82 
83  bool operator>(const DtEntityMapperKey& rhs) const;
84 
85  int& operator[](int);
86  const int operator[](int) const;
87 
88  operator DtObjectType() const;
89 
91  virtual bool exactMatch(const DtEntityMapperKey&) const;
92 
93  protected:
94 
95  mutable std::string myStringRep;
96  int myForce;
97  };
98 
99  inline int& DtEntityMapperKey::operator[](int i)
100  {
101  switch (i)
102  {
103  case 0:
104  return DtEntityKind;
105  case 1:
106  return DtDomain;
107  case 2:
108  return DtCountry;
109  case 3:
110  return DtCategory;
111  case 4:
112  return DtSubCategory;
113  case 5:
114  return DtSpecific;
115  case 6:
116  return DtExtra;
117  case 7:
118  return myForce;
119  }
120 
121  return myForce;
122  }
123 
124  inline const int DtEntityMapperKey::operator[](int i) const
125  {
126  switch (i)
127  {
128  case 0:
129  return kind();
130  case 1:
131  return domain();
132  case 2:
133  return country();
134  case 3:
135  return category();
136  case 4:
137  return subCategory();
138  case 5:
139  return specific();
140  case 6:
141  return extra();
142  case 7:
143  return force();
144  }
145 
146  return force();
147  }
148 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)