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

// TYPE IfcComplexPropertyTemplateTypeEnum = ENUMERATION OF	(P_COMPLEX	,Q_COMPLEX);
IfcComplexPropertyTemplateTypeEnum::~IfcComplexPropertyTemplateTypeEnum() {}
shared_ptr<BuildingObject> IfcComplexPropertyTemplateTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcComplexPropertyTemplateTypeEnum> copy_self( new IfcComplexPropertyTemplateTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcComplexPropertyTemplateTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCOMPLEXPROPERTYTEMPLATETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_P_COMPLEX:	stream << ".P_COMPLEX."; break;
		case ENUM_Q_COMPLEX:	stream << ".Q_COMPLEX."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcComplexPropertyTemplateTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_P_COMPLEX:	return L"P_COMPLEX";
		case ENUM_Q_COMPLEX:	return L"Q_COMPLEX";
	}
	return L"";
}
shared_ptr<IfcComplexPropertyTemplateTypeEnum> IfcComplexPropertyTemplateTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcComplexPropertyTemplateTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcComplexPropertyTemplateTypeEnum>(); }
	shared_ptr<IfcComplexPropertyTemplateTypeEnum> type_object( new IfcComplexPropertyTemplateTypeEnum() );
	if( boost::iequals( arg, L".P_COMPLEX." ) )
	{
		type_object->m_enum = IfcComplexPropertyTemplateTypeEnum::ENUM_P_COMPLEX;
	}
	else if( boost::iequals( arg, L".Q_COMPLEX." ) )
	{
		type_object->m_enum = IfcComplexPropertyTemplateTypeEnum::ENUM_Q_COMPLEX;
	}
	return type_object;
}
