summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/xml/sax
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-11-13 07:46:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-11-13 07:46:45 +0200
commitf2ec36ab5fa04e11dee655d9c623baac95db1eba (patch)
treef1f51bc34e749ca1f97e2e722a334fc599c8a124 /libxsd/xsd/cxx/xml/sax
parent6e9a647a859d9a95c96e75c77beaf41b166cc4e4 (diff)
Drop support for Xerces-C++ 2-series
Diffstat (limited to 'libxsd/xsd/cxx/xml/sax')
-rw-r--r--libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx11
-rw-r--r--libxsd/xsd/cxx/xml/sax/std-input-source.hxx29
2 files changed, 4 insertions, 36 deletions
diff --git a/libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx b/libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx
index 8487e74..31b1a34 100644
--- a/libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx
+++ b/libxsd/xsd/cxx/xml/sax/bits/error-handler-proxy.txx
@@ -65,22 +65,11 @@ namespace xsd
if (id == 0)
id = e.getSystemId ();
-#if _XERCES_VERSION >= 30000
eh_->handle (transcode<C> (id),
static_cast<unsigned long> (e.getLineNumber ()),
static_cast<unsigned long> (e.getColumnNumber ()),
s,
transcode<C> (e.getMessage ()));
-#else
- XMLSSize_t l (e.getLineNumber ());
- XMLSSize_t c (e.getColumnNumber ());
-
- eh_->handle (transcode<C> (id),
- (l == -1 ? 0 : static_cast<unsigned long> (l)),
- (c == -1 ? 0 : static_cast<unsigned long> (c)),
- s,
- transcode<C> (e.getMessage ()));
-#endif
}
}
}
diff --git a/libxsd/xsd/cxx/xml/sax/std-input-source.hxx b/libxsd/xsd/cxx/xml/sax/std-input-source.hxx
index 6b0af98..6f3ee38 100644
--- a/libxsd/xsd/cxx/xml/sax/std-input-source.hxx
+++ b/libxsd/xsd/cxx/xml/sax/std-input-source.hxx
@@ -29,27 +29,14 @@ namespace xsd
{
}
-#if _XERCES_VERSION >= 30000
virtual XMLFilePos
curPos () const
{
return static_cast<XMLFilePos> (is_.tellg ());
}
-#else
- virtual unsigned int
- curPos () const
- {
- return static_cast<unsigned int> (is_.tellg ());
- }
-#endif
-#if _XERCES_VERSION >= 30000
virtual XMLSize_t
readBytes (XMLByte* const buf, const XMLSize_t size)
-#else
- virtual unsigned int
- readBytes (XMLByte* const buf, const unsigned int size)
-#endif
{
// Some implementations don't clear gcount if you
// call read() on a stream that is in the eof state.
@@ -78,25 +65,17 @@ namespace xsd
// Make sure that if we failed, readBytes won't be called
// again.
//
- if (!is_.fail ())
- {
-#if _XERCES_VERSION >= 30000
- return static_cast<XMLSize_t> (is_.gcount ());
-#else
- return static_cast<unsigned int> (is_.gcount ());
-#endif
- }
- else
- return 0;
+ return !is_.fail ()
+ ? static_cast<XMLSize_t> (is_.gcount ())
+ : 0;
}
-#if _XERCES_VERSION >= 30000
virtual const XMLCh*
getContentType () const
{
return 0;
}
-#endif
+
private:
std::istream& is_;
};