<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css">
<title>
Gambas Documentation - GB_STREAM
</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../help+en"><img class="flag" alt="Home" border="0" src="../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../name+en">Up</a>&nbsp;
<a href="gb_static_property_self+en">Previous</a>&nbsp;
<a href="gb_stream_desc+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
GB_STREAM
</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax">typedef
&nbsp;&nbsp;struct GB_STREAM {
&nbsp;&nbsp;&nbsp;&nbsp;GB_STREAM_DESC *desc;
&nbsp;&nbsp;&nbsp;&nbsp;long _reserved;
&nbsp;&nbsp;&nbsp;&nbsp;long _free[6];
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;<b>GB_STREAM</b>;</pre><p>

If you create a class that inherits the <a href="../../comp/gb/stream+en">Stream</a> class, then you must
declare your class structure this way:
<p>
<pre class="code">typedef
  struct {
    GB_BASE object;
    GB_STREAM stream;
    }
  MyClass;
</pre><p><p>
The <tt>_free</tt> array is a space where you can store data associated with the <a href="../../def/stream+en">stream</a>,
like the opened file descriptor for example.
<p>
<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../../img/tip.png" align="center"></td><td valign="top">
Do not use this structure directly, but declares a specific <a href="../../def/stream+en">stream</a> structure having
the same size and beginning with the <a href="gb_stream_desc+en">GB_STREAM_DESC</a> field and the <tt>_reserved</tt> field.
</td></tr></table></div>
<p>
The <tt>desc</tt> field must points at a structure that points at the implementation functions of your <a href="../../def/stream+en">stream</a>.
<p>
<div class="warning"><table class="none" border="0"><tr><td width="40" valign="top"><img border="0" src="../../../img/warning.png" align="center"></td><td valign="top">
Streams of the same type should share the same description structure. See <a href="gb_stream_desc+en">GB_STREAM_DESC</a>
for more details.
</td></tr></table></div>
<p>
<hr><b>See also</b><br>
<a href="../cat/stream+en">Stream Management</a>&nbsp;

</div>
</body>
</html>

