// ------------------------------------------------------------------------------
// <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;

// ReSharper disable once CheckNamespace
namespace Xbim.Ifc2x3.StructuralAnalysisDomain
{
	public partial class @IfcStructuralCurveMember : IIfcStructuralCurveMember
	{

		[CrossSchemaAttribute(typeof(IIfcStructuralCurveMember), 8)]
		Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum IIfcStructuralCurveMember.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcStructuralCurveTypeEnum.RIGID_JOINED_MEMBER:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.RIGID_JOINED_MEMBER;
					case IfcStructuralCurveTypeEnum.PIN_JOINED_MEMBER:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.PIN_JOINED_MEMBER;
					case IfcStructuralCurveTypeEnum.CABLE:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.CABLE;
					case IfcStructuralCurveTypeEnum.TENSION_MEMBER:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.TENSION_MEMBER;
					case IfcStructuralCurveTypeEnum.COMPRESSION_MEMBER:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.COMPRESSION_MEMBER;
					case IfcStructuralCurveTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.USERDEFINED;
					case IfcStructuralCurveTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.RIGID_JOINED_MEMBER:
						PredefinedType = IfcStructuralCurveTypeEnum.RIGID_JOINED_MEMBER;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.PIN_JOINED_MEMBER:
						PredefinedType = IfcStructuralCurveTypeEnum.PIN_JOINED_MEMBER;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.CABLE:
						PredefinedType = IfcStructuralCurveTypeEnum.CABLE;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.TENSION_MEMBER:
						PredefinedType = IfcStructuralCurveTypeEnum.TENSION_MEMBER;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.COMPRESSION_MEMBER:
						PredefinedType = IfcStructuralCurveTypeEnum.COMPRESSION_MEMBER;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.USERDEFINED:
						PredefinedType = IfcStructuralCurveTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcStructuralCurveMemberTypeEnum.NOTDEFINED:
						PredefinedType = IfcStructuralCurveTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}

		private  IIfcDirection _axis;


		[CrossSchemaAttribute(typeof(IIfcStructuralCurveMember), 9)]
		IIfcDirection IIfcStructuralCurveMember.Axis 
		{ 
			get
			{
				return _axis;
			} 
			set
			{
				SetValue(v => _axis = v, _axis, value, "Axis", -9);
				
			}
		}
	//## Custom code
	//##
	}
}