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

// TYPE IfcDoorPanelPositionEnum = ENUMERATION OF	(LEFT	,MIDDLE	,RIGHT	,NOTDEFINED);
IfcDoorPanelPositionEnum::~IfcDoorPanelPositionEnum() {}
shared_ptr<BuildingObject> IfcDoorPanelPositionEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcDoorPanelPositionEnum> copy_self( new IfcDoorPanelPositionEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcDoorPanelPositionEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCDOORPANELPOSITIONENUM("; }
	switch( m_enum )
	{
		case ENUM_LEFT:	stream << ".LEFT."; break;
		case ENUM_MIDDLE:	stream << ".MIDDLE."; break;
		case ENUM_RIGHT:	stream << ".RIGHT."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcDoorPanelPositionEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_LEFT:	return L"LEFT";
		case ENUM_MIDDLE:	return L"MIDDLE";
		case ENUM_RIGHT:	return L"RIGHT";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcDoorPanelPositionEnum> IfcDoorPanelPositionEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcDoorPanelPositionEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcDoorPanelPositionEnum>(); }
	shared_ptr<IfcDoorPanelPositionEnum> type_object( new IfcDoorPanelPositionEnum() );
	if( boost::iequals( arg, L".LEFT." ) )
	{
		type_object->m_enum = IfcDoorPanelPositionEnum::ENUM_LEFT;
	}
	else if( boost::iequals( arg, L".MIDDLE." ) )
	{
		type_object->m_enum = IfcDoorPanelPositionEnum::ENUM_MIDDLE;
	}
	else if( boost::iequals( arg, L".RIGHT." ) )
	{
		type_object->m_enum = IfcDoorPanelPositionEnum::ENUM_RIGHT;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcDoorPanelPositionEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
