- Redesign the C interface to allow per-import settings.

- Make C-API threadsafe even without boost (no longer a global importer <-> scene map).
- Cleanup headers.
- Change the way how Importer::pimpl is accessed - all users are no longer friends of Importer to avoid spoiling the public interface. Rather, pimpl is exposed via a public member function and anyone having the definition of ImporterPimpl can access it.

THIS IS A BREAKING API CHANGE for anyone using properties with the C API. It is, however, a huge step forward and finally makes our C API functionally equivalent to the C++ interface.

I hope we can adapt all ports as soon as possible. I'd be grateful if the respective maintainers could do this.

Documentation is not yet up to date.

All this is in anticipation to the upcoming 3.0 release, which I'm actively working on.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1111 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-01-13 14:07:58 +00:00
parent 20495de804
commit 3f369342d6
8 changed files with 208 additions and 170 deletions

View File

@@ -67,7 +67,7 @@ BaseProcess::~BaseProcess()
// ------------------------------------------------------------------------------------------------
void BaseProcess::ExecuteOnScene( Importer* pImp)
{
ai_assert(NULL != pImp && NULL != pImp->pimpl->mScene);
ai_assert(NULL != pImp && NULL != pImp->Pimpl()->mScene);
progress = pImp->GetProgressHandler();
ai_assert(progress);
@@ -77,17 +77,17 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
// catch exceptions thrown inside the PostProcess-Step
try
{
Execute(pImp->pimpl->mScene);
Execute(pImp->Pimpl()->mScene);
} catch( const std::exception& err ) {
// extract error description
pImp->pimpl->mErrorString = err.what();
DefaultLogger::get()->error(pImp->pimpl->mErrorString);
pImp->Pimpl()->mErrorString = err.what();
DefaultLogger::get()->error(pImp->Pimpl()->mErrorString);
// and kill the partially imported data
delete pImp->pimpl->mScene;
pImp->pimpl->mScene = NULL;
delete pImp->Pimpl()->mScene;
pImp->Pimpl()->mScene = NULL;
}
}