2019-09-06 19:25:54 +02:00

24 lines
656 B
C#

using System.Diagnostics;
namespace CapnpC.CSharp.Generator.Model
{
class Annotation : IDefinition
{
public ulong Id { get; }
public bool IsGenerated { get; }
public TypeTag Tag { get => TypeTag.Annotation; }
public IHasNestedDefinitions DeclaringElement { get; }
public Type Type { get; set; }
public Annotation(ulong id, IHasNestedDefinitions parent)
{
Trace.Assert(parent != null);
Id = id;
IsGenerated = (parent as IDefinition).IsGenerated;
DeclaringElement = parent;
parent.NestedDefinitions.Add(this);
}
}
}