1 % -----------------------------------------------------------------------------
3 % -----------------------------------------------------------------------------
4 \section{\class{wxStreamBase
}}\label{wxstreambase
}
6 This class is the base class of most stream related classes in wxWidgets. It must
9 \wxheading{Derived from
}
13 \wxheading{Include files
}
19 \helpref{wxStreamBuffer
}{wxstreambuffer
}
21 % -----------------------------------------------------------------------------
23 % -----------------------------------------------------------------------------
24 \latexignore{\rtfignore{\wxheading{Members
}}}
30 \membersection{wxStreamBase::wxStreamBase
}
32 \func{}{wxStreamBase
}{\void}
34 Creates a dummy stream object. It doesn't do anything.
36 \membersection{wxStreamBase::
\destruct{wxStreamBase
}}
38 \func{}{\destruct{wxStreamBase
}}{\void}
42 \membersection{wxStreamBase::IsOk
}\label{wxstreambaseisok
}
44 \constfunc{wxStreamError
}{IsOk
}{\void}
46 Returns true if no error occurred on the stream.
50 \helpref{GetLastError
}{wxstreambasegetlasterror
}
52 \membersection{wxStreamBase::GetLastError
}\label{wxstreambasegetlasterror
}
54 \constfunc{wxStreamError
}{GetLastError
}{\void}
56 This function returns the last error.
59 \begin{twocollist
}\itemsep=
0pt
60 \twocolitem{{\bf wxSTREAM
\_NO\_ERROR}}{No error occurred.
}
61 \twocolitem{{\bf wxSTREAM
\_EOF}}{An End-Of-File occurred.
}
62 \twocolitem{{\bf wxSTREAM
\_WRITE\_ERROR}}{A generic error occurred on the last write call.
}
63 \twocolitem{{\bf wxSTREAM
\_READ\_ERROR}}{A generic error occurred on the last read call.
}
66 \membersection{wxStreamBase::OnSysRead
}\label{wxstreambaseonsysread
}
68 \func{size
\_t}{OnSysRead
}{\param{void*
}{ buffer
},
\param{size
\_t}{ bufsize
}}
70 Internal function. It is called when the stream wants to read data of the
71 specified size. It should return the size that was actually read.
73 \membersection{wxStreamBase::OnSysSeek
}
75 \func{off
\_t}{OnSysSeek
}{\param{off
\_t}{ pos
},
\param{wxSeekMode
}{ mode
}}
77 Internal function. It is called when the stream needs to change the
80 \membersection{wxStreamBase::OnSysTell
}
82 \constfunc{off
\_t}{OnSysTell
}{\void}
84 Internal function. Is is called when the stream needs to know the
87 \membersection{wxStreamBase::OnSysWrite
}
89 \func{size
\_t}{OnSysWrite
}{\param{void *
}{buffer
},
\param{size
\_t}{ bufsize
}}
91 See
\helpref{OnSysRead
}{wxstreambaseonsysread
}.
93 \membersection{wxStreamBase::GetSize
}\label{wxstreambasegetsize
}
95 \constfunc{size
\_t}{GetSize
}{\void}
97 This function returns the size of the stream. For example, for a file it is the size of
102 There are streams which do not have size by definition, such as socket streams.
103 In that cases, GetSize returns $
0$ so you should always test its return value.