// ------------------------------------------------------------------------------
// <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.GeometricConstraintResource
{
	public partial class @IfcGridPlacement : IIfcGridPlacement
	{

		[CrossSchemaAttribute(typeof(IIfcGridPlacement), 1)]
		IIfcVirtualGridIntersection IIfcGridPlacement.PlacementLocation 
		{ 
			get
			{
				return PlacementLocation;
			} 
			set
			{
				PlacementLocation = value as IfcVirtualGridIntersection;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcGridPlacement), 2)]
		IIfcGridPlacementDirectionSelect IIfcGridPlacement.PlacementRefDirection 
		{ 
			get
			{
				if (PlacementRefDirection == null) return null;
				var ifcdirection = PlacementRefDirection as GeometryResource.IfcDirection;
				if (ifcdirection != null) 
					return ifcdirection;
				var ifcvirtualgridintersection = PlacementRefDirection as IfcVirtualGridIntersection;
				if (ifcvirtualgridintersection != null) 
					return ifcvirtualgridintersection;
				return null;
			} 
			set
			{
				if (value == null)
				{
					PlacementRefDirection = null;
					return;
				}	
				var ifcdirection = value as GeometryResource.IfcDirection;
				if (ifcdirection != null) 
				{
					PlacementRefDirection = ifcdirection;
					return;
				}
				var ifcvirtualgridintersection = value as IfcVirtualGridIntersection;
				if (ifcvirtualgridintersection != null) 
				{
					PlacementRefDirection = ifcvirtualgridintersection;
					return;
				}
				
			}
		}
	//## Custom code
	//##
	}
}