]> git.saurik.com Git - wxWidgets.git/blame - interface/sstream.h
several g++ 4 warning fixes
[wxWidgets.git] / interface / sstream.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: sstream.h
e54c96f1 3// Purpose: interface of wxStringInputStream
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxStringInputStream
11 @wxheader{sstream.h}
7c913512 12
23324ae1
FM
13 This class implements an input stream which reads data from a string. It
14 supports seeking.
7c913512 15
23324ae1
FM
16 @library{wxbase}
17 @category{streams}
18*/
19class wxStringInputStream : public wxInputStream
20{
21public:
22 /**
23 Creates a new read-only stream using the specified string. Note that the string
24 is copied by the stream so if the original string is modified after using this
25 constructor, changes to it are not reflected when reading from stream.
26 */
27 wxStringInputStream(const wxString& s);
28};
29
30
e54c96f1 31
23324ae1
FM
32/**
33 @class wxStringOutputStream
34 @wxheader{sstream.h}
7c913512 35
23324ae1
FM
36 This class implements an output stream which writes data either to a
37 user-provided or internally allocated string. Note that currently this stream
38 does not support seeking but can tell its current position.
7c913512 39
23324ae1
FM
40 @library{wxbase}
41 @category{streams}
42*/
43class wxStringOutputStream : public wxOutputStream
44{
45public:
46 /**
47 If the provided pointer is non-@NULL, data will be written to it.
7c913512 48 Otherwise, an internal string is used for the data written to this stream, use
23324ae1 49 GetString() to get access to it.
4cc4bfaf 50 If @a str is used, data written to the stream is appended to the current
23324ae1
FM
51 contents of it, i.e. the string is not cleared here. However if it is not
52 empty, the positions returned by wxOutputStream::TellO will be
53 offset by the initial string length, i.e. initial stream position will be the
54 initial length of the string and not 0.
55 */
4cc4bfaf 56 wxStringOutputStream(wxString str = NULL);
23324ae1
FM
57
58 /**
59 Returns the string containing all the data written to the stream so far.
60 */
328f5751 61 const wxString GetString() const;
23324ae1 62};
e54c96f1 63