Author: borisk
Date: Fri Jun 27 03:16:38 2008
New Revision: 672232
URL: http://svn.apache.org/viewvc?rev=672232&view=rev
Log:
Add XMLFileLoc type (64-bit) that represents location in a file (line/column).
Use it in DOM interfaces.
Modified:
xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp
xerces/c/trunk/src/xercesc/dom/DOMLocator.hpp
xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp
xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.hpp
xerces/c/trunk/src/xercesc/dom/impl/DOMNormalizer.cpp
xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.cpp
xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.hpp
xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.borland.hpp
xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in
xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.msvc.hpp
Modified: xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/DOMDocument.hpp Fri Jun 27 03:16:38 2008
@@ -808,8 +808,8 @@
*/
virtual DOMElement *createElementNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName,
- const XMLSize_t lineNum,
- const XMLSize_t columnNum) = 0;
+ const XMLFileLoc lineNum,
+ const XMLFileLoc columnNum) = 0;
//@}
};
Modified: xerces/c/trunk/src/xercesc/dom/DOMLocator.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/DOMLocator.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/DOMLocator.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/DOMLocator.hpp Fri Jun 27 03:16:38 2008
@@ -81,20 +81,20 @@
// Getter methods
// -----------------------------------------------------------------------
/**
- * Get the line number where the error occured, or -1 if there is
+ * Get the line number where the error occured, or 0 if there is
* no line number available.
*
* @since DOM Level 3
*/
- virtual XMLSize_t getLineNumber() const = 0;
+ virtual XMLFileLoc getLineNumber() const = 0;
/**
- * Get the column number where the error occured, or -1 if there
+ * Get the column number where the error occured, or 0 if there
* is no column number available.
*
* @since DOM Level 3
*/
- virtual XMLSize_t getColumnNumber() const = 0;
+ virtual XMLFileLoc getColumnNumber() const = 0;
/**
* Get the byte offset into the input source, or -1 if there is no byte
offset available.
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.cpp Fri Jun 27 03:16:38
2008
@@ -601,8 +601,8 @@
DOMElement *DOMDocumentImpl::createElementNS(const XMLCh *fNamespaceURI,
const XMLCh *qualifiedName,
- const XMLSize_t lineNo,
- const XMLSize_t columnNo)
+ const XMLFileLoc lineNo,
+ const XMLFileLoc columnNo)
{
if(!qualifiedName || !isXMLName(qualifiedName))
throw DOMException(DOMException::INVALID_CHARACTER_ERR,0,
getMemoryManager());
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMDocumentImpl.hpp Fri Jun 27 03:16:38
2008
@@ -204,8 +204,8 @@
const XMLCh *qualifiedName);
virtual DOMElement* createElementNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName,
- const XMLSize_t lineNo,
- const XMLSize_t columnNo);
+ const XMLFileLoc lineNo,
+ const XMLFileLoc columnNo);
virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI,
const XMLCh *qualifiedName);
virtual DOMNodeList* getElementsByTagNameNS(const XMLCh
*namespaceURI,
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.cpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.cpp Fri Jun 27 03:16:38
2008
@@ -38,8 +38,8 @@
}
-DOMLocatorImpl::DOMLocatorImpl(const XMLSize_t lineNum,
- const XMLSize_t columnNum,
+DOMLocatorImpl::DOMLocatorImpl(const XMLFileLoc lineNum,
+ const XMLFileLoc columnNum,
DOMNode* const errorNode,
const XMLCh* const uri,
const XMLSSize_t byteOffset,
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMLocatorImpl.hpp Fri Jun 27 03:16:38
2008
@@ -45,8 +45,8 @@
DOMLocatorImpl
(
- const XMLSize_t lineNum
- , const XMLSize_t columnNum
+ const XMLFileLoc lineNum
+ , const XMLFileLoc columnNum
, DOMNode* const errorNode
, const XMLCh* const uri
, const XMLSSize_t offset = -1
@@ -59,16 +59,16 @@
//@}
// DOMLocator interface
- virtual XMLSize_t getLineNumber() const;
- virtual XMLSize_t getColumnNumber() const;
+ virtual XMLFileLoc getLineNumber() const;
+ virtual XMLFileLoc getColumnNumber() const;
virtual XMLFilePos getByteOffset() const;
virtual XMLFilePos getUtf16Offset() const;
virtual DOMNode* getRelatedNode() const;
virtual const XMLCh* getURI() const;
// Setter functions
- void setLineNumber(const XMLSize_t lineNumber);
- void setColumnNumber(const XMLSize_t columnNumber);
+ void setLineNumber(const XMLFileLoc lineNumber);
+ void setColumnNumber(const XMLFileLoc columnNumber);
void setByteOffset(const XMLFilePos offset);
void setUtf16Offset(const XMLFilePos offset);
void setRelatedNode(DOMNode* const errorNode);
@@ -106,8 +106,8 @@
// fURI
// The uri where the error occured
// -----------------------------------------------------------------------
- XMLSize_t fLineNum;
- XMLSize_t fColumnNum;
+ XMLFileLoc fLineNum;
+ XMLFileLoc fColumnNum;
XMLFilePos fByteOffset;
XMLFilePos fUtf16Offset;
DOMNode* fRelatedNode;
@@ -118,12 +118,12 @@
// ---------------------------------------------------------------------------
// DOMLocatorImpl: Getter methods
// ---------------------------------------------------------------------------
-inline XMLSize_t DOMLocatorImpl::getLineNumber() const
+inline XMLFileLoc DOMLocatorImpl::getLineNumber() const
{
return fLineNum;
}
-inline XMLSize_t DOMLocatorImpl::getColumnNumber() const
+inline XMLFileLoc DOMLocatorImpl::getColumnNumber() const
{
return fColumnNum;
}
@@ -152,12 +152,12 @@
// ---------------------------------------------------------------------------
// DOMLocatorImpl: Setter methods
// ---------------------------------------------------------------------------
-inline void DOMLocatorImpl::setLineNumber(const XMLSize_t lineNumber)
+inline void DOMLocatorImpl::setLineNumber(const XMLFileLoc lineNumber)
{
fLineNum = lineNumber;
}
-inline void DOMLocatorImpl::setColumnNumber(const XMLSize_t columnNumber)
+inline void DOMLocatorImpl::setColumnNumber(const XMLFileLoc columnNumber)
{
fColumnNum = columnNumber;
}
Modified: xerces/c/trunk/src/xercesc/dom/impl/DOMNormalizer.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/DOMNormalizer.cpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/DOMNormalizer.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/DOMNormalizer.cpp Fri Jun 27 03:16:38
2008
@@ -35,7 +35,6 @@
#include "DOMElementImpl.hpp"
#include "DOMErrorImpl.hpp"
#include "DOMEntityReferenceImpl.hpp"
-#include "DOMLocatorImpl.hpp"
#include "DOMNormalizer.hpp"
#include "DOMTextImpl.hpp"
Modified: xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.cpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.cpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.cpp Fri Jun 27
03:16:38 2008
@@ -38,8 +38,8 @@
XSDElementNSImpl::XSDElementNSImpl(DOMDocument *ownerDoc,
const XMLCh *namespaceURI,
const XMLCh *qualifiedName,
- const XMLSize_t lineNo,
- const XMLSize_t columnNo) :
+ const XMLFileLoc lineNo,
+ const XMLFileLoc columnNo) :
DOMElementNSImpl(ownerDoc, namespaceURI, qualifiedName)
, fLineNo(lineNo)
, fColumnNo(columnNo)
Modified: xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.hpp (original)
+++ xerces/c/trunk/src/xercesc/dom/impl/XSDElementNSImpl.hpp Fri Jun 27
03:16:38 2008
@@ -41,8 +41,8 @@
class CDOM_EXPORT XSDElementNSImpl: public DOMElementNSImpl {
protected:
- XMLSize_t fLineNo; //Line number
- XMLSize_t fColumnNo; //Column number
+ XMLFileLoc fLineNo; //Line number
+ XMLFileLoc fColumnNo; //Column number
public:
@@ -50,14 +50,14 @@
XSDElementNSImpl(DOMDocument *ownerDoc, //DOM Level 2
const XMLCh *namespaceURI,
const XMLCh *qualifiedName,
- const XMLSize_t lineNo,
- const XMLSize_t columnNo);
+ const XMLFileLoc lineNo,
+ const XMLFileLoc columnNo);
XSDElementNSImpl(const XSDElementNSImpl &other, bool deep=false);
virtual DOMNode * cloneNode(bool deep) const;
- XMLSize_t getLineNo() const { return fLineNo; }
- XMLSize_t getColumnNo() const { return fColumnNo; }
+ XMLFileLoc getLineNo() const { return fLineNo; }
+ XMLFileLoc getColumnNo() const { return fColumnNo; }
private:
// -----------------------------------------------------------------------
Modified: xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.borland.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.borland.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.borland.hpp
(original)
+++ xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.borland.hpp Fri Jun
27 03:16:38 2008
@@ -5,9 +5,9 @@
* 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.
@@ -25,16 +25,20 @@
//
// There are two primary xerces configuration header files:
//
-// Xerces_autoconf_config.hpp -- For configuration of items that
must be accessable
-// through
public headers. This file has limited information
-// and
carefully works to avoid collision of macro names, etc.
-//
-// This
file is included by XercesDefs.h.
-// This
version of the file is specific for Borland C++
-// family
of compilers
+// Xerces_autoconf_config.hpp
//
-// config.h -- This file is not
used with Borland C++; the macros
-// it
would specify are instead hardcoded in the makefiles
+// For configuration of items that must be accessable
+// through public headers. This file has limited information
+// and carefully works to avoid collision of macro names, etc.
+//
+// This file is included by XercesDefs.h.
+// This version of the file is specific for Borland C++
+// family of compilers
+//
+// config.h
+//
+// This file is not used with Borland C++; the macros
+// it would specify are instead hardcoded in the makefiles
//
#include <basetsd.h>
@@ -102,6 +106,10 @@
// ---------------------------------------------------------------------------
typedef XERCES_U64BIT_INT XMLFilePos;
+// ---------------------------------------------------------------------------
+// XMLFileLoc is the type used to represent a file location (line/column).
+// ---------------------------------------------------------------------------
+typedef XERCES_U64BIT_INT XMLFileLoc;
// ---------------------------------------------------------------------------
// Force on the Xerces debug token if it is on in the build environment
Modified: xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in (original)
+++ xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in Fri Jun 27
03:16:38 2008
@@ -22,17 +22,21 @@
//
// There are two primary xerces configuration header files:
//
-// Xerces_autoconf_config.hpp -- For configuration of items that
must be accessable
-// through
public headers. This file has limited information
-// and
carefully works to avoid collision of macro names, etc.
-//
-// This
file is included by XercesDefs.h. In the event
-// of a
non-configured platform, a similar header specific
-// to the
platform will be included instead.
-//
-// config.h -- Generalized
autoconf header file, with much more
-//
information, used to supply configuration information
-// for use
in implementation files.
+// Xerces_autoconf_config.hpp
+//
+// For configuration of items that must be accessable
+// through public headers. This file has limited information
+// and carefully works to avoid collision of macro names, etc.
+//
+// This file is included by XercesDefs.h. In the event
+// of a non-configured platform, a similar header specific
+// to the platform will be included instead.
+//
+// config.h
+//
+// Generalized autoconf header file, with much more
+// information, used to supply configuration information
+// for use in implementation files.
//
// For autoconf based builds, this header is configured from by the configure
// script from the .in template file of the same name.
@@ -107,6 +111,10 @@
// ---------------------------------------------------------------------------
typedef XERCES_U64BIT_INT XMLFilePos;
+// ---------------------------------------------------------------------------
+// XMLFileLoc is the type used to represent a file location (line/column).
+// ---------------------------------------------------------------------------
+typedef XERCES_U64BIT_INT XMLFileLoc;
// ---------------------------------------------------------------------------
// Force on the Xerces debug token if it is on in the build environment
Modified: xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.msvc.hpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.msvc.hpp?rev=672232&r1=672231&r2=672232&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.msvc.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.msvc.hpp Fri Jun 27
03:16:38 2008
@@ -5,9 +5,9 @@
* 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.
@@ -25,21 +25,25 @@
//
// There are two primary xerces configuration header files:
//
-// Xerces_autoconf_config.hpp -- For configuration of items that
must be accessable
-// through
public headers. This file has limited information
-// and
carefully works to avoid collision of macro names, etc.
-//
-// This
file is included by XercesDefs.h.
-// This
version of the file is specific for Microsoft Visual C++
-// family
of compilers
+// Xerces_autoconf_config.hpp
//
-// config.h -- This file is not
used with Microsoft Visual C++; the macros
-// it
would specify are instead hardcoded in the makefiles
+// For configuration of items that must be accessable
+// through public headers. This file has limited information
+// and carefully works to avoid collision of macro names, etc.
+//
+// This file is included by XercesDefs.h.
+// This version of the file is specific for Microsoft Visual C++
+// family of compilers
+//
+// config.h
+//
+// This file is not used with Microsoft Visual C++; the macros
+// it would specify are instead hardcoded in the makefiles
//
#include <basetsd.h>
-// silence the warning "while compiling class-template member function xxxx :
identifier was truncated to '255'
+// silence the warning "while compiling class-template member function xxxx :
identifier was truncated to '255'
// characters in the browser information"
#pragma warning( disable: 4786 )
@@ -56,7 +60,7 @@
#define XERCES_U32BIT_INT UINT32
#define XERCES_U64BIT_INT UINT64
-#ifdef _NATIVE_WCHAR_T_DEFINED
+#ifdef _NATIVE_WCHAR_T_DEFINED
#define XERCES_XMLCH_T wchar_t
#else
#define XERCES_XMLCH_T unsigned short
@@ -80,7 +84,7 @@
#define DLL_EXPORT
#endif
-#define XERCES_MFC_SUPPORT
+#define XERCES_MFC_SUPPORT
// ---------------------------------------------------------------------------
// XMLSize_t is the unsigned integral type.
@@ -109,6 +113,10 @@
// ---------------------------------------------------------------------------
typedef XERCES_U64BIT_INT XMLFilePos;
+// ---------------------------------------------------------------------------
+// XMLFileLoc is the type used to represent a file location (line/column).
+// ---------------------------------------------------------------------------
+typedef XERCES_U64BIT_INT XMLFileLoc;
// ---------------------------------------------------------------------------
// Force on the Xerces debug token if it is on in the build environment
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]