Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCalculationOptions.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCalculationOptions.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCalculationOptions.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoCalculationOptions + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoPlLine.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoPlLine.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoPlLine.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoPlLine + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabInput.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabInput.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabInput.cs (revision 3117) @@ -0,0 +1,66 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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.Collections.Generic; + +namespace Deltares.LayerOnSlopeTool.Io +{ + /// + public class IoDamMStabInput + { + /// Gets or sets the name of the m stab file. + /// The name of the m stab file. + public string MStabFileName { get; set; } = ""; + + /// Gets or sets the name of the soil database. + /// The name of the soil database. + public string SoilDbName { get; set; } = ""; + + /// Gets the surface line. + /// The surface line. + public List SurfaceLine { get; } = new List(); + + /// Gets the characteristic points. + /// The characteristic points. + public List CharacteristicPoints { get; } = new List(); + + /// Gets the model. + /// The model. + public IoModel Model { get; } = new IoModel(); + + /// Gets the external pl lines. + /// The external pl lines. + public List ExternalPlLines { get; } = new List(); + + /// Gets the traffic load. + /// The traffic load. + public IoTrafficLoad TrafficLoad { get; } = new IoTrafficLoad(); + + /// Gets the calculation options. + /// The calculation options. + public IoCalculationOptions CalculationOptions { get; } = new IoCalculationOptions(); + + /// Gets the geometry creation options. + /// The geometry creation options. + public IoGeometryCreationOptions GeometryCreationOptions { get; } = new IoGeometryCreationOptions(); + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillIoDamMStabDocFromXml.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillIoDamMStabDocFromXml.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillIoDamMStabDocFromXml.cs (revision 3117) @@ -0,0 +1,36 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public static class FillIoDamMStabDocFromXml + { + /// Fills the io dam m stab document. + /// The XML dam m stab dam document. + /// + public static IoMStabDamDoc FillIoDamMStabDoc(tnsPrefixDamMStabDoc xmlDamMStabDamDoc) + { + var ioMStabDamDoc = new IoMStabDamDoc(); + return ioMStabDamDoc; + } + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/Deltares.LayerOnSlopeTool.Io.Tests.csproj =================================================================== diff -u -r3113 -r3117 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/Deltares.LayerOnSlopeTool.Io.Tests.csproj (.../Deltares.LayerOnSlopeTool.Io.Tests.csproj) (revision 3113) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/Deltares.LayerOnSlopeTool.Io.Tests.csproj (.../Deltares.LayerOnSlopeTool.Io.Tests.csproj) (revision 3117) @@ -52,6 +52,7 @@ + Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCharacteristicPoint.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCharacteristicPoint.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoCharacteristicPoint.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoCharacteristicPoint + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillXmlDamMStabDocFromIo.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillXmlDamMStabDocFromIo.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/FillXmlDamMStabDocFromIo.cs (revision 3117) @@ -0,0 +1,35 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public static class FillXmlDamMStabDocFromIo + { + /// Fills the XML dam m stab document. + /// The io dam m stab dam document. + /// + public static tnsPrefixDamMStabDoc FillXmlDamMStabDoc(IoMStabDamDoc ioDamMStabDamDoc) + { + var xmlDamMStabDoc = new tnsPrefixDamMStabDoc(); + return xmlDamMStabDoc; + } + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/Deltares.LayerOnSlopeTool.Io.csproj =================================================================== diff -u -r3113 -r3117 --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/Deltares.LayerOnSlopeTool.Io.csproj (.../Deltares.LayerOnSlopeTool.Io.csproj) (revision 3113) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/Deltares.LayerOnSlopeTool.Io.csproj (.../Deltares.LayerOnSlopeTool.Io.csproj) (revision 3117) @@ -45,6 +45,18 @@ + + + + + + + + + + + + Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoTrafficLoad.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoTrafficLoad.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoTrafficLoad.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoTrafficLoad + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/IoDamMStabDocSeriliazerTests.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/IoDamMStabDocSeriliazerTests.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io.Tests/IoDamMStabDocSeriliazerTests.cs (revision 3117) @@ -0,0 +1,62 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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 KellermanSoftware.CompareNetObjects; +using NUnit.Framework; + +namespace Deltares.LayerOnSlopeTool.Io.Tests +{ + [TestFixture] + public class IoDamMStabDocSeriliazerTests + { + [Test] + [Ignore("Test in work-in-progress")] + public void GivenFilledDamMStabDocWhenSerializingDeserializingThenObjectsAreEqual() + { + const string filename = "MStabDamDocExample.xml"; + // Given Filled DamMStabDoc + IoMStabDamDoc expectedMStabDamDoc = CreateMStabDamDocExample(); + + // When Serializing/Deserializing + IoDamMStabDocSerializer damMStabDocSerializer = new IoDamMStabDocSerializer(); + damMStabDocSerializer.Save(filename, expectedMStabDamDoc); + IoMStabDamDoc actualMStabDamDoc = damMStabDocSerializer.Load(filename); + + // Then Objects Are Equal + CompareMStabDamDoc(actualMStabDamDoc, expectedMStabDamDoc); + + } + + private void CompareMStabDamDoc(IoMStabDamDoc actual, IoMStabDamDoc expected) + { + var compare = new CompareLogic { Config = { MaxDifferences = 100 } }; + var result = compare.Compare(expected, actual); + Assert.AreEqual(0, result.Differences.Count, + "Differences found read/write Input object:" + result.DifferencesString); + } + + private IoMStabDamDoc CreateMStabDamDocExample() + { + var ioMStabDamDoc = new IoMStabDamDoc(); + return ioMStabDamDoc; + } + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoGeometryCreationOptions.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoGeometryCreationOptions.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoGeometryCreationOptions.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoGeometryCreationOptions + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoSurfacePoint.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoSurfacePoint.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoSurfacePoint.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoSurfacePoint + { + + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabDocSerializer.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabDocSerializer.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoDamMStabDocSerializer.cs (revision 3117) @@ -0,0 +1,45 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoDamMStabDocSerializer + { + /// Saves the specified file name. + /// Name of the file. + /// The m stab dam document. + public void Save(string fileName, IoMStabDamDoc mStabDamDoc) + { + var xmlMStabDamDoc = FillXmlDamMStabDocFromIo.FillXmlDamMStabDoc(mStabDamDoc); + MStabDamXmlSerializer.SaveDamMStabDocAsXmlFile(fileName, xmlMStabDamDoc); + } + + /// Loads the specified file name. + /// Name of the file. + /// + public IoMStabDamDoc Load(string fileName) + { + tnsPrefixDamMStabDoc xmlMStabDamDoc = MStabDamXmlSerializer.LoadDamMStabDocFromXmlFile(fileName); + IoMStabDamDoc ioDamMStabDoc = FillIoDamMStabDocFromXml.FillIoDamMStabDoc(xmlMStabDamDoc); + return ioDamMStabDoc; + } + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoMStabDamDoc.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoMStabDamDoc.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoMStabDamDoc.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoMStabDamDoc + { + public IoDamMStabInput MStabInput { get; } = new IoDamMStabInput(); + } +} \ No newline at end of file Index: DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoModel.cs =================================================================== diff -u --- DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoModel.cs (revision 0) +++ DamTools/LayerOnSlopeTool/trunk/src/Deltares.LayerOnSlopeTool.Io/IoModel.cs (revision 3117) @@ -0,0 +1,28 @@ +// Copyright (C) Stichting Deltares 2020. All rights reserved. +// +// This file is part of the Dam Engine. +// +// The Dam Engine is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero 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. + +namespace Deltares.LayerOnSlopeTool.Io +{ + public class IoModel + { + + } +} \ No newline at end of file