ISelector.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 //-----------------------------------------------------------------------------
30 #ifndef GENAPI_ISELECTOR_H
31 #define GENAPI_ISELECTOR_H
32 
33 #include <GenApi/GenApiDll.h>
34 
35 #ifdef _MSC_VER
36 # pragma warning ( push )
37 # pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
38 #endif
39 
40 namespace GENAPI_NAMESPACE
41 {
46  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT ISelector : virtual public IBase
47  {
49  virtual bool IsSelector() const = 0;
50 
52  virtual void GetSelectedFeatures( FeatureList_t& ) const = 0;
53 
55  virtual void GetSelectingFeatures( FeatureList_t& ) const = 0;
56  };
57 
58  //*************************************************************
59  // CSelectorRef class
60  //*************************************************************
61 
67  template <class T>
68  class CSelectorRefT : public CBaseRefT<T>
69  {
70  typedef CBaseRefT<T> ref;
71 
72  public:
73  /*--------------------------------------------------------*/
74  // ISelector
75  /*--------------------------------------------------------*/
76 
78  virtual void GetSelectedFeatures(FeatureList_t &Features) const
79  {
80  if(ref::m_Ptr)
81  return ref::m_Ptr->GetSelectedFeatures( Features );
82  else
83  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
84  }
85 
87  virtual void GetSelectingFeatures( FeatureList_t& Features) const
88  {
89  if(ref::m_Ptr)
90  return ref::m_Ptr->GetSelectingFeatures( Features );
91  else
92  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
93  }
94 
96  virtual bool IsSelector() const
97  {
98  if(ref::m_Ptr)
99  return ref::m_Ptr->IsSelector();
100  else
101  throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
102  }
103  };
104 
108 
109 }
110 
111 #ifdef _MSC_VER
112 # pragma warning ( pop )
113 #endif
114 
115 #endif // GENAPI_ISELECTOR_H
#define GENICAM_INTERFACE
Definition: GenICamFwd.h:33
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBase
Base interface common to all nodes.
Definition: IBase.h:55
virtual void GetSelectedFeatures(FeatureList_t &) const =0
retrieve the group of selected features
virtual void GetSelectingFeatures(FeatureList_t &Features) const
retrieve the group of features selecting this node
Definition: ISelector.h:87
CSelectorRefT< ISelector > CSelectorRef
Reference to an ISelector pointer.
Definition: ISelector.h:107
virtual bool IsSelector() const
true iff this feature selects a group of features
Definition: ISelector.h:96
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition: GCException.h:253
virtual void GetSelectedFeatures(FeatureList_t &Features) const
Get all features of the Selector.
Definition: ISelector.h:78
T * m_Ptr
Pointer to the implementation the reference references to.
Definition: Reference.h:101
virtual void GetSelectingFeatures(FeatureList_t &) const =0
retrieve the group of features selecting this node
declspec&#39;s to be used for GenApi Windows dll
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT ISelector
Interface for groups of features selected by a single one.
Definition: ISelector.h:49
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48


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