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 #include "NodeMap.h"
41 
42 namespace GENAPI_NAMESPACE
43 {
44  //*************************************************************
45  // CIntKey class
46  //*************************************************************
47  class CIEEE1212Parser;
52  class CIntKeyImpl : public IInteger, public CNodeImpl
53  {
54  public:
56  CIntKeyImpl();
57 
58  private:
60  CIntKeyImpl& operator=( const CIntKeyImpl& rhs );
61 
62 
63  protected:
65  virtual EAccessMode InternalGetAccessMode() const;
66 
69  {
70  return intfIInteger;
71  }
72 
73  public:
74  //-------------------------------------------------------------
75  // Implementation of INodePrivate
76  //-------------------------------------------------------------
78  // \{
79  virtual void SetProperty(CProperty &Property);
80  virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const;
81  virtual void FinalConstruct();
82  // \}
83 
84  //-------------------------------------------------------------
85  // IInteger implementation
86  //-------------------------------------------------------------
87 
88  protected:
90  #pragma BullseyeCoverage off
91  virtual void InternalSetValue(int64_t /*Value*/, bool /* Verify = true*/)
92  {
93  //assert(false);
94  throw ACCESS_EXCEPTION("IntKey is read only." );
95  }
96  #pragma BullseyeCoverage on
97 
99  virtual int64_t InternalGetValue(bool Verify = false, bool IgnoreCache = false);
100 
102  virtual int64_t InternalGetMin() const
103  {
104  return m_Min;
105  }
106 
108  virtual int64_t InternalGetMax() const
109  {
110  return m_Max;
111  }
112 
113 
115  virtual int64_t InternalGetInc() const
116  {
117  return 1LL;
118  }
119 
122  {
123  return int64_autovector_t();
124  }
125 
128  {
130  return m_Representation;
131  else
132  return PureNumber;
133  }
134 
137  {
139  }
140 
141 
142  protected:
143  // inititialize when childs are initialized
144  //-------------------------------------------------------------
145  // Memeber variables
146  //-------------------------------------------------------------
147 
149  const int64_t m_Min;
150 
152  const int64_t m_Max;
153 
155  uint16_t m_Key;
156 
159 
162 
165 
166  };
167 
168  class CIntKey : public BaseT< ValueT< NodeT< IntegerT< CIntKeyImpl > > > >
169  {
170  private:
172  CIntKey& operator=( const CIntKey& rhs );
173  };
174 
175 }
176 
177 #endif // GENAPI_INTKEY_H
Definition of the ValueT class template.
CIEEE1212Parser * m_pParser
The config rom reader.
Definition: IntKey.h:161
GENICAM_INTERFACE IInteger
Interface for integer properties.
Definition: IFloat.h:114
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Definition: IntKey.h:136
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: IntKey.h:121
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: IntKey.h:68
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:127
virtual int64_t InternalGetInc() const
Get increment.
Definition: IntKey.h:115
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
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:91
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:253
const int64_t m_Max
maximum value
Definition: IntKey.h:152
virtual void SetProperty(CProperty &Property)
virtual int64_t InternalGetMin() const
Get minimum value allowed.
Definition: IntKey.h:102
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:86
const int64_t m_Min
minimum value
Definition: IntKey.h:149
uint16_t m_Key
Key of IEEE1212 Configuration Rom entry.
Definition: IntKey.h:155
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:164
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
Get feature value.
IInteger implementation for IEEE1212 integer entries.
Definition: IntKey.h:52
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
virtual int64_t InternalGetMax() const
Get maximum value allowed.
Definition: IntKey.h:108
Declaration of CNodeMap.
IInteger interface.
Definition: Types.h:193
int64_t m_Value
most recent Value
Definition: IntKey.h:158
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