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 "FloatT.h"
40 #include <map>
41 
42 #ifdef _MSC_VER
43 # pragma warning ( push )
44 # pragma warning ( disable : 4275 ) // non dll-interface XXX used as base for dll-interface class YYY
45 #endif
46 
47 namespace GENAPI_NAMESPACE
48 {
49 
53  class CFloatImpl : public IFloat, public CNodeImpl
54  {
55  public:
56  //-------------------------------------------------------------
58 
59  CFloatImpl();
62 
63  protected:
64  //-------------------------------------------------------------
66 
67  virtual EAccessMode InternalGetAccessMode() const;
69 
72  {
73  return intfIFloat;
74  }
76 
77  protected:
78  //-------------------------------------------------------------
80 
81  virtual void InternalSetValue(double Value, bool Verify = true);
83 
85  virtual double InternalGetValue(bool Verify = false, bool IgnoreCache = false) const;
86 
88  virtual double InternalGetMin() const;
89 
91  virtual double InternalGetMax() const;
92 
94  virtual bool InternalHasInc();
95 
97  virtual double InternalGetInc();
98 
101 
104 
107 
110 
112  virtual int64_t InternalGetDisplayPrecision() const;
114 
115  protected:
116  //-------------------------------------------------------------
118 
119 
121  virtual ECachingMode InternalGetCachingMode() const;
123 
124 
125  virtual void SetInvalid(ESetInvalidMode simMode);
126 
127  //-------------------------------------------------------------
128  // Initializing
129  //-------------------------------------------------------------
130  public:
131 
132 
133  virtual void SetProperty( CProperty &Property );
134  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
135 
136  protected:
137  //-------------------------------------------------------------
139 
140  std::map<int64_t, CFloatPolyRef> m_ValuesIndexed;
142 
145 
148 
151 
154 
157 
160 
163 
166 
169 
172 
174  };
175 
179  class CFloat
180  : public BaseT< ValueT< NodeT < FloatT < CFloatImpl > > > >
181  {
182  };
183 }
184 
185 #ifdef _MSC_VER
186 # pragma warning ( pop )
187 #endif
188 
189 #endif // GENAPI_FLOAT_H
Definition of the ValueT class template.
Core pf the Float node implementation.
Definition: Float.h:53
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:168
virtual void SetProperty(CProperty &Property)
virtual double InternalGetInc()
Get the constant increment if there is any.
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
virtual double InternalGetValue(bool Verify=false, bool IgnoreCache=false) const
Get feature value.
CFloatPolyRef m_Min
The minimum value.
Definition: Float.h:150
Vector of doubles with reference counting.
Definition: Autovector.h:76
ERepresentation m_Representation
recommended representation of the value
Definition: Float.h:162
__int64 int64_t
Definition: config-win32.h:21
CFloatPolyRef m_ValueDefault
The value.
Definition: Float.h:144
interface GENAPI_DECL_ABSTRACT IFloat
Interface for float properties.
Definition: IFloat.h:60
CIntegerPolyRef m_Index
Reference to the index value.
Definition: Float.h:159
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:71
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:179
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
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:85
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
CFloatPolyRef m_Max
The maximum value.
Definition: Float.h:153
CFloatPolyRef m_Value
The value.
Definition: Float.h:147
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:165
std::map< int64_t, CFloatPolyRef > m_ValuesIndexed
Map storing the indexed values by index.
Definition: Float.h:141
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
CFloatPolyRef m_Inc
The constant increment if there is any.
Definition: Float.h:156
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
Definition of the FloatT class template.
int64_t m_DisplayPrecision
the precision the float is converted with to a string
Definition: Float.h:171
Part of the generic device API.
Definition: Autovector.h:48
enum GENAPI_NAMESPACE::_EInterfaceType EInterfaceType
typedef for interface type


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 19:10:54