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

// TYPE IfcBSplineSurfaceForm = ENUMERATION OF	(PLANE_SURF	,CYLINDRICAL_SURF	,CONICAL_SURF	,SPHERICAL_SURF	,TOROIDAL_SURF	,SURF_OF_REVOLUTION	,RULED_SURF	,GENERALISED_CONE	,QUADRIC_SURF	,SURF_OF_LINEAR_EXTRUSION	,UNSPECIFIED);
IfcBSplineSurfaceForm::~IfcBSplineSurfaceForm() {}
shared_ptr<BuildingObject> IfcBSplineSurfaceForm::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcBSplineSurfaceForm> copy_self( new IfcBSplineSurfaceForm() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcBSplineSurfaceForm::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCBSPLINESURFACEFORM("; }
	switch( m_enum )
	{
		case ENUM_PLANE_SURF:	stream << ".PLANE_SURF."; break;
		case ENUM_CYLINDRICAL_SURF:	stream << ".CYLINDRICAL_SURF."; break;
		case ENUM_CONICAL_SURF:	stream << ".CONICAL_SURF."; break;
		case ENUM_SPHERICAL_SURF:	stream << ".SPHERICAL_SURF."; break;
		case ENUM_TOROIDAL_SURF:	stream << ".TOROIDAL_SURF."; break;
		case ENUM_SURF_OF_REVOLUTION:	stream << ".SURF_OF_REVOLUTION."; break;
		case ENUM_RULED_SURF:	stream << ".RULED_SURF."; break;
		case ENUM_GENERALISED_CONE:	stream << ".GENERALISED_CONE."; break;
		case ENUM_QUADRIC_SURF:	stream << ".QUADRIC_SURF."; break;
		case ENUM_SURF_OF_LINEAR_EXTRUSION:	stream << ".SURF_OF_LINEAR_EXTRUSION."; break;
		case ENUM_UNSPECIFIED:	stream << ".UNSPECIFIED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcBSplineSurfaceForm::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_PLANE_SURF:	return L"PLANE_SURF";
		case ENUM_CYLINDRICAL_SURF:	return L"CYLINDRICAL_SURF";
		case ENUM_CONICAL_SURF:	return L"CONICAL_SURF";
		case ENUM_SPHERICAL_SURF:	return L"SPHERICAL_SURF";
		case ENUM_TOROIDAL_SURF:	return L"TOROIDAL_SURF";
		case ENUM_SURF_OF_REVOLUTION:	return L"SURF_OF_REVOLUTION";
		case ENUM_RULED_SURF:	return L"RULED_SURF";
		case ENUM_GENERALISED_CONE:	return L"GENERALISED_CONE";
		case ENUM_QUADRIC_SURF:	return L"QUADRIC_SURF";
		case ENUM_SURF_OF_LINEAR_EXTRUSION:	return L"SURF_OF_LINEAR_EXTRUSION";
		case ENUM_UNSPECIFIED:	return L"UNSPECIFIED";
	}
	return L"";
}
shared_ptr<IfcBSplineSurfaceForm> IfcBSplineSurfaceForm::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcBSplineSurfaceForm>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcBSplineSurfaceForm>(); }
	shared_ptr<IfcBSplineSurfaceForm> type_object( new IfcBSplineSurfaceForm() );
	if( boost::iequals( arg, L".PLANE_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_PLANE_SURF;
	}
	else if( boost::iequals( arg, L".CYLINDRICAL_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_CYLINDRICAL_SURF;
	}
	else if( boost::iequals( arg, L".CONICAL_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_CONICAL_SURF;
	}
	else if( boost::iequals( arg, L".SPHERICAL_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_SPHERICAL_SURF;
	}
	else if( boost::iequals( arg, L".TOROIDAL_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_TOROIDAL_SURF;
	}
	else if( boost::iequals( arg, L".SURF_OF_REVOLUTION." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_SURF_OF_REVOLUTION;
	}
	else if( boost::iequals( arg, L".RULED_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_RULED_SURF;
	}
	else if( boost::iequals( arg, L".GENERALISED_CONE." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_GENERALISED_CONE;
	}
	else if( boost::iequals( arg, L".QUADRIC_SURF." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_QUADRIC_SURF;
	}
	else if( boost::iequals( arg, L".SURF_OF_LINEAR_EXTRUSION." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_SURF_OF_LINEAR_EXTRUSION;
	}
	else if( boost::iequals( arg, L".UNSPECIFIED." ) )
	{
		type_object->m_enum = IfcBSplineSurfaceForm::ENUM_UNSPECIFIED;
	}
	return type_object;
}
