// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool Xbim.CodeGeneration 
//  
//     Changes to this file may cause incorrect behaviour and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

using Xbim.Ifc4.Interfaces;
using System.Collections.Generic;
using System.Linq;
using Xbim.Common;

//## Custom using statements
//##

// ReSharper disable once CheckNamespace
namespace Xbim.Ifc4x3.SharedBldgElements
{
	public partial class @IfcBeamType : IIfcBeamType
	{

		[CrossSchemaAttribute(typeof(IIfcBeamType), 10)]
		Ifc4.Interfaces.IfcBeamTypeEnum IIfcBeamType.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcBeamTypeEnum.BEAM:
						return Ifc4.Interfaces.IfcBeamTypeEnum.BEAM;
					case IfcBeamTypeEnum.CORNICE:
                        //## Handle translation of CORNICE member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.DIAPHRAGM:
                        //## Handle translation of DIAPHRAGM member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.EDGEBEAM:
                        //## Handle translation of EDGEBEAM member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.GIRDER_SEGMENT:
                        //## Handle translation of GIRDER_SEGMENT member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.HATSTONE:
                        //## Handle translation of HATSTONE member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.HOLLOWCORE:
						return Ifc4.Interfaces.IfcBeamTypeEnum.HOLLOWCORE;
					case IfcBeamTypeEnum.JOIST:
						return Ifc4.Interfaces.IfcBeamTypeEnum.JOIST;
					case IfcBeamTypeEnum.LINTEL:
						return Ifc4.Interfaces.IfcBeamTypeEnum.LINTEL;
					case IfcBeamTypeEnum.PIERCAP:
                        //## Handle translation of PIERCAP member from IfcBeamTypeEnum in property PredefinedType
                        return this.GetUserDefined<Ifc4.Interfaces.IfcBeamTypeEnum>();
                    //##
                    case IfcBeamTypeEnum.SPANDREL:
						return Ifc4.Interfaces.IfcBeamTypeEnum.SPANDREL;
					case IfcBeamTypeEnum.T_BEAM:
						return Ifc4.Interfaces.IfcBeamTypeEnum.T_BEAM;
					case IfcBeamTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcBeamTypeEnum.USERDEFINED;
					case IfcBeamTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcBeamTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcBeamTypeEnum.BEAM:
						PredefinedType = IfcBeamTypeEnum.BEAM;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.JOIST:
						PredefinedType = IfcBeamTypeEnum.JOIST;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.HOLLOWCORE:
						PredefinedType = IfcBeamTypeEnum.HOLLOWCORE;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.LINTEL:
						PredefinedType = IfcBeamTypeEnum.LINTEL;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.SPANDREL:
						PredefinedType = IfcBeamTypeEnum.SPANDREL;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.T_BEAM:
						PredefinedType = IfcBeamTypeEnum.T_BEAM;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.USERDEFINED:
						PredefinedType = IfcBeamTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcBeamTypeEnum.NOTDEFINED:
						PredefinedType = IfcBeamTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}