- add mFileExtensions field to aiImporterDesc, BaseImporter::GetExtensionList is now longer virtual since this would be redundant.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1234 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-04-22 22:26:26 +00:00
parent 93c3723da5
commit 5a81b42ebe
81 changed files with 1681 additions and 1176 deletions

View File

@@ -105,6 +105,25 @@ void BaseImporter::SetupProperties(const Importer* /*pImp*/)
// the default implementation does nothing
}
// ------------------------------------------------------------------------------------------------
void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
{
const aiImporterDesc* desc = GetInfo();
ai_assert(desc != NULL);
const char* ext = desc->mFileExtensions;
ai_assert(ext != NULL);
const char* last = ext;
do {
if (!*ext || *ext == ' ') {
extensions.insert(std::string(last,ext-last));
last = ext+1;
}
}
while(*ext++);
}
// ------------------------------------------------------------------------------------------------
/*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler,
const std::string& pFile,