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 #pragma warning ( push )
00036 #pragma warning ( disable : 4251 ) // XXX needs to have dll-interface to be used by clients of class YYY
00037 
00038 namespace GENAPI_NAMESPACE
00039 {
00044     interface GENAPI_DECL_ABSTRACT ISelector : virtual public IBase
00045     {
00047         virtual bool IsSelector() const = 0;
00048 
00050         virtual void GetSelectedFeatures( FeatureList_t& ) const = 0;
00051 
00053         virtual void GetSelectingFeatures( FeatureList_t& ) const = 0;
00054     };
00055 
00056     //*************************************************************
00057     // CSelectorRef class
00058     //*************************************************************
00059 
00065     template <class T>
00066     class CSelectorRefT : public CBaseRefT<T>
00067     {
00068         typedef CBaseRefT<T> ref;
00069 
00070     public:
00071         /*--------------------------------------------------------*/
00072         // ISelector
00073         /*--------------------------------------------------------*/
00074 
00076         virtual void GetSelectedFeatures(FeatureList_t &Features) const
00077         {
00078             if(ref::m_Ptr)
00079                 return ref::m_Ptr->GetSelectedFeatures( Features );
00080             else
00081                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00082         }
00083 
00085         virtual void GetSelectingFeatures( FeatureList_t& Features) const
00086         {
00087             if(ref::m_Ptr)
00088                 return ref::m_Ptr->GetSelectingFeatures( Features );
00089             else
00090                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00091         }
00092 
00094         virtual bool IsSelector() const
00095         {
00096             if(ref::m_Ptr)
00097                 return ref::m_Ptr->IsSelector();
00098             else
00099                 throw ACCESS_EXCEPTION("Feature not present (reference not valid)");
00100         }
00101     };
00102 
00105     typedef CSelectorRefT<ISelector> CSelectorRef;
00106 
00107 }
00108 
00109 #pragma warning ( pop )
00110 
00111 
00112 #endif // GENAPI_ISELECTOR_H


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05