X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdom%2Fio%2Fdomstream.h;h=273782b6776872aa3660300d5fb4f3ad05f0ac77;hb=a8e0310afe0d9b31d25a143238dbbc0bc4a91860;hp=af43d0a51718511b1bccc809dac740d9d3022bc9;hpb=6232b46968ade11dd56fdb9627a2bda45d0dda7d;p=inkscape.git diff --git a/src/dom/io/domstream.h b/src/dom/io/domstream.h index af43d0a51..273782b67 100644 --- a/src/dom/io/domstream.h +++ b/src/dom/io/domstream.h @@ -12,7 +12,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2006-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,7 @@ -#include "dom.h" +#include namespace org { @@ -215,7 +215,7 @@ public: /** * Send one byte to the destination stream. */ - virtual void put(XMLCh ch) = 0; + virtual int put(XMLCh ch) = 0; }; // class OutputStream @@ -238,7 +238,7 @@ public: virtual void flush(); - virtual void put(XMLCh ch); + virtual int put(XMLCh ch); protected: @@ -264,8 +264,8 @@ public: void flush() { } - void put(XMLCh ch) - { putchar(ch); } + int put(XMLCh ch) + { putchar(ch); return 1; } }; @@ -489,10 +489,10 @@ public: virtual void flush() = 0; - virtual void put(XMLCh ch) = 0; + virtual int put(XMLCh ch) = 0; /* Formatted output */ - virtual Writer& printf(char *fmt, ...) = 0; + virtual Writer& printf(const DOMString &fmt, ...) = 0; virtual Writer& writeChar(char val) = 0; @@ -539,12 +539,12 @@ public: virtual void flush(); - virtual void put(XMLCh ch); + virtual int put(XMLCh ch); /* Formatted output */ - virtual Writer &printf(char *fmt, ...); + virtual Writer &printf(const DOMString &fmt, ...); virtual Writer& writeChar(char val); @@ -576,6 +576,10 @@ protected: BasicWriter() { destination = NULL; } + //Used for printf() or other things that might + //require formatting before sending down the stream + char formatBuf[2048]; + private: }; // class BasicWriter @@ -622,7 +626,7 @@ public: virtual void flush(); - virtual void put(XMLCh ch); + virtual int put(XMLCh ch); private: @@ -650,7 +654,7 @@ public: virtual void flush(); - virtual void put(XMLCh ch); + virtual int put(XMLCh ch); private: