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: XMLErrorReporter.hpp 672273 2008-06-27 13:57:00Z borisk $
*/
#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
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XMLErrorReporter::ErrTypes
ErrTypes
Definition: XMLErrorReporter.hpp:48
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLFileLoc
XMLUInt64 XMLFileLoc
Definition: Xerces_autoconf_config.hpp:144
XMLErrorReporter
This abstract class defines a callback mechanism for the scanner.
Definition: XMLErrorReporter.hpp:42
XMLErrorReporter::~XMLErrorReporter
virtual ~XMLErrorReporter()
Default destructor.
Definition: XMLErrorReporter.hpp:68
XercesDefs.hpp
XMLErrorReporter::XMLErrorReporter
XMLErrorReporter()
Default constructor.
Definition: XMLErrorReporter.hpp:147
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163