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

// TYPE IfcGeometricProjectionEnum = ENUMERATION OF	(GRAPH_VIEW	,SKETCH_VIEW	,MODEL_VIEW	,PLAN_VIEW	,REFLECTED_PLAN_VIEW	,SECTION_VIEW	,ELEVATION_VIEW	,USERDEFINED	,NOTDEFINED);
IfcGeometricProjectionEnum::~IfcGeometricProjectionEnum() {}
shared_ptr<BuildingObject> IfcGeometricProjectionEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcGeometricProjectionEnum> copy_self( new IfcGeometricProjectionEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcGeometricProjectionEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCGEOMETRICPROJECTIONENUM("; }
	switch( m_enum )
	{
		case ENUM_GRAPH_VIEW:	stream << ".GRAPH_VIEW."; break;
		case ENUM_SKETCH_VIEW:	stream << ".SKETCH_VIEW."; break;
		case ENUM_MODEL_VIEW:	stream << ".MODEL_VIEW."; break;
		case ENUM_PLAN_VIEW:	stream << ".PLAN_VIEW."; break;
		case ENUM_REFLECTED_PLAN_VIEW:	stream << ".REFLECTED_PLAN_VIEW."; break;
		case ENUM_SECTION_VIEW:	stream << ".SECTION_VIEW."; break;
		case ENUM_ELEVATION_VIEW:	stream << ".ELEVATION_VIEW."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcGeometricProjectionEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_GRAPH_VIEW:	return L"GRAPH_VIEW";
		case ENUM_SKETCH_VIEW:	return L"SKETCH_VIEW";
		case ENUM_MODEL_VIEW:	return L"MODEL_VIEW";
		case ENUM_PLAN_VIEW:	return L"PLAN_VIEW";
		case ENUM_REFLECTED_PLAN_VIEW:	return L"REFLECTED_PLAN_VIEW";
		case ENUM_SECTION_VIEW:	return L"SECTION_VIEW";
		case ENUM_ELEVATION_VIEW:	return L"ELEVATION_VIEW";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcGeometricProjectionEnum> IfcGeometricProjectionEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcGeometricProjectionEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcGeometricProjectionEnum>(); }
	shared_ptr<IfcGeometricProjectionEnum> type_object( new IfcGeometricProjectionEnum() );
	if( boost::iequals( arg, L".GRAPH_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_GRAPH_VIEW;
	}
	else if( boost::iequals( arg, L".SKETCH_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_SKETCH_VIEW;
	}
	else if( boost::iequals( arg, L".MODEL_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_MODEL_VIEW;
	}
	else if( boost::iequals( arg, L".PLAN_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_PLAN_VIEW;
	}
	else if( boost::iequals( arg, L".REFLECTED_PLAN_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_REFLECTED_PLAN_VIEW;
	}
	else if( boost::iequals( arg, L".SECTION_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_SECTION_VIEW;
	}
	else if( boost::iequals( arg, L".ELEVATION_VIEW." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_ELEVATION_VIEW;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcGeometricProjectionEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
