Esempio n. 1
0
        public override void WriteLayout(TagLayout layout, TextWriter writer)
        {
            WriteHeader(writer);

            var name    = layout.Name.ToSnakeCase();
            var builder = new ClassBuilder(writer, 1);

            builder.Begin(name, layout.Size, layout.GroupTag);
            layout.Accept(builder);
            builder.End();

            WriteFooter(writer);
        }
Esempio n. 2
0
        public override void WriteLayout(TagLayout layout, TextWriter writer)
        {
            WriteHeader(writer);

            var name    = NamingConvention.ToPascalCase(layout.Name);
            var builder = new ClassBuilder(writer, 2);

            builder.Begin(name, layout.Size, layout.GroupTag);
            layout.Accept(builder);
            builder.End();

            WriteFooter(writer);
        }
Esempio n. 3
0
 public override string GetSuggestedFileName(TagLayout layout)
 {
     return(string.Format("{0}.hpp", NamingConvention.ToPascalCase(layout.Name)));
 }
Esempio n. 4
0
 public override string GetSuggestedFileName(TagLayout layout)
 {
     return(string.Format("{0}.cs", layout.Name.ToPascalCase()));
 }
Esempio n. 5
0
 public override string GetSuggestedFileName(TagLayout layout)
 {
     return(string.Format("{0}.hpp", layout.Name.ToSnakeCase()));
 }
Esempio n. 6
0
 /// <summary>
 /// Writes a layout to a file.
 /// </summary>
 /// <param name="layout">The layout to write.</param>
 /// <param name="path">The path to write to.</param>
 public void WriteLayout(TagLayout layout, string path)
 {
     using (var writer = new StreamWriter(File.Open(path, FileMode.Create, FileAccess.Write)))
         WriteLayout(layout, writer);
 }
Esempio n. 7
0
 /// <summary>
 /// Writes a layout to a stream.
 /// </summary>
 /// <param name="layout">The layout to write.</param>
 /// <param name="writer">The writer to write to.</param>
 public abstract void WriteLayout(TagLayout layout, TextWriter writer);
Esempio n. 8
0
 /// <summary>
 /// Gets the suggested filename for a layout.
 /// </summary>
 /// <param name="layout">The layout.</param>
 /// <returns>A suggested filename to write the layout to.</returns>
 public abstract string GetSuggestedFileName(TagLayout layout);