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

// TYPE IfcUnitaryEquipmentTypeEnum = ENUMERATION OF	(AIRHANDLER	,AIRCONDITIONINGUNIT	,DEHUMIDIFIER	,SPLITSYSTEM	,ROOFTOPUNIT	,USERDEFINED	,NOTDEFINED);
IfcUnitaryEquipmentTypeEnum::~IfcUnitaryEquipmentTypeEnum() {}
shared_ptr<BuildingObject> IfcUnitaryEquipmentTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcUnitaryEquipmentTypeEnum> copy_self( new IfcUnitaryEquipmentTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcUnitaryEquipmentTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCUNITARYEQUIPMENTTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_AIRHANDLER:	stream << ".AIRHANDLER."; break;
		case ENUM_AIRCONDITIONINGUNIT:	stream << ".AIRCONDITIONINGUNIT."; break;
		case ENUM_DEHUMIDIFIER:	stream << ".DEHUMIDIFIER."; break;
		case ENUM_SPLITSYSTEM:	stream << ".SPLITSYSTEM."; break;
		case ENUM_ROOFTOPUNIT:	stream << ".ROOFTOPUNIT."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcUnitaryEquipmentTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_AIRHANDLER:	return L"AIRHANDLER";
		case ENUM_AIRCONDITIONINGUNIT:	return L"AIRCONDITIONINGUNIT";
		case ENUM_DEHUMIDIFIER:	return L"DEHUMIDIFIER";
		case ENUM_SPLITSYSTEM:	return L"SPLITSYSTEM";
		case ENUM_ROOFTOPUNIT:	return L"ROOFTOPUNIT";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcUnitaryEquipmentTypeEnum> IfcUnitaryEquipmentTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcUnitaryEquipmentTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcUnitaryEquipmentTypeEnum>(); }
	shared_ptr<IfcUnitaryEquipmentTypeEnum> type_object( new IfcUnitaryEquipmentTypeEnum() );
	if( boost::iequals( arg, L".AIRHANDLER." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_AIRHANDLER;
	}
	else if( boost::iequals( arg, L".AIRCONDITIONINGUNIT." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_AIRCONDITIONINGUNIT;
	}
	else if( boost::iequals( arg, L".DEHUMIDIFIER." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_DEHUMIDIFIER;
	}
	else if( boost::iequals( arg, L".SPLITSYSTEM." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_SPLITSYSTEM;
	}
	else if( boost::iequals( arg, L".ROOFTOPUNIT." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_ROOFTOPUNIT;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcUnitaryEquipmentTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
