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

// TYPE IfcConstructionMaterialResourceTypeEnum = ENUMERATION OF	(AGGREGATES	,CONCRETE	,DRYWALL	,FUEL	,GYPSUM	,MASONRY	,METAL	,PLASTIC	,WOOD	,NOTDEFINED	,USERDEFINED);
IfcConstructionMaterialResourceTypeEnum::~IfcConstructionMaterialResourceTypeEnum() {}
shared_ptr<BuildingObject> IfcConstructionMaterialResourceTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcConstructionMaterialResourceTypeEnum> copy_self( new IfcConstructionMaterialResourceTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcConstructionMaterialResourceTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCCONSTRUCTIONMATERIALRESOURCETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_AGGREGATES:	stream << ".AGGREGATES."; break;
		case ENUM_CONCRETE:	stream << ".CONCRETE."; break;
		case ENUM_DRYWALL:	stream << ".DRYWALL."; break;
		case ENUM_FUEL:	stream << ".FUEL."; break;
		case ENUM_GYPSUM:	stream << ".GYPSUM."; break;
		case ENUM_MASONRY:	stream << ".MASONRY."; break;
		case ENUM_METAL:	stream << ".METAL."; break;
		case ENUM_PLASTIC:	stream << ".PLASTIC."; break;
		case ENUM_WOOD:	stream << ".WOOD."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcConstructionMaterialResourceTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_AGGREGATES:	return L"AGGREGATES";
		case ENUM_CONCRETE:	return L"CONCRETE";
		case ENUM_DRYWALL:	return L"DRYWALL";
		case ENUM_FUEL:	return L"FUEL";
		case ENUM_GYPSUM:	return L"GYPSUM";
		case ENUM_MASONRY:	return L"MASONRY";
		case ENUM_METAL:	return L"METAL";
		case ENUM_PLASTIC:	return L"PLASTIC";
		case ENUM_WOOD:	return L"WOOD";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
	}
	return L"";
}
shared_ptr<IfcConstructionMaterialResourceTypeEnum> IfcConstructionMaterialResourceTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcConstructionMaterialResourceTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcConstructionMaterialResourceTypeEnum>(); }
	shared_ptr<IfcConstructionMaterialResourceTypeEnum> type_object( new IfcConstructionMaterialResourceTypeEnum() );
	if( boost::iequals( arg, L".AGGREGATES." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_AGGREGATES;
	}
	else if( boost::iequals( arg, L".CONCRETE." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_CONCRETE;
	}
	else if( boost::iequals( arg, L".DRYWALL." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_DRYWALL;
	}
	else if( boost::iequals( arg, L".FUEL." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_FUEL;
	}
	else if( boost::iequals( arg, L".GYPSUM." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_GYPSUM;
	}
	else if( boost::iequals( arg, L".MASONRY." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_MASONRY;
	}
	else if( boost::iequals( arg, L".METAL." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_METAL;
	}
	else if( boost::iequals( arg, L".PLASTIC." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_PLASTIC;
	}
	else if( boost::iequals( arg, L".WOOD." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_WOOD;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_NOTDEFINED;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcConstructionMaterialResourceTypeEnum::ENUM_USERDEFINED;
	}
	return type_object;
}
