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

// TYPE IfcPreferredSurfaceCurveRepresentation = ENUMERATION OF	(CURVE3D	,PCURVE_S1	,PCURVE_S2);
IfcPreferredSurfaceCurveRepresentation::~IfcPreferredSurfaceCurveRepresentation() {}
shared_ptr<BuildingObject> IfcPreferredSurfaceCurveRepresentation::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcPreferredSurfaceCurveRepresentation> copy_self( new IfcPreferredSurfaceCurveRepresentation() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcPreferredSurfaceCurveRepresentation::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCPREFERREDSURFACECURVEREPRESENTATION("; }
	switch( m_enum )
	{
		case ENUM_CURVE3D:	stream << ".CURVE3D."; break;
		case ENUM_PCURVE_S1:	stream << ".PCURVE_S1."; break;
		case ENUM_PCURVE_S2:	stream << ".PCURVE_S2."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcPreferredSurfaceCurveRepresentation::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_CURVE3D:	return L"CURVE3D";
		case ENUM_PCURVE_S1:	return L"PCURVE_S1";
		case ENUM_PCURVE_S2:	return L"PCURVE_S2";
	}
	return L"";
}
shared_ptr<IfcPreferredSurfaceCurveRepresentation> IfcPreferredSurfaceCurveRepresentation::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcPreferredSurfaceCurveRepresentation>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcPreferredSurfaceCurveRepresentation>(); }
	shared_ptr<IfcPreferredSurfaceCurveRepresentation> type_object( new IfcPreferredSurfaceCurveRepresentation() );
	if( boost::iequals( arg, L".CURVE3D." ) )
	{
		type_object->m_enum = IfcPreferredSurfaceCurveRepresentation::ENUM_CURVE3D;
	}
	else if( boost::iequals( arg, L".PCURVE_S1." ) )
	{
		type_object->m_enum = IfcPreferredSurfaceCurveRepresentation::ENUM_PCURVE_S1;
	}
	else if( boost::iequals( arg, L".PCURVE_S2." ) )
	{
		type_object->m_enum = IfcPreferredSurfaceCurveRepresentation::ENUM_PCURVE_S2;
	}
	return type_object;
}
