You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2002/05/23 17:47:24 UTC

cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMErrorImpl.cpp DOMErrorImpl.hpp DOMLocatorImpl.cpp DOMLocatorImpl.hpp Makefile.in

knoaman     02/05/23 08:47:24

  Modified:    c/Projects/Win32/VC6/xerces-all/XercesLib XercesLib.dsp
               c/src/xercesc/dom Makefile.in
               c/src/xercesc/dom/impl Makefile.in
  Added:       c/src/xercesc/dom DOMError.hpp DOMErrorHandler.hpp
                        DOMLocator.hpp
               c/src/xercesc/dom/impl DOMErrorImpl.cpp DOMErrorImpl.hpp
                        DOMLocatorImpl.cpp DOMLocatorImpl.hpp
  Log:
  DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
  
  Revision  Changes    Path
  1.105     +28 -0     xml-xerces/c/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp
  
  Index: XercesLib.dsp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- XercesLib.dsp	22 May 2002 20:56:54 -0000	1.104
  +++ XercesLib.dsp	23 May 2002 15:47:23 -0000	1.105
  @@ -2055,6 +2055,14 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMErrorImpl.cpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMErrorImpl.hpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMImplementationImpl.cpp
   # End Source File
   # Begin Source File
  @@ -2063,6 +2071,14 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMLocatorImpl.cpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMLocatorImpl.hpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\..\..\src\xercesc\dom\impl\DOMNamedNodeMapImpl.cpp
   # End Source File
   # Begin Source File
  @@ -2700,6 +2716,14 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=..\..\..\..\..\src\xercesc\dom\DOMError.hpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\..\..\src\xercesc\dom\DOMErrorHandler.hpp
  +# End Source File
  +# Begin Source File
  +
   SOURCE=..\..\..\..\..\src\xercesc\dom\DOMException.cpp
   # End Source File
   # Begin Source File
  @@ -2709,6 +2733,10 @@
   # Begin Source File
   
   SOURCE=..\..\..\..\..\src\xercesc\dom\DOMImplementation.hpp
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=..\..\..\..\..\src\xercesc\dom\DOMLocator.hpp
   # End Source File
   # Begin Source File
   
  
  
  
  1.3       +4 -1      xml-xerces/c/src/xercesc/dom/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/Makefile.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.in	21 May 2002 20:29:08 -0000	1.2
  +++ Makefile.in	23 May 2002 15:47:24 -0000	1.3
  @@ -54,7 +54,7 @@
   # <http://www.apache.org/>.
   #
   #
  -# $Id: Makefile.in,v 1.2 2002/05/21 20:29:08 tng Exp $
  +# $Id: Makefile.in,v 1.3 2002/05/23 15:47:24 knoaman Exp $
   #
   
   PLATFORM = @platform@
  @@ -88,8 +88,11 @@
   	DOMElement.hpp \
   	DOMEntity.hpp \
   	DOMEntityReference.hpp \
  +	DOMError.hpp \
  +	DOMErrorHandler.hpp \
   	DOMException.hpp \
   	DOMImplementation.hpp \
  +	DOMLocator.hpp \
   	DOMNamedNodeMap.hpp \
   	DOMNode.hpp \
   	DOMNodeFilter.hpp \
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/DOMError.hpp
  
  Index: DOMError.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMError.hpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  
  #ifndef DOMERROR_HPP
  #define DOMERROR_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class DOMLocator;
  
  
  /**
    * DOMError is an interface that describes an error.
    *
    * @see DOMErrorHandler#handleError
    */
  
  class CDOM_EXPORT DOMError
  {
  protected:
      /** @name Constructors */
      //@{
  
      /** Default constructor */
      DOMError() {};
  
      //@}
  
  public:
  
      // -----------------------------------------------------------------------
      //  Class types
      // -----------------------------------------------------------------------
      enum ErrorSeverity
      {
          SEVERITY_WARNING     = 0,
          SEVERITY_ERROR       = 1,
          SEVERITY_FATAL_ERROR = 2
      };
  
  
      /** @name Destructor */
      //@{
  
      /** Desctructor */
      virtual ~DOMError()
      {
      }
  
      //@}
  
      /** @name Get function */
      //@{
  
     /**
      * Get the severity of the error
      */
      virtual short getSeverity() const = 0;
  
     /**
      * Get the message describing the error that occured.
      */
      virtual const XMLCh* getMessage() const = 0;
  
     /**
      * Get the location of the error
      */
      virtual DOMLocator* getLocation() const = 0;
  
      //@}
  
  
     /** @name Set function */
      //@{
  
     /**
      * Set the severity of the error
      *
      * @param severity the type of the error to set
      */
      virtual void setSeverity(const short severity) = 0;
  
     /**
      * Set the error message
      *
      * @param message the error message to set.
      */
      virtual void setMessage(const XMLCh* const message) = 0;
  
     /**
      * Set the location of the error
      *
      * @param location the location of the error to set.
      */
      virtual void setLocation(DOMLocator* const location) = 0;
  
      //@}
  
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      DOMError(const DOMError&);
  
      /* Assignment operator */
      void operator=(const DOMError&);
      
  };
  
  #endif
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/DOMErrorHandler.hpp
  
  Index: DOMErrorHandler.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMErrorHandler.hpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  
  #ifndef DOMERRORHANDLER_HPP
  #define DOMERRORHANDLER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class DOMError;
  
  
  /**
    * Basic interface for DOM error handlers.
    *
    * <p>DOMErrorHandler is a callback interface that the DOM implementation
    * can call when reporting errors that happens while processing XML data, or
    * when doing some other processing (e.g. validating a document).</p>
    *
    * <p>The application that is using the DOM implementation is expected to
    * implement this interface.</p>
    *
    * @see DOMBuilder#setErrorHandler
    */
  
  class CDOM_EXPORT DOMErrorHandler
  {
  protected:
      /** @name Constructors */
      //@{
  
      /** Default constructor */
      DOMErrorHandler() {};
  
      //@}
  
  public:
      /** @name Destructor */
      //@{
  
      /** Desctructor */
      virtual ~DOMErrorHandler()
      {
      }
  
      //@}
  
      /** @name The error handler interface */
      //@{
     /**
      * This method is called on the error handler when an error occures.
      *
      * @param domError The error object that describes the error, this object
      *                 may be reused by the DOM implementation across multiple
      *                 calls to the handleEvent method.
      * @return If the handleError method returns <code>true</code> the DOM
      *         implementation should continue as if the error didn't happen
      *         when possible, if the method returns <code>false</code> then the
      *         DOM implementation should stop the current processing when
      *         possible.
      */
      virtual bool handleError(const DOMError& domError) = 0;
  
     /**
      * Reset the Error handler object on its reuse
      *
      * <p>This method helps in reseting the Error handler object
      * implementational defaults each time the Error handler is begun.</p>
      *
      */
      virtual void resetErrors() = 0;
  
      //@}
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      DOMErrorHandler(const DOMErrorHandler&);
  
      /* Assignment operator */
      void operator=(const DOMErrorHandler&);
      
  };
  
  #endif
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/DOMLocator.hpp
  
  Index: DOMLocator.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMLocator.hpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  
  #ifndef DOMLOCATOR_HPP
  #define DOMLOCATOR_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class DOMNode;
  
  
  /**
    * DOMLocator is an interface that describes a location (e.g. where an error
    * occured).
    *
    * @see DOMError#DOMError
    */
  
  class CDOM_EXPORT DOMLocator
  {
  protected:
      /** @name Constructors */
      //@{
  
      /** Default constructor */
      DOMLocator() {};
  
      //@}
  
  public:
      /** @name Destructor */
      //@{
  
      /** Desctructor */
      virtual ~DOMLocator()
      {
      }
  
      //@}
  
      /** @name Get function */
      //@{
  
     /**
      * Get the line number where the error occured. The value is -1 if there is
      * no line number available.
      *
      * @see #setLineNumber
      */
      virtual long getLineNumber() const = 0;
  
     /**
      * Get the column number where the error occured. The value is -1 if there
      * is no column number available.
      *
      * @see #setColumnNumber
      */
      virtual long getColumnNumber() const = 0;
  
     /**
      * Get the byte or character offset into the input source, if we're parsing
      * a file or a byte stream then this will be the byte offset into that
      * stream, but if a character media is parsed then the offset will be the
      * character offset. The value is -1 if there is no offset available.
      *
      * @see #setOffset
      */
      virtual long getOffset() const = 0;
  
     /**
      * Get the DOM Node where the error occured, or <code>null</code> if there
      * is no node available.
      *
      * @see #setErrorNode
      */
      virtual DOMNode* getErrorNode() const = 0;
  
     /**
      * Get the URI where the error occured, or <code>null</code> if there is no
      * URI available.
      *
      * @see #setURI
      */
      virtual const XMLCh* getURI() const = 0;
  
      //@}
  
  
     /** @name Set function */
      //@{
  
     /**
      * Set the line number of the error
      *
      * @param lineNumber the line number to set
      *
      * @see #getLinNumner
      */
      virtual void setLineNumber(const long lineNumber) = 0;
  
     /**
      * Set the column number of the error
      *
      * @param columnNumber the column number to set.
      *
      * @see #getColumnNumner
      */
      virtual void setColumnNumber(const long columnNumber) = 0;
  
     /**
      * Set the byte/character offset.
      *
      * @param offset the byte/characte offset to set.
      *
      * @see #getOffset
      */
      virtual void setOffset(const long offset) = 0;
  
     /**
      * Set the DOM Node where the error occured
      *
      * @param errorNode the DOM Node to set
      *
      * @see #getErrorNode
      */
      virtual void setErrorNode(DOMNode* const errorNode) = 0;
  
     /**
       * Set the URI where the error occured
       *
       * @param uri the URI to set.
       *
       * @see #getURI
       */
      virtual void setURI(const XMLCh* const uri) = 0;
  
      //@}
  
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      DOMLocator(const DOMLocator&);
  
      /* Assignment operator */
      void operator=(const DOMLocator&);
  };
  
  #endif
  
  
  
  1.2       +5 -1      xml-xerces/c/src/xercesc/dom/impl/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in	21 May 2002 20:29:32 -0000	1.1
  +++ Makefile.in	23 May 2002 15:47:24 -0000	1.2
  @@ -54,7 +54,7 @@
   # <http://www.apache.org/>.
   #
   #
  -# $Id: Makefile.in,v 1.1 2002/05/21 20:29:32 tng Exp $
  +# $Id: Makefile.in,v 1.2 2002/05/23 15:47:24 knoaman Exp $
   #
   
   PLATFORM = @platform@
  @@ -98,6 +98,8 @@
   	DOMElementNSImpl.hpp \
   	DOMEntityImpl.hpp \
   	DOMEntityReferenceImpl.hpp \
  +	DOMErrorImpl.hpp \
  +	DOMLocatorImpl.hpp \
   	DOMNamedNodeMapImpl.hpp \
   	DOMNodeIDMap.hpp \
   	DOMNodeImpl.hpp \
  @@ -134,6 +136,8 @@
   	DOMElementNSImpl.$(TO) \
   	DOMEntityImpl.$(TO) \
   	DOMEntityReferenceImpl.$(TO) \
  +	DOMErrorImpl.$(TO) \
  +	DOMLocatorImpl.$(TO) \
   	DOMNamedNodeMapImpl.$(TO) \
   	DOMNodeIDMap.$(TO) \
   	DOMNodeImpl.$(TO) \
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/impl/DOMErrorImpl.cpp
  
  Index: DOMErrorImpl.cpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMErrorImpl.cpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  #include <xercesc/dom/impl/DOMErrorImpl.hpp>
  #include <xercesc/dom/DOMLocator.hpp>
  
  // ---------------------------------------------------------------------------
  //  DOMErrorImpl: Constructors and Destructor
  // ---------------------------------------------------------------------------
  DOMErrorImpl::DOMErrorImpl(const short severity) :
  fAdoptLocation(false)
  , fSeverity(severity)
  , fMessage(0)
  , fLocation(0)
  {
  }
  
  DOMErrorImpl::DOMErrorImpl(const short severity,
                             const XMLCh* const message,
                             DOMLocator* const location) :
  fAdoptLocation(false)
  , fSeverity(severity)
  , fMessage(message)
  , fLocation(location)
  {
  }
  
  DOMErrorImpl::~DOMErrorImpl()
  {
      if (fAdoptLocation)
          delete fLocation;
  }
  
  // ---------------------------------------------------------------------------
  //  DOMErrorImpl: Setter methods
  // ---------------------------------------------------------------------------
  void DOMErrorImpl::setLocation(DOMLocator* const location)
  {
      if (fAdoptLocation)
          delete fLocation;
  
      fLocation = location;
  }
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/impl/DOMErrorImpl.hpp
  
  Index: DOMErrorImpl.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMErrorImpl.hpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  
  #ifndef DOMERRORIMPL_HPP
  #define DOMERRORIMPL_HPP
  
  #include <xercesc/dom/DOMError.hpp>
  
  /**
    * Implementation of a DOMError interface.
    *
    * @see DOMError#DOMError
    */
  
  class CDOM_EXPORT DOMErrorImpl : public DOMError
  {
  public:
      /** @name Constructors and Destructor */
      //@{
  
      /** Constructors */
      DOMErrorImpl(const short severity);
  
      DOMErrorImpl
      (
          const short severity
          , const XMLCh* const message
          , DOMLocator* const location
      );
                 
      /** Desctructor */
      virtual ~DOMErrorImpl();
  
      //@}
  
      /** @name Get function */
      //@{
  
     /**
      * Get the severity of the error
      */
      virtual short getSeverity() const;
  
     /**
      * Get the message describing the error that occured.
      */
      virtual const XMLCh* getMessage() const;
  
     /**
      * Get the location of the error
      */
      virtual DOMLocator* getLocation() const;
  
      //@}
  
  
     /** @name Set function */
      //@{
  
     /**
      * Set the severity of the error
      *
      * @param severity the type of the error to set
      */
      virtual void setSeverity(const short severity);
  
     /**
      * Set the error message
      *
      * @param message the error message to set.
      */
      virtual void setMessage(const XMLCh* const message);
  
     /**
      * Set the location of the error
      *
      * @param location the location of the error to set.
      */
      virtual void setLocation(DOMLocator* const location);
  
     /**
      * Set whether the location is owned by DOMError or not
      *
      * @param value <code>true</code> if DOMLocator is owned and should be
      *              deleted, <code>false</code> otherwise.
      */
      void setAdoptLocation(const bool value);
  
      //@}
  
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      DOMErrorImpl(const DOMErrorImpl&);
  
      /* Assignment operator */
      void operator=(const DOMErrorImpl&);
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAdoptLocation
      //      Indicates whether we own the DOMLocator object or not.
      //
      //  fSeverity
      //      The type of the error.
      //
      //  fMessage
      //      The error message
      //
      //  fLocation
      //      The location info of the error
      // -----------------------------------------------------------------------
      bool         fAdoptLocation;
      short        fSeverity;
      const XMLCh* fMessage;
      DOMLocator*  fLocation;
  };
  
  // ---------------------------------------------------------------------------
  //  DOMErrorImpl: Getter methods
  // ---------------------------------------------------------------------------
  inline short DOMErrorImpl::getSeverity() const
  {
      return fSeverity;
  }
  
  inline const XMLCh* DOMErrorImpl::getMessage() const
  {
      return fMessage;
  }
  
  inline DOMLocator* DOMErrorImpl::getLocation() const
  {
      return fLocation;
  }
  
  // ---------------------------------------------------------------------------
  //  DOMLocatorImpl: Setter methods
  // ---------------------------------------------------------------------------
  inline void DOMErrorImpl::setSeverity(const short severity)
  {
      fSeverity = severity;
  }
  
  inline void DOMErrorImpl::setMessage(const XMLCh* const message)
  {
      fMessage = message;
  }
  
  inline void DOMErrorImpl::setAdoptLocation(const bool value)
  {
      fAdoptLocation = value;
  }
  
  
  #endif
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/impl/DOMLocatorImpl.cpp
  
  Index: DOMLocatorImpl.cpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMLocatorImpl.cpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  #include <xercesc/dom/impl/DOMLocatorImpl.hpp>
  
  // ---------------------------------------------------------------------------
  //  DOMLocatorImpl: Constructors and Destructor
  // ---------------------------------------------------------------------------
  DOMLocatorImpl::DOMLocatorImpl() :
  fLineNum(-1)
  , fColumnNum(-1)
  , fOffset(-1)
  , fErrorNode(0)
  , fURI(0)
  {
  }
  
  
  DOMLocatorImpl::DOMLocatorImpl(const long lineNum,
                                 const long columnNum,
                                 DOMNode* const errorNode,
                                 const XMLCh* const uri,
                                 const long offset) :
  fLineNum(lineNum)
  , fColumnNum(columnNum)
  , fOffset(offset)
  , fErrorNode(errorNode)
  , fURI(uri)
  {
  }
  
  DOMLocatorImpl::~DOMLocatorImpl()
  {
  }
  
  
  
  
  1.1                  xml-xerces/c/src/xercesc/dom/impl/DOMLocatorImpl.hpp
  
  Index: DOMLocatorImpl.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   * 
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   * 
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   * 
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   * 
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:  
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   * 
   * 4. The names "Xerces" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written 
   *    permission, please contact apache\@apache.org.
   * 
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   * 
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   * 
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation, and was
   * originally based on software copyright (c) 1999, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: DOMLocatorImpl.hpp,v $
   * Revision 1.1  2002/05/23 15:47:24  knoaman
   * DOM L3 core - support for DOMError, DOMErrorHandler and DOMLocator
   *
   */
  
  
  #ifndef DOMLOCATORIMPL_HPP
  #define DOMLOCATORIMPL_HPP
  
  #include <xercesc/dom/DOMLocator.hpp>
  
  
  /**
    * Implementation of a DOMLocator interface.
    *
    * @see DOMLocator#DOMLocator
    */
  
  class CDOM_EXPORT DOMLocatorImpl : public DOMLocator
  {
  public:
      /** @name Constructors and Destructor */
      //@{
  
      /** Constructor */
      DOMLocatorImpl();
  
      DOMLocatorImpl
      (
          const long lineNum
          , const long columnNum
          , DOMNode* const errorNode
          , const XMLCh* const uri
          , const long offset = -1
      );
  
      /** Desctructor */
      virtual ~DOMLocatorImpl();
  
      //@}
  
      /** @name Get function */
      //@{
  
     /**
      * Get the line number where the error occured. The value is -1 if there is
      * no line number available.
      *
      * @see #setLineNumber
      */
      virtual long getLineNumber() const;
  
     /**
      * Get the column number where the error occured. The value is -1 if there
      * is no column number available.
      *
      * @see #setColumnNumber
      */
      virtual long getColumnNumber() const;
  
     /**
      * Get the byte or character offset into the input source, if we're parsing
      * a file or a byte stream then this will be the byte offset into that
      * stream, but if a character media is parsed then the offset will be the
      * character offset. The value is -1 if there is no offset available.
      *
      * @see #setOffset
      */
      virtual long getOffset() const;
  
     /**
      * Get the DOM Node where the error occured, or <code>null</code> if there
      * is no node available.
      *
      * @see #setErrorNode
      */
      virtual DOMNode* getErrorNode() const;
  
     /**
      * Get the URI where the error occured, or <code>null</code> if there is no
      * URI available.
      *
      * @see #setURI
      */
      virtual const XMLCh* getURI() const;
  
      //@}
  
  
     /** @name Set function */
      //@{
  
     /**
      * Set the line number of the error
      *
      * @param lineNumber the line number to set
      *
      * @see #getLinNumner
      */
      virtual void setLineNumber(const long lineNumber);
  
     /**
      * Set the column number of the error
      *
      * @param columnNumber the column number to set.
      *
      * @see #getColumnNumner
      */
      virtual void setColumnNumber(const long columnNumber);
  
     /**
      * Set the byte/character offset.
      *
      * @param offset the byte/characte offset to set.
      *
      * @see #getOffset
      */
      virtual void setOffset(const long offset);
  
     /**
      * Set the DOM Node where the error occured
      *
      * @param errorNode the DOM Node to set
      *
      * @see #getErrorNode
      */
      virtual void setErrorNode(DOMNode* const errorNode);
  
     /**
       * Set the URI where the error occured
       *
       * @param uri the URI to set.
       *
       * @see #getURI
       */
      virtual void setURI(const XMLCh* const uri);
  
      //@}
  
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      DOMLocatorImpl(const DOMLocatorImpl&);
  
      /* Assignment operator */
      void operator=(const DOMLocatorImpl&);
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fLineNum
      //  fColumnNum
      //      Track line/column number of where the error occured
      //
      //  fOffset
      //      Track character/byte offset in the input source where the error
      //      occured
      //
      //  fErrorNode
      //      Current error node where the error occured
      //
      //  fURI
      //      The uri where the error occured
      // -----------------------------------------------------------------------
      long         fLineNum;
      long         fColumnNum;
      long         fOffset;
      DOMNode*     fErrorNode;
      const XMLCh* fURI;
  };
  
  
  // ---------------------------------------------------------------------------
  //  DOMLocatorImpl: Getter methods
  // ---------------------------------------------------------------------------
  inline long DOMLocatorImpl::getLineNumber() const
  {
      return fLineNum;
  }
  
  inline long DOMLocatorImpl::getColumnNumber() const
  {
      return fColumnNum;
  }
  
  inline long DOMLocatorImpl::getOffset() const
  {
      return fOffset;
  }
  
  inline DOMNode* DOMLocatorImpl::getErrorNode() const
  {
      return fErrorNode;
  }
  
  inline const XMLCh* DOMLocatorImpl::getURI() const
  {
      return fURI;
  }
  
  
  // ---------------------------------------------------------------------------
  //  DOMLocatorImpl: Setter methods
  // ---------------------------------------------------------------------------
  inline void DOMLocatorImpl::setLineNumber(const long lineNumber)
  {
      fLineNum = lineNumber;
  }
  
  inline void DOMLocatorImpl::setColumnNumber(const long columnNumber)
  {
      fColumnNum = columnNumber;
  }
  
  inline void DOMLocatorImpl::setOffset(const long offset)
  {
      fOffset = offset;
  }
  
  inline void DOMLocatorImpl::setErrorNode(DOMNode* const errorNode)
  {
      fErrorNode = errorNode;
  }
  
  inline void DOMLocatorImpl::setURI(const XMLCh* const uri)
  {
      fURI = uri;
  }
  
  #endif
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org