Class UMod2Html

java.lang.Object
eu.bandm.tools.umod.UMod2Html

public class UMod2Html extends Object
Pretty printer for UMod. For HTML-Generation see HtmlRenderer.
  • Field Details

    • path_to_stylesheet

      public static final String path_to_stylesheet
      See Also:
    • targetDir

      public static final String targetDir
      See Also:
    • URL_BANDM_USER_DOC

      public static final String URL_BANDM_USER_DOC
      See Also:
    • forest

      protected UMod.Forest forest
    • apidocpraefix

      protected String apidocpraefix
    • linewidth

      protected int linewidth
    • allVisitorNums_classDefs

      protected SortedSet<Integer> allVisitorNums_classDefs
    • allConstructorNums_classDefs

      protected SortedSet<Integer> allConstructorNums_classDefs
    • allVisitorNums_visitorDefs

      protected SortedSet<Integer> allVisitorNums_visitorDefs
    • indent_toplevel

      int indent_toplevel
    • indent_sublevel

      int indent_sublevel
    • indent_fieldstart

      int indent_fieldstart
    • col_typestart

      Integer col_typestart
    • shift_typestart

      Integer shift_typestart
    • col_consstart

      int col_consstart
    • shift_consstart

      Integer shift_consstart
    • is_toplevel

      String is_toplevel
      TWO different strategies if not enough room:
        //->             indent_toplevel=2
        //  -->          indent_sublevel=3
            |  |  Classname     
        //-------->                        indent_fieldstart=10
        //-------------------------------> col_typestart=35
                   fields_start_here      SEQ int
      
        //-------->                        indent_fieldstart=10
        //                                 col_typestart=null, fieldname_type_distance=1
                   fields_start_here SEQ int
       
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=null
                   long_field_name        
                            SEQ int 
      
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=6   
                            ----->----->
                   long_field_name      SEQ int 
        
    • is_sublevel

      String is_sublevel
      TWO different strategies if not enough room:
        //->             indent_toplevel=2
        //  -->          indent_sublevel=3
            |  |  Classname     
        //-------->                        indent_fieldstart=10
        //-------------------------------> col_typestart=35
                   fields_start_here      SEQ int
      
        //-------->                        indent_fieldstart=10
        //                                 col_typestart=null, fieldname_type_distance=1
                   fields_start_here SEQ int
       
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=null
                   long_field_name        
                            SEQ int 
      
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=6   
                            ----->----->
                   long_field_name      SEQ int 
        
    • is_fieldstart

      String is_fieldstart
      TWO different strategies if not enough room:
        //->             indent_toplevel=2
        //  -->          indent_sublevel=3
            |  |  Classname     
        //-------->                        indent_fieldstart=10
        //-------------------------------> col_typestart=35
                   fields_start_here      SEQ int
      
        //-------->                        indent_fieldstart=10
        //                                 col_typestart=null, fieldname_type_distance=1
                   fields_start_here SEQ int
       
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=null
                   long_field_name        
                            SEQ int 
      
        //-------->                        indent_fieldstart=10
        //----------------->               col_typestart=20 shift_typestart=6   
                            ----->----->
                   long_field_name      SEQ int 
        
    • blanks

      protected static final String blanks
      See Also:
    • preItems

      protected List<Element_pre.Content> preItems
    • col

      int col
  • Constructor Details

    • UMod2Html

      public UMod2Html()
  • Method Details

    • preItems_add

      protected void preItems_add(String s)
    • preItems_add

      protected void preItems_add(Element_a a)
    • preItems_add

      protected void preItems_add(Element_span a)
    • aRef

      protected Element_a aRef(String XXname, String contents)
    • spanClass

      protected Element_span spanClass(String text, String cls)
    • spanStyle

      protected Element_span spanStyle(String text, String st)
    • aDef

      protected Element_a aDef(String name, String contents)
    • aDef

      protected Element_a aDef(String XXname, String contents, String docu)
    • prettyPrint

      public Element_pre prettyPrint(UMod.Forest forest, String dateAndTime)
      Generates HTML output like
       MODEL xxxx
         EXT xxx from yy.yy.yy
         EXT xxx from yy.yy.yy
      
       TOPLEVEL CLASS
       CCCC
               fff
               fff
       | CCC
       | CCC
       END MODEL
       
    • allDocu

      String allDocu(UMod.Item item)
    • putSubclasses

      void putSubclasses(UMod.ClassDef sup, int indent)
      Alphabetical !?! better use Source order??
    • putCol

      void putCol(String s)
    • putLf

      void putLf()
    • indent

      void indent(Integer targetCol, Integer stepWidth)
      Goto targetCol. If there is no space left, then either advance with stepWidth (!=null) as long as necessary, or go to next line.
    • putClass

      void putClass(UMod.ClassDef cd, int indent)
    • putField

      void putField(UMod.ClassDef cd, UMod.FieldDef fd)
    • putType

      void putType(UMod.Type t)
      ATTENTION, UMod Map type is shown as "a <-> b". The variant "MAP a TO b" is not generated.
    • writeToFile

      public void writeToFile(UMod.Forest forest, String dateAndTime, int linewidth, boolean monolithic, File outputDir, String fname)