MAK Data Logger API Documentation for DIS
entityMapperKey.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
11 #include <QtCore/QString>
12 #include "omtReader.h"
13 
14 class DtEntityType;
15 
17 {
18 
19 public:
20 
21  static const int DtAnyMatch;
22 
24 
25  DtEntityMapperKey(const char* p);
26 
28  (
29  int kind,
30  int domain,
31  int country,
32  int category,
33  int subcategory,
34  int specific,
35  int extra
36  );
37 
40 
43 
45  DtEntityMapperKey& operator=(const DtEntityMapperKey& rhs);
46 
48  DtEntityMapperKey& operator=(const char* rhs);
49 
50  const QString& string() const;
51 
52  int kind() const {return myKind;}
53  void setKind(int kind){myKind = kind;}
54 
55  int domain() const {return myDomain;}
56  void setDomain(int domain){myDomain = domain;}
57 
58  int country() const {return myCountry;}
59  void setCountry(int country){myCountry = country;}
60 
61  int category() const {return myCategory;}
62  void setCategory(int category){myCategory = category;}
63 
64  int subcategory() const {return mySubcategory;}
65  void setSubCategory(int subcategory){mySubcategory = subcategory;}
66 
67  int specific() const {return mySpecific;}
68  void setSpecific(int specific){mySpecific = specific;}
69 
70  int extra() const {return myExtra;}
71  void setExtra(int extra){myExtra = extra;}
72 
74 
75  bool operator==(const DtEntityMapperKey& rhs) const;
76  virtual bool matchPattern(const DtEntityMapperKey &pat) const;
77 
79 
80  bool operator!=(const DtEntityMapperKey& rhs) const;
81 
83 
84  bool operator<(const DtEntityMapperKey& rhs) const;
85 
87 
88  bool operator>(const DtEntityMapperKey& rhs) const;
89 
90  int& operator[](int);
91  const int operator[](int) const;
92 
94  virtual bool exactMatch(const DtEntityMapperKey&) const;
95 
96 protected:
97 
98  mutable QString myStringRep;
99  int myKind;
100  int myDomain;
105  int myExtra;
106 };
107 
109 {
110  switch (i)
111  {
112  case 0:
113  return myKind;
114  case 1:
115  return myDomain;
116  case 2:
117  return myCountry;
118  case 3:
119  return myCategory;
120  case 4:
121  return mySubcategory;
122  case 5:
123  return mySpecific;
124  case 6:
125  return myExtra;
126  }
127  return myKind;
128 }
129 
130 inline const int DtEntityMapperKey::operator[](int i) const
131 {
132  switch (i)
133  {
134  case 0:
135  return myKind;
136  case 1:
137  return myDomain;
138  case 2:
139  return myCountry;
140  case 3:
141  return myCategory;
142  case 4:
143  return mySubcategory;
144  case 5:
145  return mySpecific;
146  case 6:
147  return myExtra;
148  }
149 
150  return myKind;
151 }
152 

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)