Sophie

Sophie

distrib > Fedora > 17 > x86_64 > by-pkgid > 989fc7273cb69ce143e3e933773e129c > files > 93

assimp-devel-2.0.863-6.20110824svn.fc17.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: Assimp::IOSystem Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v2.0 (November 2010)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_assimp.html">Assimp</a></li><li class="navelem"><a class="el" href="class_assimp_1_1_i_o_system.html">IOSystem</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Assimp::IOSystem Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>CPP-API: Interface to the file system.  
 <a href="class_assimp_1_1_i_o_system.html#details">More...</a></p>

<p><a href="class_assimp_1_1_i_o_system-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8c334d60f04bceeb6bd0157d21723f3e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a8c334d60f04bceeb6bd0157d21723f3e">Close</a> (<a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a> *pFile)=0</td></tr>
<tr class="memdesc:a8c334d60f04bceeb6bd0157d21723f3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the given file and releases all resources associated with it.  <a href="#a8c334d60f04bceeb6bd0157d21723f3e"></a><br/></td></tr>
<tr class="memitem:a11349a65b353ed62f655c3dd802b9062"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a11349a65b353ed62f655c3dd802b9062">ComparePaths</a> (const char *one, const char *second) const </td></tr>
<tr class="memdesc:a11349a65b353ed62f655c3dd802b9062"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two paths and check whether the point to identical files.  <a href="#a11349a65b353ed62f655c3dd802b9062"></a><br/></td></tr>
<tr class="memitem:a279d1d4b0b2aa37800e222aad508dff1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a279d1d4b0b2aa37800e222aad508dff1">ComparePaths</a> (const std::string &amp;one, const std::string &amp;second) const </td></tr>
<tr class="memdesc:a279d1d4b0b2aa37800e222aad508dff1"><td class="mdescLeft">&#160;</td><td class="mdescRight">For backward compatibility.  <a href="#a279d1d4b0b2aa37800e222aad508dff1"></a><br/></td></tr>
<tr class="memitem:a7ae6cfaea4957408967463bfc3b84b27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ai_defines_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a7ae6cfaea4957408967463bfc3b84b27">Exists</a> (const std::string &amp;pFile) const </td></tr>
<tr class="memdesc:a7ae6cfaea4957408967463bfc3b84b27"><td class="mdescLeft">&#160;</td><td class="mdescRight">For backward compatibility.  <a href="#a7ae6cfaea4957408967463bfc3b84b27"></a><br/></td></tr>
<tr class="memitem:a79f5fe8d2dbe1056c9418f7de9a72445"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a79f5fe8d2dbe1056c9418f7de9a72445">Exists</a> (const char *pFile) const =0</td></tr>
<tr class="memdesc:a79f5fe8d2dbe1056c9418f7de9a72445"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tests for the existence of a file at the given path.  <a href="#a79f5fe8d2dbe1056c9418f7de9a72445"></a><br/></td></tr>
<tr class="memitem:a40e412875b985bdb638f00ef0f20fff6"><td class="memItemLeft" align="right" valign="top">virtual char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a40e412875b985bdb638f00ef0f20fff6">getOsSeparator</a> () const =0</td></tr>
<tr class="memdesc:a40e412875b985bdb638f00ef0f20fff6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the system specific directory separator.  <a href="#a40e412875b985bdb638f00ef0f20fff6"></a><br/></td></tr>
<tr class="memitem:af8ba1ee2dc0686da8fc9e3dad49af801"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#af8ba1ee2dc0686da8fc9e3dad49af801">IOSystem</a> ()</td></tr>
<tr class="memdesc:af8ba1ee2dc0686da8fc9e3dad49af801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#af8ba1ee2dc0686da8fc9e3dad49af801"></a><br/></td></tr>
<tr class="memitem:ac512ece3b0701de5682553007a4c0816"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816">Open</a> (const char *pFile, const char *pMode=&quot;rb&quot;)=0</td></tr>
<tr class="memdesc:ac512ece3b0701de5682553007a4c0816"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a new file with a given path.  <a href="#ac512ece3b0701de5682553007a4c0816"></a><br/></td></tr>
<tr class="memitem:aef35fabc9bd49fb83bfd4f12a94083c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#aef35fabc9bd49fb83bfd4f12a94083c3">Open</a> (const std::string &amp;pFile, const std::string &amp;pMode=std::string(&quot;rb&quot;))</td></tr>
<tr class="memdesc:aef35fabc9bd49fb83bfd4f12a94083c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">For backward compatibility.  <a href="#aef35fabc9bd49fb83bfd4f12a94083c3"></a><br/></td></tr>
<tr class="memitem:a617417f1c5125770606fea3b41068b36"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a617417f1c5125770606fea3b41068b36">~IOSystem</a> ()</td></tr>
<tr class="memdesc:a617417f1c5125770606fea3b41068b36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="#a617417f1c5125770606fea3b41068b36"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>CPP-API: Interface to the file system. </p>
<p>Derive an own implementation from this interface to supply custom file handling to the importer library. If you implement this interface, you also want to supply a custom implementation for <a class="el" href="class_assimp_1_1_i_o_stream.html" title="CPP-API: Class to handle file I/O for C++.">IOStream</a>.</p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_assimp_1_1_importer.html#a1161f46318af18bb86dfe0fc3edea4df" title="Supplies a custom IO handler to the importer to use to open and access files.">Importer::SetIOHandler()</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af8ba1ee2dc0686da8fc9e3dad49af801"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ai_defines_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> Assimp::IOSystem::IOSystem </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Create an instance of your derived class and assign it to an <a class="el" href="class_assimp_1_1_importer.html" title="CPP-API: The Importer class forms an C++ interface to the functionality of the Open Asset Import Libr...">Assimp::Importer</a> instance by calling <a class="el" href="class_assimp_1_1_importer.html#a1161f46318af18bb86dfe0fc3edea4df" title="Supplies a custom IO handler to the importer to use to open and access files.">Importer::SetIOHandler()</a>. </p>

