Public Member Functions | |
virtual void | Close (IOStream *pFile)=0 |
Closes the given file and releases all resources associated with it. | |
bool | ComparePaths (const std::string &one, const std::string &second) const |
For backward compatibility. | |
virtual bool | ComparePaths (const char *one, const char *second) const |
Compares two paths and check whether the point to identical files. | |
virtual bool | Exists (const char *pFile) const =0 |
Tests for the existence of a file at the given path. | |
AI_FORCE_INLINE bool | Exists (const std::string &pFile) const |
For backward compatibility. | |
virtual char | getOsSeparator () const =0 |
Returns the system specific directory separator. | |
IOSystem () | |
Default constructor. | |
IOStream * | Open (const std::string &pFile, const std::string &pMode=std::string("rb")) |
For backward compatibility. | |
virtual IOStream * | Open (const char *pFile, const char *pMode="rb")=0 |
Open a new file with a given path. | |
virtual | ~IOSystem () |
Virtual destructor. |
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 IOStream.
AI_FORCE_INLINE Assimp::IOSystem::IOSystem | ( | ) |
Default constructor.
Create an instance of your derived class and assign it to an Assimp::Importer instance by calling Importer::SetIOHandler().
AI_FORCE_INLINE Assimp::IOSystem::~IOSystem | ( | ) | [virtual] |
Virtual destructor.
It is safe to be called from within DLL Assimp, we're constructed on Assimp's heap.
virtual void Assimp::IOSystem::Close | ( | IOStream * | pFile | ) | [pure virtual] |
Closes the given file and releases all resources associated with it.
pFile | The file instance previously created by Open(). |
bool Assimp::IOSystem::ComparePaths | ( | const std::string & | one, | |
const std::string & | second | |||
) | const [inline] |
For backward compatibility.
virtual bool Assimp::IOSystem::ComparePaths | ( | const char * | one, | |
const char * | second | |||
) | const [virtual] |
Compares two paths and check whether the point to identical files.
The dummy implementation of this virtual 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.
one | First file | |
second | Second file |
virtual bool Assimp::IOSystem::Exists | ( | const char * | pFile | ) | const [pure virtual] |
Tests for the existence of a file at the given path.
pFile | Path to the file |
AI_FORCE_INLINE bool Assimp::IOSystem::Exists | ( | const std::string & | pFile | ) | const |
For backward compatibility.
virtual char Assimp::IOSystem::getOsSeparator | ( | ) | const [pure virtual] |
Returns the system specific directory separator.
AI_FORCE_INLINE IOStream * Assimp::IOSystem::Open | ( | const std::string & | pFile, | |
const std::string & | pMode = std::string("rb") | |||
) | [inline] |
virtual IOStream* Assimp::IOSystem::Open | ( | const char * | pFile, | |
const char * | pMode = "rb" | |||
) | [pure virtual] |
Open a new file with a given path.
When the access to the file is finished, call Close() to release all associated resources (or the virtual dtor of the IOStream).
pFile | Path to the file | |
pMode | Desired file I/O mode. Required are: "wb", "w", "wt", "rb", "r", "rt". |