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

// TYPE IfcPropertySetTemplateTypeEnum = ENUMERATION OF	(PSET_TYPEDRIVENONLY	,PSET_TYPEDRIVENOVERRIDE	,PSET_OCCURRENCEDRIVEN	,PSET_PERFORMANCEDRIVEN	,QTO_TYPEDRIVENONLY	,QTO_TYPEDRIVENOVERRIDE	,QTO_OCCURRENCEDRIVEN	,NOTDEFINED);
IfcPropertySetTemplateTypeEnum::~IfcPropertySetTemplateTypeEnum() {}
shared_ptr<BuildingObject> IfcPropertySetTemplateTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcPropertySetTemplateTypeEnum> copy_self( new IfcPropertySetTemplateTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcPropertySetTemplateTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCPROPERTYSETTEMPLATETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_PSET_TYPEDRIVENONLY:	stream << ".PSET_TYPEDRIVENONLY."; break;
		case ENUM_PSET_TYPEDRIVENOVERRIDE:	stream << ".PSET_TYPEDRIVENOVERRIDE."; break;
		case ENUM_PSET_OCCURRENCEDRIVEN:	stream << ".PSET_OCCURRENCEDRIVEN."; break;
		case ENUM_PSET_PERFORMANCEDRIVEN:	stream << ".PSET_PERFORMANCEDRIVEN."; break;
		case ENUM_QTO_TYPEDRIVENONLY:	stream << ".QTO_TYPEDRIVENONLY."; break;
		case ENUM_QTO_TYPEDRIVENOVERRIDE:	stream << ".QTO_TYPEDRIVENOVERRIDE."; break;
		case ENUM_QTO_OCCURRENCEDRIVEN:	stream << ".QTO_OCCURRENCEDRIVEN."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcPropertySetTemplateTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_PSET_TYPEDRIVENONLY:	return L"PSET_TYPEDRIVENONLY";
		case ENUM_PSET_TYPEDRIVENOVERRIDE:	return L"PSET_TYPEDRIVENOVERRIDE";
		case ENUM_PSET_OCCURRENCEDRIVEN:	return L"PSET_OCCURRENCEDRIVEN";
		case ENUM_PSET_PERFORMANCEDRIVEN:	return L"PSET_PERFORMANCEDRIVEN";
		case ENUM_QTO_TYPEDRIVENONLY:	return L"QTO_TYPEDRIVENONLY";
		case ENUM_QTO_TYPEDRIVENOVERRIDE:	return L"QTO_TYPEDRIVENOVERRIDE";
		case ENUM_QTO_OCCURRENCEDRIVEN:	return L"QTO_OCCURRENCEDRIVEN";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcPropertySetTemplateTypeEnum> IfcPropertySetTemplateTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcPropertySetTemplateTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcPropertySetTemplateTypeEnum>(); }
	shared_ptr<IfcPropertySetTemplateTypeEnum> type_object( new IfcPropertySetTemplateTypeEnum() );
	if( boost::iequals( arg, L".PSET_TYPEDRIVENONLY." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_PSET_TYPEDRIVENONLY;
	}
	else if( boost::iequals( arg, L".PSET_TYPEDRIVENOVERRIDE." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_PSET_TYPEDRIVENOVERRIDE;
	}
	else if( boost::iequals( arg, L".PSET_OCCURRENCEDRIVEN." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_PSET_OCCURRENCEDRIVEN;
	}
	else if( boost::iequals( arg, L".PSET_PERFORMANCEDRIVEN." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_PSET_PERFORMANCEDRIVEN;
	}
	else if( boost::iequals( arg, L".QTO_TYPEDRIVENONLY." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_QTO_TYPEDRIVENONLY;
	}
	else if( boost::iequals( arg, L".QTO_TYPEDRIVENOVERRIDE." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_QTO_TYPEDRIVENOVERRIDE;
	}
	else if( boost::iequals( arg, L".QTO_OCCURRENCEDRIVEN." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_QTO_OCCURRENCEDRIVEN;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcPropertySetTemplateTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
