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

// TYPE IfcCableSegmentTypeEnum = ENUMERATION OF	(BUSBARSEGMENT	,CABLESEGMENT	,CONDUCTORSEGMENT	,CORESEGMENT	,USERDEFINED	,NOTDEFINED);
IfcCableSegmentTypeEnum::~IfcCableSegmentTypeEnum() {}
shared_ptr<BuildingObject> IfcCableSegmentTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcCableSegmentTypeEnum> copy_self( new IfcCableSegmentTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcCableSegmentTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCABLESEGMENTTYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_BUSBARSEGMENT:	stream << ".BUSBARSEGMENT."; break;
		case ENUM_CABLESEGMENT:	stream << ".CABLESEGMENT."; break;
		case ENUM_CONDUCTORSEGMENT:	stream << ".CONDUCTORSEGMENT."; break;
		case ENUM_CORESEGMENT:	stream << ".CORESEGMENT."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcCableSegmentTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_BUSBARSEGMENT:	return L"BUSBARSEGMENT";
		case ENUM_CABLESEGMENT:	return L"CABLESEGMENT";
		case ENUM_CONDUCTORSEGMENT:	return L"CONDUCTORSEGMENT";
		case ENUM_CORESEGMENT:	return L"CORESEGMENT";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcCableSegmentTypeEnum> IfcCableSegmentTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcCableSegmentTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcCableSegmentTypeEnum>(); }
	shared_ptr<IfcCableSegmentTypeEnum> type_object( new IfcCableSegmentTypeEnum() );
	if( boost::iequals( arg, L".BUSBARSEGMENT." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_BUSBARSEGMENT;
	}
	else if( boost::iequals( arg, L".CABLESEGMENT." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_CABLESEGMENT;
	}
	else if( boost::iequals( arg, L".CONDUCTORSEGMENT." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_CONDUCTORSEGMENT;
	}
	else if( boost::iequals( arg, L".CORESEGMENT." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_CORESEGMENT;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcCableSegmentTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
