Removed direct STL dependency from the Assimp interface, should hopefully avoid problems with binary incompatible STLs. Some API changes, e.g. in the logger.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@321 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2009-01-23 21:06:43 +00:00
parent b5ab82922d
commit 03fcec7fe3
26 changed files with 542 additions and 289 deletions

View File

@@ -149,7 +149,7 @@ public:
{}
// -------------------------------------------------------------------
bool Exists( const std::string& pFile) const
bool Exists( const char* pFile) const
{
CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
IOStream* p = pip->Open(pFile);
@@ -161,17 +161,16 @@ public:
}
// -------------------------------------------------------------------
std::string getOsSeparator() const
char getOsSeparator() const
{
// FIXME
return "/";
return '/';
}
// -------------------------------------------------------------------
IOStream* Open(const std::string& pFile,
const std::string& pMode = std::string("rb"))
IOStream* Open(const char* pFile,const char* pMode = "rb")
{
aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile.c_str(),pMode.c_str());
aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,pMode);
if (!p)return NULL;
return new CIOStreamWrapper(p);
}
@@ -278,6 +277,7 @@ const char* aiGetErrorString()
{
return gLastErrorString.c_str();
}
// ------------------------------------------------------------------------------------------------
// Returns the error text of the last failed import process.
int aiIsExtensionSupported(const char* szExtension)
@@ -289,18 +289,18 @@ int aiIsExtensionSupported(const char* szExtension)
boost::mutex::scoped_lock lock(gMutex);
#endif
if (!gActiveImports.empty())
{
return (int)((*(gActiveImports.begin())).second->IsExtensionSupported(
std::string ( szExtension )));
if (!gActiveImports.empty()) {
return (int)((*(gActiveImports.begin())).second->IsExtensionSupported( szExtension ));
}
// need to create a temporary Importer instance.
// TODO: Find a better solution ...
Assimp::Importer* pcTemp = new Assimp::Importer();
int i = (int)pcTemp->IsExtensionSupported(std::string ( szExtension ));
int i = (int)pcTemp->IsExtensionSupported(std::string(szExtension));
delete pcTemp;
return i;
}
// ------------------------------------------------------------------------------------------------
// Get a list of all file extensions supported by ASSIMP
void aiGetExtensionList(aiString* szOut)
@@ -312,20 +312,18 @@ void aiGetExtensionList(aiString* szOut)
boost::mutex::scoped_lock lock(gMutex);
#endif
std::string szTemp;
if (!gActiveImports.empty())
{
(*(gActiveImports.begin())).second->GetExtensionList(szTemp);
szOut->Set ( szTemp );
(*(gActiveImports.begin())).second->GetExtensionList(*szOut);
return;
}
// need to create a temporary Importer instance.
// TODO: Find a better solution ...
Assimp::Importer* pcTemp = new Assimp::Importer();
pcTemp->GetExtensionList(szTemp);
szOut->Set ( szTemp );
pcTemp->GetExtensionList(*szOut);
delete pcTemp;
}
// ------------------------------------------------------------------------------------------------
void aiGetMemoryRequirements(const C_STRUCT aiScene* pIn,
C_STRUCT aiMemoryInfo* in)