internal void AddFeatureStub(DataField field, FeatureStub stub) { if (stub != null) { AddFeatureDescription(field, stub); } }
/// <summary> /// Creates a new line section /// </summary> /// <param name="itemName">The name for the item involved</param> /// <param name="baseLine">The line that this section is part of</param> /// <param name="from">The point at the start of the section</param> /// <param name="to">The point at the end of the section</param> /// <returns>The created section (never null)</returns> internal override LineFeature CreateSection(string itemName, LineFeature baseLine, PointFeature from, PointFeature to) { IFeature f = new FeatureStub(this.Creator, InternalIdValue.Empty, baseLine.EntityType, null); return(new LineFeature(f, baseLine, from, to, baseLine.IsTopological)); }
/// <summary> /// Writes an array of <see cref="FeatureStub"/>, creating them from the supplied /// feature array. /// </summary> /// <param name="field">The tag that identifies the item.</param> /// <param name="features">The features to convert into stubs before writing them out.</param> internal void WriteFeatureStubArray(DataField field, Feature[] features) { var stubs = new FeatureStub[features.Length]; for (int i = 0; i < stubs.Length; i++) { stubs[i] = new FeatureStub(features[i]); } WritePersistentArray <FeatureStub>(field, stubs); }
/// <summary> /// Creates a new line section /// </summary> /// <param name="itemName">The name for the item involved</param> /// <param name="baseLine">The line that this section is part of</param> /// <param name="from">The point at the start of the section</param> /// <param name="to">The point at the end of the section</param> /// <returns>The created section (never null)</returns> internal virtual LineFeature CreateSection(string itemName, LineFeature baseLine, PointFeature from, PointFeature to) { IFeature f = FindFeatureDescription(itemName); if (f == null) { InternalIdValue id = MapModel.WorkingSession.AllocateNextId(); f = new FeatureStub(m_Operation, id, baseLine.EntityType, baseLine.FeatureId); } return(new LineFeature(f, baseLine, from, to, baseLine.IsTopological)); }
internal void AddFeatureStub(DataField field, FeatureStub stub) { if (stub != null) AddFeatureDescription(field, stub); }
/// <summary> /// Initializes a new instance of the <see cref="DeserializationFactory"/> class that /// contains the supplied feature stubs (each stub will be identified by the <see cref="FeatureStub.InternalId"/> /// property). /// </summary> /// <param name="op">The editing operation that needs to create features (not null).</param> /// <param name="stubs">The stubs to include in the factory</param> internal DeserializationFactory(Operation op, FeatureStub[] stubs) : base(op) { foreach (FeatureStub stub in stubs) AddFeatureDescription(stub.InternalId.ToString(), stub); }
/// <summary> /// Creates a new instance of <see cref="PointFeature"/>, with the currently /// active entity type (and a user-perceived ID if it applies), and adds to the model. /// </summary> /// <returns>The new feature (never null)</returns> internal override PointFeature CreatePointFeature(string itemName) { IFeature f = new FeatureStub(this.Creator, InternalIdValue.Empty, this.PointType, null); return(new PointFeature(f, null)); }
/// <summary> /// Creates a new line section /// </summary> /// <param name="itemName">The name for the item involved</param> /// <param name="baseLine">The line that this section is part of</param> /// <param name="from">The point at the start of the section</param> /// <param name="to">The point at the end of the section</param> /// <returns>The created section (never null)</returns> internal override LineFeature CreateSection(string itemName, LineFeature baseLine, PointFeature from, PointFeature to) { IFeature f = new FeatureStub(this.Creator, InternalIdValue.Empty, baseLine.EntityType, null); return new LineFeature(f, baseLine, from, to, baseLine.IsTopological); }
/// <summary> /// Creates a new instance of <see cref="PointFeature"/>, with the currently /// active entity type (and a user-perceived ID if it applies), and adds to the model. /// </summary> /// <returns>The new feature (never null)</returns> internal override PointFeature CreatePointFeature(string itemName) { IFeature f = new FeatureStub(this.Creator, InternalIdValue.Empty, this.PointType, null); return new PointFeature(f, null); }