1 % ----------------------------------------------------------------------------
3 % ----------------------------------------------------------------------------
4 \section{\class{wxTextInputStream
}}\label{wxtextinputstream
}
6 This class provides functions that read text datas using an input stream.
7 So, you can read
\it{text
} floats, integers.
9 Operator >> is overloaded and you can use this class a C++ std-iostream.
13 wxTextInputStream text( input );
18 text >> i1; // read a
8 bit integer.
19 text >> i1 >> f2; // read a
8 bit integer followed by float.
20 text >> line; // read a text line
23 \wxheading{Include files
}
27 \latexignore{\rtfignore{\wxheading{Members
}}}
29 \membersection{wxTextInputStream::wxTextInputStream
}\label{wxtextinputstreamconstr
}
31 \func{}{wxTextInputStream
}{\param{wxInputStream\&
}{ stream
}}
33 Constructs a text stream object from an input stream. Only read methods will
36 \wxheading{Parameters
}
38 \docparam{stream
}{The input stream.
}
40 \membersection{wxTextInputStream::
\destruct{wxTextInputStream
}}
42 \func{}{\destruct{wxTextInputStream
}}{\void}
44 Destroys the wxTextInputStream object.
46 \membersection{wxTextInputStream::Read8
}
48 \func{unsigned char
}{Read8
}{\void}
50 Reads a single byte from the stream.
52 \membersection{wxTextInputStream::Read16
}
54 \func{unsigned short
}{Read16
}{\void}
56 Reads a
16 bit integer from the stream.
58 \membersection{wxTextInputStream::Read32
}
60 \func{unsigned long
}{Read32
}{\void}
62 Reads a
32 bit integer from the stream.
64 \membersection{wxTextInputStream::ReadDouble
}
66 \func{double
}{ReadDouble
}{\void}
68 Reads a double (IEEE encoded) from the stream.
70 \membersection{wxTextInputStream::ReadString
}
72 \func{wxString
}{wxTextInputStream::ReadString
}{\void}
74 Reads a line from the stream. A line is a string which ends with
75 $
\backslack$n or $
\backslash$r$
\backslash$n or $
\backslash$r.
77 % ----------------------------------------------------------------------------
79 % ----------------------------------------------------------------------------
81 \section{\class{wxTextOutputStream
}}\label{wxtextoutputstream
}
83 This class provides functions that write text datas using an output stream.
84 So, you can write
\it{text
} floats, integers.
88 wxTextOutputStream text( output );
90 output << "This is a text line
\n";
95 \latexignore{\rtfignore{\wxheading{Members
}}}
97 \membersection{wxTextOutputStream::wxTextOutputStream
}\label{wxdataoutputstreamconstr
}
99 \func{}{wxTextOutputStream
}{\param{wxOutputStream\&
}{ stream
}}
101 Constructs a text stream object from an output stream. Only write methods will
104 \wxheading{Parameters
}
106 \docparam{stream
}{The output stream.
}
108 \membersection{wxTextOutputStream::
\destruct{wxTextOutputStream
}}
110 \func{}{\destruct{wxTextOutputStream
}}{\void}
112 Destroys the wxTextOutputStream object.
114 \membersection{wxTextOutputStream::Write8
}
116 \func{void
}{wxTextOutputStream::Write8
}{{\param unsigned char
}{i8
}}
118 Writes the single byte
{\it i8
} to the stream.
120 \membersection{wxTextOutputStream::Write16
}
122 \func{void
}{wxTextOutputStream::Write16
}{{\param unsigned short
}{i16
}}
124 Writes the
16 bit integer
{\it i16
} to the stream.
126 \membersection{wxTextOutputStream::Write32
}
128 \func{void
}{wxTextOutputStream::Write32
}{{\param unsigned long
}{i32
}}
130 Writes the
32 bit integer
{\it i32
} to the stream.
132 \membersection{wxTextOutputStream::WriteDouble
}
134 \func{void
}{wxTextOutputStream::WriteDouble
}{{\param double
}{f
}}
136 Writes the double
{\it f
} to the stream using the IEEE format.
138 \membersection{wxTextOutputStream::WriteString
}
140 \func{void
}{wxTextOutputStream::WriteString
}{{\param const wxString\&
}{string
}}
142 Writes
{\it string
} as a line. Depending on the operating system, it adds
143 $
\backslash$n or $
\backslash$r$
\backslash$n.