public MapInfoProvider(string tabpath) { try { m_layer = new Layer(tabpath); m_filename = tabpath; BuildTree(); } catch (Exception ex) { throw new Exception("Couldn't load file " + tabpath + "\nError: " + ex.Message); } }
internal FeaturesEnum(IObjectProvider objProvider, Layer layer) : base(objProvider) { this.layer = layer; }
protected internal Features(Layer layer) : base(MiApi.mitab_c_get_feature_count(layer.Handle)) { this.Layer = layer; }
/// <summary> /// Override this to support descendants of the Field class. /// </summary> /// <returns>A Field, with the given index, belonging to the given Layer</returns> protected internal virtual Field CreateField(Layer layer, int index) { return new Field(layer, index); }
protected internal Feature(Layer layer, int featureId) { this.Id = featureId; this.Layer = layer; this.Handle = MiApi.mitab_c_read_feature(layer.Handle, featureId); this.Type = MiApi.mitab_c_get_type(Handle); this.Parts = CreateParts(this); }
protected internal Fields(Layer layer):base(MiApi.mitab_c_get_field_count(layer.Handle)) { fields = new Field[Count]; for (int i=0; i<Count; i++) fields[i] = CreateField(layer, i); }
protected internal Field(Layer layer, int i) { this.Layer = layer; this.Index = i; this.Name = MiApi.mitab_c_get_field_name(layer.Handle, i); this.Type = MiApi.mitab_c_get_field_type(layer.Handle, i); this.Precision = (short) MiApi.mitab_c_get_field_precision(layer.Handle, i); this.Width = MiApi.mitab_c_get_field_width(layer.Handle, i); }
/// <summary> /// Override this to support descendants of the Field class. /// </summary> /// <returns>A Field, with the given index, belonging to the given Layer</returns> protected internal virtual Field CreateField(Layer layer, int index) { return(new Field(layer, index)); }