SmartFeature.h
Go to the documentation of this file.
1 
2 //-----------------------------------------------------------------------------
3 // (c) 2006 by Basler Vision Technologies
4 // Section: Vision Components
5 // Project: GenApi
6 // Author: Hartmut Nebelung
7 // $Header$
8 //
9 // License: This file is published under the license of the EMVA GenICam Standard Group.
10 // A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
11 // If for some reason you are missing this file please contact the EMVA or visit the website
12 // (http://www.genicam.org) for a full copy.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
18 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 // POSSIBILITY OF SUCH DAMAGE.
25 //-----------------------------------------------------------------------------
32 #ifndef GENAPI_SMARTFEATURE_H
33 #define GENAPI_SMARTFEATURE_H
34 
35 #include "../Types.h"
36 #include "../IInteger.h"
37 #include "Register.h"
38 #include "BaseT.h"
39 #include "ValueT.h"
40 #include "NodeT.h"
41 #include "IntegerT.h"
42 
43 
45 namespace GENAPI_NAMESPACE
46 {
47  // *************************************************************
48  // CSmartFeature class
49  // *************************************************************
51 
57  class CSmartFeatureImpl : public CRegisterImpl, public IInteger
58  {
59  public:
60  CSmartFeatureImpl(void);
61 
62  protected:
63  //-------------------------------------------------------------
64  // Implementation of IInteger
65  //-------------------------------------------------------------
67  //{
68  // Set feature value
69  virtual void InternalSetValue(int64_t /*Value*/, bool /*Verify = true*/)
70  {
71  throw ACCESS_EXCEPTION_NODE("CSmartFeatureImpl::InternalSetValue : a smart feature cannot be written");
72  }
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() const;
79 
80  // Get maximum value allowed
81  virtual int64_t InternalGetMax() const;
82 
83  // Get increment
84  virtual int64_t InternalGetInc() const;
85 
88  {
89  return int64_autovector_t();
90  }
91 
92  // Get recommended representation
94  {
95  return PureNumber;
96  }
97 
100  {
102  }
103 
106  {
107  return intfIInteger;
108  }
109 
110 
111  //\}
112  //-------------------------------------------------------------
113  // Implementation of INode
114  //-------------------------------------------------------------
116  // \{
117  virtual EAccessMode InternalGetAccessMode() const;
118  // \}
119 
120  //-------------------------------------------------------------
121  // Implementation of INodePrivate
122  //-------------------------------------------------------------
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 
129  private:
132  };
133 
134  class CSmartFeature : public BaseT< ValueT< NodeT< IntegerT< RegisterT< CSmartFeatureImpl > > > > >
135  {
136  };
137 }
138 #endif // GENAPI_SMARTFEATURE_H
Definition of the ValueT class template.
virtual EAccessMode InternalGetAccessMode() const
Get the access mode of the node.
virtual void SetProperty(CProperty &Property)
Definition of CRegister.
Implements the Basler Smart Feature class.
Definition: SmartFeature.h:57
Decimal number in an edit control.
Definition: Types.h:94
virtual GENICAM_NAMESPACE::gcstring InternalGetUnit()
Get the unit.
Definition: SmartFeature.h:99
__int64 int64_t
Definition: config-win32.h:21
GUID m_FeatureID
the GUID identifying the smart features
Definition: SmartFeature.h:131
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 int64_t InternalGetMax() const
enum GENAPI_NAMESPACE::_ERepresentation ERepresentation
recommended representation of a node value
Standard IRegister implementation Provides a chunk of memory which acts as a proxy to the register...
Definition: Register.h:58
Vector of integers with reference counting.
Definition: Autovector.h:54
virtual void InternalSetValue(int64_t, bool)
Definition: SmartFeature.h:69
virtual ERepresentation InternalGetRepresentation() const
Definition: SmartFeature.h:93
#define ACCESS_EXCEPTION_NODE
Fires a access error exception, e.g. throw ACCESS_ERROR_EXCEPTION("Not everybody") ...
Definition: Exception.h:172
interface GENAPI_DECL_ABSTRACT bool Verify
Definition: IBoolean.h:61
Definition of the IntegerT class template.
virtual int64_t InternalGetMin() const
virtual bool GetProperty(CNodeDataMap *pNodeDataMap, CPropertyID::EProperty_ID_t PropertyID, CNodeData::PropertyVector_t &PropertyList) const
Definition of the BaseT class template.
virtual EInterfaceType InternalGetPrincipalInterfaceType() const
Implementation of IBase::GetPrincipalInterfaceType()
Definition: SmartFeature.h:105
const int64_autovector_t InternalGetListOfValidValues()
Get list of valid value.
Definition: SmartFeature.h:87
A string class which is a clone of std::string.
Definition: GCString.h:52
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
IInteger interface.
Definition: Types.h:193
virtual int64_t InternalGetValue(bool Verify=false, bool IgnoreCache=false)
virtual int64_t InternalGetInc() const
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