// ------------------------------------------------------------------------------
// <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.PresentationAppearanceResource
{
	public partial class @IfcSurfaceTexture : IIfcSurfaceTexture
	{

		[CrossSchemaAttribute(typeof(IIfcSurfaceTexture), 1)]
		Ifc4.MeasureResource.IfcBoolean IIfcSurfaceTexture.RepeatS 
		{ 
			get
			{
				return new Ifc4.MeasureResource.IfcBoolean(RepeatS);
			} 
			set
			{
				RepeatS = new MeasureResource.IfcBoolean(value);
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcSurfaceTexture), 2)]
		Ifc4.MeasureResource.IfcBoolean IIfcSurfaceTexture.RepeatT 
		{ 
			get
			{
				return new Ifc4.MeasureResource.IfcBoolean(RepeatT);
			} 
			set
			{
				RepeatT = new MeasureResource.IfcBoolean(value);
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcSurfaceTexture), 3)]
		Ifc4.MeasureResource.IfcIdentifier? IIfcSurfaceTexture.Mode 
		{ 
			get
			{
				if (!Mode.HasValue) return null;
				return new Ifc4.MeasureResource.IfcIdentifier(Mode.Value);
			} 
			set
			{
				Mode = value.HasValue ? 
					new MeasureResource.IfcIdentifier(value.Value) :  
					 new MeasureResource.IfcIdentifier?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcSurfaceTexture), 4)]
		IIfcCartesianTransformationOperator2D IIfcSurfaceTexture.TextureTransform 
		{ 
			get
			{
				return TextureTransform;
			} 
			set
			{
				TextureTransform = value as GeometryResource.IfcCartesianTransformationOperator2D;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcSurfaceTexture), 5)]
		IItemSet<Xbim.Ifc4.MeasureResource.IfcIdentifier> IIfcSurfaceTexture.Parameter 
		{ 
			get
			{
			
				return new Common.Collections.ProxyValueSet<MeasureResource.IfcIdentifier, Ifc4.MeasureResource.IfcIdentifier>(Parameter, 
					s => new Ifc4.MeasureResource.IfcIdentifier(s), 
					t => new MeasureResource.IfcIdentifier(t));
			} 
		}
		IEnumerable<IIfcTextureCoordinate> IIfcSurfaceTexture.IsMappedBy 
		{ 
			get
			{
				return Model.Instances.Where<IIfcTextureCoordinate>(e => e.Maps != null &&  e.Maps.Contains(this), "Maps", this);
			} 
		}
		IEnumerable<IIfcSurfaceStyleWithTextures> IIfcSurfaceTexture.UsedInStyles 
		{ 
			get
			{
				return Model.Instances.Where<IIfcSurfaceStyleWithTextures>(e => e.Textures != null &&  e.Textures.Contains(this), "Textures", this);
			} 
		}
	//## Custom code
	//##
	}
}