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

View File

@ -53,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp; using namespace Assimp;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Constructor. // Constructor.
DefaultIOSystem::DefaultIOSystem() DefaultIOSystem::DefaultIOSystem()
@ -70,9 +69,9 @@ DefaultIOSystem::~DefaultIOSystem()
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Tests for the existence of a file at the given path. // Tests for the existence of a file at the given path.
bool DefaultIOSystem::Exists( const std::string& pFile) const bool DefaultIOSystem::Exists( const char* pFile) const
{ {
FILE* file = ::fopen( pFile.c_str(), "rb"); FILE* file = ::fopen( pFile, "rb");
if( !file) if( !file)
return false; return false;
@ -82,13 +81,16 @@ bool DefaultIOSystem::Exists( const std::string& pFile) const
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Open a new file with a given path. // Open a new file with a given path.
IOStream* DefaultIOSystem::Open( const std::string& strFile, const std::string& strMode) IOStream* DefaultIOSystem::Open( const char* strFile, const char* strMode)
{ {
FILE* file = ::fopen( strFile.c_str(), strMode.c_str()); ai_assert(NULL != strFile);
ai_assert(NULL != strMode);
FILE* file = ::fopen( strFile, strMode);
if( NULL == file) if( NULL == file)
return NULL; return NULL;
return new DefaultIOStream( file, strFile); return new DefaultIOStream(file, (std::string) strFile);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -100,20 +102,18 @@ void DefaultIOSystem::Close( IOStream* pFile)
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Returns the operation specific directory separator // Returns the operation specific directory separator
std::string DefaultIOSystem::getOsSeparator() const char DefaultIOSystem::getOsSeparator() const
{ {
#ifndef _WIN32 #ifndef _WIN32
std::string sep = "/"; return '/';
#else #else
std::string sep = "\\"; return '\\';
#endif #endif
return sep;
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// IOSystem default implementation (ComparePaths isn't a pure virtual function) // IOSystem default implementation (ComparePaths isn't a pure virtual function)
bool IOSystem::ComparePaths (const std::string& one, bool IOSystem::ComparePaths (const char* one, const char* second) const
const std::string& second)
{ {
return !ASSIMP_stricmp(one,second); return !ASSIMP_stricmp(one,second);
} }
@ -123,20 +123,19 @@ bool IOSystem::ComparePaths (const std::string& one,
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Convert a relative path into an absolute path // Convert a relative path into an absolute path
inline void MakeAbsolutePath (const std::string& in, char* _out) inline void MakeAbsolutePath (const char* in, char* _out)
{ {
#ifdef _WIN32 #ifdef _WIN32
::_fullpath(_out, in.c_str(),PATHLIMIT); ::_fullpath(_out, in,PATHLIMIT);
#else #else
// use realpath // use realpath
realpath(in.c_str(), _out); realpath(in, _out);
#endif #endif
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// DefaultIOSystem's more specialized implementation // DefaultIOSystem's more specialized implementation
bool DefaultIOSystem::ComparePaths (const std::string& one, bool DefaultIOSystem::ComparePaths (const char* one, const char* second) const
const std::string& second)
{ {
// chances are quite good both paths are formatted identically, // chances are quite good both paths are formatted identically,
// so we can hopefully return here already // so we can hopefully return here already

View File

@ -44,8 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/IOSystem.h" #include "../include/IOSystem.h"
namespace Assimp namespace Assimp {
{
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** Default implementation of IOSystem using the standard C file functions */ /** Default implementation of IOSystem using the standard C file functions */
@ -60,15 +59,15 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Tests for the existence of a file at the given path. */ /** Tests for the existence of a file at the given path. */
bool Exists( const std::string& pFile) const; bool Exists( const char* pFile) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Returns the directory separator. */ /** Returns the directory separator. */
std::string getOsSeparator() const; char getOsSeparator() const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Open a new file with a given path. */ /** Open a new file with a given path. */
IOStream* Open( const std::string& pFile, const std::string& pMode = std::string("rb")); IOStream* Open( const char* pFile, const char* pMode = "rb");
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Closes the given file and releases all resources associated with it. */ /** Closes the given file and releases all resources associated with it. */
@ -76,7 +75,7 @@ public:
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** Compare two paths */ /** Compare two paths */
bool ComparePaths (const std::string& one, const std::string& second); bool ComparePaths (const char* one, const char* second) const;
}; };
} //!ns Assimp } //!ns Assimp

View File

@ -39,6 +39,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
*/ */
/** @file DefaultLogger.cpp
* @brief Implementation of DefaultLogger (and Logger)
*/
#include "AssimpPCH.h" #include "AssimpPCH.h"
#include "DefaultIOSystem.h" #include "DefaultIOSystem.h"
@ -54,7 +58,7 @@ NullLogger DefaultLogger::s_pNullLogger;
Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger; Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// // Represents a logstream + its error severity
struct LogStreamInfo struct LogStreamInfo
{ {
unsigned int m_uiErrorSeverity; unsigned int m_uiErrorSeverity;
@ -78,7 +82,7 @@ struct LogStreamInfo
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Construct a default log stream // Construct a default log stream
LogStream* LogStream::createDefaultStream(DefaultLogStreams streams, LogStream* LogStream::createDefaultStream(DefaultLogStreams streams,
const std::string& name /*= "AssimpLog.txt"*/, const char* name /*= "AssimpLog.txt"*/,
IOSystem* io /*= NULL*/) IOSystem* io /*= NULL*/)
{ {
switch (streams) switch (streams)
@ -97,7 +101,7 @@ LogStream* LogStream::createDefaultStream(DefaultLogStreams streams,
case DLS_COUT: case DLS_COUT:
return new StdOStreamLogStream(std::cout); return new StdOStreamLogStream(std::cout);
case DLS_FILE: case DLS_FILE:
return (name.size() ? new FileLogStream(name,io) : NULL); return (name && *name ? new FileLogStream(name,io) : NULL);
default: default:
// We don't know this default log stream, so raise an assertion // We don't know this default log stream, so raise an assertion
ai_assert(false); ai_assert(false);
@ -110,7 +114,7 @@ LogStream* LogStream::createDefaultStream(DefaultLogStreams streams,
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Creates the only singleton instance // Creates the only singleton instance
Logger *DefaultLogger::create(const std::string &name /*= "AssimpLog.txt"*/, Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
LogSeverity severity /*= NORMAL*/, LogSeverity severity /*= NORMAL*/,
unsigned int defStreams /*= DLS_DEBUGGER | DLS_FILE*/, unsigned int defStreams /*= DLS_DEBUGGER | DLS_FILE*/,
IOSystem* io /*= NULL*/) IOSystem* io /*= NULL*/)
@ -134,12 +138,36 @@ Logger *DefaultLogger::create(const std::string &name /*= "AssimpLog.txt"*/,
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_CERR)); m_pLogger->attachStream( LogStream::createDefaultStream(DLS_CERR));
// Stream the log to a file // Stream the log to a file
if (defStreams & DLS_FILE && !name.empty()) if (defStreams & DLS_FILE && name && *name)
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_FILE,name,io)); m_pLogger->attachStream( LogStream::createDefaultStream(DLS_FILE,name,io));
return m_pLogger; return m_pLogger;
} }
// ----------------------------------------------------------------------------------
void Logger::debug(const std::string &message) {
ai_assert(message.length()<=Logger::MAX_LOG_MESSAGE_LENGTH);
return OnDebug(message.c_str());
}
// ----------------------------------------------------------------------------------
void Logger::info(const std::string &message) {
ai_assert(message.length()<=Logger::MAX_LOG_MESSAGE_LENGTH);
return OnInfo(message.c_str());
}
// ----------------------------------------------------------------------------------
void Logger::warn(const std::string &message) {
ai_assert(message.length()<=Logger::MAX_LOG_MESSAGE_LENGTH);
return OnWarn(message.c_str());
}
// ----------------------------------------------------------------------------------
void Logger::error(const std::string &message) {
ai_assert(message.length()<=Logger::MAX_LOG_MESSAGE_LENGTH);
return OnError(message.c_str());
}
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
void DefaultLogger::set( Logger *logger ) void DefaultLogger::set( Logger *logger )
{ {
@ -174,37 +202,45 @@ void DefaultLogger::kill()
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Debug message // Debug message
void DefaultLogger::debug( const std::string &message ) void DefaultLogger::OnDebug( const char* message )
{ {
if ( m_Severity == Logger::NORMAL ) if ( m_Severity == Logger::NORMAL )
return; return;
const std::string msg( "Debug, T" + getThreadID() + ": " + message ); char msg[MAX_LOG_MESSAGE_LENGTH*2];
writeToStreams( msg, Logger::DEBUGGING ); ::sprintf(msg,"Debug, T%i: %s", GetThreadID(), message );
WriteToStreams( msg, Logger::DEBUGGING );
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Logs an info // Logs an info
void DefaultLogger::info( const std::string &message ) void DefaultLogger::OnInfo( const char* message )
{ {
const std::string msg( "Info, T" + getThreadID() + ": " + message ); char msg[MAX_LOG_MESSAGE_LENGTH*2];
writeToStreams( msg , Logger::INFO ); ::sprintf(msg,"Info, T%i: %s", GetThreadID(), message );
WriteToStreams( msg , Logger::INFO );
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Logs a warning // Logs a warning
void DefaultLogger::warn( const std::string &message ) void DefaultLogger::OnWarn( const char* message )
{ {
const std::string msg( "Warn, T" + getThreadID() + ": "+ message ); char msg[MAX_LOG_MESSAGE_LENGTH*2];
writeToStreams( msg, Logger::WARN ); ::sprintf(msg,"Warn, T%i: %s", GetThreadID(), message );
WriteToStreams( msg, Logger::WARN );
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Logs an error // Logs an error
void DefaultLogger::error( const std::string &message ) void DefaultLogger::OnError( const char* message )
{ {
const std::string msg( "Error, T"+ getThreadID() + ": " + message ); char msg[MAX_LOG_MESSAGE_LENGTH*2];
writeToStreams( msg, Logger::ERR ); ::sprintf(msg,"Error, T%i: %s", GetThreadID(), message );
WriteToStreams( msg, Logger::ERR );
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
@ -289,57 +325,50 @@ DefaultLogger::~DefaultLogger()
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Writes message to stream // Writes message to stream
void DefaultLogger::writeToStreams(const std::string &message, void DefaultLogger::WriteToStreams(const char *message,
ErrorSeverity ErrorSev ) ErrorSeverity ErrorSev )
{ {
if ( message.empty() ) ai_assert(NULL != message);
return;
std::string s;
// Check whether this is a repeated message // Check whether this is a repeated message
if (message == lastMsg) if (! ::strncmp( message,lastMsg, lastLen-1))
{ {
if (!noRepeatMsg) if (!noRepeatMsg)
{ {
noRepeatMsg = true; noRepeatMsg = true;
s = "Skipping one or more lines with the same contents\n"; message = "Skipping one or more lines with the same contents\n";
} }
else return; else return;
} }
else else
{ {
lastMsg = s = message; // append a new-line character to the message to be printed
noRepeatMsg = false; lastLen = ::strlen(message);
::memcpy(lastMsg,message,lastLen+1);
::strcat(lastMsg+lastLen,"\n");
s.append("\n"); message = lastMsg;
noRepeatMsg = false;
++lastLen;
} }
for ( ConstStreamIt it = m_StreamArray.begin(); for ( ConstStreamIt it = m_StreamArray.begin();
it != m_StreamArray.end(); it != m_StreamArray.end();
++it) ++it)
{ {
if ( ErrorSev & (*it)->m_uiErrorSeverity ) if ( ErrorSev & (*it)->m_uiErrorSeverity )
(*it)->m_pStream->write( s); (*it)->m_pStream->write( message);
} }
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Returns thread id, if not supported only a zero will be returned. // Returns thread id, if not supported only a zero will be returned.
std::string DefaultLogger::getThreadID() unsigned int DefaultLogger::GetThreadID()
{ {
std::string thread_id( "0" ); // fixme: we can get this value via boost::threads
#ifdef WIN32 #ifdef WIN32
HANDLE hThread = ::GetCurrentThread(); return (unsigned int)::GetCurrentThreadId();
if ( hThread )
{
std::stringstream thread_msg;
thread_msg << ::GetCurrentThreadId() /*<< " "*/;
return thread_msg.str();
}
else
return thread_id;
#else #else
return thread_id; return 0; // not supported
#endif #endif
} }

View File

@ -6,7 +6,6 @@
namespace Assimp { namespace Assimp {
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
/** @class FileLogStream /** @class FileLogStream
* @brief Logstream to write into a file. * @brief Logstream to write into a file.
@ -15,32 +14,29 @@ class FileLogStream :
public LogStream public LogStream
{ {
public: public:
FileLogStream( const std::string &strFileName, IOSystem* io = NULL ); FileLogStream( const char* file, IOSystem* io = NULL );
~FileLogStream(); ~FileLogStream();
void write( const std::string &message ); void write( const char* message );
private: private:
IOStream *m_pStream; IOStream *m_pStream;
}; };
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Constructor // Constructor
inline FileLogStream::FileLogStream( const std::string &strFileName, IOSystem* io ) : inline FileLogStream::FileLogStream( const char* file, IOSystem* io ) :
m_pStream(NULL) m_pStream(NULL)
{ {
if ( strFileName.empty() ) if ( !file || 0 == *file )
return; return;
const static std::string mode = "wt";
// If no IOSystem is specified: take a default one // If no IOSystem is specified: take a default one
if (!io) if (!io)
{ {
DefaultIOSystem FileSystem; DefaultIOSystem FileSystem;
m_pStream = FileSystem.Open( strFileName, mode ); m_pStream = FileSystem.Open( file, "wt");
} }
else m_pStream = io->Open( strFileName, mode ); else m_pStream = io->Open( file, "wt" );
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
@ -51,21 +47,18 @@ inline FileLogStream::~FileLogStream()
delete m_pStream; delete m_pStream;
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
// Write method // Write method
inline void FileLogStream::write( const std::string &message ) inline void FileLogStream::write( const char* message )
{ {
if (m_pStream != NULL) if (m_pStream != NULL)
{ {
m_pStream->Write(message.c_str(), sizeof(char), message.size()); m_pStream->Write(message, sizeof(char), ::strlen(message));
m_pStream->Flush(); m_pStream->Flush();
} }
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------
} // !Namespace Assimp } // !Namespace Assimp
#endif // !! ASSIMP_FILELOGSTREAM_H_INC #endif // !! ASSIMP_FILELOGSTREAM_H_INC

View File

@ -569,13 +569,45 @@ void Importer::FreeScene( )
mScene = NULL; mScene = NULL;
} }
// ------------------------------------------------------------------------------------------------
// Get the current error string, if any
const std::string& Importer::GetErrorString() const
{
return mErrorString;
}
// ------------------------------------------------------------------------------------------------
// Enable extra-verbose mode
void Importer::SetExtraVerbose(bool bDo)
{
bExtraVerbose = bDo;
}
// ------------------------------------------------------------------------------------------------
// Get the current scene
const aiScene* Importer::GetScene() const
{
return mScene;
}
// ------------------------------------------------------------------------------------------------
// Orphan the current scene
aiScene* Importer::GetOrphanedScene()
{
aiScene* s = mScene;
mScene = NULL;
return s;
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Reads the given file and returns its contents if successful. // Reads the given file and returns its contents if successful.
const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags) const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
{ {
// Validate the flags // Validate the flags
ai_assert(ValidateFlags(pFlags)); ai_assert(ValidateFlags(pFlags));
const std::string pFile(_pFile);
// ====================================================================== // ======================================================================
// Put a large try block around everything to catch all std::exception's // Put a large try block around everything to catch all std::exception's
// that might be thrown by STL containers or by new(). // that might be thrown by STL containers or by new().
@ -701,17 +733,18 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Helper function to check whether an extension is supported by ASSIMP // Helper function to check whether an extension is supported by ASSIMP
bool Importer::IsExtensionSupported(const std::string& szExtension) bool Importer::IsExtensionSupported(const char* szExtension)
{ {
return NULL != FindLoader(szExtension); return NULL != FindLoader(szExtension);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
BaseImporter* Importer::FindLoader (const std::string& szExtension) BaseImporter* Importer::FindLoader (const char* _szExtension)
{ {
const std::string szExtension(_szExtension);
for (std::vector<BaseImporter*>::const_iterator for (std::vector<BaseImporter*>::const_iterator
i = this->mImporter.begin(); i = mImporter.begin();
i != this->mImporter.end();++i) i != mImporter.end();++i)
{ {
// pass the file extension to the CanRead(..,NULL)-method // pass the file extension to the CanRead(..,NULL)-method
if ((*i)->CanRead(szExtension,NULL))return *i; if ((*i)->CanRead(szExtension,NULL))return *i;
@ -721,19 +754,21 @@ BaseImporter* Importer::FindLoader (const std::string& szExtension)
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Helper function to build a list of all file extensions supported by ASSIMP // Helper function to build a list of all file extensions supported by ASSIMP
void Importer::GetExtensionList(std::string& szOut) void Importer::GetExtensionList(aiString& szOut)
{ {
unsigned int iNum = 0; unsigned int iNum = 0;
std::string tmp; // todo: Rewrite baseImporter::GetExtensionList to use aiString, too
for (std::vector<BaseImporter*>::const_iterator for (std::vector<BaseImporter*>::const_iterator
i = this->mImporter.begin(); i = mImporter.begin();
i != this->mImporter.end();++i,++iNum) i != mImporter.end();++i,++iNum)
{ {
// insert a comma as delimiter character // insert a comma as delimiter character
if (0 != iNum) if (0 != iNum)
szOut.append(";"); tmp.append(";");
(*i)->GetExtensionList(szOut); (*i)->GetExtensionList(tmp);
} }
szOut.Set(tmp);
return; return;
} }

View File

@ -437,11 +437,15 @@ void ObjFileParser::getMaterialLib()
while (!isNewLine(*m_DataIt)) while (!isNewLine(*m_DataIt))
m_DataIt++; m_DataIt++;
// TODO: fix path construction
// CLEANUP ... who is resposible for *two* identical DefaultIOSystems
// where the IOSystem passed to ReadFile() should be used???
// Check for existence // Check for existence
DefaultIOSystem IOSystem; DefaultIOSystem IOSystem;
std::string strMatName(pStart, &(*m_DataIt)); std::string strMatName(pStart, &(*m_DataIt));
std::string absName = m_strAbsPath + IOSystem.getOsSeparator() + strMatName; std::string absName = m_strAbsPath + IOSystem.getOsSeparator() + strMatName;
if ( !IOSystem.Exists(absName) ) if ( !IOSystem.Exists( absName.c_str()) )
{ {
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
return; return;
@ -454,7 +458,7 @@ void ObjFileParser::getMaterialLib()
// Load the material library // Load the material library
DefaultIOSystem FileSystem; DefaultIOSystem FileSystem;
IOStream *pFile = FileSystem.Open(absName); IOStream *pFile = FileSystem.Open(absName.c_str());
if (0L != pFile) if (0L != pFile)
{ {
// Import material library data from file // Import material library data from file

View File

@ -22,7 +22,7 @@ public:
~StdOStreamLogStream(); ~StdOStreamLogStream();
/** @brief Writer */ /** @brief Writer */
void write(const std::string &messgae); void write(const char* message);
private: private:
std::ostream& ostream; std::ostream& ostream;
}; };
@ -40,9 +40,9 @@ inline StdOStreamLogStream::~StdOStreamLogStream()
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Write method // Write method
inline void StdOStreamLogStream::write(const std::string &message) inline void StdOStreamLogStream::write(const char* message)
{ {
ostream << message.c_str(); ostream << message;
ostream.flush(); ostream.flush();
} }

View File

@ -308,7 +308,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
void ValidateDSProcess::Validate( const aiLight* pLight) void ValidateDSProcess::Validate( const aiLight* pLight)
{ {
if (pLight->mType == aiLightSource_UNDEFINED) if (pLight->mType == aiLightSource_UNDEFINED)
ReportError("aiLight::mType is aiLightSource_UNDEFINED"); ReportWarning("aiLight::mType is aiLightSource_UNDEFINED");
if (!pLight->mAttenuationConstant && if (!pLight->mAttenuationConstant &&
!pLight->mAttenuationLinear && !pLight->mAttenuationLinear &&
@ -334,7 +334,7 @@ void ValidateDSProcess::Validate( const aiCamera* pCamera)
ReportError("aiCamera::mClipPlaneFar must be >= aiCamera::mClipPlaneNear"); ReportError("aiCamera::mClipPlaneFar must be >= aiCamera::mClipPlaneNear");
if (!pCamera->mHorizontalFOV || pCamera->mHorizontalFOV >= (float)AI_MATH_PI) if (!pCamera->mHorizontalFOV || pCamera->mHorizontalFOV >= (float)AI_MATH_PI)
ReportError("%f is not a valid value for aiCamera::mHorizontalFOV",pCamera->mHorizontalFOV); ReportWarning("%f is not a valid value for aiCamera::mHorizontalFOV",pCamera->mHorizontalFOV);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -23,7 +23,7 @@ public:
~Win32DebugLogStream(); ~Win32DebugLogStream();
/** @brief Writer */ /** @brief Writer */
void write(const std::string &messgae); void write(const char* messgae);
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -38,9 +38,9 @@ inline Win32DebugLogStream::~Win32DebugLogStream()
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Write method // Write method
inline void Win32DebugLogStream::write(const std::string &message) inline void Win32DebugLogStream::write(const char* message)
{ {
OutputDebugString( message.c_str() ); OutputDebugString( message);
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@ -653,11 +653,11 @@
</FileConfiguration> </FileConfiguration>
</File> </File>
<File <File
RelativePath="..\..\include\cppunit\TextTestRunner.h" RelativePath="..\..\include\cppunit\ui\text\TextTestRunner.h"
> >
</File> </File>
<File <File
RelativePath="..\..\include\cppunit\ui\text\TextTestRunner.h" RelativePath="..\..\include\cppunit\TextTestRunner.h"
> >
</File> </File>
</Filter> </Filter>
@ -2694,11 +2694,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\include\cppunit\Makefile.am" RelativePath="Makefile.am"
> >
</File> </File>
<File <File
RelativePath="Makefile.am" RelativePath="..\..\include\cppunit\Makefile.am"
> >
</File> </File>
</Files> </Files>

View File

@ -54,11 +54,14 @@ namespace Assimp {
class IOStream; class IOStream;
struct LogStreamInfo; struct LogStreamInfo;
//! Default log file
#define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt"
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
/** @class DefaultLogger /** @class DefaultLogger
* @brief Default logging implementation. The logger writes into a file. * @brief Default logging implementation.
* The name can be set by creating the logger. If no filename was specified *
* the logger will use the standard out and error streams. * todo .... move static stuff to Logger where it belongs to.
*/ */
class ASSIMP_API DefaultLogger : class ASSIMP_API DefaultLogger :
public Logger public Logger
@ -78,7 +81,7 @@ public:
* *
* This replaces the default NullLogger with a DefaultLogger instance. * This replaces the default NullLogger with a DefaultLogger instance.
*/ */
static Logger *create(const std::string &name = "AssimpLog.txt", static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME,
LogSeverity severity = NORMAL, LogSeverity severity = NORMAL,
unsigned int defStreams = DLS_DEBUGGER | DLS_FILE, unsigned int defStreams = DLS_DEBUGGER | DLS_FILE,
IOSystem* io = NULL); IOSystem* io = NULL);
@ -110,31 +113,32 @@ public:
static void kill(); static void kill();
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
void debug(const std::string &message);
/** @brief Logs an info message */
void info(const std::string &message);
/** @brief Logs a warning message */
void warn(const std::string &message);
/** @brief Logs an error message */
void error(const std::string &message);
/** @brief Severity setter */ /** @brief Severity setter */
void setLogSeverity(LogSeverity log_severity); /* override */ void setLogSeverity(LogSeverity log_severity);
/** @brief Attach a stream to the logger. */ /** @brief Attach a stream to the logger. */
void attachStream(LogStream *pStream, unsigned int severity); /* override */ void attachStream(LogStream *pStream,
unsigned int severity);
/** @brief Detach a still attached stream from logger */ /** @brief Detach a still attached stream from logger */
void detatchStream(LogStream *pStream, unsigned int severity); /* override */ void detatchStream(LogStream *pStream,
unsigned int severity);
private: private:
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
/* override */ void OnDebug(const char* message);
/** @brief Logs an info message */
/* override */ void OnInfo(const char* message);
/** @brief Logs a warning message */
/* override */ void OnWarn(const char* message);
/** @brief Logs an error message */
/* override */ void OnError(const char* message);
/** @brief Private construction for internal use by create(). /** @brief Private construction for internal use by create().
* @param severity Logging granularity * @param severity Logging granularity
*/ */
@ -144,12 +148,12 @@ private:
~DefaultLogger(); ~DefaultLogger();
/** @brief Writes a message to all streams */ /** @brief Writes a message to all streams */
void writeToStreams(const std::string &message, ErrorSeverity ErrorSev ); void WriteToStreams(const char* message, ErrorSeverity ErrorSev );
/** @brief Returns the thread id. /** @brief Returns the thread id.
* @remark This is an OS specific feature, if not supported, a zero will be returned. * @remark This is an OS specific feature, if not supported, a zero will be returned.
*/ */
std::string getThreadID(); unsigned int GetThreadID();
private: private:
// Aliases for stream container // Aliases for stream container
@ -167,7 +171,8 @@ private:
StreamArray m_StreamArray; StreamArray m_StreamArray;
bool noRepeatMsg; bool noRepeatMsg;
std::string lastMsg; char lastMsg[MAX_LOG_MESSAGE_LENGTH*2];
size_t lastLen;
}; };
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ namespace Assimp {
* to the Importer. If you implement this interface, be sure to also provide an * to the Importer. If you implement this interface, be sure to also provide an
* implementation for IOSystem that creates instances of your custom IO class. * implementation for IOSystem that creates instances of your custom IO class.
*/ */
class ASSIMP_API IOStream class ASSIMP_API IOStream : public Intern::AllocateFromAssimpHeap
{ {
protected: protected:
/** Constructor protected, use IOSystem::Open() to create an instance. */ /** Constructor protected, use IOSystem::Open() to create an instance. */

View File

@ -52,10 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
corresponding C interface. corresponding C interface.
#endif #endif
#include "aiTypes.h" #include "aiTypes.h"
namespace Assimp { namespace Assimp {
class IOStream; class IOStream;
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -65,37 +63,61 @@ class IOStream;
* Derive an own implementation from this interface to supply custom file handling * Derive an own implementation from this interface to supply custom file handling
* to the importer library. If you implement this interface, you also want to * to the importer library. If you implement this interface, you also want to
* supply a custom implementation for IOStream. * supply a custom implementation for IOStream.
*
* @see Importer::SetIOHandler()
*/ */
class ASSIMP_API IOSystem class ASSIMP_API IOSystem : public Intern::AllocateFromAssimpHeap
{ {
public: public:
/** @brief Constructor. Create an instance of your derived class and
* assign it to an #Assimp::Importer instance by calling Importer::SetIOHandler(). // -------------------------------------------------------------------
/** @brief Default constructor.
*
* Create an instance of your derived class and assign it to an
* #Assimp::Importer instance by calling Importer::SetIOHandler().
*/ */
IOSystem(); IOSystem();
/** Destructor. */ // -------------------------------------------------------------------
/** @brief Virtual destructor.
*
* It is safe to be called from within DLL Assimp, we're constructed
* on Assimp's heap.
*/
virtual ~IOSystem(); virtual ~IOSystem();
public:
// -------------------------------------------------------------------
/** @brief For backward compatibility
* @see Exists(const char*)
*/
AI_FORCE_INLINE bool Exists( const std::string& pFile) const;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Tests for the existence of a file at the given path. /** @brief Tests for the existence of a file at the given path.
* *
* @param pFile Path to the file * @param pFile Path to the file
* @return true if there is a file with this path, else false. * @return true if there is a file with this path, else false.
*/ */
virtual bool Exists( const std::string& pFile) const = 0;
virtual bool Exists( const char* pFile) const = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Returns the system specific directory separator /** @brief Returns the system specific directory separator
* @return System specific directory separator * @return System specific directory separator
*/ */
virtual std::string getOsSeparator() const = 0; virtual char getOsSeparator() const = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Open a new file with a given path. /** @brief Open a new file with a given path.
* *
* When the access to the file is finished, call Close() to release * When the access to the file is finished, call Close() to release
* all associated resources. * all associated resources (or the virtual dtor of the IOStream).
* *
* @param pFile Path to the file * @param pFile Path to the file
* @param pMode Desired file I/O mode. Required are: "wb", "w", "wt", * @param pMode Desired file I/O mode. Required are: "wb", "w", "wt",
@ -106,16 +128,25 @@ public:
* @note When implementing this class to provide custom IO handling, * @note When implementing this class to provide custom IO handling,
* you probably have to supply an own implementation of IOStream as well. * you probably have to supply an own implementation of IOStream as well.
*/ */
virtual IOStream* Open(const std::string& pFile, virtual IOStream* Open(const char* pFile,
const std::string& pMode = std::string("rb")) = 0; const char* pMode = "rb") = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Closes the given file and releases all resources associated with it. /** @brief For backward compatibility
* @see Open(const char*, const char*)
*/
inline IOStream* Open(const std::string& pFile,
const std::string& pMode = std::string("rb"));
// -------------------------------------------------------------------
/** @brief Closes the given file and releases all resources
* associated with it.
* @param pFile The file instance previously created by Open(). * @param pFile The file instance previously created by Open().
*/ */
virtual void Close( IOStream* pFile) = 0; virtual void Close( IOStream* pFile) = 0;
// ------------------------------------------------------------------- // -------------------------------------------------------------------
/** @brief Compares two paths and check whether the point to /** @brief Compares two paths and check whether the point to
* identical files. * identical files.
@ -129,24 +160,65 @@ public:
* @return true if the paths point to the same file. The file needn't * @return true if the paths point to the same file. The file needn't
* be existing, however. * be existing, however.
*/ */
virtual bool ComparePaths (const std::string& one, virtual bool ComparePaths (const char* one,
const std::string& second); const char* second) const;
// -------------------------------------------------------------------
/** @brief For backward compatibility
* @see ComparePaths(const char*, const char*)
*/
inline bool ComparePaths (const std::string& one,
const std::string& second) const;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
inline IOSystem::IOSystem() AI_FORCE_INLINE IOSystem::IOSystem()
{ {
// empty // empty
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
inline IOSystem::~IOSystem() AI_FORCE_INLINE IOSystem::~IOSystem()
{ {
// empty // empty
} }
// ----------------------------------------------------------------------------
// For compatibility, the interface of some functions taking a std::string was
// changed to const char* to avoid crashes between binary incompatible STL
// versions. This code her is inlined, so it shouldn't cause any problems.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
AI_FORCE_INLINE IOStream* IOSystem::Open(const std::string& pFile,
const std::string& pMode)
{
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
return Open(pFile.c_str(),pMode.c_str());
}
// ----------------------------------------------------------------------------
AI_FORCE_INLINE bool IOSystem::Exists( const std::string& pFile) const
{
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
return Exists(pFile.c_str());
}
// ----------------------------------------------------------------------------
inline bool IOSystem::ComparePaths (const std::string& one,
const std::string& second) const
{
// NOTE:
// For compatibility, interface was changed to const char* to
// avoid crashes between binary incompatible STL versions
return ComparePaths(one.c_str(),second.c_str());
}
// ----------------------------------------------------------------------------
} //!ns Assimp } //!ns Assimp
#endif //AI_IOSYSTEM_H_INC #endif //AI_IOSYSTEM_H_INC

View File

@ -69,7 +69,7 @@ enum DefaultLogStreams
// MSVC only: Stream the log the the debugger // MSVC only: Stream the log the the debugger
DLS_DEBUGGER = 0x8 DLS_DEBUGGER = 0x8
}; }; // !enum DefaultLogStreams
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
/** @class LogStream /** @class LogStream
@ -88,11 +88,19 @@ public:
/** @brief Virtual destructor */ /** @brief Virtual destructor */
virtual ~LogStream(); virtual ~LogStream();
// -------------------------------------------------------------------
/** @brief Overwrite this for your own output methods /** @brief Overwrite this for your own output methods
*
* Log messages *may* consist of multiple lines and you shouldn't
* expect a consistent formatting. If you want custom formatting
* (e.g. generate HTML), supply a custom instance of Logger to
* DefaultLogger:set(). Usually you can *expect* that a log message
* is exactly one line long, terminated with a single \n sequence.
* @param message Message to be written * @param message Message to be written
*/ */
virtual void write(const std::string &message) = 0; virtual void write(const char* message) = 0;
// -------------------------------------------------------------------
/** @brief Creates a default log stream /** @brief Creates a default log stream
* @param streams Type of the default stream * @param streams Type of the default stream
* @param name For DLS_FILE: name of the output file * @param name For DLS_FILE: name of the output file
@ -101,9 +109,9 @@ public:
* @return New LogStream instance - you're responsible for it's destruction! * @return New LogStream instance - you're responsible for it's destruction!
*/ */
static LogStream* createDefaultStream(DefaultLogStreams streams, static LogStream* createDefaultStream(DefaultLogStreams streams,
const std::string& name = "AssimpLog.txt", const char* name = "AssimpLog.txt",
IOSystem* io = NULL); IOSystem* io = NULL);
}; }; // !class LogStream
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
// Default constructor // Default constructor

View File

@ -85,6 +85,10 @@ public:
ERR = 8 //!< Error log message ERR = 8 //!< Error log message
}; };
/** @brief Maximum length for log messages
*/
static const size_t MAX_LOG_MESSAGE_LENGTH = 1024;
public: public:
/** @brief Virtual destructor */ /** @brief Virtual destructor */
virtual ~Logger(); virtual ~Logger();
@ -92,22 +96,22 @@ public:
/** @brief Writes a debug message /** @brief Writes a debug message
* @param message Debug message * @param message Debug message
*/ */
virtual void debug(const std::string &message)= 0; void debug(const std::string &message);
/** @brief Writes a info message /** @brief Writes a info message
* @param message Info message * @param message Info message
*/ */
virtual void info(const std::string &message) = 0; void info(const std::string &message);
/** @brief Writes a warning message /** @brief Writes a warning message
* @param message Warn message * @param message Warn message
*/ */
virtual void warn(const std::string &message) = 0; void warn(const std::string &message);
/** @brief Writes an error message /** @brief Writes an error message
* @param message Error message * @param message Error message
*/ */
virtual void error(const std::string &message) = 0; void error(const std::string &message);
/** @brief Set a new log severity. /** @brief Set a new log severity.
* @param log_severity New severity for logging * @param log_severity New severity for logging
@ -142,6 +146,38 @@ public:
protected: protected:
/** @brief Default constructor */ /** @brief Default constructor */
Logger(); Logger();
/** @brief Called as a request to write a specific debug message
* @param message Debug message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
*/
virtual void OnDebug(const char* message)= 0;
/** @brief Called as a request to write a specific info message
* @param message Info message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
*/
virtual void OnInfo(const char* message) = 0;
/** @brief Called as a request to write a specific warn message
* @param message Warn message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
*/
virtual void OnWarn(const char* essage) = 0;
/** @brief Called as a request to write a specific error message
* @param message Error message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
*/
virtual void OnError(const char* message) = 0;
}; };
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------

View File

@ -39,15 +39,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/** @file NullLogger.h /** @file NullLogger.h
* @brief Dummy logger
*/ */
#if (!defined AI_NULLLOGGER_H_INCLUDED) #ifndef INCLUDED_AI_NULLLOGGER_H
#define AI_NULLLOGGER_H_INCLUDED #define INCLUDED_AI_NULLLOGGER_H
#include "../include/Logger.h" #include "../include/Logger.h"
namespace Assimp namespace Assimp {
{
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/** @class NullLogger /** @class NullLogger
@ -59,25 +59,39 @@ class ASSIMP_API NullLogger : public Logger
{ {
public: public:
/** @brief Logs a debug message */ /** @brief Logs a debug message */
void debug(const std::string &message) { (void)message;} //this avoids compiler warnings void OnDebug(const char* message) {
(void)message; //this avoids compiler warnings
}
/** @brief Logs an info message */ /** @brief Logs an info message */
void info(const std::string &message) {(void)message;} //this avoids compiler warnings void OnInfo(const char* message) {
(void)message; //this avoids compiler warnings
}
/** @brief Logs a warning message */ /** @brief Logs a warning message */
void warn(const std::string &message) {(void)message;} //this avoids compiler warnings void OnWarn(const char* message) {
(void)message; //this avoids compiler warnings
}
/** @brief Logs an error message */ /** @brief Logs an error message */
void error(const std::string &message) {(void)message;} //this avoids compiler warnings void OnError(const char* message) {
(void)message; //this avoids compiler warnings
}
/** @brief Log severity setter */ /** @brief Log severity setter */
void setLogSeverity(LogSeverity log_severity) {(void)log_severity;} //this avoids compiler warnings void setLogSeverity(LogSeverity log_severity) {
(void)log_severity; //this avoids compiler warnings
}
/** @brief Detach a still attached stream from logger */ /** @brief Detach a still attached stream from logger */
void attachStream(LogStream *pStream, unsigned int severity) {(void)pStream; (void)severity;} //this avoids compiler warnings void attachStream(LogStream *pStream, unsigned int severity) {
(void)pStream; (void)severity; //this avoids compiler warnings
}
/** @brief Detach a still attached stream from logger */ /** @brief Detach a still attached stream from logger */
void detatchStream(LogStream *pStream, unsigned int severity) {(void)pStream; (void)severity;} //this avoids compiler warnings void detatchStream(LogStream *pStream, unsigned int severity) {
(void)pStream; (void)severity; //this avoids compiler warnings
}
}; };
} }

View File

@ -67,10 +67,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp { namespace Assimp {
namespace Intern { namespace Intern {
// Internal helper class to utilize our internal new/delete routines /** @brief Internal helper class to utilize our internal new/delete
// for allocating object of this class. By doing this you can safely * routines for allocating object of this and derived classes.
// share class objects between Assimp and the application - it works *
// even over DLL boundaries. * By doing this you can safely share class objects between Assimp
* and the application - it works even over DLL boundaries. A good
* example is the IOSystem where the application allocates its custom
* IOSystem, then calls Importer::SetIOSystem(). When the Importer
* destructs, Assimp calls operator delete on the stored IOSystem.
* If it lies on a different heap than Assimp is working with,
* the application is determined to crash.
*/
struct ASSIMP_API AllocateFromAssimpHeap { struct ASSIMP_API AllocateFromAssimpHeap {
// new/delete overload // new/delete overload

View File

@ -317,6 +317,15 @@ public:
* The pointer to the scene remains in possession of the Importer * The pointer to the scene remains in possession of the Importer
* instance. Use GetOrphanedScene() to take ownership of it. * instance. Use GetOrphanedScene() to take ownership of it.
*/ */
const aiScene* ReadFile( const char* pFile, unsigned int pFlags);
// -------------------------------------------------------------------
/** @brief Reads the given file and returns its contents if successful.
*
* This function is provided for backward compatibility.
* See the const char* version for detailled docs.
* @see ReadFile(const char*, pFlags)
*/
const aiScene* ReadFile( const std::string& pFile, unsigned int pFlags); const aiScene* ReadFile( const std::string& pFile, unsigned int pFlags);
@ -348,6 +357,15 @@ public:
* Cases-insensitive. * Cases-insensitive.
* @return true if the extension is supported, false otherwise * @return true if the extension is supported, false otherwise
*/ */
bool IsExtensionSupported(const char* szExtension);
// -------------------------------------------------------------------
/** @brief Returns whether a given file extension is supported by ASSIMP.
*
* This function is provided for backward compatibility.
* See the const char* version for detailled docs.
* @see IsExtensionSupported(const char*)
*/
bool IsExtensionSupported(const std::string& szExtension); bool IsExtensionSupported(const std::string& szExtension);
@ -360,7 +378,16 @@ public:
* is a loader which handles such files. * is a loader which handles such files.
* Format of the list: "*.3ds;*.obj;*.dae". * Format of the list: "*.3ds;*.obj;*.dae".
*/ */
void GetExtensionList(std::string& szOut); void GetExtensionList(aiString& szOut);
// -------------------------------------------------------------------
/** @brief Get a full list of all file extensions supported by ASSIMP.
*
* This function is provided for backward compatibility.
* See the aiString version for detailled docs.
* @see GetExtensionList(aiString&)
*/
inline void GetExtensionList(std::string& szOut);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -372,7 +399,7 @@ public:
* must include a trailing dot. * must include a trailing dot.
* @return NULL if there is no loader for the extension. * @return NULL if there is no loader for the extension.
*/ */
BaseImporter* FindLoader (const std::string& szExtension); BaseImporter* FindLoader (const char* szExtension);
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -449,27 +476,31 @@ protected:
SharedPostProcessInfo* mPPShared; SharedPostProcessInfo* mPPShared;
}; //! class Importer }; //! class Importer
// ----------------------------------------------------------------------------------
inline const std::string& Importer::GetErrorString() const // ----------------------------------------------------------------------------
// For compatibility, the interface of some functions taking a std::string was
// changed to const char* to avoid crashes between binary incompatible STL
// versions. This code her is inlined, so it shouldn't cause any problems.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
AI_FORCE_INLINE const aiScene* Importer::ReadFile( const std::string& pFile,
unsigned int pFlags)
{ {
return mErrorString; return ReadFile(pFile.c_str(),pFlags);
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------
inline void Importer::SetExtraVerbose(bool bDo) AI_FORCE_INLINE void Importer::GetExtensionList(std::string& szOut)
{ {
bExtraVerbose = bDo; aiString s;
GetExtensionList(s);
szOut = s.data;
} }
// ---------------------------------------------------------------------------------- // ----------------------------------------------------------------------------
inline const aiScene* Importer::GetScene() const AI_FORCE_INLINE bool Importer::IsExtensionSupported(
const std::string& szExtension)
{ {
return mScene; return IsExtensionSupported(szExtension.c_str());
}
// ----------------------------------------------------------------------------------
inline aiScene* Importer::GetOrphanedScene()
{
aiScene* s = mScene;
mScene = NULL;
return s;
} }
} // !namespace Assimp } // !namespace Assimp

View File

@ -127,7 +127,7 @@ void CLogWindow::Show()
} }
} }
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
void CMyLogStream::write(const std::string &message) void CMyLogStream::write(const char* message)
{ {
CLogWindow::Instance().WriteLine(message); CLogWindow::Instance().WriteLine(message);
} }
@ -193,7 +193,7 @@ void CLogWindow::Save()
D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0)); D3DCOLOR_ARGB(0xFF,0xFF,0xFF,0));
} }
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
void CLogWindow::WriteLine(const std::string& message) void CLogWindow::WriteLine(const char* message)
{ {
this->szPlainText.append(message); this->szPlainText.append(message);
this->szPlainText.append("\r\n"); this->szPlainText.append("\r\n");
@ -203,7 +203,7 @@ void CLogWindow::WriteLine(const std::string& message)
this->szText.resize(this->szText.length()-1); this->szText.resize(this->szText.length()-1);
} }
switch (message.c_str()[0]) switch (message[0])
{ {
case 'e': case 'e':
case 'E': case 'E':

View File

@ -52,7 +52,7 @@ class CMyLogStream : Assimp::LogStream
{ {
public: public:
/** @brief Implementation of the abstract method */ /** @brief Implementation of the abstract method */
void write(const std::string &message); void write(const char* message);
}; };
@ -93,7 +93,7 @@ public:
void Save(); void Save();
// write a line to the log window // write a line to the log window
void WriteLine(const std::string& message); void WriteLine(const char* message);
// Set the bUpdate member // Set the bUpdate member
inline void SetAutoUpdate(bool b) inline void SetAutoUpdate(bool b)

View File

@ -23,7 +23,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -105,7 +105,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -188,7 +188,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -268,7 +268,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -349,7 +349,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -429,7 +429,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -510,7 +510,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -592,7 +592,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -675,7 +675,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -755,7 +755,7 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -836,7 +836,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -918,7 +918,7 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -1001,7 +1001,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -1083,7 +1083,7 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
> >
<Tool <Tool
@ -1166,7 +1166,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -1246,7 +1246,7 @@
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >

View File

@ -20,7 +20,7 @@
<Configuration <Configuration
Name="debug|Win32" Name="debug|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -85,6 +85,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -145,7 +146,7 @@
<Configuration <Configuration
Name="release|Win32" Name="release|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -211,7 +212,7 @@
<Configuration <Configuration
Name="release|x64" Name="release|x64"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -276,7 +277,7 @@
<Configuration <Configuration
Name="release-dll|Win32" Name="release-dll|Win32"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops" InheritedPropertySheets=".\shared\DllShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -353,7 +354,7 @@
<Configuration <Configuration
Name="release-dll|x64" Name="release-dll|x64"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops" InheritedPropertySheets=".\shared\DllShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -429,7 +430,7 @@
<Configuration <Configuration
Name="debug-dll|Win32" Name="debug-dll|Win32"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops" InheritedPropertySheets=".\shared\DllShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -504,7 +505,7 @@
<Configuration <Configuration
Name="debug-dll|x64" Name="debug-dll|x64"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops" InheritedPropertySheets=".\shared\DllShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -578,7 +579,7 @@
<Configuration <Configuration
Name="release-noboost-st|Win32" Name="release-noboost-st|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -643,7 +644,7 @@
<Configuration <Configuration
Name="release-noboost-st|x64" Name="release-noboost-st|x64"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -708,7 +709,7 @@
<Configuration <Configuration
Name="debug-noboost-st|Win32" Name="debug-noboost-st|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -771,7 +772,7 @@
<Configuration <Configuration
Name="debug-noboost-st|x64" Name="debug-noboost-st|x64"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -832,7 +833,7 @@
<Configuration <Configuration
Name="debug-st|Win32" Name="debug-st|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -895,7 +896,7 @@
<Configuration <Configuration
Name="debug-st|x64" Name="debug-st|x64"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@ -956,7 +957,7 @@
<Configuration <Configuration
Name="release-st|Win32" Name="release-st|Win32"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool
@ -1021,7 +1022,7 @@
<Configuration <Configuration
Name="release-st|x64" Name="release-st|x64"
ConfigurationType="4" ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops" InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops;.\shared\FastSTL.vsprops"
WholeProgramOptimization="0" WholeProgramOptimization="0"
> >
<Tool <Tool

View File

@ -23,6 +23,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -104,6 +105,7 @@
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)" OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj" IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -186,6 +188,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -267,6 +270,7 @@
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)" OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj" IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -349,6 +353,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -430,6 +435,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -512,6 +518,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -593,6 +600,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -675,7 +683,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -757,7 +765,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -840,7 +848,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -922,7 +930,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops" InheritedPropertySheets=".\shared\NoBoostShared.vsprops;.\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -1005,6 +1013,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -1086,6 +1095,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@ -1168,6 +1178,7 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >
@ -1249,6 +1260,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="FastSTL"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="_HAS_ITERATOR_DEBUGGING=0;_SECURE_SCL=0"
/>
</VisualStudioPropertySheet>

View File

@ -186,7 +186,6 @@
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)" IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1" ConfigurationType="1"
InheritedPropertySheets=".\shared\FastSTL.vsprops"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1" WholeProgramOptimization="1"
> >