// Copyright (C) Stichting Deltares 2016. 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.ComponentModel;
using Deltares.Geotechnics;
using Deltares.Standard;
using Deltares.Standard.Attributes;
using Deltares.Standard.EventPublisher;
using Deltares.Standard.Units;
namespace Deltares.DSoilModel.Data
{
[TrackChanges]
public class SosSoilLayer1D : SoilLayer1D
{
private double? maximumTopLevel;
private double? minimumTopLevel;
private string remarkTopLevel = "";
///
/// Gets or sets the maximum top level.
///
///
/// The maximum top level.
///
[ReadOnly(true)]
[Format("F3")]
[Unit(UnitType.Depth)]
public double? MaximumTopLevel
{
get
{
return maximumTopLevel;
}
set
{
DataEventPublisher.BeforeChange(this, p => p.MaximumTopLevel);
maximumTopLevel = value;
DataEventPublisher.AfterChange(this, p => p.MaximumTopLevel);
}
}
///
/// Gets or sets the minimum top level.
///
///
/// The minimum top level.
///
[ReadOnly(true)]
[Format("F3")]
[Unit(UnitType.Depth)]
public double? MinimumTopLevel
{
get
{
return minimumTopLevel;
}
set
{
DataEventPublisher.BeforeChange(this, p => p.MinimumTopLevel);
minimumTopLevel = value;
DataEventPublisher.AfterChange(this, p => p.MinimumTopLevel);
}
}
///
/// Gets or sets the remark top level.
///
///
/// The remark top level.
///
[ReadOnly(true)]
public string RemarkTopLevel
{
get
{
return remarkTopLevel;
}
set
{
DataEventPublisher.BeforeChange(this, p => p.RemarkTopLevel);
remarkTopLevel = value;
DataEventPublisher.AfterChange(this, p => p.RemarkTopLevel);
}
}
///
/// Clones this instance.
///
/// Clone of this instance
public override object Clone()
{
var clone = new SosSoilLayer1D();
clone.Assign(this);
return clone;
}
///
/// Assigns the specified layer.
///
/// The layer.
public virtual void Assign(SosSoilLayer1D layer)
{
base.Assign(layer);
remarkTopLevel = layer.RemarkTopLevel;
minimumTopLevel = layer.MinimumTopLevel;
maximumTopLevel = layer.MaximumTopLevel;
}
}
}