Class ProceduralTemplateParser

  • Direct Known Subclasses:
    CTemplateParser, JavaTemplateParser

    public class ProceduralTemplateParser
    extends TemplateParser
    A class that allows to parse macros of templates in a code generator perspective.
    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Bert Rodiers
    Pt.AcceptedRating:
    Red (rodiers)
    Pt.ProposedRating:
    Red (rodiers)
    • Field Detail

      • _includeFiles

        protected java.util.Set<java.lang.String> _includeFiles
        The set of header files that needed to be included.
    • Constructor Detail

      • ProceduralTemplateParser

        public ProceduralTemplateParser()
        Construct the ProceduralTemplateParser.
    • Method Detail

      • init

        public void init​(java.lang.Object component,
                         ProgramCodeGeneratorAdapter adapter)
        Init the TemplateParser with the associated given component and the given adapter.
        Overrides:
        init in class TemplateParser
        Parameters:
        component - The associated component.
        adapter - The associated adapter.
      • getHeaderFiles

        public java.util.Set<java.lang.String> getHeaderFiles()
                                                       throws IllegalActionException
        Get the files needed by the code generated from this adapter class. This base class returns an empty set.
        Overrides:
        getHeaderFiles in class TemplateParser
        Returns:
        A set of strings that are header files needed by the code generated from this adapter class.
        Throws:
        IllegalActionException - Not Thrown in this base class.
      • generateFireCode

        public java.lang.String generateFireCode()
        Generate code that corresponds with the fire() method.
        Returns:
        The generated code.