// ------------------------------------------------------------------------------
// <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.GeometryResource
{
	public partial class @IfcBSplineCurveWithKnots : IIfcBSplineCurveWithKnots
	{

		[CrossSchemaAttribute(typeof(IIfcBSplineCurveWithKnots), 6)]
		IItemSet<Xbim.Ifc4.MeasureResource.IfcInteger> IIfcBSplineCurveWithKnots.KnotMultiplicities 
		{ 
			get
			{
			
				return new Common.Collections.ProxyValueSet<MeasureResource.IfcInteger, Ifc4.MeasureResource.IfcInteger>(KnotMultiplicities, 
					s => new Ifc4.MeasureResource.IfcInteger(s), 
					t => new MeasureResource.IfcInteger(t));
			} 
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurveWithKnots), 7)]
		IItemSet<Xbim.Ifc4.MeasureResource.IfcParameterValue> IIfcBSplineCurveWithKnots.Knots 
		{ 
			get
			{
			
				return new Common.Collections.ProxyValueSet<MeasureResource.IfcParameterValue, Ifc4.MeasureResource.IfcParameterValue>(Knots, 
					s => new Ifc4.MeasureResource.IfcParameterValue(s), 
					t => new MeasureResource.IfcParameterValue(t));
			} 
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurveWithKnots), 8)]
		Ifc4.Interfaces.IfcKnotType IIfcBSplineCurveWithKnots.KnotSpec 
		{ 
			get
			{
				//## Custom code to handle enumeration of KnotSpec
				//##
				switch (KnotSpec)
				{
					case IfcKnotType.PIECEWISE_BEZIER_KNOTS:
						return Ifc4.Interfaces.IfcKnotType.PIECEWISE_BEZIER_KNOTS;
					case IfcKnotType.QUASI_UNIFORM_KNOTS:
						return Ifc4.Interfaces.IfcKnotType.QUASI_UNIFORM_KNOTS;
					case IfcKnotType.UNIFORM_KNOTS:
						return Ifc4.Interfaces.IfcKnotType.UNIFORM_KNOTS;
					case IfcKnotType.UNSPECIFIED:
						return Ifc4.Interfaces.IfcKnotType.UNSPECIFIED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of KnotSpec
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcKnotType.UNIFORM_KNOTS:
						KnotSpec = IfcKnotType.UNIFORM_KNOTS;
						return;
					case Ifc4.Interfaces.IfcKnotType.QUASI_UNIFORM_KNOTS:
						KnotSpec = IfcKnotType.QUASI_UNIFORM_KNOTS;
						return;
					case Ifc4.Interfaces.IfcKnotType.PIECEWISE_BEZIER_KNOTS:
						KnotSpec = IfcKnotType.PIECEWISE_BEZIER_KNOTS;
						return;
					case Ifc4.Interfaces.IfcKnotType.UNSPECIFIED:
						KnotSpec = IfcKnotType.UNSPECIFIED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}
		Ifc4.MeasureResource.IfcInteger IIfcBSplineCurveWithKnots.UpperIndexOnKnots 
		{
			get 
			{
				return new Ifc4.MeasureResource.IfcInteger(UpperIndexOnKnots);
			}
		}

	//## Custom code
	//##
	}
}