IEnumEntry.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: Margret Albrecht
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 //-----------------------------------------------------------------------------
30 #ifndef GENAPI_IENUMENTRY_H
31 #define GENAPI_IENUMENTRY_H
32 
33 
34 #include <Base/GCString.h>
35 #include <GenApi/GenApiDll.h>
36 #include <GenApi/IValue.h>
37 
38 #ifdef _MSC_VER
39 # pragma warning ( push )
40 # pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
41 #endif
42 
43 namespace GENAPI_NAMESPACE
44 {
45 
46  //*************************************************************
47  // IEnumEntry interface
48  //*************************************************************
49 
55  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumEntry : virtual public IValue
56  {
57 
58  public:
60  virtual int64_t GetValue() = 0;
61 
63  virtual GENICAM_NAMESPACE::gcstring GetSymbolic()const = 0;
64 
66  virtual double GetNumericValue() = 0;
67 
69  virtual bool IsSelfClearing() = 0;
70  };
71 
72  //*************************************************************
73  // CEnumEntryRef class
74  //*************************************************************
75 
76 #ifndef DOXYGEN_IGNORE
77 
83  template <class T>
84  class CEnumEntryRefT : public CValueRefT<T>
85  {
86  typedef CValueRefT<T> ref;
87 
88  public:
89  /*--------------------------------------------------------*/
90  // IEnumEntry
91  /*--------------------------------------------------------*/
92 
94  virtual int64_t GetValue()
95  {
96  if(ref::m_Ptr)
97  return ref::m_Ptr->GetValue();
98  else
99  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
100  }
101 
104  {
105  if(ref::m_Ptr)
106  return ref::m_Ptr->GetSymbolic();
107  else
108  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
109  }
110 
112  virtual double GetNumericValue()
113  {
114  if(ref::m_Ptr)
115  return ref::m_Ptr->GetNumericValue();
116  else
117  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
118  }
119 
121  virtual bool IsSelfClearing()
122  {
123  if(ref::m_Ptr)
124  return ref::m_Ptr->IsSelfClearing();
125  else
126  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
127  }
128  };
129 
133 
134 #endif
135 
136 }
137 
138 #ifdef _MSC_VER
139 # pragma warning ( pop )
140 #endif
141 
142 #endif // ifndef GENAPI_IENUMENTRY_H
#define GENICAM_INTERFACE
Definition: GenICamFwd.h:33
virtual bool GetValue(bool Verify=false, bool IgnoreCache=false) const =0
Get node value.
__int64 int64_t
Definition: config-win32.h:21
virtual bool IsSelfClearing()
Indicates if the corresponding EnumEntry is self clearing.
Definition: IEnumEntry.h:121
CEnumEntryRefT< IEnumEntry > CEnumEntryRef
Reference to an IEnumEntry pointer.
Definition: IEnumEntry.h:132
virtual GENICAM_NAMESPACE::gcstring GetSymbolic() const =0
Get symbolic enum value.
virtual GENICAM_NAMESPACE::gcstring GetSymbolic() const
Get symbolic enum value.
Definition: IEnumEntry.h:103
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:253
virtual bool IsSelfClearing()=0
Indicates if the corresponding EnumEntry is self clearing.
T * m_Ptr
Pointer to the implementation the reference references to.
Definition: Reference.h:101
virtual double GetNumericValue()
Get numeric enum value.
Definition: IEnumEntry.h:112
A string class which is a clone of std::string.
Definition: GCString.h:52
virtual int64_t GetValue()
Get numeric enum value.
Definition: IEnumEntry.h:94
Portable string implementation.
declspec&#39;s to be used for GenApi Windows dll
Definition of the interface IValue.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumEntry
Interface of single enum value.
Definition: IEnumEntry.h:60
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IValue
Interface for value properties.
Definition: IValue.h:61
virtual double GetNumericValue()=0
Get double number associated with the entry.
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40