IntConverter.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // (c) 2006 by Basler Vision Technologies
3 // Section: Vision Components
4 // Project: GenApi
5 // Author: Hartmut Nebelung
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 //-----------------------------------------------------------------------------
31 #ifndef GENAPI_INTCONVERTER_H
32 #define GENAPI_INTCONVERTER_H
33 
34 #include "Base/GCString.h"
35 #include "../IInteger.h"
36 #include "Node.h"
37 #include "BaseT.h"
38 #include "ValueT.h"
39 #include "NodeT.h"
40 #include "NodeMap.h"
41 #include "IntSwissKnife.h"
42 #include "IntegerT.h"
44 #include "PolyReference.h"
45 
46 namespace GENAPI_NAMESPACE
47 {
48  //*************************************************************
49  // CIntConverter class
50  //*************************************************************
51 
53 
60  class CIntConverterImpl : public IInteger, public CNodeImpl
61  {
62  public:
65  protected:
66 
67  //-------------------------------------------------------------
68  // IInteger implementation
69  //-------------------------------------------------------------
70 
71  // Set feature value
72  virtual void InternalSetValue(int64_t Value, bool Verify = true);
73 
74  // Get feature value
75  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
76 
77  // Get minimum value allowed
78  virtual int64_t InternalGetMin();
79 
80  // Get maximum value allowed
81  virtual int64_t InternalGetMax();
82 
83  // Get increment
84  virtual int64_t InternalGetInc();
85 
88 
89  // Get recommended representation
91  {
93  return m_Representation;
94  else
95  return m_Value.GetRepresentation();
96 
97  }
98 
99  // Get the access mode of the node
100  virtual EAccessMode InternalGetAccessMode() const;
101 
104  {
105  return intfIInteger;
106  }
107 
110  {
111  if( m_Unit.empty() )
112  return m_Value.GetUnit();
113 
114  return m_Unit;
115  }
116 
118  virtual ECachingMode InternalGetCachingMode() const;
119 
120  public:
121  //-------------------------------------------------------------
122  // Initializing
123  //-------------------------------------------------------------
124  public:
125 
126  virtual void SetProperty( CProperty &Property );
127  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
128 
129  // determine if the conversion function is increasing or decreasing
130  void CheckIncreasing();
131 
132 
133  private:
135  bool IsMinUninititialized() const;
136 
138  bool IsMaxUninitialized() const;
139 
140  //-------------------------------------------------------------
141  // Member variables
142  //-------------------------------------------------------------
143 
146 
149 
152 
155 
158 
161 
164 
167 
170 
171  };
172 
175  : public BaseT< ValueT< NodeT < IntegerT < CIntConverterImpl > > > >
176  {
177  };
178 }
179 
180 #endif
Definition of the ValueT class template.
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
virtual ERepresentation InternalGetRepresentation() const
Definition: IntConverter.h:90
virtual void SetProperty(CProperty &Property)
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition: IFloat.h:114
const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
virtual void InternalSetValue(int64_t Value, bool Verify=true)
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Definition: IntConverter.h:109
bool IsMaxUninitialized() const
Checks if <Max> has ben set.
ERepresentation GetRepresentation() const
see IInteger interface
virtual bool empty(void) const
CIntegerPolyRef m_pConvertTo
The Swiss Knife for Set.
Definition: IntConverter.h:154
__int64 int64_t
Definition: config-win32.h:21
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntConverter.h:103
IInteger implementation with integrated conversion.
Definition: IntConverter.h:60
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: IntConverter.h:166
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the NodeT class template.
GENICAM_NAMESPACE::gcstring GetUnit() const
see IInteger interface
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
enum GENAPI_NAMESPACE::_ECachingMode ECachingMode
caching mode of a register
Vector of integers with reference counting.
Definition: Autovector.h:54
GENICAM_NAMESPACE::gcstring m_InputName
The Name of the external Variable.
Definition: IntConverter.h:151
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
ESlope m_Slope
indicates if the formula is strictly monotonous increasing or decreating
Definition: IntConverter.h:169
Definition of the IntegerT class template.
Definition of polymorphical smart pointer.
class implementingthe converter object
Definition: IntConverter.h:174
ERepresentation m_Representation
recommended representation of the value
Definition: IntConverter.h:163
bool IsMinUninititialized() const
Checks if <Min> has ben set.
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:86
CIntegerPolyRef m_pConvertFrom
The Swiss Knife for Get.
Definition: IntConverter.h:157
GENICAM_NAMESPACE::gcstring m_FormulaTo
The SwissKnife formula for Set.
Definition: IntConverter.h:145
A string class which is a clone of std::string.
Definition: GCString.h:52
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
Definition of CInt64MathParser.
enum GENAPI_NAMESPACE::_ESlope ESlope
typedef for formula type
Declaration of CNodeMap.
IInteger interface.
Definition: Types.h:193
GENICAM_NAMESPACE::gcstring m_FormulaFrom
The SwissKnife formula for Get.
Definition: IntConverter.h:148
CIntegerPolyRef m_Value
Refeerence to the value.
Definition: IntConverter.h:160
Definition of CIntSwissKnife.
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