IntKey.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_INTKEY_H
32 #define GENAPI_INTKEY_H
33 
34 #include "Node.h"
35 #include "IEEE1212Parser.h"
36 #include "BaseT.h"
37 #include "ValueT.h"
38 #include "IntegerT.h"
39 #include "NodeT.h"
40 
41 namespace GENAPI_NAMESPACE
42 {
43  //*************************************************************
44  // CIntKey class
45  //*************************************************************
46  class CIEEE1212Parser;
51  class CIntKeyImpl : public IInteger, public CNodeImpl
52  {
53  public:
55  CIntKeyImpl();
56 
57  private:
59  CIntKeyImpl& operator=( const CIntKeyImpl& rhs );
60 
61 
62  protected:
64  virtual EAccessMode InternalGetAccessMode() const;
65 
68  {
69  return intfIInteger;
70  }
71 
72  public:
73  //-------------------------------------------------------------
74  // Implementation of INodePrivate
75  //-------------------------------------------------------------
77  // \{
78  virtual void SetProperty(CProperty &Property);
79  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
80  virtual void FinalConstruct();
81  // \}
82 
83  //-------------------------------------------------------------
84  // IInteger implementation
85  //-------------------------------------------------------------
86 
87  protected:
89  #pragma BullseyeCoverage off
90  virtual void InternalSetValue(int64_t /*Value*/, bool /* Verify = true*/)
91  {
92  //assert(false);
93  throw ACCESS_EXCEPTION("IntKey is read only." );
94  }
95  #pragma BullseyeCoverage on
96 
98  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
99 
101  virtual int64_t InternalGetMin() const
102  {
103  return m_Min;
104  }
105 
107  virtual int64_t InternalGetMax() const
108  {
109  return m_Max;
110  }
111 
112 
114  virtual int64_t InternalGetInc() const
115  {
116  return 1LL;
117  }
118 
121  {
122  return int64_autovector_t();
123  }
124 
127  {
129  return m_Representation;
130  else
131  return PureNumber;
132  }
133 
136  {
138  }
139 
140 
141  protected:
142  // inititialize when childs are initialized
143  //-------------------------------------------------------------
144  // Memeber variables
145  //-------------------------------------------------------------
146 
148  const int64_t m_Min;
149 
151  const int64_t m_Max;
152 
154  uint16_t m_Key;
155 
158 
161 
164 
165  };
166 
167  class CIntKey : public BaseT< ValueT< NodeT< IntegerT< CIntKeyImpl > > > >
168  {
169  private:
171  CIntKey& operator=( const CIntKey& rhs );
172  };
173 
174 }
175 
176 #endif // GENAPI_INTKEY_H
Definition of the ValueT class template.
CIEEE1212Parser * m_pParser
The config rom reader.
Definition: IntKey.h:160
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Definition: IntKey.h:135
const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: IntKey.h:120
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntKey.h:67
Decimal number in an edit control.
Definition: Types.h:94
__int64 int64_t
Definition: config-win32.h:21
virtual ERepresentation InternalGetRepresentation() const
Get recommended representation.
Definition: IntKey.h:126
virtual int64_t InternalGetInc() const
Get increment.
Definition: IntKey.h:114
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
interface GENAPI_DECL_ABSTRACT IInteger
Interface for integer properties.
Definition: IInteger.h:61
Implementation of the IBase interface.
Definition: BaseT.h:48
Definition of the NodeT class template.
virtual void InternalSetValue(int64_t, bool)
Set feature value.
Definition: IntKey.h:90
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
CIntKeyImpl & operator=(const CIntKeyImpl &rhs)
not implemented: assignment operator
Vector of integers with reference counting.
Definition: Autovector.h:54
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:252
const int64_t m_Max
maximum value
Definition: IntKey.h:151
virtual void SetProperty(CProperty &Property)
virtual int64_t InternalGetMin() const
Get minimum value allowed.
Definition: IntKey.h:101
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
Definition of the IntegerT class template.
virtual EAccessMode InternalGetAccessMode() const
determine the node&#39;s access mode
Definition of the BaseT class template.
Standard implementation for the INode and the ISelector interface.
Definition: Node.h:85
const int64_t m_Min
minimum value
Definition: IntKey.h:148
uint16_t m_Key
Key of IEEE1212 Configuration Rom entry.
Definition: IntKey.h:154
Definition of CIEEE1212Parser.
A string class which is a clone of std::string.
Definition: GCString.h:52
const ERepresentation m_Representation
representation of value
Definition: IntKey.h:163
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get feature value.
IInteger implementation for IEEE1212 integer entries.
Definition: IntKey.h:51
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
virtual int64_t InternalGetMax() const
Get maximum value allowed.
Definition: IntKey.h:107
IInteger interface.
Definition: Types.h:193
int64_t m_Value
most recent Value
Definition: IntKey.h:157
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