</div>
</div>
<a class="anchor" id="a617417f1c5125770606fea3b41068b36"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ai_defines_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> Assimp::IOSystem::~IOSystem </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Virtual destructor. </p>
<p>It is safe to be called from within DLL <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a>, we're constructed on <a class="el" href="namespace_assimp.html" title="Assimp&#39;s CPP-API and all internal APIs.">Assimp</a>'s heap. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8c334d60f04bceeb6bd0157d21723f3e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Assimp::IOSystem::Close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a> *&#160;</td>
          <td class="paramname"><em>pFile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Closes the given file and releases all resources associated with it. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pFile</td><td>The file instance previously created by <a class="el" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816" title="Open a new file with a given path.">Open()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a11349a65b353ed62f655c3dd802b9062"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Assimp::IOSystem::ComparePaths </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>one</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>second</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares two paths and check whether the point to identical files. </p>
<p>The dummy implementation of this virtual member performs a case-insensitive comparison of the given strings. The default IO system implementation uses OS mechanisms to convert relative into absolute paths, so the result can be trusted. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">one</td><td>First file </td></tr>
    <tr><td class="paramname">second</td><td>Second file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>true if the paths point to the same file. The file needn't be existing, however. </dd></dl>

</div>
</div>
<a class="anchor" id="a279d1d4b0b2aa37800e222aad508dff1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Assimp::IOSystem::ComparePaths </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>one</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>second</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>For backward compatibility. </p>
<dl class="section see"><dt>See also:</dt><dd>ComparePaths(const char*, const char*) </dd></dl>

</div>
</div>
<a class="anchor" id="a7ae6cfaea4957408967463bfc3b84b27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ai_defines_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> bool Assimp::IOSystem::Exists </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pFile</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>For backward compatibility. </p>
<dl class="section see"><dt>See also:</dt><dd>Exists(const char*) </dd></dl>

</div>
</div>
<a class="anchor" id="a79f5fe8d2dbe1056c9418f7de9a72445"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool Assimp::IOSystem::Exists </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pFile</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Tests for the existence of a file at the given path. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pFile</td><td>Path to the file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>true if there is a file with this path, else false. </dd></dl>

</div>
</div>
<a class="anchor" id="a40e412875b985bdb638f00ef0f20fff6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual char Assimp::IOSystem::getOsSeparator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the system specific directory separator. </p>
<dl class="section return"><dt>Returns:</dt><dd>System specific directory separator </dd></dl>

</div>
</div>
<a class="anchor" id="ac512ece3b0701de5682553007a4c0816"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a>* Assimp::IOSystem::Open </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pFile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pMode</em> = <code>&quot;rb&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Open a new file with a given path. </p>
<p>When the access to the file is finished, call <a class="el" href="class_assimp_1_1_i_o_system.html#a8c334d60f04bceeb6bd0157d21723f3e" title="Closes the given file and releases all resources associated with it.">Close()</a> to release all associated resources (or the virtual dtor of the <a class="el" href="class_assimp_1_1_i_o_stream.html" title="CPP-API: Class to handle file I/O for C++.">IOStream</a>).</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pFile</td><td>Path to the file </td></tr>
    <tr><td class="paramname">pMode</td><td>Desired file I/O mode. Required are: "wb", "w", "wt", "rb", "r", "rt".</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>New <a class="el" href="class_assimp_1_1_i_o_stream.html" title="CPP-API: Class to handle file I/O for C++.">IOStream</a> interface allowing the lib to access the underlying file. </dd></dl>
<dl class="section note"><dt>Note:</dt><dd>When implementing this class to provide custom IO handling, you probably have to supply an own implementation of <a class="el" href="class_assimp_1_1_i_o_stream.html" title="CPP-API: Class to handle file I/O for C++.">IOStream</a> as well. </dd></dl>

</div>
</div>
<a class="anchor" id="aef35fabc9bd49fb83bfd4f12a94083c3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ai_defines_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> <a class="el" href="class_assimp_1_1_i_o_stream.html">IOStream</a> * Assimp::IOSystem::Open </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pFile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>pMode</em> = <code>std::string(&quot;rb&quot;)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>For backward compatibility. </p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_assimp_1_1_i_o_system.html#ac512ece3b0701de5682553007a4c0816" title="Open a new file with a given path.">Open(const char*, const char*)</a> </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_o_system_8h.html">IOSystem.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>