protected internal Parts(Feature feature):base(MiApi.mitab_c_get_parts(feature.Handle)) { this.Feature = feature; }
/// <summary> /// Override this to support descendants of the Parts class. /// </summary> /// <returns>This layers fields</returns> protected internal virtual Parts CreateParts(Feature feature) { return new Parts(this); }
/// <summary> /// Returns a double representation of this fields value for the given feature. /// </summary> /// <param name="feature">The feature to find the fields value for.</param> /// <returns>A double representation of this fields value for the given feature</returns> public double GetValueAsDouble(Feature feature) { return MiApi.mitab_c_get_field_as_double(feature.Handle, this.Index); }
protected internal Part(Feature feature, int partIdx) { this.Index = partIdx; this.Feature = feature; this.Vertices = CreateVertices(this); }
protected internal DataValues(Feature feature):base(MiApi.mitab_c_get_field_count(feature.Layer.Handle)) { Values = new object[Count]; for (int i = 0; i < Count; i++) { switch (feature.Layer.Fields[i].Type) { case FieldType.TABFT_Char: Values[i] = MiApi.mitab_c_get_field_as_string(feature.Handle, i); break; case FieldType.TABFT_Date: double d = MiApi.mitab_c_get_field_as_double(feature.Handle, i); if (d == 0) Values[i] = null; else { int year = (int)(d / 10000); int month = (int)((d - year * 10000) / 100); int day = (int)(d - year * 10000 - month * 100); Values[i] = new DateTime(year, month, day); } break; case FieldType.TABFT_Decimal: Values[i] = MiApi.mitab_c_get_field_as_double(feature.Handle, i); break; case FieldType.TABFT_Float: Values[i] = (float)MiApi.mitab_c_get_field_as_double(feature.Handle, i); break; case FieldType.TABFT_Integer: Values[i] = (int)MiApi.mitab_c_get_field_as_double(feature.Handle, i); break; case FieldType.TABFT_Logical: Values[i] = MiApi.mitab_c_get_field_as_string(feature.Handle, i) == "T"? true : false; break; case FieldType.TABFT_SmallInt: Values[i] = (short)MiApi.mitab_c_get_field_as_double(feature.Handle, i); break; } } }
/// <summary> /// Returns a string representation of this fields value for the given feature. /// </summary> /// <param name="feature">The feature to find the fields value for.</param> /// <returns>A string representation of this fields value for the given feature</returns> public string GetValueAsString(Feature feature) { return MiApi.mitab_c_get_field_as_string(feature.Handle, this.Index); }
/// <summary> /// Override this to support descendants of the Parts class. /// </summary> /// <returns>This layers fields</returns> protected internal virtual Parts CreateParts(Feature feature) { return(new Parts(this)); }
protected internal Parts(Feature feature) : base(MiApi.mitab_c_get_parts(feature.Handle)) { this.Feature = feature; }
protected internal Part(Feature feature, int partIdx) { this.Index = partIdx; this.Feature = feature; this.Vertices = CreateVertices(this); }
/// <summary> /// Returns a double representation of this fields value for the given feature. /// </summary> /// <param name="feature">The feature to find the fields value for.</param> /// <returns>A double representation of this fields value for the given feature</returns> public double GetValueAsDouble(Feature feature) { return(MiApi.mitab_c_get_field_as_double(feature.Handle, this.Index)); }
/// <summary> /// Returns a string representation of this fields value for the given feature. /// </summary> /// <param name="feature">The feature to find the fields value for.</param> /// <returns>A string representation of this fields value for the given feature</returns> public string GetValueAsString(Feature feature) { return(MiApi.mitab_c_get_field_as_string(feature.Handle, this.Index)); }