// Copyright (C) Stichting Deltares 2019. 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;
using Deltares.DamEngine.Data.Standard;
namespace Deltares.DamEngine.Data.Geometry
{
///
/// Base class for all Geometry objects
///
[Serializable]
public abstract class GeometryObject : IGeometryObject, IName
{
private string name = "";
///
/// Sets the name.
///
/// The new name.
public virtual void SetName(string newName)
{
name = newName; // TODO: Name is virtual. Is this really expected behavior?
}
///
/// Gets the geometry bounds.
///
///
public virtual GeometryBounds GetGeometryBounds()
{
return null;
}
#region IGeometryObject Members
///
/// Gets or sets the name.
///
///
/// The name.
///
public virtual string Name
{
get
{
return name;
}
set
{
name = value;
}
}
#endregion
///
/// Returns a that represents this instance.
///
///
/// A that represents this instance.
///
public override string ToString()
{
return Name;
}
}
}