// ------------------------------------------------------------------------------
// <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 @IfcIndexedColourMap : IIfcIndexedColourMap
	{

		[CrossSchemaAttribute(typeof(IIfcIndexedColourMap), 1)]
		IIfcTessellatedFaceSet IIfcIndexedColourMap.MappedTo 
		{ 
			get
			{
				return MappedTo;
			} 
			set
			{
				MappedTo = value as GeometricModelResource.IfcTessellatedFaceSet;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcIndexedColourMap), 2)]
		Ifc4.MeasureResource.IfcNormalisedRatioMeasure? IIfcIndexedColourMap.Opacity 
		{ 
			get
			{
				if (!Opacity.HasValue) return null;
				return new Ifc4.MeasureResource.IfcNormalisedRatioMeasure(Opacity.Value);
			} 
			set
			{
				Opacity = value.HasValue ? 
					new MeasureResource.IfcNormalisedRatioMeasure(value.Value) :  
					 new MeasureResource.IfcNormalisedRatioMeasure?() ;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcIndexedColourMap), 3)]
		IIfcColourRgbList IIfcIndexedColourMap.Colours 
		{ 
			get
			{
				return Colours;
			} 
			set
			{
				Colours = value as IfcColourRgbList;
				
			}
		}

		[CrossSchemaAttribute(typeof(IIfcIndexedColourMap), 4)]
		IItemSet<Xbim.Ifc4.MeasureResource.IfcPositiveInteger> IIfcIndexedColourMap.ColourIndex 
		{ 
			get
			{
			
				return new Common.Collections.ProxyValueSet<MeasureResource.IfcPositiveInteger, Ifc4.MeasureResource.IfcPositiveInteger>(ColourIndex, 
					s => new Ifc4.MeasureResource.IfcPositiveInteger(s), 
					t => new MeasureResource.IfcPositiveInteger(t));
			} 
		}
	//## Custom code
	//##
	}
}