Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cerrorhandler.h
#ifndef CERRORHANDLER_H__
#define CERRORHANDLER_H__ 1
#include "p6loader.h"
namespace P6EXAMPLES {
//
// This defines a private interface that will be used
// to initalize our error handler. The createInstance()
// method returns only interface pointers and this
// allows us to ask it for this interface. Once
// initialize() has been successfully called,
// queryInterface() is used to retrieve the
// p6ISAX2ErrorHandler interface.
//
interface IErrorHandlerInit : public P6R::p6ICom
{
P6COMMETHOD initialize( P6R::p6IConsole *pConsole ) = 0;
};
// {440A2009-89A4-4735-88F2-B4E830C9463E}
#define IF_IErrorHandlerInit {0x440A2009,0x89A4,0x4735,{0x88,0xF2,0xB4,0xE8,0x30,0xC9,0x46,0x3E}}
//
class CErrorHandler : public IErrorHandlerInit, public P6R::p6ISAX2ErrorHandler
{
public:
//
// P6COM Helper macro declares p6ICom methods
// - queryInterface()
// - addref()
// - release()
// - createInstance() <- This is a static method
// used to create an instance
// of this component.
//
//
// IErrorHandlerInit methods
//
P6COMMETHOD initialize(P6R::p6IConsole *pConsole);
//
// p6ISAX2ErrorHandler methods
//
P6COMMETHOD warning( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject );
P6COMMETHOD warningEx( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject, const P6R::P6WCHAR* pDisplay );
P6COMMETHOD error( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject );
P6COMMETHOD errorEx( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject, const P6R::P6WCHAR* pDisplay );
P6COMMETHOD fatalError( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject );
P6COMMETHOD fatalErrorEx( P6R::P6ERR errorCode, P6R::p6ISAX2Locator* pObject, const P6R::P6WCHAR* pDisplay );
CErrorHandler();
virtual ~CErrorHandler();
protected:
P6R::P6BOOL m_bInitialized;
P6R::P6UINT32 m_errorState;
};
} // namespace
#endif