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

// TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF	(FENESTRATION	,FOUNDATION	,LOADBEARING	,OUTERSHELL	,SHADING	,TRANSPORT	,USERDEFINED	,NOTDEFINED);
IfcBuildingSystemTypeEnum::~IfcBuildingSystemTypeEnum() {}
shared_ptr<BuildingObject> IfcBuildingSystemTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcBuildingSystemTypeEnum> copy_self( new IfcBuildingSystemTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcBuildingSystemTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCBUILDINGSYSTEMTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_FENESTRATION:	stream << ".FENESTRATION."; break;
		case ENUM_FOUNDATION:	stream << ".FOUNDATION."; break;
		case ENUM_LOADBEARING:	stream << ".LOADBEARING."; break;
		case ENUM_OUTERSHELL:	stream << ".OUTERSHELL."; break;
		case ENUM_SHADING:	stream << ".SHADING."; break;
		case ENUM_TRANSPORT:	stream << ".TRANSPORT."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcBuildingSystemTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_FENESTRATION:	return L"FENESTRATION";
		case ENUM_FOUNDATION:	return L"FOUNDATION";
		case ENUM_LOADBEARING:	return L"LOADBEARING";
		case ENUM_OUTERSHELL:	return L"OUTERSHELL";
		case ENUM_SHADING:	return L"SHADING";
		case ENUM_TRANSPORT:	return L"TRANSPORT";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcBuildingSystemTypeEnum> IfcBuildingSystemTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcBuildingSystemTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcBuildingSystemTypeEnum>(); }
	shared_ptr<IfcBuildingSystemTypeEnum> type_object( new IfcBuildingSystemTypeEnum() );
	if( boost::iequals( arg, L".FENESTRATION." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_FENESTRATION;
	}
	else if( boost::iequals( arg, L".FOUNDATION." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_FOUNDATION;
	}
	else if( boost::iequals( arg, L".LOADBEARING." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_LOADBEARING;
	}
	else if( boost::iequals( arg, L".OUTERSHELL." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_OUTERSHELL;
	}
	else if( boost::iequals( arg, L".SHADING." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_SHADING;
	}
	else if( boost::iequals( arg, L".TRANSPORT." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_TRANSPORT;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcBuildingSystemTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
