// ------------------------------------------------------------------------------
// <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.StructuralElementsDomain
{
	public partial class @IfcTendonAnchorType : IIfcTendonAnchorType
	{

		[CrossSchemaAttribute(typeof(IIfcTendonAnchorType), 10)]
		Ifc4.Interfaces.IfcTendonAnchorTypeEnum IIfcTendonAnchorType.PredefinedType 
		{ 
			get
			{
				//## Custom code to handle enumeration of PredefinedType
				//##
				switch (PredefinedType)
				{
					case IfcTendonAnchorTypeEnum.COUPLER:
						return Ifc4.Interfaces.IfcTendonAnchorTypeEnum.COUPLER;
					case IfcTendonAnchorTypeEnum.FIXED_END:
						return Ifc4.Interfaces.IfcTendonAnchorTypeEnum.FIXED_END;
					case IfcTendonAnchorTypeEnum.TENSIONING_END:
						return Ifc4.Interfaces.IfcTendonAnchorTypeEnum.TENSIONING_END;
					case IfcTendonAnchorTypeEnum.USERDEFINED:
						//## Optional custom handling of PredefinedType == .USERDEFINED. 
						//##
						return Ifc4.Interfaces.IfcTendonAnchorTypeEnum.USERDEFINED;
					case IfcTendonAnchorTypeEnum.NOTDEFINED:
						return Ifc4.Interfaces.IfcTendonAnchorTypeEnum.NOTDEFINED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of PredefinedType
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcTendonAnchorTypeEnum.COUPLER:
						PredefinedType = IfcTendonAnchorTypeEnum.COUPLER;
						return;
					case Ifc4.Interfaces.IfcTendonAnchorTypeEnum.FIXED_END:
						PredefinedType = IfcTendonAnchorTypeEnum.FIXED_END;
						return;
					case Ifc4.Interfaces.IfcTendonAnchorTypeEnum.TENSIONING_END:
						PredefinedType = IfcTendonAnchorTypeEnum.TENSIONING_END;
						return;
					case Ifc4.Interfaces.IfcTendonAnchorTypeEnum.USERDEFINED:
						PredefinedType = IfcTendonAnchorTypeEnum.USERDEFINED;
						return;
					case Ifc4.Interfaces.IfcTendonAnchorTypeEnum.NOTDEFINED:
						PredefinedType = IfcTendonAnchorTypeEnum.NOTDEFINED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
	//## Custom code
	//##
	}
}