<!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"/> <meta name="generator" content="Doxygen 1.8.8"/> <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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="doxygen.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  <span id="projectnumber">v3.1.1 (June 2014)</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related 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 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><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('class_assimp_1_1_i_o_system.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="class_assimp_1_1_i_o_system-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">Assimp::IOSystem Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></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>Inherits AllocateFromAssimpHeap.</p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a8c334d60f04bceeb6bd0157d21723f3e"><td class="memItemLeft" align="right" valign="top">virtual void </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"> </td><td class="mdescRight">Closes the given file and releases all resources associated with it. <a href="#a8c334d60f04bceeb6bd0157d21723f3e">More...</a><br /></td></tr> <tr class="separator:a8c334d60f04bceeb6bd0157d21723f3e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a11349a65b353ed62f655c3dd802b9062"><td class="memItemLeft" align="right" valign="top">virtual bool </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"> </td><td class="mdescRight">Compares two paths and check whether the point to identical files. <a href="#a11349a65b353ed62f655c3dd802b9062">More...</a><br /></td></tr> <tr class="separator:a11349a65b353ed62f655c3dd802b9062"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a279d1d4b0b2aa37800e222aad508dff1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a279d1d4b0b2aa37800e222aad508dff1">ComparePaths</a> (const std::string &one, const std::string &second) const </td></tr> <tr class="memdesc:a279d1d4b0b2aa37800e222aad508dff1"><td class="mdescLeft"> </td><td class="mdescRight">For backward compatibility. <a href="#a279d1d4b0b2aa37800e222aad508dff1">More...</a><br /></td></tr> <tr class="separator:a279d1d4b0b2aa37800e222aad508dff1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7ae6cfaea4957408967463bfc3b84b27"><td class="memItemLeft" align="right" valign="top"><a class="el" href="defs_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#a7ae6cfaea4957408967463bfc3b84b27">Exists</a> (const std::string &pFile) const </td></tr> <tr class="memdesc:a7ae6cfaea4957408967463bfc3b84b27"><td class="mdescLeft"> </td><td class="mdescRight">For backward compatibility. <a href="#a7ae6cfaea4957408967463bfc3b84b27">More...</a><br /></td></tr> <tr class="separator:a7ae6cfaea4957408967463bfc3b84b27"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a79f5fe8d2dbe1056c9418f7de9a72445"><td class="memItemLeft" align="right" valign="top">virtual bool </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"> </td><td class="mdescRight">Tests for the existence of a file at the given path. <a href="#a79f5fe8d2dbe1056c9418f7de9a72445">More...</a><br /></td></tr> <tr class="separator:a79f5fe8d2dbe1056c9418f7de9a72445"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a40e412875b985bdb638f00ef0f20fff6"><td class="memItemLeft" align="right" valign="top">virtual char </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"> </td><td class="mdescRight">Returns the system specific directory separator. <a href="#a40e412875b985bdb638f00ef0f20fff6">More...</a><br /></td></tr> <tr class="separator:a40e412875b985bdb638f00ef0f20fff6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af8ba1ee2dc0686da8fc9e3dad49af801"><td class="memItemLeft" align="right" valign="top"> </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"> </td><td class="mdescRight">Default constructor. <a href="#af8ba1ee2dc0686da8fc9e3dad49af801">More...</a><br /></td></tr> <tr class="separator:af8ba1ee2dc0686da8fc9e3dad49af801"><td class="memSeparator" colspan="2"> </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> * </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="rb")=0</td></tr> <tr class="memdesc:ac512ece3b0701de5682553007a4c0816"><td class="mdescLeft"> </td><td class="mdescRight">Open a new file with a given path. <a href="#ac512ece3b0701de5682553007a4c0816">More...</a><br /></td></tr> <tr class="separator:ac512ece3b0701de5682553007a4c0816"><td class="memSeparator" colspan="2"> </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> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_assimp_1_1_i_o_system.html#aef35fabc9bd49fb83bfd4f12a94083c3">Open</a> (const std::string &pFile, const std::string &pMode=std::string("rb"))</td></tr> <tr class="memdesc:aef35fabc9bd49fb83bfd4f12a94083c3"><td class="mdescLeft"> </td><td class="mdescRight">For backward compatibility. <a href="#aef35fabc9bd49fb83bfd4f12a94083c3">More...</a><br /></td></tr> <tr class="separator:aef35fabc9bd49fb83bfd4f12a94083c3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a617417f1c5125770606fea3b41068b36"><td class="memItemLeft" align="right" valign="top">virtual </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"> </td><td class="mdescRight">Virtual destructor. <a href="#a617417f1c5125770606fea3b41068b36">More...</a><br /></td></tr> <tr class="separator:a617417f1c5125770606fea3b41068b36"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">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><h2 class="groupheader">Constructor & 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="defs_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="defs_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's CPP-API and all internal APIs. ">Assimp</a>, we're constructed on <a class="el" href="namespace_assimp.html" title="Assimp's CPP-API and all internal APIs. ">Assimp</a>'s heap. </p> </div> </div> <h2 class="groupheader">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> * </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 * </td> <td class="paramname"><em>one</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>second</em> </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 & </td> <td class="paramname"><em>one</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>second</em> </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="defs_8h.html#a61d239a320b58eca56bacc46fc2c79b8">AI_FORCE_INLINE</a> bool Assimp::IOSystem::Exists </td> <td>(</td> <td class="paramtype">const std::string & </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 * </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 * </td> <td class="paramname"><em>pFile</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>pMode</em> = <code>"rb"</code> </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="defs_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 & </td> <td class="paramname"><em>pFile</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>pMode</em> = <code>std::string("rb")</code> </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_8hpp.html">IOSystem.hpp</a></li> </ul> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <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> <li class="footer">Generated on Sat Oct 18 2014 15:01:15 for Assimp by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li> </ul> </div> </body> </html>