CodeGenTaskSet Class

MapPrep

CodeGenTaskSet Class

 

Represents the data for and results of a code generation session comprising of one or more CodeGen tasks. A CodeGenTaskSet object is processed by the CodeGenerator class in order to generate code.

For an example of generating code with the CodeGen API look here.

Syntax

Class Name:           public class CodeGenTaskSet

Namespace:          CodeGen.Engine

Assembly:          CodeGenEngineShared.dll (later will move into CodeGenEngine.dll)

Constructors

Name

Description

CodeGenTaskSet

Initializes a new instance of the CodeGenTaskSet class.

Methods

Name

Description

LoadFromFile(String,CodeGenTaskSet)

De-serializes a previously saved XML file back to a CodeGenTaskSet object.

SaveToFile(String)

Serializes the current objects data to an XML file.

Required Properties Set by Calling Application Before Processing

Name

Type

Description

Tasks

@ObservableCollection<CodeGenTask>

 

Optional Properties Set by Calling Application Before Processing

Name

Type

Description

ContinueAfterError

Boolean

Continue processing after errors. If multiple templates, files or tasks are being processed then this option allows code generation to continue even though one template/structure combination has generated an error. Setting this property is the equivalent of using the -c command line option.

DataMappingsFile

String

Specifies that custom data mappings are loaded from an XML file. Refer to Customizing Data Type Mappings in the docs for more info. Setting this property is the equivalent of using the -cdm command line option.

Description

String

A description of the task set. Not used by CodeGen, but it may be useful for consuming code to display task set descriptions in their UI.

EchoCommands

Boolean

Display the command line used to start CodeGen. Setting this property is the equivalent of using the -e command line option.

ListGeneratedFiles

Boolean

List Files. Lists the names of any files generated when not running in verbose or debug logging modes. Setting this property is the equivalent of using the -lf command line option.

LoggingLevel

LoggingLevel

Logging level.  Setting this property is the equivalent of using using one of the -v, -d, or -debug command line option.

LogTokenizerResults

Boolean

Causes CodeGenerator to create log files containing the internal results of the code tokenization and parsing phases. Setting this property is the equivalent of using the -dt command line option.

OutputFolder

String

Output directory. Defaults to the current directory, or the directory specified with the CODEGEN_OUTDIR environment variable. You can use a full or relative path, or a logical followed by a colon (e.g. SRC:). Setting this property is the equivalent of using the -o  command line option. A value set here provides a default value to each task in the task set.

RepositoryMainFile

String

Repository main file to use for this task set. Providing a value here provides a default value for each task in the task set. Setting this property is the equivalent of setting the RPSMFIL environment variable.

RepositoryTextFile

String

Repository text file to use for this task set. Providing a value here provides a default value for each task in the task set. Setting this property is the equivalent of setting the RPSTFIL environment variable.

TemplateFolder

String

Input file directory containing templates. Defaults to the current directory, or the directory specified with the CODEGEN_TPLDIR environment variable. You can specify a full or relative path, or a logical name followed by a colon (e.g. TPL:). Setting this property is the equivalent of using the -i command line option. Setting a value here provides a default value for all tasks in the task set.

Properties Set by CodeGenerator During Processing

Name

Type

Description

Complete

Boolean

Indicates that all tasks within the task set completed without errors or warnings.

LastErrorMessage

String

The last error message that was reported for all tasks in the task set.

Messages

@ObservableCollection<String>

All messages that were reported while processing the task set.

Events Raised During Processing

Name

Description

StartingTaskSet

Raised by CodeGenerator just before it starts processing the task set.

TaskSetComplete

Raised by CodeGenerator just after it finishes processing the task set.

 

 

 

 


Copyright © 2018  Synergex International, Inc.