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

		[CrossSchemaAttribute(typeof(IIfcBSplineCurve), 1)]
		Ifc4.MeasureResource.IfcInteger IIfcBSplineCurve.Degree 
		{ 
			get
			{
				//## Handle return of Degree for which no match was found
                return new Ifc4.MeasureResource.IfcInteger(Degree);
				//##
			} 
			set
			{
				Degree = value;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurve), 2)]
		IItemSet<IIfcCartesianPoint> IIfcBSplineCurve.ControlPointsList 
		{ 
			get
			{
			
				return new Common.Collections.ProxyItemSet<IfcCartesianPoint, IIfcCartesianPoint>(ControlPointsList);
			} 
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurve), 3)]
		Ifc4.Interfaces.IfcBSplineCurveForm IIfcBSplineCurve.CurveForm 
		{ 
			get
			{
				//## Custom code to handle enumeration of CurveForm
				//##
				switch (CurveForm)
				{
					case IfcBSplineCurveForm.POLYLINE_FORM:
						return Ifc4.Interfaces.IfcBSplineCurveForm.POLYLINE_FORM;
					case IfcBSplineCurveForm.CIRCULAR_ARC:
						return Ifc4.Interfaces.IfcBSplineCurveForm.CIRCULAR_ARC;
					case IfcBSplineCurveForm.ELLIPTIC_ARC:
						return Ifc4.Interfaces.IfcBSplineCurveForm.ELLIPTIC_ARC;
					case IfcBSplineCurveForm.PARABOLIC_ARC:
						return Ifc4.Interfaces.IfcBSplineCurveForm.PARABOLIC_ARC;
					case IfcBSplineCurveForm.HYPERBOLIC_ARC:
						return Ifc4.Interfaces.IfcBSplineCurveForm.HYPERBOLIC_ARC;
					case IfcBSplineCurveForm.UNSPECIFIED:
						return Ifc4.Interfaces.IfcBSplineCurveForm.UNSPECIFIED;
					
					default:
						throw new System.ArgumentOutOfRangeException();
				}
			} 
			set
			{
				//## Custom code to handle setting of enumeration of CurveForm
				//##
				switch (value)
				{
					case Ifc4.Interfaces.IfcBSplineCurveForm.POLYLINE_FORM:
						CurveForm = IfcBSplineCurveForm.POLYLINE_FORM;
						return;
					case Ifc4.Interfaces.IfcBSplineCurveForm.CIRCULAR_ARC:
						CurveForm = IfcBSplineCurveForm.CIRCULAR_ARC;
						return;
					case Ifc4.Interfaces.IfcBSplineCurveForm.ELLIPTIC_ARC:
						CurveForm = IfcBSplineCurveForm.ELLIPTIC_ARC;
						return;
					case Ifc4.Interfaces.IfcBSplineCurveForm.PARABOLIC_ARC:
						CurveForm = IfcBSplineCurveForm.PARABOLIC_ARC;
						return;
					case Ifc4.Interfaces.IfcBSplineCurveForm.HYPERBOLIC_ARC:
						CurveForm = IfcBSplineCurveForm.HYPERBOLIC_ARC;
						return;
					case Ifc4.Interfaces.IfcBSplineCurveForm.UNSPECIFIED:
						CurveForm = IfcBSplineCurveForm.UNSPECIFIED;
						return;
					default:
						throw new System.ArgumentOutOfRangeException();
				}
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurve), 4)]
		Ifc4.MeasureResource.IfcLogical IIfcBSplineCurve.ClosedCurve 
		{ 
			get
			{
				//## Handle return of ClosedCurve for which no match was found
			    return new Ifc4.MeasureResource.IfcLogical(ClosedCurve);
			    //##
			} 
			set
			{
				ClosedCurve = value;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcBSplineCurve), 5)]
		Ifc4.MeasureResource.IfcLogical IIfcBSplineCurve.SelfIntersect 
		{ 
			get
			{
				//## Handle return of SelfIntersect for which no match was found
                return new Ifc4.MeasureResource.IfcLogical(SelfIntersect);
				//##
			} 
			set
			{
				SelfIntersect = value;
				
			}
		}
		Ifc4.MeasureResource.IfcInteger IIfcBSplineCurve.UpperIndexOnControlPoints 
		{
			get 
			{
				return new Ifc4.MeasureResource.IfcInteger(UpperIndexOnControlPoints);
			}
		}

		List<Common.Geometry.XbimPoint3D> IIfcBSplineCurve.ControlPoints 
		{
			get 
			{
				return ControlPoints;
			}
		}

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