2019-08-29 12:10:23 -04:00
|
|
|
|
using System.Collections.Generic;
|
2019-06-12 21:56:55 +02:00
|
|
|
|
|
|
|
|
|
namespace CapnpC.Model
|
|
|
|
|
{
|
2019-08-29 12:10:23 -04:00
|
|
|
|
class GenFile: IDefinition, IHasNestedDefinitions
|
2019-06-12 21:56:55 +02:00
|
|
|
|
{
|
2019-08-29 12:10:23 -04:00
|
|
|
|
public ulong Id { get; }
|
|
|
|
|
public TypeTag Tag { get => TypeTag.File; }
|
2019-08-30 11:35:25 -04:00
|
|
|
|
public IHasNestedDefinitions DeclaringElement { get => null; }
|
2019-08-29 12:10:23 -04:00
|
|
|
|
|
2019-06-12 21:56:55 +02:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string[] Namespace { get; set; }
|
|
|
|
|
|
2019-08-29 12:10:23 -04: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)
|
|
|
|
|
{
|
|
|
|
|
Id = id;
|
|
|
|
|
}
|
2019-06-12 21:56:55 +02:00
|
|
|
|
}
|
|
|
|
|
}
|