<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Simple Image Loading LibrarY: FileDataSource Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="classes.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="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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 class="nav"> <a class="el" href="a00168.html">SILLY</a>::<a class="el" href="a00114.html">FileDataSource</a></div> <h1>FileDataSource Class Reference</h1><!-- doxytag: class="SILLY::FileDataSource" --><!-- doxytag: inherits="SILLY::DataSource" -->This class allow the loading of an image directly from a file. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="a00188.html">SILLYFileDataSource.h</a>></code> <p> Inheritance diagram for FileDataSource:<p><center><img src="a00226.png" border="0" usemap="#a00227" alt="Inheritance graph"></center> <map name="a00227"> <area href="a00113.html" shape="rect" coords="16,5,117,32" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for FileDataSource:<p><center><img src="a00228.png" border="0" usemap="#a00229" alt="Collaboration graph"></center> <map name="a00229"> <area href="a00113.html" shape="rect" coords="6,5,107,32" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="a00008.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="a00114.html#357c56f7a66c0a034966794cc86b41de">FileDataSource</a> (const char *filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a data source from an existing file. <a href="#357c56f7a66c0a034966794cc86b41de"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="db50775c2b2355c89b9c5c3f2b7d14d8"></a><!-- doxytag: member="SILLY::FileDataSource::getDataPtr" ref="db50775c2b2355c89b9c5c3f2b7d14d8" args="() const " --> const <a class="el" href="a00168.html#ea185528b70b44efcecbc49855184018">byte</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#db50775c2b2355c89b9c5c3f2b7d14d8">getDataPtr</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get raw access to the image data. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="755fe6ae9cc7446462f39112220f11d5"></a><!-- doxytag: member="SILLY::FileDataSource::getSize" ref="755fe6ae9cc7446462f39112220f11d5" args="() const " --> size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#755fe6ae9cc7446462f39112220f11d5">getSize</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the size of the data. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#1bc549fe21f279f77205855d40b60007">isValid</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check wether the loading is successfull or not. <a href="#1bc549fe21f279f77205855d40b60007"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0bfaa0839d1bc5eb65bc12fc6eb6ab1"></a><!-- doxytag: member="SILLY::FileDataSource::operator[]" ref="a0bfaa0839d1bc5eb65bc12fc6eb6ab1" args="(size_t offset) const " --> <a class="el" href="a00168.html#ea185528b70b44efcecbc49855184018">byte</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00113.html#a0bfaa0839d1bc5eb65bc12fc6eb6ab1">operator[]</a> (size_t offset) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Retieve the byte at <em>offset</em>. <br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9fbaa5162ae093457ce29808b0d7128b"></a><!-- doxytag: member="SILLY::FileDataSource::~FileDataSource" ref="9fbaa5162ae093457ce29808b0d7128b" args="()" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00114.html#9fbaa5162ae093457ce29808b0d7128b">~FileDataSource</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">destructor <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This class allow the loading of an image directly from a file. <p> This class provides the services required to load an from a file. The loading is done once at initialization. We wanted to avoid exception. This is why user must check whether the object is valid or not after creation. <p> <p> Definition at line <a class="el" href="a00188.html#l00048">48</a> of file <a class="el" href="a00188.html">SILLYFileDataSource.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="357c56f7a66c0a034966794cc86b41de"></a><!-- doxytag: member="SILLY::FileDataSource::FileDataSource" ref="357c56f7a66c0a034966794cc86b41de" args="(const char *filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00114.html">FileDataSource</a> </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>filename</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Create a data source from an existing file. <p> The <a class="el" href="a00114.html">FileDataSource</a> manage the loading and the caching of the raw image source. The object manage the life time of the data.<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>filename</em> </td><td>the name of the file containing the data </td></tr> </table> </dl> <p> Definition at line <a class="el" href="a00208.html#l00046">46</a> of file <a class="el" href="a00208.html">SILLYFileDataSource.cpp</a>. </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="1bc549fe21f279f77205855d40b60007"></a><!-- doxytag: member="SILLY::FileDataSource::isValid" ref="1bc549fe21f279f77205855d40b60007" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool isValid </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check wether the loading is successfull or not. <p> One must call this function after creating this object in order to be sure the loading was successfull.<p> <dl compact><dt><b>Returns:</b></dt><dd>true if the loading is successfull. </dd></dl> <p> Definition at line <a class="el" href="a00189.html#l00034">34</a> of file <a class="el" href="a00189.html">SILLYFileDataSource.icpp</a>. </div> </div><p> <hr>The documentation for this class was generated from the following files:<ul> <li>/home/paul/dev/cegui/release_tmp/release_tmp/include/<a class="el" href="a00188.html">SILLYFileDataSource.h</a><li>/home/paul/dev/cegui/release_tmp/release_tmp/src/<a class="el" href="a00208.html">SILLYFileDataSource.cpp</a><li>/home/paul/dev/cegui/release_tmp/release_tmp/include/<a class="el" href="a00189.html">SILLYFileDataSource.icpp</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Sun Nov 5 14:38:43 2006 for Simple Image Loading LibrarY by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>