Browse Source

+ 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
aramis_acg 14 năm trước cách đây
mục cha
commit
6dea8f2ecd
1 tập tin đã thay đổi với 15 bổ sung0 xóa
  1. 15 0
      include/export.hpp

+ 15 - 0
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