Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
00058
00059
00065 template <class T>
00066 class CSelectorRefT : public CBaseRefT<T>
00067 {
00068 typedef CBaseRefT<T> ref;
00069
00070 public:
00071
00072
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