diff --git a/code/AMFImporter.cpp b/code/AMFImporter.cpp index 78f21814c..a038560fc 100644 --- a/code/AMFImporter.cpp +++ b/code/AMFImporter.cpp @@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AMFImporter_Macro.hpp" #include "fast_atof.h" -#include "DefaultIOSystem.h" +#include // Header files, stdlib. #include diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 6d3cfb0fe..60d0ef23e 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -93,6 +93,8 @@ SET( PUBLIC_HEADERS ${HEADER_PATH}/NullLogger.hpp ${HEADER_PATH}/cexport.h ${HEADER_PATH}/Exporter.hpp + ${HEADER_PATH}/DefaultIOStream.h + ${HEADER_PATH}/DefaultIOSystem.h ) SET( Core_SRCS @@ -125,9 +127,7 @@ SET( Common_SRCS ByteSwapper.h DefaultProgressHandler.h DefaultIOStream.cpp - DefaultIOStream.h DefaultIOSystem.cpp - DefaultIOSystem.h CInterfaceIOWrapper.cpp CInterfaceIOWrapper.h Hash.h diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 7f9540aa1..fad035358 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Bitmap.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" #include "StringUtils.h" #include "XMLTools.h" +#include #include #include #include diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 7c6aa74bb..c671545ca 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -54,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "fast_atof.h" #include "ParsingUtils.h" #include "SkeletonMeshBuilder.h" -#include "Defines.h" #include "CreateAnimMesh.h" #include "time.h" @@ -62,7 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "Defines.h" +#include using namespace Assimp; diff --git a/code/DefaultIOStream.cpp b/code/DefaultIOStream.cpp index ddb17881f..db1b6baf8 100644 --- a/code/DefaultIOStream.cpp +++ b/code/DefaultIOStream.cpp @@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include "DefaultIOStream.h" +#include #include #include diff --git a/code/DefaultIOSystem.cpp b/code/DefaultIOSystem.cpp index 8c44c8bd0..711476806 100644 --- a/code/DefaultIOSystem.cpp +++ b/code/DefaultIOSystem.cpp @@ -40,10 +40,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @file Default implementation of IOSystem using the standard C file functions */ -#include "DefaultIOSystem.h" -#include "DefaultIOStream.h" #include "StringComparison.h" +#include +#include #include #include #include diff --git a/code/DefaultLogger.cpp b/code/DefaultLogger.cpp index 5364bd8bc..106c51561 100644 --- a/code/DefaultLogger.cpp +++ b/code/DefaultLogger.cpp @@ -43,13 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Implementation of DefaultLogger (and Logger) */ -#include "DefaultIOSystem.h" // Default log streams #include "Win32DebugLogStream.h" #include "StdOStreamLogStream.h" #include "FileLogStream.h" #include "StringUtils.h" + +#include #include #include #include diff --git a/code/Exceptional.h b/code/Exceptional.h index 3268423ef..5109b8f07 100644 --- a/code/Exceptional.h +++ b/code/Exceptional.h @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_EXCEPTIONAL_H #include -#include "DefaultIOStream.h" +#include using std::runtime_error; #ifdef _MSC_VER diff --git a/code/Exporter.cpp b/code/Exporter.cpp index 3f77826e5..81178bbdb 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -52,7 +52,6 @@ Here we implement only the C++ interface (Assimp::Exporter). #ifndef ASSIMP_BUILD_NO_EXPORT -#include "DefaultIOSystem.h" #include "BlobIOSystem.h" #include "SceneCombiner.h" #include "BaseProcess.h" @@ -64,6 +63,8 @@ Here we implement only the C++ interface (Assimp::Exporter). #include "Exceptional.h" #include "ScenePrivate.h" #include + +#include #include #include #include @@ -235,7 +236,7 @@ bool Exporter::IsDefaultIOHandler() const { } // ------------------------------------------------------------------------------------------------ -const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, +const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, unsigned int, const ExportProperties* pProperties ) { if (pimpl->blob) { delete pimpl->blob; diff --git a/code/FileLogStream.h b/code/FileLogStream.h index 574a63ed6..ba08d2c89 100644 --- a/code/FileLogStream.h +++ b/code/FileLogStream.h @@ -3,7 +3,7 @@ #include #include -#include "DefaultIOSystem.h" +#include namespace Assimp { diff --git a/code/IFCBoolean.cpp b/code/IFCBoolean.cpp index d3b77d87c..98b230392 100644 --- a/code/IFCBoolean.cpp +++ b/code/IFCBoolean.cpp @@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "IFCUtil.h" #include "PolyTools.h" #include "ProcessHelper.h" -#include "Defines.h" +#include #include #include diff --git a/code/IFCUtil.cpp b/code/IFCUtil.cpp index 7caebbcd4..d7e4d5d54 100644 --- a/code/IFCUtil.cpp +++ b/code/IFCUtil.cpp @@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "IFCUtil.h" #include "PolyTools.h" #include "ProcessHelper.h" -#include "Defines.h" +#include namespace Assimp { namespace IFC { diff --git a/code/Importer.cpp b/code/Importer.cpp index d60dfb6b0..7d7b84292 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -65,8 +65,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "BaseProcess.h" -#include "DefaultIOStream.h" -#include "DefaultIOSystem.h" #include "DefaultProgressHandler.h" #include "GenericProperty.h" #include "ProcessHelper.h" @@ -81,6 +79,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include +#include + #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS # include "ValidateDataStructure.h" #endif diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp index 3425d7b09..64cebc7d5 100644 --- a/code/MDLMaterialLoader.cpp +++ b/code/MDLMaterialLoader.cpp @@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "qnan.h" -#include "Defines.h" using namespace Assimp; diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 9a5a56c5e..85d0d08af 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -41,12 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER -#include "DefaultIOSystem.h" #include "ObjFileImporter.h" #include "ObjFileParser.h" #include "ObjFileData.h" #include "IOStreamBuffer.h" #include +#include #include #include #include diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index 6980f0dab..41ae447ba 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -45,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ObjTools.h" #include "ObjFileData.h" #include "ParsingUtils.h" -#include "DefaultIOSystem.h" #include "BaseImporter.h" +#include #include #include #include @@ -58,7 +58,7 @@ const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME; // ------------------------------------------------------------------- // Constructor with loaded data and directories. -ObjFileParser::ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &modelName, +ObjFileParser::ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &modelName, IOSystem *io, ProgressHandler* progress, const std::string &originalObjFileName) : m_DataIt(), @@ -115,7 +115,7 @@ void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) { m_DataIt = buffer.begin(); m_DataItEnd = buffer.end(); - // Handle progress reporting + // Handle progress reporting const size_t filePos( streamBuffer.getFilePos() ); if ( lastFilePos < filePos ) { processed += static_cast(filePos); diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index a605e0f41..442d19458 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OPENGEX_IMPORTER #include "OpenGEXImporter.h" -#include "DefaultIOSystem.h" +#include #include #include "MakeVerboseFormat.h" #include "StringComparison.h" diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 198ecdd73..25ecb0017 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -40,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER -#include "DefaultIOSystem.h" #include "Q3BSPFileImporter.h" #include "Q3BSPZipArchive.h" #include "Q3BSPFileParser.h" @@ -56,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include #include "StringComparison.h" diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index 0dabaf87d..b32f15000 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -42,10 +42,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER #include "Q3BSPFileParser.h" -#include "DefaultIOSystem.h" #include "Q3BSPFileData.h" #include "Q3BSPZipArchive.h" #include +#include #include namespace Assimp { diff --git a/code/SceneCombiner.h b/code/SceneCombiner.h index a6ba06768..64c1ea48e 100644 --- a/code/SceneCombiner.h +++ b/code/SceneCombiner.h @@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include "Defines.h" +#include #include #include #include diff --git a/code/StandardShapes.cpp b/code/StandardShapes.cpp index eed8ddabc..26c84217a 100644 --- a/code/StandardShapes.cpp +++ b/code/StandardShapes.cpp @@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StandardShapes.h" #include "StringComparison.h" -#include "Defines.h" #include +#include #include namespace Assimp { diff --git a/code/StepExporter.cpp b/code/StepExporter.cpp index eb84ac594..aa7086cee 100644 --- a/code/StepExporter.cpp +++ b/code/StepExporter.cpp @@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" #include #include #include @@ -56,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include "Exceptional.h" +#include #include #include #include diff --git a/code/StreamReader.h b/code/StreamReader.h index 4ef42c1b3..698ba2b39 100644 --- a/code/StreamReader.h +++ b/code/StreamReader.h @@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Exceptional.h" #include #include -#include "Defines.h" +#include namespace Assimp { @@ -243,7 +243,7 @@ public: * * @param limit Maximum number of bytes to be read from * the beginning of the file. Specifying UINT_MAX - * resets the limit to the original end of the stream. + * resets the limit to the original end of the stream. * Returns the previously set limit. */ unsigned int SetReadLimit(unsigned int _limit) { unsigned int prev = GetReadLimit(); diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp index cbeaa4623..2bd9d7544 100644 --- a/code/X3DImporter.cpp +++ b/code/X3DImporter.cpp @@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StringUtils.h" // Header files, Assimp. -#include "DefaultIOSystem.h" +#include #include "fast_atof.h" // Header files, stdlib. diff --git a/code/X3DImporter_Networking.cpp b/code/X3DImporter_Networking.cpp index 4a75c9e66..d862cd7ef 100644 --- a/code/X3DImporter_Networking.cpp +++ b/code/X3DImporter_Networking.cpp @@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "X3DImporter_Macro.hpp" // Header files, Assimp. -#include "DefaultIOSystem.h" +#include namespace Assimp { diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index eeb5a1de1..30a0a21f8 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" +#include #include #include #include diff --git a/code/XFileHelper.h b/code/XFileHelper.h index 69f2a98f6..49a41d153 100644 --- a/code/XFileHelper.h +++ b/code/XFileHelper.h @@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "Defines.h" +#include namespace Assimp { diff --git a/code/XFileImporter.cpp b/code/XFileImporter.cpp index 3b149a18a..ca5956d94 100644 --- a/code/XFileImporter.cpp +++ b/code/XFileImporter.cpp @@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "XFileImporter.h" #include "XFileParser.h" -#include "Defines.h" #include "TinyFormatter.h" #include "ConvertToLHProcess.h" +#include #include #include #include diff --git a/code/glTFAsset.h b/code/glTFAsset.h index 2a0de7bf3..10453efa6 100644 --- a/code/glTFAsset.h +++ b/code/glTFAsset.h @@ -62,7 +62,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef ASSIMP_API # include -# include "DefaultIOSystem.h" +# include # include "ByteSwapper.h" #else # include diff --git a/code/glTFImporter.h b/code/glTFImporter.h index 5d06730a5..7edcc83f2 100644 --- a/code/glTFImporter.h +++ b/code/glTFImporter.h @@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_GLTFIMPORTER_H_INC #include "BaseImporter.h" -#include "DefaultIOSystem.h" +#include struct aiNode; diff --git a/code/DefaultIOStream.h b/include/assimp/DefaultIOStream.h similarity index 99% rename from code/DefaultIOStream.h rename to include/assimp/DefaultIOStream.h index 294c5b797..f4c9af85d 100644 --- a/code/DefaultIOStream.h +++ b/include/assimp/DefaultIOStream.h @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "Defines.h" +#include namespace Assimp { diff --git a/code/DefaultIOSystem.h b/include/assimp/DefaultIOSystem.h similarity index 98% rename from code/DefaultIOSystem.h rename to include/assimp/DefaultIOSystem.h index 49960a847..b4986b330 100644 --- a/code/DefaultIOSystem.h +++ b/include/assimp/DefaultIOSystem.h @@ -48,7 +48,7 @@ namespace Assimp { // --------------------------------------------------------------------------- /** Default implementation of IOSystem using the standard C file functions */ -class DefaultIOSystem : public IOSystem +class ASSIMP_API DefaultIOSystem : public IOSystem { public: /** Constructor. */ diff --git a/code/Defines.h b/include/assimp/Defines.h similarity index 100% rename from code/Defines.h rename to include/assimp/Defines.h diff --git a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h index 6f806f922..41d800487 100644 --- a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h +++ b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_ANDROIDJNIIOSYSTEM_H_INC #define AI_ANDROIDJNIIOSYSTEM_H_INC -#include "../code/DefaultIOSystem.h" +#include #include #include #include diff --git a/port/AndroidJNI/AndroidJNIIOSystem.cpp b/port/AndroidJNI/AndroidJNIIOSystem.cpp index f2becdcb0..e276ea59f 100644 --- a/port/AndroidJNI/AndroidJNIIOSystem.cpp +++ b/port/AndroidJNI/AndroidJNIIOSystem.cpp @@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include +#include #include using namespace Assimp; diff --git a/test/unit/TestIOStream.h b/test/unit/TestIOStream.h index a979caec8..3dbfc45e3 100644 --- a/test/unit/TestIOStream.h +++ b/test/unit/TestIOStream.h @@ -39,7 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once -#include "DefaultIOStream.h" +#include using namespace ::Assimp; diff --git a/test/unit/utImporter.cpp b/test/unit/utImporter.cpp index ac1f0194f..a2ba25ac2 100644 --- a/test/unit/utImporter.cpp +++ b/test/unit/utImporter.cpp @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include "TestIOSystem.h" -#include "DefaultIOSystem.h" +#include using namespace ::std; using namespace ::Assimp; @@ -53,12 +53,12 @@ using namespace ::Assimp; class ImporterTest : public ::testing::Test { public: - virtual void SetUp() { - pImp = new Importer(); + virtual void SetUp() { + pImp = new Importer(); } - - virtual void TearDown() { - delete pImp; + + virtual void TearDown() { + delete pImp; } protected: @@ -275,4 +275,4 @@ TEST_F(ImporterTest, testMultipleReads) TEST_F( ImporterTest, SearchFileHeaderForTokenTest ) { //DefaultIOSystem ioSystem; // BaseImporter::SearchFileHeaderForToken( &ioSystem, assetPath, Token, 2 ) -} \ No newline at end of file +}