1
#ifndef __BUFFERSTREAM_H__
2
#define __BUFFERSTREAM_H__
4
* Phoebe DOM Implementation.
6
* This is a C++ approximation of the W3C DOM model, which follows
7
* fairly closely the specifications in the various .idl files, copies of
8
* which are provided for reference. Most important is this one:
10
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
15
* Copyright (C) 2006 Bob Jamison
17
* This library is free software; you can redistribute it and/or
18
* modify it under the terms of the GNU Lesser General Public
19
* License as published by the Free Software Foundation; either
20
* version 2.1 of the License, or (at your option) any later version.
22
* This library is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25
* Lesser General Public License for more details.
27
* You should have received a copy of the GNU Lesser General Public
28
* License along with this library; if not, write to the Free Software
29
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33
#include "domstream.h"
46
//#########################################################################
47
//# S T R I N G I N P U T S T R E A M
48
//#########################################################################
51
* This class is for reading character from a DOMString
54
class BufferInputStream : public InputStream
59
BufferInputStream(const std::vector<unsigned char> &sourceBuffer);
61
virtual ~BufferInputStream();
63
virtual int available();
71
const std::vector<unsigned char> &buffer;
77
}; // class BufferInputStream
82
//#########################################################################
83
//# B U F F E R O U T P U T S T R E A M
84
//#########################################################################
87
* This class is for sending a stream to a character buffer
90
class BufferOutputStream : public OutputStream
97
virtual ~BufferOutputStream();
101
virtual void flush();
103
virtual void put(XMLCh ch);
105
virtual std::vector<unsigned char> &getBuffer()
113
std::vector<unsigned char> buffer;
118
}; // class BufferOutputStream
133
#endif /* __BUFFERSTREAM_H__ */