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

// TYPE IfcAlarmTypeEnum = ENUMERATION OF	(BELL	,BREAKGLASSBUTTON	,LIGHT	,MANUALPULLBOX	,SIREN	,WHISTLE	,USERDEFINED	,NOTDEFINED);
IfcAlarmTypeEnum::~IfcAlarmTypeEnum() {}
shared_ptr<BuildingObject> IfcAlarmTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcAlarmTypeEnum> copy_self( new IfcAlarmTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcAlarmTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCALARMTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_BELL:	stream << ".BELL."; break;
		case ENUM_BREAKGLASSBUTTON:	stream << ".BREAKGLASSBUTTON."; break;
		case ENUM_LIGHT:	stream << ".LIGHT."; break;
		case ENUM_MANUALPULLBOX:	stream << ".MANUALPULLBOX."; break;
		case ENUM_SIREN:	stream << ".SIREN."; break;
		case ENUM_WHISTLE:	stream << ".WHISTLE."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcAlarmTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_BELL:	return L"BELL";
		case ENUM_BREAKGLASSBUTTON:	return L"BREAKGLASSBUTTON";
		case ENUM_LIGHT:	return L"LIGHT";
		case ENUM_MANUALPULLBOX:	return L"MANUALPULLBOX";
		case ENUM_SIREN:	return L"SIREN";
		case ENUM_WHISTLE:	return L"WHISTLE";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcAlarmTypeEnum> IfcAlarmTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcAlarmTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcAlarmTypeEnum>(); }
	shared_ptr<IfcAlarmTypeEnum> type_object( new IfcAlarmTypeEnum() );
	if( boost::iequals( arg, L".BELL." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_BELL;
	}
	else if( boost::iequals( arg, L".BREAKGLASSBUTTON." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_BREAKGLASSBUTTON;
	}
	else if( boost::iequals( arg, L".LIGHT." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_LIGHT;
	}
	else if( boost::iequals( arg, L".MANUALPULLBOX." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_MANUALPULLBOX;
	}
	else if( boost::iequals( arg, L".SIREN." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_SIREN;
	}
	else if( boost::iequals( arg, L".WHISTLE." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_WHISTLE;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcAlarmTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
