// Copyright (C) Stichting Deltares 2024. All rights reserved. // // This file is part of the D-Soil Model application. // // The D-Soil Model application is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // All names, logos, and references to "Deltares" are registered trademarks of // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. using System; using System.Collections.Generic; using Deltares.Geotechnics.Soils; using Deltares.Standard; using Deltares.Standard.IO; namespace Deltares.DSoilModel.Data { /// /// IDataFactory implementation for importing SoilSegments using ShapefileImporter in DSL /// public class SoilSegmentFactory : IDataFactory { /// /// Initializes a new instance of the class. /// public SoilSegmentFactory() { SoilSegments = new List(); } /// /// Gets or sets the existing soil segments. /// /// /// The soil segments. /// public List SoilSegments { get; set; } /// /// Gets a new object with given type and key. /// /// The key. /// The type, only SoilSegment is supported /// Not used for this implementation. /// The created object or null if the type is not supported. public object GetObject(string key, Type type, Enum subType) { if (type == typeof(SoilSegment)) { var segment = new SoilSegment() { Name = key }; SoilSegments.Add(segment); return segment; } return null; } /// /// Not implemented /// /// public T GetObject(string key, Enum subType) { throw new NotImplementedException(); } /// /// Not implemented /// /// public object GetExistingObject(string key, Type type, Enum subType) { throw new NotImplementedException(); } /// /// Not implemented /// /// public T GetExistingObject(string key, Enum subType) { throw new NotImplementedException(); } /// /// Not implemented /// /// public bool ShouldRegister(RegisteredItem registeredItem) { throw new NotImplementedException(); } /// /// Not implemented /// /// public void ProcessImportedItems(ImporterProgressDelegate progress) { throw new NotImplementedException(); } } }