GenApi 3.5.1
ICategory.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// (c) 2006 by Basler Vision Technologies
3// Author: Fritz Dierks
4//
5// License: This file is published under the license of the EMVA GenICam Standard Group.
6// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
7// If for some reason you are missing this file please contact the EMVA or visit the website
8// (http://www.genicam.org) for a full copy.
9//
10// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
11// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
12// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
13// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
14// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
15// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
16// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
17// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
18// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
19// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20// POSSIBILITY OF SUCH DAMAGE.
21//
22//-----------------------------------------------------------------------------
30#ifndef GENAPI_ICATEGORY_H
31#define GENAPI_ICATEGORY_H
32
33#include <Base/GCString.h>
34#include <GenApi/GenApiDll.h>
35#include <GenApi/Types.h>
36#include <GenApi/IValue.h>
37#include <GenApi/Container.h>
38
39#include <assert.h>
40
41#ifdef _MSC_VER
42# pragma warning ( push )
43# pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
44#endif
45
46namespace GENAPI_NAMESPACE
47{
48
49 GENICAM_INTERFACE INode;
50
51
52 //*************************************************************
53 // ICategory interface
54 //*************************************************************
55
60 GENICAM_INTERFACE GENAPI_DECL_ABSTRACT ICategory : virtual public IValue
61 {
62
64 virtual void GetFeatures(FeatureList_t &Features) const = 0;
65
66 };
67
68
69 //*************************************************************
70 // CCategoryRef class
71 //*************************************************************
72
73#ifndef DOXYGEN_IGNORE
74
80 template <class T>
81 class CCategoryRefT : public CValueRefT<T>
82 {
83 typedef CValueRefT<T> ref;
84
85 public:
86 /*--------------------------------------------------------*/
87 // ICategory
88 /*--------------------------------------------------------*/
89
91 virtual void GetFeatures(FeatureList_t &Features) const
92 {
93 if (ref::m_Ptr)
94 {
95 ref::m_Ptr->GetFeatures( Features );
96 }
97 else
98 {
99 throw ACCESS_EXCEPTION( "Feature not present (reference not valid)" );
100 }
101 }
102 };
103
106 typedef CCategoryRefT<ICategory> CCategoryRef;
107
108#endif
109
110}
111
112#ifdef _MSC_VER
113# pragma warning ( pop )
114#endif
115
116#endif // ifndef GENAPI_ICATEGORY_H
Portable container classes for INode & IValue pointers.
Portable string implementation.
declspec's to be used for GenApi Windows dll
Definition of the interface IValue.
Common types used in the public GenApi interface.
#define ACCESS_EXCEPTION
Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
Definition GCException.h:252
CCategoryRefT< ICategory > CCategoryRef
Definition ICategory.h:106
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT ICategory
Gives access to a category node.
Definition ICategory.h:64
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IValue
Interface for value properties.
Definition IValue.h:59
GENICAM_INTERFACE INode
Interface common to all nodes.
Definition ICategory.h:49