<html> <head> <title>Cal3D: CalStreamSource Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center"> <tr> <td class="md" align="center"> <small> <b>- Cal3D 0.11 API Reference -</b> </small> </td> </tr> </table> <br> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>CalStreamSource Class Reference</h1><!-- doxytag: class="CalStreamSource" --><!-- doxytag: inherits="CalDataSource" --><a class="el" href="classCalStreamSource.html" title="CalStreamSource class.">CalStreamSource</a> class. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="streamsource_8h_source.html">streamsource.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for CalStreamSource:</div> <div class="dynsection"> <p><center><img src="classCalStreamSource.png" usemap="#CalStreamSource_map" border="0" alt=""></center> <map name="CalStreamSource_map"> <area href="classCalDataSource.html" alt="CalDataSource" shape="rect" coords="0,0,111,24"> </map> </div> <p> <a href="classCalStreamSource-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#8e1c256078c06d4b6c2bdfa231edab29">CalStreamSource</a> (std::istream &inputStream)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructs a stream source instance from an existing istream. <a href="#8e1c256078c06d4b6c2bdfa231edab29"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#b70f2ec3dd2e65fd0cd8bf61dbd6a61e">~CalStreamSource</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destruct the <a class="el" href="classCalStreamSource.html" title="CalStreamSource class.">CalStreamSource</a>. <a href="#b70f2ec3dd2e65fd0cd8bf61dbd6a61e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#3ffd2137af2a0166b66c8eca6c65b3d7">ok</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the data source is in a good state. <a href="#3ffd2137af2a0166b66c8eca6c65b3d7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="faea4bddb063a06e1349ee83630ee70c"></a><!-- doxytag: member="CalStreamSource::setError" ref="faea4bddb063a06e1349ee83630ee70c" args="() const " --> virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#faea4bddb063a06e1349ee83630ee70c">setError</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the error code and message related to a streaming source. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#e9898a6cb9838f632fd92e20f8d5cd28">readBytes</a> (void *pBuffer, int length)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads a number of bytes. <a href="#e9898a6cb9838f632fd92e20f8d5cd28"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#a09c0e2eaf2a0a55e6d257a4eff63d13">readFloat</a> (float &value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads a float. <a href="#a09c0e2eaf2a0a55e6d257a4eff63d13"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#7c953882c703d8c5f9504ab00cc0e1ba">readInteger</a> (int &value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads an integer. <a href="#7c953882c703d8c5f9504ab00cc0e1ba"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCalStreamSource.html#6ac7d3205bcbed0686efd70b14638092">readString</a> (std::string &strValue)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reads a string. <a href="#6ac7d3205bcbed0686efd70b14638092"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="65c2b02eb400b2fd9cf52144646a771e"></a><!-- doxytag: member="CalStreamSource::mInputStream" ref="65c2b02eb400b2fd9cf52144646a771e" args="" --> std::istream * </td><td class="memItemRight" valign="bottom"><b>mInputStream</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <a class="el" href="classCalStreamSource.html" title="CalStreamSource class.">CalStreamSource</a> class. <p> This is an object designed to represent a source of Cal3d data as coming from a standard input stream. <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="8e1c256078c06d4b6c2bdfa231edab29"></a><!-- doxytag: member="CalStreamSource::CalStreamSource" ref="8e1c256078c06d4b6c2bdfa231edab29" args="(std::istream &inputStream)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">CalStreamSource::CalStreamSource </td> <td>(</td> <td class="paramtype">std::istream & </td> <td class="paramname"> <em>inputStream</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Constructs a stream source instance from an existing istream. <p> This function is the only constructor of the stream source.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>inputStream</em> </td><td>The input stream to use, which should be set up and ready to be read from before making the stream source. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="b70f2ec3dd2e65fd0cd8bf61dbd6a61e"></a><!-- doxytag: member="CalStreamSource::~CalStreamSource" ref="b70f2ec3dd2e65fd0cd8bf61dbd6a61e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">CalStreamSource::~CalStreamSource </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Destruct the <a class="el" href="classCalStreamSource.html" title="CalStreamSource class.">CalStreamSource</a>. <p> Note that input stream is not closed here; this should be handled externally. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="3ffd2137af2a0166b66c8eca6c65b3d7"></a><!-- doxytag: member="CalStreamSource::ok" ref="3ffd2137af2a0166b66c8eca6c65b3d7" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool CalStreamSource::ok </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Checks whether the data source is in a good state. <p> This function checks if the istream can be used.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>One of the following values: <ul> <li><b>true</b> if data source is in a good state </li> <li><b>false</b> if not </li> </ul> </dd></dl> <p>Implements <a class="el" href="classCalDataSource.html">CalDataSource</a>.</p> </div> </div><p> <a class="anchor" name="e9898a6cb9838f632fd92e20f8d5cd28"></a><!-- doxytag: member="CalStreamSource::readBytes" ref="e9898a6cb9838f632fd92e20f8d5cd28" args="(void *pBuffer, int length)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool CalStreamSource::readBytes </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"> <em>pBuffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>length</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads a number of bytes. <p> This function reads a given number of bytes from this data source.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pBuffer</em> </td><td>A pointer to the buffer where the bytes are stored into. </td></tr> <tr><td valign="top"></td><td valign="top"><em>length</em> </td><td>The number of bytes that should be read.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>One of the following values: <ul> <li><b>true</b> if successful </li> <li><b>false</b> if an error happend </li> </ul> </dd></dl> <p>Implements <a class="el" href="classCalDataSource.html">CalDataSource</a>.</p> </div> </div><p> <a class="anchor" name="a09c0e2eaf2a0a55e6d257a4eff63d13"></a><!-- doxytag: member="CalStreamSource::readFloat" ref="a09c0e2eaf2a0a55e6d257a4eff63d13" args="(float &value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool CalStreamSource::readFloat </td> <td>(</td> <td class="paramtype">float & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads a float. <p> This function reads a float from this data source.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>A reference to the float into which the data is read.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>One of the following values: <ul> <li><b>true</b> if successful </li> <li><b>false</b> if an error happend </li> </ul> </dd></dl> <p>Implements <a class="el" href="classCalDataSource.html">CalDataSource</a>.</p> </div> </div><p> <a class="anchor" name="7c953882c703d8c5f9504ab00cc0e1ba"></a><!-- doxytag: member="CalStreamSource::readInteger" ref="7c953882c703d8c5f9504ab00cc0e1ba" args="(int &value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool CalStreamSource::readInteger </td> <td>(</td> <td class="paramtype">int & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads an integer. <p> This function reads an integer from this data source.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>A reference to the integer into which the data is read.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>One of the following values: <ul> <li><b>true</b> if successful </li> <li><b>false</b> if an error happend </li> </ul> </dd></dl> <p>Implements <a class="el" href="classCalDataSource.html">CalDataSource</a>.</p> </div> </div><p> <a class="anchor" name="6ac7d3205bcbed0686efd70b14638092"></a><!-- doxytag: member="CalStreamSource::readString" ref="6ac7d3205bcbed0686efd70b14638092" args="(std::string &strValue)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool CalStreamSource::readString </td> <td>(</td> <td class="paramtype">std::string & </td> <td class="paramname"> <em>strValue</em> </td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Reads a string. <p> This function reads a string from this data source.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>A reference to the string into which the data is read.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>One of the following values: <ul> <li><b>true</b> if successful </li> <li><b>false</b> if an error happend </li> </ul> </dd></dl> <p>Implements <a class="el" href="classCalDataSource.html">CalDataSource</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="streamsource_8h_source.html">streamsource.h</a><li>streamsource.cpp</ul> </div> <hr> <center> <small> Generated at Fri Jul 24 21:14:57 2009 by <a href="http://gna.org/projects/cal3d/">The Cal3D Team</a> with <a href="http://www.doxygen.org/index.html"> Doxygen 1.5.9 </a> </small> </center> </body> </html>