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 "IntSwissKnife.h"
41 #include "IntegerT.h"
43 #include "PolyReference.h"
44 
45 namespace GENAPI_NAMESPACE
46 {
47  //*************************************************************
48  // CIntConverter class
49  //*************************************************************
50 
52 
59  class CIntConverterImpl : public IInteger, public CNodeImpl
60  {
61  public:
64  protected:
65 
66  //-------------------------------------------------------------
67  // IInteger implementation
68  //-------------------------------------------------------------
69 
70  // Set feature value
71  virtual void InternalSetValue(int64_t Value, bool Verify = true);
72 
73  // Get feature value
74  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
75 
76  // Get minimum value allowed
77  virtual int64_t InternalGetMin();
78 
79  // Get maximum value allowed
80  virtual int64_t InternalGetMax();
81 
82  // Get increment
83  virtual int64_t InternalGetInc();
84 
87 
88  // Get recommended representation
90  {
92  return m_Representation;
93  else
94  return m_Value.GetRepresentation();
95 
96  }
97 
98  // Get the access mode of the node
99  virtual EAccessMode InternalGetAccessMode() const;
100 
103  {
104  return intfIInteger;
105  }
106 
109  {
110  if( m_Unit.empty() )
111  return m_Value.GetUnit();
112 
113  return m_Unit;
114  }
115 
117  virtual ECachingMode InternalGetCachingMode() const;
118 
119  public:
120  //-------------------------------------------------------------
121  // Initializing
122  //-------------------------------------------------------------
123  public:
124 
125  virtual void SetProperty( CProperty &Property );
126  virtual bool GetProperty( CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList ) const;
127 
128  // determine if the conversion function is increasing or decreasing
129  void CheckIncreasing();
130 
131 
132  private:
134  bool IsMinUninititialized() const;
135 
137  bool IsMaxUninitialized() const;
138 
139  //-------------------------------------------------------------
140  // Member variables
141  //-------------------------------------------------------------
142 
145 
148 
151 
154 
157 
160 
163 
166 
169 
170  };
171 
174  : public BaseT< ValueT< NodeT < IntegerT < CIntConverterImpl > > > >
175  {
176  };
177 }
178 
179 #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:89
virtual void SetProperty(CProperty &Property)
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
virtual void InternalSetValue(int64_t Value, bool Verify=true)
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Definition: IntConverter.h:108
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:153
__int64 int64_t
Definition: config-win32.h:21
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntConverter.h:102
interface GENAPI_DECL_ABSTRACT IInteger
Interface for integer properties.
Definition: IInteger.h:61
IInteger implementation with integrated conversion.
Definition: IntConverter.h:59
GENICAM_NAMESPACE::gcstring m_Unit
the physical unit name
Definition: IntConverter.h:165
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:150
virtual ECachingMode InternalGetCachingMode() const
Get Caching Mode.
ESlope m_Slope
indicates if the formula is strictly monotonous increasing or decreating
Definition: IntConverter.h:168
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
Definition of the IntegerT class template.
Definition of polymorphical smart pointer.
class implementingthe converter object
Definition: IntConverter.h:173
ERepresentation m_Representation
recommended representation of the value
Definition: IntConverter.h:162
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:85
CIntegerPolyRef m_pConvertFrom
The Swiss Knife for Get.
Definition: IntConverter.h:156
GENICAM_NAMESPACE::gcstring m_FormulaTo
The SwissKnife formula for Set.
Definition: IntConverter.h:144
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
IInteger interface.
Definition: Types.h:193
GENICAM_NAMESPACE::gcstring m_FormulaFrom
The SwissKnife formula for Get.
Definition: IntConverter.h:147
CIntegerPolyRef m_Value
Refeerence to the value.
Definition: IntConverter.h:159
Definition of CIntSwissKnife.
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