ISelector.h
Go to the documentation of this file.
00001 //-----------------------------------------------------------------------------
00002 //  (c) 2006 by Basler Vision Technologies
00003 //  Section: Vision Components
00004 //  Project: GenApi
00005 //  Author:  Hartmut Nebelung
00006 //  $Header$
00007 //
00008 //  License: This file is published under the license of the EMVA GenICam  Standard Group.
00009 //  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
00010 //  If for some reason you are missing  this file please contact the EMVA or visit the website
00011 //  (http://www.genicam.org) for a full copy.
00012 //
00013 //  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
00014 //  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00015 //  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00016 //  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
00017 //  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
00018 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
00019 //  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
00020 //  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
00021 //  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
00022 //  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00023 //  POSSIBILITY OF SUCH DAMAGE.
00024 //-----------------------------------------------------------------------------
00030 #ifndef GENAPI_ISELECTOR_H
00031 #define GENAPI_ISELECTOR_H
00032 
00033 #include <GenApi/GenApiDll.h>
00034 
00035 #ifdef _MSC_VER
00036 #   pragma warning ( push )
00037 #   pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
00038 #endif
00039 
00040 namespace GENAPI_NAMESPACE
00041 {
00046     interface GENAPI_DECL_ABSTRACT ISelector : virtual public IBase
00047     {
00049         virtual bool IsSelector() const = 0;
00050 
00052         virtual void GetSelectedFeatures( FeatureList_t& ) const = 0;
00053 
00055         virtual void GetSelectingFeatures( FeatureList_t& ) const = 0;
00056     };
00057 
00058     //*************************************************************
00059     // CSelectorRef class
00060     //*************************************************************
00061 
00067     template <class T>
00068     class CSelectorRefT : public CBaseRefT<T>
00069     {
00070         typedef CBaseRefT<T> ref;
00071 
00072     public:
00073         /*--------------------------------------------------------*/
00074         // ISelector
00075         /*--------------------------------------------------------*/
00076 
00078         virtual void GetSelectedFeatures(FeatureList_t &Features) const
00079         {
00080             if(ref::m_Ptr)
00081                 return ref::m_Ptr->GetSelectedFeatures( Features );
00082             else
00083                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00084         }
00085 
00087         virtual void GetSelectingFeatures( FeatureList_t& Features) const
00088         {
00089             if(ref::m_Ptr)
00090                 return ref::m_Ptr->GetSelectingFeatures( Features );
00091             else
00092                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00093         }
00094 
00096         virtual bool IsSelector() const
00097         {
00098             if(ref::m_Ptr)
00099                 return ref::m_Ptr->IsSelector();
00100             else
00101                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00102         }
00103     };
00104 
00107     typedef CSelectorRefT<ISelector> CSelectorRef;
00108 
00109 }
00110 
00111 #ifdef _MSC_VER
00112 #   pragma warning ( pop )
00113 #endif
00114 
00115 #endif // GENAPI_ISELECTOR_H


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:47