/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */

#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcActionSourceTypeEnum.h"

// TYPE IfcActionSourceTypeEnum = ENUMERATION OF	(DEAD_LOAD_G	,COMPLETION_G1	,LIVE_LOAD_Q	,SNOW_S	,WIND_W	,PRESTRESSING_P	,SETTLEMENT_U	,TEMPERATURE_T	,EARTHQUAKE_E	,FIRE	,IMPULSE	,IMPACT	,TRANSPORT	,ERECTION	,PROPPING	,SYSTEM_IMPERFECTION	,SHRINKAGE	,CREEP	,LACK_OF_FIT	,BUOYANCY	,ICE	,CURRENT	,WAVE	,RAIN	,BRAKES	,USERDEFINED	,NOTDEFINED);
IfcActionSourceTypeEnum::~IfcActionSourceTypeEnum() {}
shared_ptr<BuildingObject> IfcActionSourceTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcActionSourceTypeEnum> copy_self( new IfcActionSourceTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcActionSourceTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCACTIONSOURCETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_DEAD_LOAD_G:	stream << ".DEAD_LOAD_G."; break;
		case ENUM_COMPLETION_G1:	stream << ".COMPLETION_G1."; break;
		case ENUM_LIVE_LOAD_Q:	stream << ".LIVE_LOAD_Q."; break;
		case ENUM_SNOW_S:	stream << ".SNOW_S."; break;
		case ENUM_WIND_W:	stream << ".WIND_W."; break;
		case ENUM_PRESTRESSING_P:	stream << ".PRESTRESSING_P."; break;
		case ENUM_SETTLEMENT_U:	stream << ".SETTLEMENT_U."; break;
		case ENUM_TEMPERATURE_T:	stream << ".TEMPERATURE_T."; break;
		case ENUM_EARTHQUAKE_E:	stream << ".EARTHQUAKE_E."; break;
		case ENUM_FIRE:	stream << ".FIRE."; break;
		case ENUM_IMPULSE:	stream << ".IMPULSE."; break;
		case ENUM_IMPACT:	stream << ".IMPACT."; break;
		case ENUM_TRANSPORT:	stream << ".TRANSPORT."; break;
		case ENUM_ERECTION:	stream << ".ERECTION."; break;
		case ENUM_PROPPING:	stream << ".PROPPING."; break;
		case ENUM_SYSTEM_IMPERFECTION:	stream << ".SYSTEM_IMPERFECTION."; break;
		case ENUM_SHRINKAGE:	stream << ".SHRINKAGE."; break;
		case ENUM_CREEP:	stream << ".CREEP."; break;
		case ENUM_LACK_OF_FIT:	stream << ".LACK_OF_FIT."; break;
		case ENUM_BUOYANCY:	stream << ".BUOYANCY."; break;
		case ENUM_ICE:	stream << ".ICE."; break;
		case ENUM_CURRENT:	stream << ".CURRENT."; break;
		case ENUM_WAVE:	stream << ".WAVE."; break;
		case ENUM_RAIN:	stream << ".RAIN."; break;
		case ENUM_BRAKES:	stream << ".BRAKES."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcActionSourceTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_DEAD_LOAD_G:	return L"DEAD_LOAD_G";
		case ENUM_COMPLETION_G1:	return L"COMPLETION_G1";
		case ENUM_LIVE_LOAD_Q:	return L"LIVE_LOAD_Q";
		case ENUM_SNOW_S:	return L"SNOW_S";
		case ENUM_WIND_W:	return L"WIND_W";
		case ENUM_PRESTRESSING_P:	return L"PRESTRESSING_P";
		case ENUM_SETTLEMENT_U:	return L"SETTLEMENT_U";
		case ENUM_TEMPERATURE_T:	return L"TEMPERATURE_T";
		case ENUM_EARTHQUAKE_E:	return L"EARTHQUAKE_E";
		case ENUM_FIRE:	return L"FIRE";
		case ENUM_IMPULSE:	return L"IMPULSE";
		case ENUM_IMPACT:	return L"IMPACT";
		case ENUM_TRANSPORT:	return L"TRANSPORT";
		case ENUM_ERECTION:	return L"ERECTION";
		case ENUM_PROPPING:	return L"PROPPING";
		case ENUM_SYSTEM_IMPERFECTION:	return L"SYSTEM_IMPERFECTION";
		case ENUM_SHRINKAGE:	return L"SHRINKAGE";
		case ENUM_CREEP:	return L"CREEP";
		case ENUM_LACK_OF_FIT:	return L"LACK_OF_FIT";
		case ENUM_BUOYANCY:	return L"BUOYANCY";
		case ENUM_ICE:	return L"ICE";
		case ENUM_CURRENT:	return L"CURRENT";
		case ENUM_WAVE:	return L"WAVE";
		case ENUM_RAIN:	return L"RAIN";
		case ENUM_BRAKES:	return L"BRAKES";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcActionSourceTypeEnum> IfcActionSourceTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcActionSourceTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcActionSourceTypeEnum>(); }
	shared_ptr<IfcActionSourceTypeEnum> type_object( new IfcActionSourceTypeEnum() );
	if( boost::iequals( arg, L".DEAD_LOAD_G." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_DEAD_LOAD_G;
	}
	else if( boost::iequals( arg, L".COMPLETION_G1." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_COMPLETION_G1;
	}
	else if( boost::iequals( arg, L".LIVE_LOAD_Q." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_LIVE_LOAD_Q;
	}
	else if( boost::iequals( arg, L".SNOW_S." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_SNOW_S;
	}
	else if( boost::iequals( arg, L".WIND_W." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_WIND_W;
	}
	else if( boost::iequals( arg, L".PRESTRESSING_P." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_PRESTRESSING_P;
	}
	else if( boost::iequals( arg, L".SETTLEMENT_U." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_SETTLEMENT_U;
	}
	else if( boost::iequals( arg, L".TEMPERATURE_T." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_TEMPERATURE_T;
	}
	else if( boost::iequals( arg, L".EARTHQUAKE_E." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_EARTHQUAKE_E;
	}
	else if( boost::iequals( arg, L".FIRE." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_FIRE;
	}
	else if( boost::iequals( arg, L".IMPULSE." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_IMPULSE;
	}
	else if( boost::iequals( arg, L".IMPACT." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_IMPACT;
	}
	else if( boost::iequals( arg, L".TRANSPORT." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_TRANSPORT;
	}
	else if( boost::iequals( arg, L".ERECTION." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_ERECTION;
	}
	else if( boost::iequals( arg, L".PROPPING." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_PROPPING;
	}
	else if( boost::iequals( arg, L".SYSTEM_IMPERFECTION." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_SYSTEM_IMPERFECTION;
	}
	else if( boost::iequals( arg, L".SHRINKAGE." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_SHRINKAGE;
	}
	else if( boost::iequals( arg, L".CREEP." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_CREEP;
	}
	else if( boost::iequals( arg, L".LACK_OF_FIT." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_LACK_OF_FIT;
	}
	else if( boost::iequals( arg, L".BUOYANCY." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_BUOYANCY;
	}
	else if( boost::iequals( arg, L".ICE." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_ICE;
	}
	else if( boost::iequals( arg, L".CURRENT." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_CURRENT;
	}
	else if( boost::iequals( arg, L".WAVE." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_WAVE;
	}
	else if( boost::iequals( arg, L".RAIN." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_RAIN;
	}
	else if( boost::iequals( arg, L".BRAKES." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_BRAKES;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcActionSourceTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
