![]() |
|
|||
File indexing completed on 2025-02-21 09:30:08
0001 /* 0002 Open Asset Import Library (assimp) 0003 ---------------------------------------------------------------------- 0004 0005 Copyright (c) 2006-2024, assimp team 0006 0007 All rights reserved. 0008 0009 Redistribution and use of this software in source and binary forms, 0010 with or without modification, are permitted provided that the 0011 following conditions are met: 0012 0013 * Redistributions of source code must retain the above 0014 copyright notice, this list of conditions and the 0015 following disclaimer. 0016 0017 * Redistributions in binary form must reproduce the above 0018 copyright notice, this list of conditions and the 0019 following disclaimer in the documentation and/or other 0020 materials provided with the distribution. 0021 0022 * Neither the name of the assimp team, nor the names of its 0023 contributors may be used to endorse or promote products 0024 derived from this software without specific prior 0025 written permission of the assimp team. 0026 0027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 0028 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 0029 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 0030 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 0031 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 0032 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 0033 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0034 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0035 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0036 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 0037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0038 0039 ---------------------------------------------------------------------- 0040 */ 0041 0042 /** 0043 * @file Default implementation of IOSystem using the standard C file functions 0044 */ 0045 #pragma once 0046 #ifndef AI_DEFAULTIOSYSTEM_H_INC 0047 #define AI_DEFAULTIOSYSTEM_H_INC 0048 0049 #ifdef __GNUC__ 0050 # pragma GCC system_header 0051 #endif 0052 0053 #include <assimp/IOSystem.hpp> 0054 0055 namespace Assimp { 0056 0057 // --------------------------------------------------------------------------- 0058 /** Default implementation of IOSystem using the standard C file functions */ 0059 class ASSIMP_API DefaultIOSystem : public IOSystem { 0060 public: 0061 // ------------------------------------------------------------------- 0062 /** Tests for the existence of a file at the given path. */ 0063 bool Exists( const char* pFile) const override; 0064 0065 // ------------------------------------------------------------------- 0066 /** Returns the directory separator. */ 0067 char getOsSeparator() const override; 0068 0069 // ------------------------------------------------------------------- 0070 /** Open a new file with a given path. */ 0071 IOStream* Open( const char* pFile, const char* pMode = "rb") override; 0072 0073 // ------------------------------------------------------------------- 0074 /** Closes the given file and releases all resources associated with it. */ 0075 void Close( IOStream* pFile) override; 0076 0077 // ------------------------------------------------------------------- 0078 /** Compare two paths */ 0079 bool ComparePaths (const char* one, const char* second) const override; 0080 0081 /** @brief get the file name of a full filepath 0082 * example: /tmp/archive.tar.gz -> archive.tar.gz 0083 */ 0084 static std::string fileName( const std::string &path ); 0085 0086 /** @brief get the complete base name of a full filepath 0087 * example: /tmp/archive.tar.gz -> archive.tar 0088 */ 0089 static std::string completeBaseName( const std::string &path); 0090 0091 /** @brief get the path of a full filepath 0092 * example: /tmp/archive.tar.gz -> /tmp/ 0093 */ 0094 static std::string absolutePath( const std::string &path); 0095 }; 0096 0097 } //!ns Assimp 0098 0099 #endif //AI_DEFAULTIOSYSTEM_H_INC
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |