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

// TYPE IfcVoidingFeatureTypeEnum = ENUMERATION OF	(CUTOUT	,NOTCH	,HOLE	,MITER	,CHAMFER	,EDGE	,USERDEFINED	,NOTDEFINED);
IfcVoidingFeatureTypeEnum::~IfcVoidingFeatureTypeEnum() {}
shared_ptr<BuildingObject> IfcVoidingFeatureTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcVoidingFeatureTypeEnum> copy_self( new IfcVoidingFeatureTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcVoidingFeatureTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCVOIDINGFEATURETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_CUTOUT:	stream << ".CUTOUT."; break;
		case ENUM_NOTCH:	stream << ".NOTCH."; break;
		case ENUM_HOLE:	stream << ".HOLE."; break;
		case ENUM_MITER:	stream << ".MITER."; break;
		case ENUM_CHAMFER:	stream << ".CHAMFER."; break;
		case ENUM_EDGE:	stream << ".EDGE."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcVoidingFeatureTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_CUTOUT:	return L"CUTOUT";
		case ENUM_NOTCH:	return L"NOTCH";
		case ENUM_HOLE:	return L"HOLE";
		case ENUM_MITER:	return L"MITER";
		case ENUM_CHAMFER:	return L"CHAMFER";
		case ENUM_EDGE:	return L"EDGE";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcVoidingFeatureTypeEnum> IfcVoidingFeatureTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcVoidingFeatureTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcVoidingFeatureTypeEnum>(); }
	shared_ptr<IfcVoidingFeatureTypeEnum> type_object( new IfcVoidingFeatureTypeEnum() );
	if( boost::iequals( arg, L".CUTOUT." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_CUTOUT;
	}
	else if( boost::iequals( arg, L".NOTCH." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_NOTCH;
	}
	else if( boost::iequals( arg, L".HOLE." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_HOLE;
	}
	else if( boost::iequals( arg, L".MITER." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_MITER;
	}
	else if( boost::iequals( arg, L".CHAMFER." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_CHAMFER;
	}
	else if( boost::iequals( arg, L".EDGE." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_EDGE;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcVoidingFeatureTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
