diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2013-03-08 08:59:37 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2013-03-08 08:59:37 +0000 |
| commit | d8a3b36b43e0700126a7a25a1d38858d1a1d4836 (patch) | |
| tree | eaf5a86ac5542fc33ed8bb697a615e08ddd2ae01 /src/dom | |
| parent | changes_2013_02_25a.patch (diff) | |
| parent | Drop deprecated get_vbox method in Gtk::Dialog (diff) | |
| download | inkscape-d8a3b36b43e0700126a7a25a1d38858d1a1d4836.tar.gz inkscape-d8a3b36b43e0700126a7a25a1d38858d1a1d4836.zip | |
merge from trunk (r12181)
(bzr r11668.1.53)
Diffstat (limited to 'src/dom')
| -rw-r--r-- | src/dom/io/bufferstream.cpp | 2 | ||||
| -rw-r--r-- | src/dom/io/bufferstream.h | 2 | ||||
| -rw-r--r-- | src/dom/io/domstream.cpp | 229 | ||||
| -rw-r--r-- | src/dom/io/domstream.h | 247 | ||||
| -rw-r--r-- | src/dom/io/stringstream.cpp | 2 | ||||
| -rw-r--r-- | src/dom/io/stringstream.h | 2 | ||||
| -rw-r--r-- | src/dom/io/uristream.cpp | 13 | ||||
| -rw-r--r-- | src/dom/io/uristream.h | 6 |
8 files changed, 226 insertions, 277 deletions
diff --git a/src/dom/io/bufferstream.cpp b/src/dom/io/bufferstream.cpp index 7baab4814..3389bd80e 100644 --- a/src/dom/io/bufferstream.cpp +++ b/src/dom/io/bufferstream.cpp @@ -146,7 +146,7 @@ void BufferOutputStream::flush() /** * Writes the specified byte to this output stream. */ -int BufferOutputStream::put(XMLCh ch) +int BufferOutputStream::put(gunichar ch) { if (closed) return -1; diff --git a/src/dom/io/bufferstream.h b/src/dom/io/bufferstream.h index 9a36b30e2..0ac06b362 100644 --- a/src/dom/io/bufferstream.h +++ b/src/dom/io/bufferstream.h @@ -102,7 +102,7 @@ public: virtual void flush(); - virtual int put(XMLCh ch); + virtual int put(gunichar ch); virtual std::vector<unsigned char> &getBuffer() { return buffer; } diff --git a/src/dom/io/domstream.cpp b/src/dom/io/domstream.cpp index de221f855..b9ff7e9d2 100644 --- a/src/dom/io/domstream.cpp +++ b/src/dom/io/domstream.cpp @@ -424,12 +424,11 @@ static int dprintf(Writer &outs, const DOMString &fmt, va_list ap) //# B A S I C I N P U T S T R E A M //######################################################################### - /** * - */ -BasicInputStream::BasicInputStream(const InputStream &sourceStream) - : source((InputStream &)sourceStream) + */ +BasicInputStream::BasicInputStream(InputStream &sourceStream) + : source(sourceStream) { closed = false; } @@ -438,7 +437,7 @@ BasicInputStream::BasicInputStream(const InputStream &sourceStream) * Returns the number of bytes that can be read (or skipped over) from * this input stream without blocking by the next caller of a method for * this input stream. - */ + */ int BasicInputStream::available() { if (closed) @@ -446,11 +445,11 @@ int BasicInputStream::available() return source.available(); } - + /** * Closes this input stream and releases any system resources * associated with the stream. - */ + */ void BasicInputStream::close() { if (closed) @@ -458,10 +457,10 @@ void BasicInputStream::close() source.close(); closed = true; } - + /** * Reads the next byte of data from the input stream. -1 if EOF - */ + */ int BasicInputStream::get() { if (closed) @@ -477,9 +476,9 @@ int BasicInputStream::get() /** * - */ -BasicOutputStream::BasicOutputStream(const OutputStream &destinationStream) - : destination((OutputStream &)destinationStream) + */ +BasicOutputStream::BasicOutputStream(OutputStream &destinationStream) + : destination(destinationStream) { closed = false; } @@ -487,7 +486,7 @@ BasicOutputStream::BasicOutputStream(const OutputStream &destinationStream) /** * Closes this output stream and releases any system resources * associated with this stream. - */ + */ void BasicOutputStream::close() { if (closed) @@ -495,40 +494,33 @@ void BasicOutputStream::close() destination.close(); closed = true; } - + /** * Flushes this output stream and forces any buffered output * bytes to be written out. - */ + */ void BasicOutputStream::flush() { if (closed) return; destination.flush(); } - + /** * Writes the specified byte to this output stream. - */ -int BasicOutputStream::put(XMLCh ch) + */ +int BasicOutputStream::put(gunichar ch) { if (closed) return -1; - if (destination.put(ch) < 0) - return -1; - return 1; + destination.put(ch); + return 1; } - //######################################################################### //# B A S I C R E A D E R //######################################################################### - - -/** - * - */ BasicReader::BasicReader(Reader &sourceReader) { source = &sourceReader; @@ -538,7 +530,7 @@ BasicReader::BasicReader(Reader &sourceReader) * Returns the number of bytes that can be read (or skipped over) from * this reader without blocking by the next caller of a method for * this reader. - */ + */ int BasicReader::available() { if (source) @@ -547,69 +539,65 @@ int BasicReader::available() return 0; } - + /** * Closes this reader and releases any system resources * associated with the reader. - */ + */ void BasicReader::close() { if (source) source->close(); } - + /** * Reads the next byte of data from the reader. - */ -int BasicReader::get() + */ +gunichar BasicReader::get() { if (source) return source->get(); else - return -1; + return (gunichar)-1; } - - - - - + /** * Reads a line of data from the reader. - */ -DOMString BasicReader::readLine() + */ +Glib::ustring BasicReader::readLine() { - DOMString str; + Glib::ustring str; while (available() > 0) { - XMLCh ch = get(); + gunichar ch = get(); if (ch == '\n') break; str.push_back(ch); } return str; } - + /** * Reads a line of data from the reader. - */ -DOMString BasicReader::readWord() + */ +Glib::ustring BasicReader::readWord() { - DOMString str; + Glib::ustring str; while (available() > 0) { - XMLCh ch = get(); - if (uni_is_space(ch)) + gunichar ch = get(); + if (!g_unichar_isprint(ch)) break; str.push_back(ch); } return str; } + - -static bool getLong(DOMString &str, long *val) +static bool getLong(Glib::ustring &str, long *val) { - const char *begin = str.c_str(); + const char *begin = str.raw().c_str(); char *end; long ival = strtol(begin, &end, 10); if (str == end) @@ -618,25 +606,23 @@ static bool getLong(DOMString &str, long *val) return true; } -static bool getULong(const DOMString &str, unsigned long *val) +static bool getULong(Glib::ustring &str, unsigned long *val) { - DOMString tmp = str; - char *begin = (char *)tmp.c_str(); + const char *begin = str.raw().c_str(); char *end; unsigned long ival = strtoul(begin, &end, 10); - if (begin == end) + if (str == end) return false; *val = ival; return true; } -static bool getDouble(const DOMString &str, double *val) +static bool getDouble(Glib::ustring &str, double *val) { - DOMString tmp = str; - const char *begin = tmp.c_str(); + const char *begin = str.raw().c_str(); char *end; double ival = strtod(begin, &end); - if (begin == end) + if (str == end) return false; *val = ival; return true; @@ -644,13 +630,9 @@ static bool getDouble(const DOMString &str, double *val) - -/** - * - */ -Reader &BasicReader::readBool (bool& val ) +const Reader &BasicReader::readBool (bool& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); if (buf == "true") val = true; else @@ -658,96 +640,72 @@ Reader &BasicReader::readBool (bool& val ) return *this; } -/** - * - */ -Reader &BasicReader::readShort (short& val ) +const Reader &BasicReader::readShort (short& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); long ival; if (getLong(buf, &ival)) val = (short) ival; return *this; } -/** - * - */ -Reader &BasicReader::readUnsignedShort (unsigned short& val ) +const Reader &BasicReader::readUnsignedShort (unsigned short& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); unsigned long ival; if (getULong(buf, &ival)) val = (unsigned short) ival; return *this; } -/** - * - */ -Reader &BasicReader::readInt (int& val ) +const Reader &BasicReader::readInt (int& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); long ival; if (getLong(buf, &ival)) val = (int) ival; return *this; } -/** - * - */ -Reader &BasicReader::readUnsignedInt (unsigned int& val ) +const Reader &BasicReader::readUnsignedInt (unsigned int& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); unsigned long ival; if (getULong(buf, &ival)) val = (unsigned int) ival; return *this; } -/** - * - */ -Reader &BasicReader::readLong (long& val ) +const Reader &BasicReader::readLong (long& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); long ival; if (getLong(buf, &ival)) val = ival; return *this; } -/** - * - */ -Reader &BasicReader::readUnsignedLong (unsigned long& val ) +const Reader &BasicReader::readUnsignedLong (unsigned long& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); unsigned long ival; if (getULong(buf, &ival)) val = ival; return *this; } -/** - * - */ -Reader &BasicReader::readFloat (float& val ) +const Reader &BasicReader::readFloat (float& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); double ival; if (getDouble(buf, &ival)) val = (float)ival; return *this; } -/** - * - */ -Reader &BasicReader::readDouble (double& val ) +const Reader &BasicReader::readDouble (double& val ) { - DOMString buf = readWord(); + Glib::ustring buf = readWord(); double ival; if (getDouble(buf, &ival)) val = ival; @@ -761,12 +719,12 @@ Reader &BasicReader::readDouble (double& val ) //######################################################################### -InputStreamReader::InputStreamReader(const InputStream &inputStreamSource) - : inputStream((InputStream &)inputStreamSource) +InputStreamReader::InputStreamReader(InputStream &inputStreamSource) + : inputStream(inputStreamSource) { } - + /** * Close the underlying OutputStream @@ -775,7 +733,7 @@ void InputStreamReader::close() { inputStream.close(); } - + /** * Flush the underlying OutputStream */ @@ -783,15 +741,15 @@ int InputStreamReader::available() { return inputStream.available(); } - + /** * Overloaded to receive its bytes from an InputStream * rather than a Reader */ -int InputStreamReader::get() +gunichar InputStreamReader::get() { //Do we need conversions here? - int ch = (XMLCh)inputStream.get(); + gunichar ch = (gunichar)inputStream.get(); return ch; } @@ -818,7 +776,7 @@ StdReader::~StdReader() delete inputStream; } - + /** * Close the underlying OutputStream @@ -827,7 +785,7 @@ void StdReader::close() { inputStream->close(); } - + /** * Flush the underlying OutputStream */ @@ -835,22 +793,21 @@ int StdReader::available() { return inputStream->available(); } - + /** * Overloaded to receive its bytes from an InputStream * rather than a Reader */ -int StdReader::get() +gunichar StdReader::get() { //Do we need conversions here? - XMLCh ch = (XMLCh)inputStream->get(); + gunichar ch = (gunichar)inputStream->get(); return ch; } - //######################################################################### //# B A S I C W R I T E R //######################################################################### @@ -886,7 +843,7 @@ void BasicWriter::flush() /** * Writes the specified byte to this output writer. */ -int BasicWriter::put(XMLCh ch) +int BasicWriter::put(gunichar ch) { if (destination && destination->put(ch)>=0) return 1; @@ -1079,7 +1036,7 @@ void OutputStreamWriter::flush() * Overloaded to redirect the output chars from the next Writer * in the chain to an OutputStream instead. */ -int OutputStreamWriter::put(XMLCh ch) +int OutputStreamWriter::put(gunichar ch) { //Do we need conversions here? int intCh = (int) ch; @@ -1133,11 +1090,10 @@ void StdWriter::flush() * Overloaded to redirect the output chars from the next Writer * in the chain to an OutputStream instead. */ -int StdWriter::put(XMLCh ch) +int StdWriter::put(gunichar ch) { //Do we need conversions here? - int intCh = (int) ch; - if (outputStream->put(intCh) < 0) + if (outputStream->put(ch) < 0) return -1; return 1; } @@ -1146,13 +1102,6 @@ int StdWriter::put(XMLCh ch) - - - - - - - //############################################### //# O P E R A T O R S //############################################### @@ -1166,31 +1115,31 @@ int StdWriter::put(XMLCh ch) -Reader& operator>> (Reader &reader, bool& val ) +const Reader& operator>> (Reader &reader, bool& val ) { return reader.readBool(val); } -Reader& operator>> (Reader &reader, short &val) +const Reader& operator>> (Reader &reader, short &val) { return reader.readShort(val); } -Reader& operator>> (Reader &reader, unsigned short &val) +const Reader& operator>> (Reader &reader, unsigned short &val) { return reader.readUnsignedShort(val); } -Reader& operator>> (Reader &reader, int &val) +const Reader& operator>> (Reader &reader, int &val) { return reader.readInt(val); } -Reader& operator>> (Reader &reader, unsigned int &val) +const Reader& operator>> (Reader &reader, unsigned int &val) { return reader.readUnsignedInt(val); } -Reader& operator>> (Reader &reader, long &val) +const Reader& operator>> (Reader &reader, long &val) { return reader.readLong(val); } -Reader& operator>> (Reader &reader, unsigned long &val) +const Reader& operator>> (Reader &reader, unsigned long &val) { return reader.readUnsignedLong(val); } -Reader& operator>> (Reader &reader, float &val) +const Reader& operator>> (Reader &reader, float &val) { return reader.readFloat(val); } -Reader& operator>> (Reader &reader, double &val) +const Reader& operator>> (Reader &reader, double &val) { return reader.readDouble(val); } diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h index 1a93e73b2..a021676fa 100644 --- a/src/dom/io/domstream.h +++ b/src/dom/io/domstream.h @@ -44,23 +44,21 @@ namespace dom namespace io { - - -class StreamException +class StreamException : public std::exception { public: - StreamException(const DOMString &theReason) throw() - : reason(theReason) - {} + StreamException(const char *theReason) throw() + { reason = theReason; } + StreamException(Glib::ustring &theReason) throw() + { reason = theReason; } virtual ~StreamException() throw() { } - char const *what() + char const *what() const throw() { return reason.c_str(); } - + private: - - DOMString reason; + Glib::ustring reason; }; @@ -95,14 +93,14 @@ public: * to be read */ virtual int available() = 0; - + /** * Do whatever it takes to 'close' this input stream * The most likely implementation of this method will be * for endpoints that use a resource for their data. */ virtual void close() = 0; - + /** * Read one byte from this input stream. This is a blocking * call. If no data is currently available, this call will @@ -113,7 +111,7 @@ public: * This call returns -1 on end-of-file. */ virtual int get() = 0; - + }; // class InputStream @@ -129,22 +127,22 @@ class BasicInputStream : public InputStream public: - BasicInputStream(const InputStream &sourceStream); - + BasicInputStream(InputStream &sourceStream); + virtual ~BasicInputStream() {} - + virtual int available(); - + virtual void close(); - + virtual int get(); - + protected: bool closed; InputStream &source; - + private: @@ -161,10 +159,10 @@ public: int available() { return 0; } - + void close() { /* do nothing */ } - + int get() { return getchar(); } @@ -174,7 +172,6 @@ public: - //######################################################################### //# O U T P U T S T R E A M //######################################################################### @@ -207,18 +204,18 @@ public: * 3. close the destination stream */ virtual void close() = 0; - + /** * This call should push any pending data it might have to * the destination stream. It should NOT call flush() on * the destination stream. */ virtual void flush() = 0; - + /** * Send one byte to the destination stream. */ - virtual int put(XMLCh ch) = 0; + virtual int put(gunichar ch) = 0; }; // class OutputStream @@ -233,15 +230,15 @@ class BasicOutputStream : public OutputStream public: - BasicOutputStream(const OutputStream &destinationStream); - + BasicOutputStream(OutputStream &destinationStream); + virtual ~BasicOutputStream() {} virtual void close(); - + virtual void flush(); - - virtual int put(XMLCh ch); + + virtual int put(gunichar ch); protected: @@ -263,12 +260,12 @@ public: void close() { } - + void flush() { } - - int put(XMLCh ch) - { putchar(ch); return 1; } + + int put(gunichar ch) + { return putchar(ch); } }; @@ -279,7 +276,6 @@ public: //# R E A D E R //######################################################################### - /** * This interface and its descendants are for unicode character-oriented input * @@ -301,33 +297,42 @@ public: virtual int available() = 0; - + virtual void close() = 0; - - virtual int get() = 0; - - virtual DOMString readLine() = 0; - - virtual DOMString readWord() = 0; - + + virtual gunichar get() = 0; + + virtual Glib::ustring readLine() = 0; + + virtual Glib::ustring readWord() = 0; + /* Input formatting */ - virtual Reader& readBool (bool& val ) = 0; - - virtual Reader& readShort (short &val) = 0; - - virtual Reader& readUnsignedShort (unsigned short &val) = 0; - - virtual Reader& readInt (int &val) = 0; - - virtual Reader& readUnsignedInt (unsigned int &val) = 0; - - virtual Reader& readLong (long &val) = 0; - - virtual Reader& readUnsignedLong (unsigned long &val) = 0; - - virtual Reader& readFloat (float &val) = 0; - - virtual Reader& readDouble (double &val) = 0; + virtual const Reader& readBool (bool& val ) = 0; + virtual const Reader& operator>> (bool& val ) = 0; + + virtual const Reader& readShort (short &val) = 0; + virtual const Reader& operator>> (short &val) = 0; + + virtual const Reader& readUnsignedShort (unsigned short &val) = 0; + virtual const Reader& operator>> (unsigned short &val) = 0; + + virtual const Reader& readInt (int &val) = 0; + virtual const Reader& operator>> (int &val) = 0; + + virtual const Reader& readUnsignedInt (unsigned int &val) = 0; + virtual const Reader& operator>> (unsigned int &val) = 0; + + virtual const Reader& readLong (long &val) = 0; + virtual const Reader& operator>> (long &val) = 0; + + virtual const Reader& readUnsignedLong (unsigned long &val) = 0; + virtual const Reader& operator>> (unsigned long &val) = 0; + + virtual const Reader& readFloat (float &val) = 0; + virtual const Reader& operator>> (float &val) = 0; + + virtual const Reader& readDouble (double &val) = 0; + virtual const Reader& operator>> (double &val) = 0; }; // interface Reader @@ -343,37 +348,56 @@ class BasicReader : public Reader public: BasicReader(Reader &sourceStream); - + virtual ~BasicReader() {} virtual int available(); - + virtual void close(); - - virtual int get(); - - virtual DOMString readLine(); - - virtual DOMString readWord(); - + + virtual gunichar get(); + + virtual Glib::ustring readLine(); + + virtual Glib::ustring readWord(); + /* Input formatting */ - virtual Reader& readBool (bool& val ); - - virtual Reader& readShort (short &val) ; - - virtual Reader& readUnsignedShort (unsigned short &val) ; - - virtual Reader& readInt (int &val) ; - - virtual Reader& readUnsignedInt (unsigned int &val) ; - - virtual Reader& readLong (long &val) ; - - virtual Reader& readUnsignedLong (unsigned long &val) ; - - virtual Reader& readFloat (float &val) ; - - virtual Reader& readDouble (double &val) ; + virtual const Reader& readBool (bool& val ); + virtual const Reader& operator>> (bool& val ) + { return readBool(val); } + + virtual const Reader& readShort (short &val); + virtual const Reader& operator>> (short &val) + { return readShort(val); } + + virtual const Reader& readUnsignedShort (unsigned short &val); + virtual const Reader& operator>> (unsigned short &val) + { return readUnsignedShort(val); } + + virtual const Reader& readInt (int &val); + virtual const Reader& operator>> (int &val) + { return readInt(val); } + + virtual const Reader& readUnsignedInt (unsigned int &val); + virtual const Reader& operator>> (unsigned int &val) + { return readUnsignedInt(val); } + + virtual const Reader& readLong (long &val); + virtual const Reader& operator>> (long &val) + { return readLong(val); } + + virtual const Reader& readUnsignedLong (unsigned long &val); + virtual const Reader& operator>> (unsigned long &val) + { return readUnsignedLong(val); } + + virtual const Reader& readFloat (float &val); + virtual const Reader& operator>> (float &val) + { return readFloat(val); } + + virtual const Reader& readDouble (double &val); + virtual const Reader& operator>> (double &val) + { return readDouble(val); } + protected: @@ -388,27 +412,6 @@ private: -Reader& operator>> (Reader &reader, bool& val ); - -Reader& operator>> (Reader &reader, short &val); - -Reader& operator>> (Reader &reader, unsigned short &val); - -Reader& operator>> (Reader &reader, int &val); - -Reader& operator>> (Reader &reader, unsigned int &val); - -Reader& operator>> (Reader &reader, long &val); - -Reader& operator>> (Reader &reader, unsigned long &val); - -Reader& operator>> (Reader &reader, float &val); - -Reader& operator>> (Reader &reader, double &val); - - - - /** * Class for placing a Reader on an open InputStream * @@ -417,14 +420,14 @@ class InputStreamReader : public BasicReader { public: - InputStreamReader(const InputStream &inputStreamSource); - + InputStreamReader(InputStream &inputStreamSource); + /*Overload these 3 for your implementation*/ virtual int available(); - + virtual void close(); - - virtual int get(); + + virtual gunichar get(); private: @@ -445,13 +448,13 @@ public: StdReader(); virtual ~StdReader(); - + /*Overload these 3 for your implementation*/ virtual int available(); - + virtual void close(); - - virtual int get(); + + virtual gunichar get(); private: @@ -463,8 +466,6 @@ private: - - //######################################################################### //# W R I T E R //######################################################################### @@ -492,7 +493,7 @@ public: virtual void flush() = 0; - virtual int put(XMLCh ch) = 0; + virtual int put(gunichar ch) = 0; /* Formatted output */ virtual Writer& printf(const DOMString &fmt, ...) = 0; @@ -542,7 +543,7 @@ public: virtual void flush(); - virtual int put(XMLCh ch); + virtual int put(gunichar ch); @@ -635,7 +636,7 @@ public: virtual void flush(); - virtual int put(XMLCh ch); + virtual int put(gunichar ch); private: @@ -663,7 +664,7 @@ public: virtual void flush(); - virtual int put(XMLCh ch); + virtual int put(gunichar ch); private: diff --git a/src/dom/io/stringstream.cpp b/src/dom/io/stringstream.cpp index c6e47045e..ca058a575 100644 --- a/src/dom/io/stringstream.cpp +++ b/src/dom/io/stringstream.cpp @@ -140,7 +140,7 @@ void StringOutputStream::flush() /** * Writes the specified byte to this output stream. */ -int StringOutputStream::put(XMLCh ch) +int StringOutputStream::put(gunichar ch) { buffer.push_back(ch); return 1; diff --git a/src/dom/io/stringstream.h b/src/dom/io/stringstream.h index f6ed89e65..9ba24fc26 100644 --- a/src/dom/io/stringstream.h +++ b/src/dom/io/stringstream.h @@ -100,7 +100,7 @@ public: virtual void flush(); - virtual int put(XMLCh ch); + virtual int put(gunichar ch); virtual DOMString &getString() { return buffer; } diff --git a/src/dom/io/uristream.cpp b/src/dom/io/uristream.cpp index 09b0ac361..f6172d9e0 100644 --- a/src/dom/io/uristream.cpp +++ b/src/dom/io/uristream.cpp @@ -235,10 +235,10 @@ void UriReader::close() throw(StreamException) /** * */ -int UriReader::get() throw(StreamException) +gunichar UriReader::get() throw(StreamException) { - int ch = (int)inputStream->get(); - return ch; + //int ch = (int)inputStream->get(); + return inputStream->get();//ch; } @@ -372,7 +372,7 @@ void UriOutputStream::flush() throw(StreamException) /** * Writes the specified byte to this output stream. */ -int UriOutputStream::put(XMLCh ch) throw(StreamException) +int UriOutputStream::put(gunichar ch) throw(StreamException) { if (closed) return -1; @@ -440,10 +440,9 @@ void UriWriter::flush() throw(StreamException) /** * */ -int UriWriter::put(XMLCh ch) throw(StreamException) +int UriWriter::put(gunichar ch) throw(StreamException) { - int ich = (int)ch; - if (outputStream->put(ich) < 0) + if (outputStream->put(ch) < 0) return -1; return 1; } diff --git a/src/dom/io/uristream.h b/src/dom/io/uristream.h index 8d60468a5..51227acc9 100644 --- a/src/dom/io/uristream.h +++ b/src/dom/io/uristream.h @@ -111,7 +111,7 @@ public: virtual void close() throw(StreamException); - virtual int get() throw(StreamException); + virtual gunichar get() throw(StreamException); private: @@ -143,7 +143,7 @@ public: virtual void flush() throw(StreamException); - virtual int put(XMLCh ch) throw(StreamException); + virtual int put(gunichar ch) throw(StreamException); private: @@ -181,7 +181,7 @@ public: virtual void flush() throw(StreamException); - virtual int put(XMLCh ch) throw(StreamException); + virtual int put(gunichar ch) throw(StreamException); private: |
