Class HTMLCodeGeneratorAdapter

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
    Direct Known Subclasses:
    Director, TypedCompositeActor

    public abstract class HTMLCodeGeneratorAdapter
    extends CodeGeneratorAdapter
    Base class for a html code generator adapter.

    Subclasses should override generateHTML().

    Subclasses should be sure to properly indent the code by either using the code block functionality in methods like _generateBlockCode(String) or by calling CodeStream.indent(String), for example:

         StringBuffer code = new StringBuffer();
         code.append(super.generateWrapupCode());
         code.append("// Local wrapup code");
         return processCode(CodeStream.indent(code.toString()));
     
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Bert Rodiers
    Pt.AcceptedRating:
    Yellow (rodiers)
    Pt.ProposedRating:
    Yellow (rodiers)
    • Field Detail

      • _eol

        protected static final java.lang.String _eol
        End of line character. Under Unix: "\n", under Windows: "\n\r". We use a end of line character so that the files we generate have the proper end of line character for use by other native tools.
      • _codeGenerator

        protected GenericCodeGenerator _codeGenerator
        The code generator that contains this adapter class.
    • Constructor Detail

      • HTMLCodeGeneratorAdapter

        public HTMLCodeGeneratorAdapter​(NamedObj component)
        Construct the code generator adapter associated with the given component.
        Parameters:
        component - The associated component.