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

// TYPE IfcCostScheduleTypeEnum = ENUMERATION OF	(BUDGET	,COSTPLAN	,ESTIMATE	,TENDER	,PRICEDBILLOFQUANTITIES	,UNPRICEDBILLOFQUANTITIES	,SCHEDULEOFRATES	,USERDEFINED	,NOTDEFINED);
IfcCostScheduleTypeEnum::~IfcCostScheduleTypeEnum() {}
shared_ptr<BuildingObject> IfcCostScheduleTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcCostScheduleTypeEnum> copy_self( new IfcCostScheduleTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcCostScheduleTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCOSTSCHEDULETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_BUDGET:	stream << ".BUDGET."; break;
		case ENUM_COSTPLAN:	stream << ".COSTPLAN."; break;
		case ENUM_ESTIMATE:	stream << ".ESTIMATE."; break;
		case ENUM_TENDER:	stream << ".TENDER."; break;
		case ENUM_PRICEDBILLOFQUANTITIES:	stream << ".PRICEDBILLOFQUANTITIES."; break;
		case ENUM_UNPRICEDBILLOFQUANTITIES:	stream << ".UNPRICEDBILLOFQUANTITIES."; break;
		case ENUM_SCHEDULEOFRATES:	stream << ".SCHEDULEOFRATES."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcCostScheduleTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_BUDGET:	return L"BUDGET";
		case ENUM_COSTPLAN:	return L"COSTPLAN";
		case ENUM_ESTIMATE:	return L"ESTIMATE";
		case ENUM_TENDER:	return L"TENDER";
		case ENUM_PRICEDBILLOFQUANTITIES:	return L"PRICEDBILLOFQUANTITIES";
		case ENUM_UNPRICEDBILLOFQUANTITIES:	return L"UNPRICEDBILLOFQUANTITIES";
		case ENUM_SCHEDULEOFRATES:	return L"SCHEDULEOFRATES";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcCostScheduleTypeEnum> IfcCostScheduleTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcCostScheduleTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcCostScheduleTypeEnum>(); }
	shared_ptr<IfcCostScheduleTypeEnum> type_object( new IfcCostScheduleTypeEnum() );
	if( boost::iequals( arg, L".BUDGET." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_BUDGET;
	}
	else if( boost::iequals( arg, L".COSTPLAN." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_COSTPLAN;
	}
	else if( boost::iequals( arg, L".ESTIMATE." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_ESTIMATE;
	}
	else if( boost::iequals( arg, L".TENDER." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_TENDER;
	}
	else if( boost::iequals( arg, L".PRICEDBILLOFQUANTITIES." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_PRICEDBILLOFQUANTITIES;
	}
	else if( boost::iequals( arg, L".UNPRICEDBILLOFQUANTITIES." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_UNPRICEDBILLOFQUANTITIES;
	}
	else if( boost::iequals( arg, L".SCHEDULEOFRATES." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_SCHEDULEOFRATES;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcCostScheduleTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
