public interface DarkMatterGeneratorIF
| Modifier and Type | Method and Description |
|---|---|
void |
gatherUserInput(DmgConfigDMO config,
ConfigLocation loc,
ConfigFinder f,
SchemaManager sm)
In cases where your generator requires some further input from the user,
you can overload this method to perform that interaction.
|
void |
generateCode(DmgConfigDMO config,
ConfigLocation loc,
ConfigFinder f,
SchemaManager sm)
This method should be overloaded to generate whatever code you need to generate.
|
void |
setFileHeader(String fh)
In some cases, it's convenient to be able to dump a common header to your generated
files.
|
void |
setProgressStream(PrintStream ps)
If the overall generation process wants you to provide feedback, this method will be
called with a handle to the print stream where you should display progress messages.
|
void gatherUserInput(DmgConfigDMO config, ConfigLocation loc, ConfigFinder f, SchemaManager sm)
config - The generator config.loc - The location where the config was found. Code if often generated relative to
this location.f - The configuration findersm - The schema manager that contains the base schema plus any others that
were requested in the .dmg config file via the schemaToLoad attribute.void generateCode(DmgConfigDMO config, ConfigLocation loc, ConfigFinder f, SchemaManager sm) throws IOException, ResultException, DmcNameClashException, DmcValueException
config - The generator config.loc - The location where the config was found. Code if often generated relative to
this location.f - The configuration findersm - The schema manager that contains the base schema plus any others that
were requested in the .dmg config file via the schemaToLoad attribute.IOExceptionResultExceptionDmcNameClashExceptionDmcValueExceptionvoid setProgressStream(PrintStream ps)
ps - The print streamvoid setFileHeader(String fh)
fh - The header text.Copyright © 2023. All rights reserved.