GTXclient C++ API  GTXserver-16.0.2
GTXVariableInfo.hpp
1 /*****************************************************************************
2 
3  Copyright (c)2007 Geovariances, Avon, France.
4 
5  In consideration of payment of the license fee, which is a part of
6  the price you paid for this product, Geovariances (GV) as licensor,
7  grants you, the licensee, a non-exclusive right to use this copy of a
8  GV software product.
9  GV reserves all rights not expressly granted to licensee. GV retains
10  titleship and ownership of software. This license is not a sale of
11  the original software or any copy. GV also retains titleship and
12  ownership of any modifications or derivations of this software. Any
13  modifications of this software must be clearly marked as such. This
14  copyright message must appear in its entirety in this software, or
15  any modifications or derivations thereof.
16 
17  Geovariances welcomes any comments, suggestions, bug reports, etc. At
18  the discretion of Geovariances, any customer supplied bug fixes,
19  enhancements, or utility codes will be distributed in future software
20  releases (the contributor will of course be credited).
21 
22  Geovariances
23  49bis, Avenue Franklin Roosevelt
24  77210 Avon, FRANCE
25 
26  Phone: +33-(0)-160.749.100
27  Fax: +33-(0)-164.228.728
28  e-mail: support@geovariances.fr
29 
30  All Rights Reserved
31 
32 *****************************************************************************/
33 
34 #ifndef __GTXVariableInfo_hpp__
35 #define __GTXVariableInfo_hpp__
36 
37 #define __USING_GTXSERVER_CPP_API__
38 
39 #ifdef DOXYGEN
40 #define SWIG_OR_DOXYGEN
41 #endif //DOXYGEN
42 
43 #ifdef SWIG
44 #define GLOBAL_CLASS
45 #define SWIG_OR_DOXYGEN
46 #else //SWIG
47 #include <GTXClient.h>
48 #endif //SWIG
49 
53 class GLOBAL_CLASS GTXVariableInfo
54 {
55 public:
59  GTXVariableInfo(const GTXVariableInfo &in_vinfo);
60 
67  {
68  VAR_TYPE_SELECTION = -3,
69  VAR_TYPE_FLOAT_ALL = -2,
70  VAR_TYPE_ANY = -1,
77  VAR_TYPE_INVALID
78  };
79 
81  VariableType GetVariableType();
85  int GetBitLength();
87  int GetAlphaLength();
89  bool GetImplicitFlag();
91  int GetIndicesNumber();
93  const char *GetUnit();
95  const char *GetUnitSymbol();
97  bool GetLengthFlag();
98 
99 private:
100  GTXVariableInfo_C _cinfo;
101  friend class GTXClient;
102 };
103 
106 {
107 }
108 
111 {
112  _cinfo = in_vinfo._cinfo;
113 }
114 
116 {
117  return (GTXVariableInfo::VariableType)_cinfo.type;
118 }
119 
121 {
122  return _cinfo.bit_length;
123 }
124 
126 {
127  return _cinfo.alpha_length;
128 }
129 
131 {
132  return _cinfo.implicit != 0;
133 }
134 
136 {
137  return _cinfo.i_number;
138 }
139 
140 inline const char *GTXVariableInfo::GetUnit()
141 {
142  return _cinfo.unit;
143 }
144 
145 inline const char *GTXVariableInfo::GetUnitSymbol()
146 {
147  return _cinfo.unit_symbol;
148 }
149 
151 {
152  return _cinfo.length_var != 0;
153 }
154 
155 #endif // __GTXVariableInfo_hpp__