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

// TYPE IfcDoorPanelOperationEnum = ENUMERATION OF	(SWINGING	,DOUBLE_ACTING	,SLIDING	,FOLDING	,REVOLVING	,ROLLINGUP	,FIXEDPANEL	,USERDEFINED	,NOTDEFINED);
IfcDoorPanelOperationEnum::~IfcDoorPanelOperationEnum() {}
shared_ptr<BuildingObject> IfcDoorPanelOperationEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcDoorPanelOperationEnum> copy_self( new IfcDoorPanelOperationEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcDoorPanelOperationEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCDOORPANELOPERATIONENUM("; }
	switch( m_enum )
	{
		case ENUM_SWINGING:	stream << ".SWINGING."; break;
		case ENUM_DOUBLE_ACTING:	stream << ".DOUBLE_ACTING."; break;
		case ENUM_SLIDING:	stream << ".SLIDING."; break;
		case ENUM_FOLDING:	stream << ".FOLDING."; break;
		case ENUM_REVOLVING:	stream << ".REVOLVING."; break;
		case ENUM_ROLLINGUP:	stream << ".ROLLINGUP."; break;
		case ENUM_FIXEDPANEL:	stream << ".FIXEDPANEL."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcDoorPanelOperationEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_SWINGING:	return L"SWINGING";
		case ENUM_DOUBLE_ACTING:	return L"DOUBLE_ACTING";
		case ENUM_SLIDING:	return L"SLIDING";
		case ENUM_FOLDING:	return L"FOLDING";
		case ENUM_REVOLVING:	return L"REVOLVING";
		case ENUM_ROLLINGUP:	return L"ROLLINGUP";
		case ENUM_FIXEDPANEL:	return L"FIXEDPANEL";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcDoorPanelOperationEnum> IfcDoorPanelOperationEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcDoorPanelOperationEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcDoorPanelOperationEnum>(); }
	shared_ptr<IfcDoorPanelOperationEnum> type_object( new IfcDoorPanelOperationEnum() );
	if( boost::iequals( arg, L".SWINGING." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_SWINGING;
	}
	else if( boost::iequals( arg, L".DOUBLE_ACTING." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_DOUBLE_ACTING;
	}
	else if( boost::iequals( arg, L".SLIDING." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_SLIDING;
	}
	else if( boost::iequals( arg, L".FOLDING." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_FOLDING;
	}
	else if( boost::iequals( arg, L".REVOLVING." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_REVOLVING;
	}
	else if( boost::iequals( arg, L".ROLLINGUP." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_ROLLINGUP;
	}
	else if( boost::iequals( arg, L".FIXEDPANEL." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_FIXEDPANEL;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcDoorPanelOperationEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
