Refactoring ... added documentation, simplified some parts of the code and migrated some class declarations in separate files.
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@100 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -39,9 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Implementation of the few default functions of the base importer class */
|
||||
/** @file Implementation of BaseImporter */
|
||||
#include "BaseImporter.h"
|
||||
#include "BaseProcess.h"
|
||||
|
||||
#include "../include/DefaultLogger.h"
|
||||
#include "../include/aiScene.h"
|
||||
@@ -68,7 +67,7 @@ BaseImporter::~BaseImporter()
|
||||
aiScene* BaseImporter::ReadFile( const std::string& pFile, IOSystem* pIOHandler)
|
||||
{
|
||||
// create a scene object to hold the data
|
||||
aiScene* scene = new aiScene;
|
||||
aiScene* scene = new aiScene();
|
||||
|
||||
// dispatch importing
|
||||
try
|
||||
@@ -93,26 +92,8 @@ aiScene* BaseImporter::ReadFile( const std::string& pFile, IOSystem* pIOHandler)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BaseProcess::ExecuteOnScene( Importer* pImp)
|
||||
void BaseImporter::SetupProperties(const Importer* pImp)
|
||||
{
|
||||
ai_assert(NULL != pImp && NULL != pImp->mScene);
|
||||
|
||||
// catch exceptions thrown inside the PostProcess-Step
|
||||
try
|
||||
{
|
||||
this->Execute(pImp->mScene);
|
||||
|
||||
} catch( ImportErrorException* exception)
|
||||
{
|
||||
// extract error description
|
||||
pImp->mErrorString = exception->GetErrorText();
|
||||
|
||||
DefaultLogger::get()->error(pImp->mErrorString);
|
||||
|
||||
delete exception;
|
||||
|
||||
// and kill the partially imported data
|
||||
delete pImp->mScene;
|
||||
pImp->mScene = NULL;
|
||||
}
|
||||
// the default implementation does nothing
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user