class Pegasus::Generators::Api::FileGenerator(C, I)
- Pegasus::Generators::Api::FileGenerator(C, I)
- Reference
- Object
Overview
A base class for a source file generator.
This class is meant to be extended by each individual
file generator that uses ECR
, and thus provides
the methods #input!
and #context
to make
the genertor's input and context available inside
the template file.
Direct Known Subclasses
- Pegasus::Generators::C::HeaderGenerator
- Pegasus::Generators::C::SourceGenerator
- Pegasus::Generators::Crystal::ParserGenerator
- Pegasus::Generators::CrystalSem::SourceGenerator
- Pegasus::Generators::CSem::HeaderGenerator
- Pegasus::Generators::CSem::SourceGenerator
Defined in:
generators/generators.crConstructors
-
.new(parent : Pegasus::Generators::Api::PegasusOptionParser(C, I), name : String, default_filename : String, description : String)
Creates a new file generator attached to he given
PegasusOptionParser
, with the given name, default filename, and description.
Instance Method Summary
-
#add_option(opt_parser)
Adds required options to the given option parser.
-
#context
Convenience method to access the parser context from an ECR template.
-
#default_filename : String
The default filename this generator will write to.
-
#default_filename=(default_filename : String)
The default filename this generator will write to.
-
#description : String
The user-friendly description of this generator.
-
#description=(description : String)
The user-friendly description of this generator.
-
#input!
Convenience method to access the parser generator input from an ECR template.
-
#name : String
The internal name of this file generator, which will be associated with a filename by the
PegasusOptionParser
. -
#name=(name : String)
The internal name of this file generator, which will be associated with a filename by the
PegasusOptionParser
. -
#parent : PegasusOptionParser(C, I)
The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.
-
#parent=(parent : PegasusOptionParser(C, I))
The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.
Constructor Detail
Creates a new file generator attached to he given PegasusOptionParser
,
with the given name, default filename, and description.
Instance Method Detail
The default filename this generator will write to.
The internal name of this file generator,
which will be associated with a filename by the PegasusOptionParser
.
The internal name of this file generator,
which will be associated with a filename by the PegasusOptionParser
.
The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.
The parser program to which this generator belongs, used to retreive input and context and to configure and retreive file names.