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

// TYPE IfcInterceptorTypeEnum = ENUMERATION OF	(CYCLONIC	,GREASE	,OIL	,PETROL	,USERDEFINED	,NOTDEFINED);
IfcInterceptorTypeEnum::~IfcInterceptorTypeEnum() {}
shared_ptr<BuildingObject> IfcInterceptorTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcInterceptorTypeEnum> copy_self( new IfcInterceptorTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcInterceptorTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCINTERCEPTORTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_CYCLONIC:	stream << ".CYCLONIC."; break;
		case ENUM_GREASE:	stream << ".GREASE."; break;
		case ENUM_OIL:	stream << ".OIL."; break;
		case ENUM_PETROL:	stream << ".PETROL."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcInterceptorTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_CYCLONIC:	return L"CYCLONIC";
		case ENUM_GREASE:	return L"GREASE";
		case ENUM_OIL:	return L"OIL";
		case ENUM_PETROL:	return L"PETROL";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcInterceptorTypeEnum> IfcInterceptorTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcInterceptorTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcInterceptorTypeEnum>(); }
	shared_ptr<IfcInterceptorTypeEnum> type_object( new IfcInterceptorTypeEnum() );
	if( boost::iequals( arg, L".CYCLONIC." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_CYCLONIC;
	}
	else if( boost::iequals( arg, L".GREASE." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_GREASE;
	}
	else if( boost::iequals( arg, L".OIL." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_OIL;
	}
	else if( boost::iequals( arg, L".PETROL." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_PETROL;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcInterceptorTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
