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

// TYPE IfcFurnitureTypeEnum = ENUMERATION OF	(CHAIR	,TABLE	,DESK	,BED	,FILECABINET	,SHELF	,SOFA	,USERDEFINED	,NOTDEFINED);
IfcFurnitureTypeEnum::~IfcFurnitureTypeEnum() {}
shared_ptr<BuildingObject> IfcFurnitureTypeEnum::getDeepCopy( BuildingCopyOptions& options )
{
	shared_ptr<IfcFurnitureTypeEnum> copy_self( new IfcFurnitureTypeEnum() );
	copy_self->m_enum = m_enum;
	return copy_self;
}
void IfcFurnitureTypeEnum::getStepParameter( std::stringstream& stream, bool is_select_type ) const
{
	if( is_select_type ) { stream << "IFCFURNITURETYPEENUM("; }
	switch( m_enum )
	{
		case ENUM_CHAIR:	stream << ".CHAIR."; break;
		case ENUM_TABLE:	stream << ".TABLE."; break;
		case ENUM_DESK:	stream << ".DESK."; break;
		case ENUM_BED:	stream << ".BED."; break;
		case ENUM_FILECABINET:	stream << ".FILECABINET."; break;
		case ENUM_SHELF:	stream << ".SHELF."; break;
		case ENUM_SOFA:	stream << ".SOFA."; break;
		case ENUM_USERDEFINED:	stream << ".USERDEFINED."; break;
		case ENUM_NOTDEFINED:	stream << ".NOTDEFINED."; break;
	}
	if( is_select_type ) { stream << ")"; }
}
const std::wstring IfcFurnitureTypeEnum::toString() const
{
	switch( m_enum ) 
	{
		case ENUM_CHAIR:	return L"CHAIR";
		case ENUM_TABLE:	return L"TABLE";
		case ENUM_DESK:	return L"DESK";
		case ENUM_BED:	return L"BED";
		case ENUM_FILECABINET:	return L"FILECABINET";
		case ENUM_SHELF:	return L"SHELF";
		case ENUM_SOFA:	return L"SOFA";
		case ENUM_USERDEFINED:	return L"USERDEFINED";
		case ENUM_NOTDEFINED:	return L"NOTDEFINED";
	}
	return L"";
}
shared_ptr<IfcFurnitureTypeEnum> IfcFurnitureTypeEnum::createObjectFromSTEP( const std::wstring& arg, const std::map<int,shared_ptr<BuildingEntity> >& map )
{
	if( arg.compare( L"$" ) == 0 ) { return shared_ptr<IfcFurnitureTypeEnum>(); }
	if( arg.compare( L"*" ) == 0 ) { return shared_ptr<IfcFurnitureTypeEnum>(); }
	shared_ptr<IfcFurnitureTypeEnum> type_object( new IfcFurnitureTypeEnum() );
	if( boost::iequals( arg, L".CHAIR." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_CHAIR;
	}
	else if( boost::iequals( arg, L".TABLE." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_TABLE;
	}
	else if( boost::iequals( arg, L".DESK." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_DESK;
	}
	else if( boost::iequals( arg, L".BED." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_BED;
	}
	else if( boost::iequals( arg, L".FILECABINET." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_FILECABINET;
	}
	else if( boost::iequals( arg, L".SHELF." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_SHELF;
	}
	else if( boost::iequals( arg, L".SOFA." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_SOFA;
	}
	else if( boost::iequals( arg, L".USERDEFINED." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_USERDEFINED;
	}
	else if( boost::iequals( arg, L".NOTDEFINED." ) )
	{
		type_object->m_enum = IfcFurnitureTypeEnum::ENUM_NOTDEFINED;
	}
	return type_object;
}
