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

// TYPE IfcConnectionTypeEnum = ENUMERATION OF	(ATPATH	,ATSTART	,ATEND	,NOTDEFINED);
IfcConnectionTypeEnum::~IfcConnectionTypeEnum() {}
shared_ptr<BuildingObject> IfcConnectionTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcConnectionTypeEnum> copy_self( new IfcConnectionTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcConnectionTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCONNECTIONTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_ATPATH:	stream << ".ATPATH."; break;
		case ENUM_ATSTART:	stream << ".ATSTART."; break;
		case ENUM_ATEND:	stream << ".ATEND."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcConnectionTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_ATPATH:	return L"ATPATH";
		case ENUM_ATSTART:	return L"ATSTART";
		case ENUM_ATEND:	return L"ATEND";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcConnectionTypeEnum> IfcConnectionTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcConnectionTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcConnectionTypeEnum>(); }
	shared_ptr<IfcConnectionTypeEnum> type_object( new IfcConnectionTypeEnum() );
	if( boost::iequals( arg, L".ATPATH." ) )
	{
		type_object->m_enum = IfcConnectionTypeEnum::ENUM_ATPATH;
	}
	else if( boost::iequals( arg, L".ATSTART." ) )
	{
		type_object->m_enum = IfcConnectionTypeEnum::ENUM_ATSTART;
	}
	else if( boost::iequals( arg, L".ATEND." ) )
	{
		type_object->m_enum = IfcConnectionTypeEnum::ENUM_ATEND;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcConnectionTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
