// ------------------------------------------------------------------------------
// <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.RepresentationResource
{
	public partial class @IfcCoordinateOperation : IIfcCoordinateOperation
	{

		[CrossSchemaAttribute(typeof(IIfcCoordinateOperation), 1)]
		IIfcCoordinateReferenceSystemSelect IIfcCoordinateOperation.SourceCRS 
		{ 
			get
			{
				if (SourceCRS == null) return null;
				var ifccoordinatereferencesystem = SourceCRS as IfcCoordinateReferenceSystem;
				if (ifccoordinatereferencesystem != null) 
					return ifccoordinatereferencesystem;
				var ifcgeometricrepresentationcontext = SourceCRS as IfcGeometricRepresentationContext;
				if (ifcgeometricrepresentationcontext != null) 
					return ifcgeometricrepresentationcontext;
				return null;
			} 
			set
			{
				if (value == null)
				{
					SourceCRS = null;
					return;
				}	
				var ifccoordinatereferencesystem = value as IfcCoordinateReferenceSystem;
				if (ifccoordinatereferencesystem != null) 
				{
					SourceCRS = ifccoordinatereferencesystem;
					return;
				}
				var ifcgeometricrepresentationcontext = value as IfcGeometricRepresentationContext;
				if (ifcgeometricrepresentationcontext != null) 
				{
					SourceCRS = ifcgeometricrepresentationcontext;
					return;
				}
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcCoordinateOperation), 2)]
		IIfcCoordinateReferenceSystem IIfcCoordinateOperation.TargetCRS 
		{ 
			get
			{
				return TargetCRS;
			} 
			set
			{
				TargetCRS = value as IfcCoordinateReferenceSystem;
				
			}
		}
	//## Custom code
	//##
	}
}