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 #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
00060
00061
00067 template <class T>
00068 class CSelectorRefT : public CBaseRefT<T>
00069 {
00070 typedef CBaseRefT<T> ref;
00071
00072 public:
00073
00074
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