00001 00029 #ifndef INC_MI32_VFILTERS_H 00030 #define INC_MI32_VFILTERS_H 00031 00032 #ifndef INC_MI32_OBSERVER_H 00033 #include <mi32/observer.h> 00034 #endif 00035 00036 #ifndef INC_MI32_ICONID_H 00037 #include <mi32/iconid.h> 00038 #endif 00039 00040 00041 #ifndef GENERATING_DOXYGEN_OUTPUT 00042 class MISTRING; 00043 class VECTORFILTEROBSERVER; 00044 namespace RVC { 00045 class VECTORTOOLKIT; 00046 class OBJITEM; 00047 } 00048 #endif // GENERATING_DOXYGEN_OUTPUT 00049 00050 00051 /* Setup and execution structure for all vector filters */ 00052 class VECTFILTPARMS : public SUBJECT<VECTORFILTEROBSERVER> { 00053 public: 00054 VECTFILTPARMS (); 00055 00056 virtual ~VECTFILTPARMS (); 00057 00059 ERRVALUE Execute ( 00060 RVC::VECTORTOOLKIT& vtk 00061 ) { return (v_Execute(vtk)); } 00062 00064 void GenerateForm ( 00065 MDLGPARENT form 00066 ) { v_GenerateForm(form); } 00067 00069 void GenerateReportString ( 00070 MISTRING& string 00071 ) const { v_GenerateReportString(string); } 00072 00074 TEXTID GetLabel ( 00075 ) const { return (v_GetLabel()); } 00076 00078 ICONID GetIconId ( 00079 ) const { return (v_GetIconId()); } 00080 00082 HELPID GetHelpID ( 00083 ) const { return (v_GetHelpID()); } 00084 00086 bool HasForm ( 00087 ) const { return (v_HasForm()); } 00088 00090 bool IsPolygonFilter ( 00091 ) const { return (v_IsPolygonFilter()); } 00092 00094 void UpdateObject ( 00095 const RVC::OBJITEM& ObjItem 00096 ) { v_UpdateObject(ObjItem); } 00097 00098 protected: 00099 00100 #ifndef GENERATING_DOXYGEN_OUTPUT 00101 void CallOnFilterReady (bool IsReady); 00102 #endif 00103 00104 private: 00105 #ifndef GENERATING_DOXYGEN_OUTPUT 00107 virtual ERRVALUE v_Execute (RVC::VECTORTOOLKIT& vtk) = 0; 00108 virtual TEXTID v_GetLabel () const = 0; 00109 virtual ICONID v_GetIconId () const = 0; 00110 00112 virtual void v_GenerateReportString (MISTRING& string) const; 00113 virtual void v_GenerateForm (MDLGPARENT form); 00114 virtual HELPID v_GetHelpID () const; 00115 virtual bool v_HasForm () const; 00116 virtual bool v_IsPolygonFilter () const; 00117 virtual void v_UpdateObject (const RVC::OBJITEM& ObjItem); 00118 #endif 00119 }; 00120 00121 00123 class VECTORFILTEROBSERVER : public OBSERVER_BASE { 00124 public: 00125 00126 explicit VECTORFILTEROBSERVER ( 00127 VECTFILTPARMS& vfp 00128 ); 00129 00130 virtual ~VECTORFILTEROBSERVER ( 00131 ); 00132 00133 virtual void OnFilterReady ( 00134 bool IsReady 00135 ); 00136 00137 private: 00138 #ifndef GENERATING_DOXYGEN_OUTPUT 00139 VECTORFILTEROBSERVER (const VECTORFILTEROBSERVER&); 00140 VECTORFILTEROBSERVER& operator= (const VECTORFILTEROBSERVER&); 00141 friend class VECTFILTPARMS; 00142 #endif // GENERATING_DOXYGEN_OUTPUT 00143 }; 00144 00147 00150 VECTFILTPARMS* VfDanglingLinesInit ( 00151 ); 00152 00155 VECTFILTPARMS* VfDissolvePolysInit ( 00156 ); 00157 00160 VECTFILTPARMS* VfLineThinningInit ( 00161 ); 00162 00165 VECTFILTPARMS* VfRemoveBubblesInit ( 00166 ); 00167 00170 VECTFILTPARMS* VfRemoveExcessNodesInit ( 00171 ); 00172 00175 VECTFILTPARMS* VfRemoveIslandsInit ( 00176 ); 00177 00180 VECTFILTPARMS* VfPrecisionInit ( 00181 ); 00182 00185 VECTFILTPARMS* VfScriptInit ( 00186 ); 00187 00190 VECTFILTPARMS* VfSliverPolygonsInit ( 00191 ); 00192 00195 VECTFILTPARMS* VfSplineInit ( 00196 ); 00197 00200 VECTFILTPARMS* VfUndershootsInit ( 00201 ); 00202 00204 00205 #endif
1.6.1