void GenerateMembers(IndentWriter writer) { foreach (var member in Members) { writer.WriteDocumentation(member.Doc); writer.WriteLine(member.Name.ToCSharp() + " = " + HexFormat(member.Value) + ","); } }
public static void GenerateDocumentation(this IDocumented gen, IndentWriter writer) { if (gen.Doc is null) { return; } writer.WriteDocumentation(gen.Doc, gen is ReturnValue ? "returns" : "summary"); }
public void Generate(GenerationOptions opts, IGeneratable parent, IndentWriter writer) { writer.WriteDocumentation(Doc); // Simple uncorrect gen for now var managedType = this.GetSymbol(opts); // We need something that will tell us the equivalent C# type // including the number of pointers. // For now, generate normal info. writer.WriteLine($"{managedType.Name} {Name};"); }
public void Generate(GenerationOptions opts, IGeneratable parent, IndentWriter writer) { writer.WriteDocumentation(Doc); string value = Value; // Make this smarter, probably pass in some options and key them. if (parent is Bitfield) { value = HexFormat(value); } writer.WriteLine(Name.ToCSharp() + " = " + value + ","); }