62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
|
|
using System;
|
|||
|
|
using System.Runtime.Serialization;
|
|||
|
|
#pragma warning disable IDE0130
|
|||
|
|
|
|||
|
|
namespace CaeMesh
|
|||
|
|
{
|
|||
|
|
[Serializable]
|
|||
|
|
public class TetrahedralGmsh : GmshSetupItem, ISerializable
|
|||
|
|
{
|
|||
|
|
// Variables
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Properties
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Constructors
|
|||
|
|
public TetrahedralGmsh(string name)
|
|||
|
|
: base(name)
|
|||
|
|
{
|
|||
|
|
Reset();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public TetrahedralGmsh(TetrahedralGmsh tetrahedronGmsh)
|
|||
|
|
: base("tmpName")
|
|||
|
|
{
|
|||
|
|
CopyFrom(tetrahedronGmsh);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public TetrahedralGmsh(SerializationInfo info, StreamingContext context)
|
|||
|
|
: base(info, context)
|
|||
|
|
{
|
|||
|
|
foreach (SerializationEntry entry in info)
|
|||
|
|
{
|
|||
|
|
switch (entry.Name)
|
|||
|
|
{
|
|||
|
|
default:
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Methods
|
|||
|
|
public override void Reset()
|
|||
|
|
{
|
|||
|
|
base.Reset();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void CopyFrom(TetrahedralGmsh tetrahedronGmsh)
|
|||
|
|
{
|
|||
|
|
base.CopyFrom(tetrahedronGmsh);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ISerialization
|
|||
|
|
public new void GetObjectData(SerializationInfo info, StreamingContext context)
|
|||
|
|
{
|
|||
|
|
base.GetObjectData(info, context);
|
|||
|
|
// Using typeof() works also for null fields
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|