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

// TYPE IfcElectricMotorTypeEnum = ENUMERATION OF	(DC	,INDUCTION	,POLYPHASE	,RELUCTANCESYNCHRONOUS	,SYNCHRONOUS	,USERDEFINED	,NOTDEFINED);
IfcElectricMotorTypeEnum::~IfcElectricMotorTypeEnum() {}
shared_ptr<BuildingObject> IfcElectricMotorTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcElectricMotorTypeEnum> copy_self( new IfcElectricMotorTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcElectricMotorTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCELECTRICMOTORTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_DC:	stream << ".DC."; break;
		case ENUM_INDUCTION:	stream << ".INDUCTION."; break;
		case ENUM_POLYPHASE:	stream << ".POLYPHASE."; break;
		case ENUM_RELUCTANCESYNCHRONOUS:	stream << ".RELUCTANCESYNCHRONOUS."; break;
		case ENUM_SYNCHRONOUS:	stream << ".SYNCHRONOUS."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcElectricMotorTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_DC:	return L"DC";
		case ENUM_INDUCTION:	return L"INDUCTION";
		case ENUM_POLYPHASE:	return L"POLYPHASE";
		case ENUM_RELUCTANCESYNCHRONOUS:	return L"RELUCTANCESYNCHRONOUS";
		case ENUM_SYNCHRONOUS:	return L"SYNCHRONOUS";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcElectricMotorTypeEnum> IfcElectricMotorTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcElectricMotorTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcElectricMotorTypeEnum>(); }
	shared_ptr<IfcElectricMotorTypeEnum> type_object( new IfcElectricMotorTypeEnum() );
	if( boost::iequals( arg, L".DC." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_DC;
	}
	else if( boost::iequals( arg, L".INDUCTION." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_INDUCTION;
	}
	else if( boost::iequals( arg, L".POLYPHASE." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_POLYPHASE;
	}
	else if( boost::iequals( arg, L".RELUCTANCESYNCHRONOUS." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_RELUCTANCESYNCHRONOUS;
	}
	else if( boost::iequals( arg, L".SYNCHRONOUS." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_SYNCHRONOUS;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcElectricMotorTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
