From 6dea8f2ecd418bafbdc8e8748a0646cf176eaae3 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 3 Apr 2011 10:36:20 +0000 Subject: [PATCH] + add transparent std::string overloads to Exporter API. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@928 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- include/export.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/export.hpp b/include/export.hpp index 083ec0538..fc12427d4 100644 --- a/include/export.hpp +++ b/include/export.hpp @@ -139,6 +139,7 @@ public: * a previous call to #ExportToBlob, it will be disposed. * Any IO handlers set via #SetIOHandler are ignored here.*/ const aiExportDataBlob* ExportToBlob( const aiScene* pScene, const char* pFormatId ); + inline const aiExportDataBlob* ExportToBlob( const aiScene* pScene, const std::string& pFormatId ); // ------------------------------------------------------------------- @@ -149,6 +150,7 @@ public: * @param pPath Full target file name. Target must be accessible. * @return AI_SUCCESS if everything was fine. */ aiReturn Export( const aiScene* pScene, const char* pFormatId, const char* pPath ); + inline aiReturn Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath ); @@ -188,6 +190,19 @@ protected: ExporterPimpl* pimpl; }; + +// ---------------------------------------------------------------------------------- +inline const aiExportDataBlob* Exporter :: ExportToBlob( const aiScene* pScene, const std::string& pFormatId ) +{ + return ExportToBlob(pScene,pFormatId.c_str()); +} + +// ---------------------------------------------------------------------------------- +inline aiReturn Exporter :: Export( const aiScene* pScene, const std::string& pFormatId, const std::string& pPath ) +{ + return Export(pScene,pFormatId.c_str(),pPath.c_str()); +} + } // namespace Assimp #endif // ASSIMP_BUILD_NO_EXPORT #endif // AI_EXPORT_HPP_INC