1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
<HTML>
<head><title>wxStreamBase</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxstreambase"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx221.htm#wxstatusbar"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx223.htm#wxstreambuffer"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxStreamBase</H2>
<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
None<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/stream.h><P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx223.htm#wxstreambuffer">wxStreamBuffer</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B> <P>
<A HREF="#topic847">wxStreamBase::wxStreamBase</A><BR>
<A HREF="#topic848">wxStreamBase::~wxStreamBase</A><BR>
<A HREF="#wxstreambaselasterror">wxStreamBase::LastError</A><BR>
<A HREF="#wxstreambaseonsysread">wxStreamBase::OnSysRead</A><BR>
<A HREF="#topic849">wxStreamBase::OnSysSeek</A><BR>
<A HREF="#topic850">wxStreamBase::OnSysTell</A><BR>
<A HREF="#topic851">wxStreamBase::OnSysWrite</A><BR>
<A HREF="#topic852">wxStreamBase::StreamSize</A><BR>
<P>
<HR>
<A NAME="topic847"></A>
<H3>wxStreamBase::wxStreamBase</H3>
<P>
<B></B> <B>wxStreamBase</B>()<P>
Creates a dummy stream object. It doesn't do anything.<P>
<HR>
<A NAME="topic848"></A>
<H3>wxStreamBase::~wxStreamBase</H3>
<P>
<B></B> <B>~wxStreamBase</B>()<P>
Destructor.<P>
<HR>
<A NAME="wxstreambaselasterror"></A>
<H3>wxStreamBase::LastError</H3>
<P>
<B>wxStreamError</B> <B>LastError</B>() <B>const</B><P>
This function returns the last error.
<TABLE>
<TR><TD VALIGN=TOP>
<B>wxStream_NOERROR</B>
</TD>
<TD VALIGN=TOP>
No error occured.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxStream_EOF</B>
</TD>
<TD VALIGN=TOP>
An End-Of-File occured.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxStream_WRITE_ERR</B>
</TD>
<TD VALIGN=TOP>
A generic error occured on the last write call.
</TD></TR>
<TR><TD VALIGN=TOP>
<B>wxStream_READ_ERR</B>
</TD>
<TD VALIGN=TOP>
A generic error occured on the last read call.
</TD></TR>
</TABLE>
<P>
<HR>
<A NAME="wxstreambaseonsysread"></A>
<H3>wxStreamBase::OnSysRead</H3>
<P>
<B>size_t</B> <B>OnSysRead</B>(<B>void*</B><I> buffer</I>, <B>size_t</B><I> bufsize</I>)<P>
Internal function. It is called when the stream buffer needs a buffer of the
specified size. It should return the size that was actually read.<P>
<HR>
<A NAME="topic849"></A>
<H3>wxStreamBase::OnSysSeek</H3>
<P>
<B>off_t</B> <B>OnSysSeek</B>(<B>off_t</B><I> pos</I>, <B>wxSeekMode</B><I> mode</I>)<P>
Internal function. It is called when the stream buffer needs to change the
current position in the stream. See <A HREF="wx223.htm#wxstreambufferseek">wxStreamBuffer::Seek</A><P>
<HR>
<A NAME="topic850"></A>
<H3>wxStreamBase::OnSysTell</H3>
<P>
<B>off_t</B> <B>OnSysTell</B>() <B>const</B><P>
Internal function. Is is called when the stream buffer needs to know the
real position in the stream.<P>
<HR>
<A NAME="topic851"></A>
<H3>wxStreamBase::OnSysWrite</H3>
<P>
<B>size_t</B> <B>OnSysWrite</B>(<B>void *</B><I>buffer</I>, <B>size_t</B><I> bufsize</I>)<P>
See <A HREF="wx222.htm#wxstreambaseonsysread">OnSysRead</A>.<P>
<HR>
<A NAME="topic852"></A>
<H3>wxStreamBase::StreamSize</H3>
<P>
<B>size_t</B> <B>StreamSize</B>() <B>const</B><P>
This function returns the size of the stream. For example, for a file it is the size of
the file).<P>
<B><FONT COLOR="#FF0000">Warning</FONT></B><P>
There are streams which do not have size by definition, such as socket streams.
In that cases, StreamSize returns an invalid size represented by<P>
<PRE>
~(size_t)0
</PRE>
</BODY></HTML>
|