void IfcPPReaderSTEP::loadModelFromString( std::string& content, shared_ptr<IfcPPModel>& target_model )
{
	progressTextCallback( L"Reading file..." );
	progressValueCallback( 0, "parse" );
	try
	{
		removeComments( content );
		readStreamHeader( content, target_model );
		readStreamData( content, target_model );
		target_model->resolveInverseAttributes();
		target_model->updateCache();
	}
	catch( IfcPPOutOfMemoryException& e)
	{
		throw e;
	}
	catch( IfcPPException& e )
	{
		messageCallback( e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "" );
	}
	catch( std::exception& e )
	{
		messageCallback( e.what(), StatusCallback::MESSAGE_TYPE_ERROR, "" );
	}
	catch( ... )
	{
		messageCallback( "An error occured", StatusCallback::MESSAGE_TYPE_ERROR, __FUNC__ );
	}
}
void IfcPPReaderSTEP::readStreamData( std::string& read_in, shared_ptr<IfcPPModel>& model )
{
	IfcPPModel::IfcPPSchemaVersion& file_schema_version = model->getIfcSchemaVersion();
	boost::unordered_map<int,shared_ptr<IfcPPEntity> >& map_entities = model->m_map_entities;
	readStreamData( read_in, file_schema_version, map_entities );
}
void IfcPPReaderXML::readStreamData( std::string& in, shared_ptr<IfcPPModel>& model )
{
	IfcPPModel::IfcPPSchemaVersion& file_schema_version = model->getIfcSchemaVersion();
	map_t<int,shared_ptr<IfcPPEntity> >& map_entities = model->m_map_entities;
	readStreamData( in, file_schema_version, map_entities );
}