www.pudn.com > TidyWin32-src.zip > TidyObject.h
// TidyObject.h : Declaration of the CTidyObject #ifndef __TIDYOBJECT_H_ #define __TIDYOBJECT_H_ #include "resource.h" // main symbols #include "../TidyGUI/TidyProxy.h" #include "TidyOptions.h" //------------------------------------------------------------------- // CTidyObject class ATL_NO_VTABLE CTidyObject : public CComObjectRootEx, public CComCoClass , public ISupportErrorInfo, public IDispatchImpl { public: CTidyObject() : m_TidyProxy(true), m_pOptions(0) { } HRESULT FinalConstruct(); void FinalRelease(); private: // methods void ParseTidyMsgs(); private: // variables CTidyProxy m_TidyProxy; CComObject * m_pOptions; vector m_Warnings; vector m_Errors; string m_Comments; public: //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // interface ISupportsErrorInfo STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // interface ITidyObject STDMETHOD(TidyToMem)(BSTR sourceFile, BSTR* result); STDMETHOD(TidyToFile)(BSTR sourceFile, BSTR destFile); STDMETHOD(TidyMemToMem)(BSTR sourceStr, BSTR* result); STDMETHOD(get_TotalWarnings)(long *pVal); STDMETHOD(get_TotalErrors)(long *pVal); STDMETHOD(get_Warning)(long i, BSTR *pVal); STDMETHOD(get_Error)(long i, BSTR *pVal); STDMETHOD(get_Comments)(BSTR *pVal); STDMETHOD(get_Options)(ITidyOptions** pVal); //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DECLARE_REGISTRY_RESOURCEID(IDR_TIDYOBJECT) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CTidyObject) COM_INTERFACE_ENTRY(ITidyObject) COM_INTERFACE_ENTRY(IDispatch) COM_INTERFACE_ENTRY(ISupportErrorInfo) END_COM_MAP() }; //------------------------------------------------------------------- #endif //__TIDYOBJECT_H_