Compiler CreateCompiler( string name, string path, Sandbox.Compiler/Configuration settings )

robot_2Generated
code_blocksInput

Description

The CreateCompiler method is responsible for creating a new instance of a Compiler within the CompileGroup. This method requires a name, a path, and a configuration object to set up the compiler appropriately.

Usage

To use the CreateCompiler method, you need to provide the following parameters:

  • name: A string representing the name of the compiler. This is used for identification purposes within the compile group.
  • path: A string specifying the file path where the compiler will operate. This path is typically where the source files are located.
  • settings: A Configuration object that contains various settings and options for the compiler. This configuration dictates how the compiler should behave during the compilation process.

Once invoked, the method returns a Compiler object that can be used to manage and execute compilation tasks.

Example

// Example of using CreateCompiler
var compileGroup = new CompileGroup();
var compilerConfig = new Compiler.Configuration();

// Set up configuration settings
compilerConfig.SomeSetting = true;

// Create a new compiler
Compiler myCompiler = compileGroup.CreateCompiler("MyCompiler", "/path/to/source", compilerConfig);

// Use the compiler
myCompiler.Compile();