/// <summary>
        /// Commits all changes of the coordinate system.
        /// </summary>
        /// <remarks>
        /// After committing no changes in the coordinate system are allowed.
        /// </remarks>
        public void Commit()
        {
            if (committed)
            {
                return;
            }
            committedSchema = GetSchema();

            roAxes    = new ReadOnlyVariableCollection(axes);
            axes      = null;
            arrayAxes = null;

            committed = true;
        }
        /// <summary>
        /// Gets the schema for the coordinate system describing its structure.
        /// </summary>
        public CoordinateSystemSchema GetSchema()
        {
            if (committed)
            {
                System.Diagnostics.Debug.Assert(committedSchema != null);
                return(committedSchema);
            }

            int[] axesIds = new int[axes.Count];
            int   i       = 0;

            foreach (var axis in axes)
            {
                axesIds[i++] = axis.ID;
            }
            CoordinateSystemSchema schema = new CoordinateSystemSchema(
                name, axesIds);

            return(schema);
        }
Example #3
0
		internal DataSetSchema(Guid guid, string uri, int version, VariableSchema[] vars, CoordinateSystemSchema[] cs)
		{
			this.guid = guid;
			this.vars = vars;
			this.cs = cs;
			this.version = version;
			this.uri = uri;
		}