// ------------------------------------------------------------------------------
// <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 @IfcPlacement : IIfcPlacement
	{

		[CrossSchemaAttribute(typeof(IIfcPlacement), 1)]
		IIfcCartesianPoint IIfcPlacement.Location 
		{ 
			get
			{
				//## Handle return of Location for which no match was found
                // TODO: Martin- I assume this is the right approach?
                if (Location == null) return null;
                if (Location is IfcCartesianPoint cart)
                {
                    return cart;
                }
                return null;
                //##
			} 
			set
			{
				//## Handle setting of Location for which no match was found
                if (value == null)
                {
                    Location = null;
                    return;
                }
                if (value is IfcCartesianPoint cp)
                {
                    Location = cp;
                }
                //##
				
			}
		}
		Ifc4.GeometryResource.IfcDimensionCount IIfcPlacement.Dim 
		{
			get 
			{
				return new Ifc4.GeometryResource.IfcDimensionCount(Dim);
			}
		}

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