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

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