Reference.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: Fritz Dierks
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_REFERENCE_H
32 #define GENAPI_REFERENCE_H
33 
34 #include <GenApi/Types.h>
35 #include <GenApi/GenApiDll.h>
36 
37 namespace GENAPI_NAMESPACE
38 {
40 
41  //*************************************************************
42  // IReference interface
43  //*************************************************************
44 
49  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IReference
50  {
52  virtual void SetReference( GENAPI_NAMESPACE::IBase *pBase ) = 0;
53  };
54 
55  //*************************************************************
56  // IEnumReference interface
57  //*************************************************************
58 
63  GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumReference
64  {
66  virtual void SetEnumReference( int Index, GENICAM_NAMESPACE::gcstring Name) = 0;
67 
69  virtual void SetNumEnums( int NumEnums ) = 0;
70  };
71 
72  //*************************************************************
73  // CReference class
74  //*************************************************************
75 
80  template <class T, class I=T>
81  class CReferenceT : public T, public IReference
82  {
83  public:
84  // Constructor
86  m_Ptr(NULL)
87  {}
88 
89  /*--------------------------------------------------------*/
90  // IReference
91  /*--------------------------------------------------------*/
92 
94  virtual void SetReference( IBase *ptr )
95  {
96  m_Ptr = dynamic_cast<I*>( ptr );
97  }
98 
99  protected:
101  I *m_Ptr;
102  };
103 
104 }
105 
106 #endif // ifndef GENAPI_REFERENCE_H
#define GENICAM_INTERFACE
Definition: GenICamFwd.h:33
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IBase
Base interface common to all nodes.
Definition: IBase.h:55
Common types used in the public GenApi interface.
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IReference
Interface to construct a reference.
Definition: Reference.h:50
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IEnumReference
Interface to construct an enum reference.
Definition: Reference.h:64
I * m_Ptr
Pointer to the implementation the reference references to.
Definition: Reference.h:101
virtual void SetReference(IBase *ptr)
sets the implementation to the reference
Definition: Reference.h:94
A string class which is a clone of std::string.
Definition: GCString.h:52
Reference to an IBase derived pointer.
Definition: Reference.h:81
virtual void SetNumEnums(int NumEnums)=0
sets the number of enum vallues
declspec&#39;s to be used for GenApi Windows dll
Lexical analyzer for CIntSwissKnife.
Definition: Autovector.h:48


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