/* 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/IfcLightEmissionSourceEnum.h"

// TYPE IfcLightEmissionSourceEnum = ENUMERATION OF	(COMPACTFLUORESCENT	,FLUORESCENT	,HIGHPRESSUREMERCURY	,HIGHPRESSURESODIUM	,LIGHTEMITTINGDIODE	,LOWPRESSURESODIUM	,LOWVOLTAGEHALOGEN	,MAINVOLTAGEHALOGEN	,METALHALIDE	,TUNGSTENFILAMENT	,NOTDEFINED);
IfcLightEmissionSourceEnum::~IfcLightEmissionSourceEnum() {}
shared_ptr<BuildingObject> IfcLightEmissionSourceEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcLightEmissionSourceEnum> copy_self( new IfcLightEmissionSourceEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcLightEmissionSourceEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCLIGHTEMISSIONSOURCEENUM("; }
	switch( m_enum )
	{
		case ENUM_COMPACTFLUORESCENT:	stream << ".COMPACTFLUORESCENT."; break;
		case ENUM_FLUORESCENT:	stream << ".FLUORESCENT."; break;
		case ENUM_HIGHPRESSUREMERCURY:	stream << ".HIGHPRESSUREMERCURY."; break;
		case ENUM_HIGHPRESSURESODIUM:	stream << ".HIGHPRESSURESODIUM."; break;
		case ENUM_LIGHTEMITTINGDIODE:	stream << ".LIGHTEMITTINGDIODE."; break;
		case ENUM_LOWPRESSURESODIUM:	stream << ".LOWPRESSURESODIUM."; break;
		case ENUM_LOWVOLTAGEHALOGEN:	stream << ".LOWVOLTAGEHALOGEN."; break;
		case ENUM_MAINVOLTAGEHALOGEN:	stream << ".MAINVOLTAGEHALOGEN."; break;
		case ENUM_METALHALIDE:	stream << ".METALHALIDE."; break;
		case ENUM_TUNGSTENFILAMENT:	stream << ".TUNGSTENFILAMENT."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcLightEmissionSourceEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_COMPACTFLUORESCENT:	return L"COMPACTFLUORESCENT";
		case ENUM_FLUORESCENT:	return L"FLUORESCENT";
		case ENUM_HIGHPRESSUREMERCURY:	return L"HIGHPRESSUREMERCURY";
		case ENUM_HIGHPRESSURESODIUM:	return L"HIGHPRESSURESODIUM";
		case ENUM_LIGHTEMITTINGDIODE:	return L"LIGHTEMITTINGDIODE";
		case ENUM_LOWPRESSURESODIUM:	return L"LOWPRESSURESODIUM";
		case ENUM_LOWVOLTAGEHALOGEN:	return L"LOWVOLTAGEHALOGEN";
		case ENUM_MAINVOLTAGEHALOGEN:	return L"MAINVOLTAGEHALOGEN";
		case ENUM_METALHALIDE:	return L"METALHALIDE";
		case ENUM_TUNGSTENFILAMENT:	return L"TUNGSTENFILAMENT";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcLightEmissionSourceEnum> IfcLightEmissionSourceEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcLightEmissionSourceEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcLightEmissionSourceEnum>(); }
	shared_ptr<IfcLightEmissionSourceEnum> type_object( new IfcLightEmissionSourceEnum() );
	if( boost::iequals( arg, L".COMPACTFLUORESCENT." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_COMPACTFLUORESCENT;
	}
	else if( boost::iequals( arg, L".FLUORESCENT." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_FLUORESCENT;
	}
	else if( boost::iequals( arg, L".HIGHPRESSUREMERCURY." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_HIGHPRESSUREMERCURY;
	}
	else if( boost::iequals( arg, L".HIGHPRESSURESODIUM." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_HIGHPRESSURESODIUM;
	}
	else if( boost::iequals( arg, L".LIGHTEMITTINGDIODE." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_LIGHTEMITTINGDIODE;
	}
	else if( boost::iequals( arg, L".LOWPRESSURESODIUM." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_LOWPRESSURESODIUM;
	}
	else if( boost::iequals( arg, L".LOWVOLTAGEHALOGEN." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_LOWVOLTAGEHALOGEN;
	}
	else if( boost::iequals( arg, L".MAINVOLTAGEHALOGEN." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_MAINVOLTAGEHALOGEN;
	}
	else if( boost::iequals( arg, L".METALHALIDE." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_METALHALIDE;
	}
	else if( boost::iequals( arg, L".TUNGSTENFILAMENT." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_TUNGSTENFILAMENT;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcLightEmissionSourceEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
