Float.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006-8 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Hartmut Nebelung, Fritz Dierks
6 // $Header$
7 //
8 // License: This file is published under the license of the EMVA GenICam Standard Group.
9 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10 // If for some reason you are missing this file please contact the EMVA or visit the website
11 // (http://www.genicam.org) for a full copy.
12 //
13 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
14 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
17 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 // POSSIBILITY OF SUCH DAMAGE.
24 //-----------------------------------------------------------------------------
30 #ifndef GENAPI_FLOAT_H
31 #define GENAPI_FLOAT_H
32 
33 #include "Base/GCString.h"
34 #include "../IFloat.h"
35 #include "Node.h"
36 #include "BaseT.h"
37 #include "ValueT.h"
38 #include "NodeT.h"
39 #include "NodeMap.h"
40 #include "FloatT.h"
41 #include <map>
42 
43 #ifdef _MSC_VER
44 # pragma warning ( push )
45 # pragma warning ( disable : 4275 ) // non dll-interface XXX used as base for dll-interface class YYY
46 #endif
47 
48 namespace GENAPI_NAMESPACE
49 {
50 
54  class CFloatImpl : public IFloat, public CNodeImpl
55  {
56  public:
57  //-------------------------------------------------------------
59 
60  CFloatImpl();
63 
64  protected:
65  //-------------------------------------------------------------
67 
68  virtual EAccessMode InternalGetAccessMode() const;
70 
73  {
74  return intfIFloat;
75  }
77 
78  protected:
79  //-------------------------------------------------------------
81 
82  virtual void InternalSetValue(double Value, bool Verify = true);
84 
86  virtual double InternalGetValue(bool Verify = false, bool IgnoreCache = false) const;
87 
89  virtual double InternalGetMin() const;
90 
92  virtual double InternalGetMax() const;
93 
95  virtual bool InternalHasInc();
96 
98  virtual double InternalGetInc();
99 
102 
105 
108 
111 
113  virtual int64_t InternalGetDisplayPrecision() const;
115 
116  protected:
117  //-------------------------------------------------------------
119 
120 
122  virtual ECachingMode InternalGetCachingMode() const;
124 
125 
126  virtual void SetInvalid(ESetInvalidMode simMode);
127 
128  //-------------------------------------------------------------
129  // Initializing
130  //-------------------------------------------------------------
131  public:
132 
133 
134  virtual void SetProperty( CProperty &Property );
135  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
136 
137  protected:
138  //-------------------------------------------------------------
140 
141  std::map<int64_t, CFloatPolyRef> m_ValuesIndexed;
143 
146 
149 
152 
155 
158 
161 
164 
167 
170 
173 
175  };
176 
180  class CFloat
181  : public BaseT< ValueT< NodeT < FloatT < CFloatImpl > > > >
182  {
183  };
184 }
185 
186 #ifdef _MSC_VER
187 # pragma warning ( pop )
188 #endif
189 
190 #endif // GENAPI_FLOAT_H
Definition of the ValueT class template.
Core pf the Float node implementation.
Definition: Float.h:54
IFloat interface.
Definition: Types.h:196
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
EDisplayNotation m_DisplayNotation
the printf format specifier used to convert the float number to a string
Definition: Float.h:169
virtual void SetProperty(CProperty &Property)
virtual double InternalGetInc()
Get the constant increment if there is any.
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
virtual double InternalGetValue(bool Verify=false, bool IgnoreCache=false) const
Get feature value.
CFloatPolyRef m_Min
The minimum value.
Definition: Float.h:151
Vector of doubles with reference counting.
Definition: Autovector.h:76
ERepresentation m_Representation
recommended representation of the value
Definition: Float.h:163
__int64 int64_t
Definition: config-win32.h:21
CFloatPolyRef m_ValueDefault
The value.
Definition: Float.h:145
CIntegerPolyRef m_Index
Reference to the index value.
Definition: Float.h:160
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the NodeT class template.
virtual int64_t InternalGetDisplayPrecision() const
Get the precision to be used when converting the float to a string.
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: Float.h:72
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
enum GENAPI_NAMESPACE::_EDisplayNotation EDisplayNotation
typedef for float notation
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit() const
Get the unit.
virtual EDisplayNotation InternalGetDisplayNotation() const
Get the way the float should be converted to a string.
Float node implementation.
Definition: Float.h:180
virtual void InternalSetValue(double Value, bool Verify=true)
Set feature value.
virtual bool InternalHasInc()
True if the float has a constant increment.
virtual double InternalGetMin() const
Get minimum value allowed.
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
CFloatPolyRef m_Max
The maximum value.
Definition: Float.h:154
CFloatPolyRef m_Value
The value.
Definition: Float.h:148
virtual void SetInvalid(ESetInvalidMode simMode)
A reference to a float which can be either a double variable, or a pointer to an IFloat, IInteger, or an IEnumeration interface.
A string class which is a clone of std::string.
Definition: GCString.h:52
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: Float.h:166
std::map< int64_t, CFloatPolyRef > m_ValuesIndexed
Map storing the indexed values by index.
Definition: Float.h:142
virtual double InternalGetMax() const
Get maximum value allowed.
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
Portable string implementation.
A reference to an int64 which can bei either an int64 variable, or a pointer to an IInteger...
Definition: PolyReference.h:68
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition: IFloat.h:60
CFloatPolyRef m_Inc
The constant increment if there is any.
Definition: Float.h:157
ESetInvalidMode
Three different modes of operation for INodePrivate::SetInvalid()
Definition: INodePrivate.h:91
virtual const double_autovector_t InternalGetListOfValidValues()
Get list of valid value.
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
Declaration of CNodeMap.
Definition of the FloatT class template.
int64_t m_DisplayPrecision
the precision the float is converted with to a string
Definition: Float.h:172
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40