2019-09-06 19:25:54 +02:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace CapnpC.CSharp.Generator.Model
|
|
|
|
|
{
|
|
|
|
|
class GenFile: IDefinition, IHasNestedDefinitions
|
|
|
|
|
{
|
|
|
|
|
public ulong Id { get; }
|
|
|
|
|
public bool IsGenerated { get; }
|
|
|
|
|
public TypeTag Tag { get => TypeTag.File; }
|
|
|
|
|
public IHasNestedDefinitions DeclaringElement { get => null; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string[] Namespace { get; set; }
|
2020-01-30 21:53:08 +01:00
|
|
|
|
public bool? NullableEnable { get; set; }
|
2020-02-08 17:23:07 +01:00
|
|
|
|
public bool EmitNullableDirective { get; set; }
|
2020-03-26 21:30:30 +01:00
|
|
|
|
public bool EmitDomainClassesAndInterfaces { get; set; }
|
2020-04-18 15:06:52 +02:00
|
|
|
|
public string HeaderText { get; set; }
|
2020-03-26 21:30:30 +01:00
|
|
|
|
public SupportedAnnotations.TypeVisibility TypeVisibility { get; set; }
|
2019-09-06 19:25:54 +02:00
|
|
|
|
|
|
|
|
|
public IEnumerable<TypeDefinition> NestedTypes { get => this.GetNestedTypes(); }
|
|
|
|
|
public ICollection<IDefinition> NestedDefinitions { get; } = new List<IDefinition>();
|
|
|
|
|
public ICollection<Constant> Constants { get; } = new List<Constant>();
|
|
|
|
|
|
|
|
|
|
public GenFile(ulong id, bool isGenerated)
|
|
|
|
|
{
|
|
|
|
|
Id = id;
|
|
|
|
|
IsGenerated = isGenerated;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|