XMLErrorReporter.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_XMLERRORREPORTER_HPP)
#define XERCESC_INCLUDE_GUARD_XMLERRORREPORTER_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLPARSER_EXPORT XMLErrorReporter
{
public:
// -----------------------------------------------------------------------
// The types of errors we can issue
// -----------------------------------------------------------------------
enum ErrTypes
{
ErrType_Warning
, ErrType_Error
, ErrType_Fatal
, ErrTypes_Unknown
};
// -----------------------------------------------------------------------
// Constructors are hidden, only the virtual destructor is exposed
// -----------------------------------------------------------------------
virtual ~XMLErrorReporter()
{
}
// -----------------------------------------------------------------------
// The error handler interface
// -----------------------------------------------------------------------
virtual void error
(
const unsigned int errCode
, const XMLCh* const errDomain
, const ErrTypes type
, const XMLCh* const errorText
, const XMLCh* const systemId
, const XMLCh* const publicId
, const XMLFileLoc lineNum
, const XMLFileLoc colNum
) = 0;
virtual void resetErrors() = 0;
protected :
XMLErrorReporter()
{
}
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and destructor
// -----------------------------------------------------------------------
XMLErrorReporter(const XMLErrorReporter&);
XMLErrorReporter& operator=(const XMLErrorReporter&);
};
XERCES_CPP_NAMESPACE_END
#endif
XercesDefs.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
XMLFileLoc
XMLUInt64 XMLFileLoc
Definition Xerces_autoconf_config.hpp:144
XMLErrorReporter
This abstract class defines a callback mechanism for the scanner.
Definition XMLErrorReporter.hpp:43
XMLErrorReporter::error
virtual void error(const unsigned int errCode, const XMLCh *const errDomain, const ErrTypes type, const XMLCh *const errorText, const XMLCh *const systemId, const XMLCh *const publicId, const XMLFileLoc lineNum, const XMLFileLoc colNum)=0
Called to report errors from the scanner or validator.
XMLErrorReporter::resetErrors
virtual void resetErrors()=0
Called before a new parse event to allow the handler to reset.
XMLErrorReporter::~XMLErrorReporter
virtual ~XMLErrorReporter()
Default destructor.
Definition XMLErrorReporter.hpp:68
XMLErrorReporter::ErrTypes
ErrTypes
Definition XMLErrorReporter.hpp:49
XMLErrorReporter::XMLErrorReporter
XMLErrorReporter()
Default constructor.
Definition XMLErrorReporter.hpp:147