Code-X Processor

How to download and run

Go to the Public Downloads and get this executable:

  • codex.exe

The executable is self-contained and can be run without prior installation.

The Code-X Processor tool is contained in the Tinman 3D SDK as the codex component. It analyzes the C# source code of Code-X compliant libraries and then generates source code for other programming languages, for example C++, HLSL or GLSL.

For details on this workflow, please refer to Code-X Framework.

The following sections explain the command line and project file syntax that are required to run a Code-X workflow.

CAUTION

Running a Code-X workflow can cause lots of file modifications in the local filesystem.

It is strongly recommended to have a version control system in place (e.g. Git or SVN), to be able to review all changes that have actually happened and to undo them, if necessary.

This particularly applies to the time when authoring a Code-X project file, where - for example - it is possible to have all output files accidentally deleted by adding a single incorrect exclude filter (which would also delete all native code blocks).

Command Line

To perform a Code-X workflow, run the codex tool and point it to a Code-X Project File.

The codex tool requires a Development licence key, which must be specified with an environment variable:
TINMAN_3D_LICENCEKEY= ...
Command-line invocation of codex tool
> codex <task> (1)
1 The command-line task to perform.
Grammar of a command-line task
!task         := check | process | generate | run ; (1)

check         := 'check' project-file ;
generate      := 'generate' language? project-file ;
process       := 'process' project-file ;
run           := 'run' language? project-file ;

!language     := '@' (@'cs' | @'cpp' | @'java') ; (2)
!project-file := path ; (3)
1 Chooses the task to perform: check, process, generate, run
2 Chooses the target programming language, or all if omitted.
3 Chooses the Code-X Project File, as an absolute or relative file path.

Status messages that are intended for human consumption are output to the standard output stream in an unspecified format and may be discarded without loosing any relevant information about the Code-X workflow.

Errors, warnings and hints regarding the Code-X workflow are output to the standard error stream in a well-defined format and are supposed to be consumed by human beings or machines, see Message Format.

The process exit codes may be used when integrating a Code-X workflow invocation into a build pipeline.

Table 1. Process exit codes
Code Meaning

0

The Code-X workflow has completed successfully.

No syntax errors have been reported.

No semantic problems have been reported.

No semantic hints have been reported.

1

The Code-X workflow has completed successfully.

No syntax errors have been reported.

No semantic problems have been reported.

At least one semantic hint has been generated.

2

The Code-X workflow has completed successfully.

No syntax errors have been reported.

No semantic errors have been reported.

At least one semantic warning has been generated.

3

The Code-X workflow has failed with errors.

At least one syntax error or semantic error has been generated.

-1

The Code-X workflow did not run.

The command-line arguments are incorrect or the licence key is missing.

-2

The Code-X workflow has crashed.

An unexpected internal error has occurred. Error information can be found in the logfile.

check

Example command-line invocation
> codex check my-project.xml

This task parses the Code-X compliant input source code files and collects the native code blocks (see CxStatementCode and CodeX::NativeAttribute) of each target programming language, by scanning the output source code files. If there are syntax errors, the task reports them and then terminates.

If there are no syntax errors, the task inspects the parsed input source code files and the collected native code blocks. If there are semantic problems, the task reports them and then terminates.

This task does not modify the filesystem.

process

Example command-line invocation
> codex process my-project.xml

This task first runs check and terminates if there are any errors or problems. Upon success, it writes the .psi and .api files for each project.

The .psi files contain the full code model as well as the content of all native code regions.

The .api files only contain those parts of the full code model which are required for use as external libraries.

This task modifies the filesystem.

generate

Example command-line invocation
> codex generate @ cpp my-project.xml

This task uses the .psi files of each project and thus requires that process has been run before. It generates the output source code for the chosen target programming languages.

This task modifies the filesystem.

run

Example command-line invocation
> codex run my-project.xml

This task runs process and terminates if there are any errors or problems. Upon success, runs generate.

This task modifies the filesystem.

MSBuild

The Code-X processor can be invoked from the Microsoft Build Engine (MSBuild).

Although MSBuild can run arbitrary command-line tools (and thus the codex tool), using a build task eases setup and provides better feedback for errors, warnings and notices, with out-of-the box integration in IDEs.

The codex task requires a Development licence key, which must be specified with an environment variable:
TINMAN_3D_LICENCEKEY= ...

To add the Code-X processor to a project, insert a <UsingTask/> element to the project file, which will register the processor task with the build engine.

Register processor task
<UsingTask
  TaskName="CodeX.Processor.Task"
  AssemblyFile="codex-task.dll"/> (1)
1 Path to the processor task binary, see lib/win.any/ or Preview (Web) / Tools.

Once the processor task has been registered, build targets may be defined by adding <Target/> elements to the project file.

Build target using the processor task
<Target
  Name="MyTaskName" BeforeTargets="Build"> (1)
  <CodeX.Processor.Task
    Arguments="check codex.xml"
    Directory="$(ProjectDir)"
    FailOnErrors="true"
    FailOnNotices="false"
    FailOnWarnings="false"/>
</Target>
1 Choose these according to your build pipeline.

The processor task properties are described by the subsequent sections.

​Arguments

Default Value

"check codex.xml"

The command-line arguments for the Code-X processor, see Command Line.

If not specified, runs check on the default project file.

​Directory

Default Value

"$(ProjectDir)"

The base directory to use for resolving relative paths that are present in Arguments.

If not specified, the directory of the project file that has called this task is used.

​Fail​On​Errors

Default Value

"true"

Shall the build fail on syntax and semantic errors?

​Fail​On​Notices

Default Value

"false"

Shall the build fail on semantic notices?

​Fail​On​Warnings

Default Value

"false"

Shall the build fail on semantic warnings?

Message Format

The Code-X workflow outputs messages in a well-defined format, as described by the subsequent sections.

Syntax Errors

A syntax error indicates that an input source file does match the grammar for Code-X code units (see CxCodeUnit).

All errors must be fixed before the Code-X workflow can succeed.

Syntax errors may be generated for valid C# code, because not all C# language features are supported by Code-X.
Syntax error message
['project.codex\CodeX.Examples.CodeX\Constants.cs'] (1)
45:     public const int SomeNumber = 1x0; (2)
   ___________________________________/\__ (3)
   [Syntax] Mismatch in rule constant, expected this: ';' (4)
   [Syntax] Mismatch in rule expr-add, expected this: [  +- ] | '\n' | ...
   [Syntax] Mismatch in rule expr-assign, expected this: [  = ] | '%=' | ...
   [Syntax] Mismatch in rule expr-cond, expected this: [  ? ] | '\n' | ...
   [Syntax] Mismatch in rule expr-cond-and, expected this: ' ' | '&&' | ...
   [Syntax] Mismatch in rule expr-cond-or, expected this: ' ' | '\n' | ...
   [Syntax] Mismatch in rule expr-equal, expected this: ' ' | '!=' | ...
   [Syntax] Mismatch in rule expr-logic-and, expected this: [  & ] | '\n' | ...
   [Syntax] Mismatch in rule expr-logic-or, expected this: [  | ] | '\n' | ...
   [Syntax] Mismatch in rule expr-logic-xor, expected this: [  ^ ] | '\n' | ...
   [Syntax] Mismatch in rule expr-mul, expected this: [  %*/ ] | '//' | ...
   [Syntax] Mismatch in rule expr-relate, expected this: [  <> ] | '<=' | ...
   [Syntax] Mismatch in rule expr-shift, expected this: ' ' | '<<' | '>>' | ...
   [Syntax] Mismatch in rule expr-suffix, expected this: [  (. ] | '++' | ...
   [Syntax] Mismatch in rule literal-number, expected this: '.' | '0'..'9' | ...
1 Path to the source code file, relative to $(BaseDir)
2 The source code line, including the line number
3 Visual indicator of the syntax error column
4 The grammar rules that were matching the preceding input

Semantic Problems

A semantic problem is a critical error, a non-critical error or a warning, in terms of the Code-X Framework.

All errors must be fixed before the Code-X workflow can succeed.

All warnings should be fixed. The workflow will fail on warnings. By configuring <ignore/> elements in the Code-X Project File, specific warnings can be ignored.

Semantic problem message
[Critical] ConstantDeclaration.MemberType has incomplete / unresolved value! (1)
['project.codex\CodeX.Examples.CodeX\Constants.cs'] (2)
::CodeX.Examples/Constants/SomeString (3)
----  (4)
/// <summary>
///   Summary
/// </summary>
public const string2 SomeString = "Hallo";
----

[Critical] NamedType has incomplete / unresolved value!
::CodeX.Examples/Constants/SomeString
string2 (3)
1 The severity (Critical, Error, Warning or Notice), followed by the message. Will be omitted iff it is identical to the part of the previous message.
2 Path to the source code file, relative to $(BaseDir)
3 A name path that identifies the code element, in the form ::Namespace/Type/Member/Parameter. Will be omitted iff it is identical to the part of the previous message.
4 The source code fragment, will be surrounded by ----, if multi-line.

Semantic Hints

A semantic hint is a notice, in terms of the Code-X Framework.

The format of semantic hints is identical to the format of Semantic Problems.

By configuring <ignore/> elements in the Code-X Project File, specific hints can be silenced.

After adding native code blocks to the input source code, there will be hints stating that code blocks in the output source code are incomplete. Running the Code-X workflow in such a case will create the missing code blocks. The hints will disappear once theses blocks have been filled with code.

Code-X Project File

Regular XML files are used to define Code-X workflows. File paths need to be specified at various places in a project file. This documentation uses the following placeholders to refer to common directories:

$(ProjectFile)

This is the absolute path to the Code-X project file.

$(BaseDir)

The base directory of the Code-X workflow, defined by base of <codex/>.

$(ProjectDir)

The base directory of a project, defined by base of <project/>.

$(OutputDir)

The output directory for generated source code of a <module/> for a specific <target/>.

Code-X project file
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE codex PUBLIC "-//TINMAN//CODEX//EN"
  "https://dtd.tinman3d.com/Code-X.1.dtd"> (1)
<codex format="1"> (2)
  ...
</codex>
1 The Document Type Definition for validation, which also chooses the Code-X project file format version.
2 See <codex/> element.

The following sections contain a documentation block for each XML element, of this style:

<example/>
Parent

<parent-1/>
<parent-2/>

Children

<child-1/> - exactly one
<child-2/> - zero or one
<child-3/> - zero or more

Attributes

attribute-1 - required
attribute-2 - required
attribute-3 - optional
attribute-4 - optional

<example attribute-1="..." attribute-2="..."
         attribute-3="..." attribute-4="...">
  <child-1>...</child-1>
  <child-2>...</child-2>
  <child-3>...</child-3>
</example>

The Parent section links to the possible XML parent elements, Children lists the allowed child XML elements and Attributes shows the attributes of the XML element. For each attribute, there is a separate documentation section.

<codex/>

This is the root XML element of a Code-X Project File document.

<codex/>
Children

<global/> - zero or one
<external/> - zero or more
<project/> - zero or more
<shaders/> - zero or more

Attributes

format - optional
base - optional

<codex format="..." base="...">
  <global>...</global>
  <project>...</project>
  <shaders>...</shaders>
  ...
</codex>

format

The file format version of the Code-X project file. If not specified, the format version 1 will be assumed.

Currently there is only the file format version 1.

base

If absolute, defines $(BaseDir).

If relative, resolves against the directory that contains $(ProjectFile) and then defines $(BaseDir).

If not specified, $(BaseDir) will be identical to the directory that contains $(ProjectFile).

<dictionary/>

Defines the dictionary that will be used for spell-checking when analyzing source code comments.

<dictionary/>
Parent

<global/>

Children

<word-list/> - zero or more

<dictionary>
  <word-list/>
  ...
</dictionary>

<exclude/>

Defines filters for excluding files / types from processing.

<exclude/>
Parent

<global/>
<input/>

Children

<filter/> - zero or more

<exclude>
  <filter/>
  ...
</exclude>

<filter/>

Defines a filter for file paths or fully qualified type names.

<filter/>
Parent

<exclude/>
<include/>

Attributes

prefix - optional
suffix - optional
priority - optional

<filter prefix="..." suffix="..." priority="..."/>

For input files of a <project/>, the <filter/> attributes operate on relative file paths, based on $(ProjectDir). Directory separators are normalized, so / and \ may be used interchangeably.

Example input for file path filter
Relative/Path/To/Input.cs

For input types of a <module/>, the <filter/> attributes operator on the fully-qualified C# type name, not including the global:: prefix and omitting any generic type suffixes.

Example input for type name filter
CodeX.Examples.HelloWorld

prefix

If set, the input must start with the specified prefix.

suffix

If set, the input must end with the specified suffix.

priority

Specifies the priority of this filter. If a filter matches a file / type, it will set the filter result (according to the parent element) only if its priority is greater then the previous match.

If not set, the priority is 0.

<global/>

The elements in the global section define properties for the whole workspace. Some properties may be overridden by elements at lower levels.

<global/>
Parent

<codex/>

Children

<dictionary/> - zero or one
<exclude/> - zero or one
<ignore/> - zero or more

<global>
  <dictionary>...</dictionary>
  <exclude>...</exclude>
  <ignore/>
  ...
</global>

<ignore/>

Defines filters for ignoring non-critical Semantic Problems and Semantic Hints.

Ignored inspection messages a dropped silently, the processor will behave as if the message had not been generated in the first place.

<ignore/>
Parent

<global/>

Attributes

message - optional
message-op - optional
node - optional
node-op - optional

<ignore message="..." message-op="..." node="..." node-op="..."/>

The <ignore/> filter will match if all of the following conditions are true:

  • The message test produces a match.

  • The node test produces a match.

The message-op and node-op attributes depict the matching operator and may be one of the following:

Equal

The match token must be equal to message / node.

Contain

The match token must contain message / node.

Prefix

The match token must start with message / node.

Suffix

The match token must end with message / node.

message

Chooses the message text of an inspection message as the match token (i.e. the first line of text, excluding the tag for the inspection severity).

If empty, all inspection messages will be matched, regardless of message-op.

message-op

The matching operator to use for message.

node

Chooses the name path of the code element of an inspection message as the match token (i.e. the second line of text).

If empty, all inspection messages will be matched, regardless of node-op.

node-op

The matching operator to use for node.

<include/>

Defines filters for including files / types for processing.

<include/>
Parent

<input/>

Children

<filter/> - zero or more

<include>
  <filter/>
  ...
</include>

<input/>

Specifies the files / types that will be used as input for the Code-X workflow.

The <exclude/> filters are applied before the <include/> filters, which means that exclusions have higher precedence as inclusions when they have the same priority.

<input/>
Parent

<project/>

Children

<exclude/> - zero or one
<include/> - zero or one

Attributes

default - required

<input default="...">
  <exclude>...</exclude>
  <include>...</include>
</input>

default

Specifies the initial filter result value. May be one of the following:

Include

Files / types will be included by default and may be excluded by filters.

Exclude

Files / types will be excluded by default and may be included by filters.

<option/>

Defines a single option in a set of <options/>.

<option/>
Parent

<options/>

Attributes

name - required
value - required

<option name="..." value="..."/>

name

The option name.

value

The option value.

<options/>

Defines a set of <option/> elements for the Cpu-X and Gpu-X workflows.

<options/>
Parent

<module/>
<target/>

Children

<option/> - zero or more

<options>
  <option/>
  ...
</options>

<word-list/>

Declares a word file that shall be used for spell-checking. Word files are simple text files in UTF-8 encoding, where each line of text defines a single word.

<word-list/>
Parent

<dictionary/>

Attributes

kind - required
path - required

<word-list kind="..." path="..."/>

kind

Defines the usage of the word list. May be one of the following:

Abbreviation

Case-sensitive abbreviations that shall be ignored.

Example 1. Common abbreviations

JSON
WKT
XML

Designation

Case-sensitive names and designations that shall be ignored.

Example 2. Common names

Mercator
Euler
Lambert

Dictionary

Case-insensitive words to use for spell-checking.

Example 3. Common dictionary words

hello
world

Reserved

Reserved identifiers that shall be ignored.

Example 4. Common reserved identifiers

stackalloc
readonly

path

The path of the word file. Will be resolved against $(BaseDir), if relative.

Cpu-X Workflow

This section explains those Code-X Project File elements that belong to the Cpu-X workflow.

<dependency/>

Declares that the enclosing <project/> depends on the project that is specified by this element.

The dependency may be an external library (see <external/>) or another project (see <project/>).

<dependency/>
Parent

<project/>

Attributes

name - optional
guid - required
major - required
minor - required

<dependency name="..." guid="..."
            major="..." minor="..."/>

name

Optional human-readable name to use instead of guid, for better readability.

This name does not have any impact on the Code-X workflow. However, it should correlate with name.

guid

The guid of the referenced <project/>.

major

The exact major version number of the referenced <project/>.

The major versions of the dependency and the referenced project must match exactly.

minor

The minimum minor version number of the referenced <project/>.

The minor version of the dependency must be less than or equal to the minor version of the referenced <project/>.

<external/>

Defines an external library, which is provided as a separate .psi or .api file.

<external/>
Parent

<codex/>

Children

path - exactly one

<external path="..."/>

path

The file path of the .psi or .api file which represents the external library.

If relative, resolves against $(BaseDir).

Since .api files have a smaller file size, the Code-X workflow will finish more quickly. Also, they will not expose any implementation details, as they contain only those parts of the code model which belong to the public API.

<module/>

Defines a module within a <project/>.

<module/>
Parent

<project/>

Children

<options/> - zero or one
<input/> - exactly one

Attributes

name - required
output - required
tag - required
type-prefix - optional

<module name="..." tag="..."
        type-prefix="..." output="...">
  <options>...</options>
  <input/>
</module>

name

Specifies a human-readable name for the module.

This name is used in comments of the generated source code when referring to a module of a project and should thus be plausible.

tag

Assigns a machine-readable tag to the module, which must be suitable for use as filesystem path element and as a programming language identifier.

type-prefix

Specifies a common type name prefix that depicts which types of are included in the module.

The <input/> of <project/> yields source code files, which are parsed into code units.

Each code unit contains a single type declaration, which has a fully-qualified name.

A code unit belongs to a module iff the fully-qualified type name of its declaration starts with type-prefix.

output

Defines $(OutputDir) as the concatenation (indicated by |) of the following tokens:

$(ProjectDir) | "/" | output | full-source? | path-suffix | "/"

If a <module/> is not obfuscated, the full-source token will not be used.

For obfuscated modules, two output passes are performed: the first pass outputs the obfuscated source code and the second pass output the full (i.e. non-obfuscated) source code. The full-source token is used to generate a distinct $(OutputDir) value for the second pass.

Example 5. Example $(OutputDir)

Given these values:

$(ProjectDir) = "/my-project"
output = "MyModule"
full-source = ".Full"
path-suffix = ".Cpp"

Code for non-obfuscated modules and for the first pass of obfuscated modules is then output to:

$(OutputDir) = "/my-project/MyModule.Cpp"

Code for the second pass of obfuscated modules is output to:

$(OutputDir) = "/my-project/MyModule.Full.Cpp"

<options/>

This section lists the <options/> that may be configured for the Cpu-X Workflow.

Table 2. Allowed option targets
Option Allowed in <module/> Allowed in <target/> Used by language

"BuggyCode"

yes

yes

any

"Encoding"

yes

yes

any

"IndentChar"

yes

yes

any

"IndentCount"

yes

yes

any

"IndentWidth"

yes

yes

any

"NamingStyle"

yes

no

any

"NoExport"

yes

yes

CPP

"Obfuscate"

yes

yes

any

"PrecompiledHeader"

yes

yes

CPP

Allowed options that are present in <target/> will override options that are present in <module/>.

"BuggyCode"

This custom option enables ("yes") or disables ("no") output of buggy code.

Defaults to "no".

Buggy code is a defined as the modification of functional code:

  • The structural design remains unchanged (namespaces, types and members).

  • The program flow (i.e. statements) remains unchanged.

  • Near-terminal expressions are modified in order to yield non-functional code.

The modifications should be hardly noticeable, so that a reviewer can still make statements about the code quality and structure. Furthermore, the modifications must not cause compiler errors and should not cause additional compiler warnings. This way, a developer can set up a full integration using the buggy code. After shaking off all integration issues, the developer can swap in the functional code.

"Encoding"

Name of the output encoding to use, may be one of the following:

  • "US-ASCII"

  • "ISO-8859-1"

  • "UTF-8"

  • "UTF-16BE"

  • "UTF-16LE"

Specifying a name that does not match any of the above ones (case-insensitively), the fallback "US-ASCII" will be used.

If the encoding has a preamble (for example BOM for Unicode), it will be used when writing generated files.

Defaults to "UTF-8".

"IndentChar"

Specified the indentation character to use.

Default to " " (space).

"IndentCount"

Specified the width of a single indentation level, measured in indentation characters.

Defaults to 2.

"IndentWidth"

Specified the width of a single indentation level, measured in text columns.

Defaults to 2.

"NamingStyle"

Specifies the naming style to use.

May be one of the following values, as indicated by the sub-section captions.

"Default"

This is the default naming style for language CPP and CS.

  • "UpperMixedCase" for type declarations

    • with "I…​" prefix for interface declarations

  • "UpperMixedCase" for public members

  • "lowerMixedCase" for non-public members

"Hungarian"

Based on "Default", adding name prefixes for type declarations and their members.

Name prefixes for type declarations:

  • "C…​" for classes

  • "S…​" for structures

  • "E…​" for enumerations

Name prefixes for members have two parts:

  • "m_" for instance members

  • "s_" for static members

The second prefix part depends on the member type:

"Java"

This is the default naming style for language JAVA.

Based on "Default", using the following rules for naming members:

  • "UPPER_CASE_NAME" for enum items, constants and static readonly fields.

  • "lowerMixedCase" for all other members

"NoExport"

This options disables ("yes") or enables ("no") export of symbols for dynamic linking.

Defaults to "no".

"Obfuscate"

This options enables ("yes") or disables ("no") obfuscation of non-public code.

If specified by <module/>, obfuscation will be configured accordingly.

Otherwise, if specified by <target/>, obfuscation will be configured accordingly.

Otherwise, obfuscation will be disabled.

When obfuscation is enabled, all code elements that are neither public nor protected will / be obfuscated in the following manner:

  • They will be renamed to X_, where X is a randomly chosen identifier.

  • All code comments are removed.

  • All non-significant whitespaces are removed.

Obfuscation will not be performed for local variables with identifiers that end with _keep. Code elements annotated with [Keep] will also not be obfuscated.

"PrecompiledHeader"

Name of the precompiled C++ header file to include at the top of each generated source file.

Defaults to "", i.e. no precompiled header is used.

<project/>

Defines a project for the Code-X workflow, which generates C++ source code, for example.

<project/>
Parent

<codex/>

Children

<project-id/> - exactly one
<dependency/> - zero or more
<target/> - zero or more
<input/> - exactly one
<module/> - zero or more

Attributes

base - optional
header - optional
name - required
psi - required
tag - required

<project name="..." tag="..."
         base="..." psi="..." header="...">
  <project-id/>
  <dependency/>
  ...
  <target>...</target>
  ...
  <input>...</input>
  <module>...</module>
  ...
</project>

base

If absolute, defines $(ProjectDir).

If relative, resolves against $(BaseDir) and then defines $(ProjectDir).

If not specified, $(ProjectDir) will be identical to $(BaseDir).

header

Path to an optional copyright text file in UTF-8 encoding, either absolute or relative to $(ProjectDir), which will be read and its content be written at the beginning of each generated output source code file.

The file header must be plain text. Depending on the <target/> programming language, it will be wrapped in suitable source code comments. Usually, these will be single-line comments.

Example file header text
Example file header
with two text lines
Example source code file output
// Example file header
// with two text lines
...

The file header text may contain placeholders, which will be expanded, as described below.

Table 3. File header placeholders
Placeholder Replacement Values

{0}

A - B vX.Y

A = <project/>.name
B = <module/>.name
X = <project-id/>.major
Y = <project-id/>.minor

name

Specifies a human-readable name for the project.

This name is used in comments of the generated source code when referring to a project and should thus be plausible.

psi

Path to the .psi file of this project, either absolute or relative to $(ProjectDir).

The .api file of the project will be written into the same directory as the .psi file.

tag

Assigns a machine-readable tag to the project, which must be suitable for use in filesystem paths.

The tag does not need to be unique, multiple projects may share the same tag.

The generators for the <target/> programming languages use the project tag to construct file paths for the output source code files, so it is important to choose project tags carefully. Otherwise, output files may overwrite each other, which will cause compilation errors.

<project-id/>

References a specific project and version.

<project-id/>
Parent

<project/>

Attributes

name - optional
guid - required
major - optional
minor - optional

<project-id name="..." guid="..." major="..." minor="..."/>

name

Optional human-readable name to use instead of guid, for better readability.

This name does not have any impact on the Code-X workflow. However, it should correlate with name.

guid

Defines a unique identifier for the project, in form of a GUID, for example A3252944-2D5D-4010-B0FE-D68DB002A19A.

Usually, a project identifier is assigned once and then never changed again. The Code-X workflow uses the guid in combination with major and minor in order to resolve references between projects.

major

Defines the major version number of the project.

Each time the public API of a project (i.e. the contents of the .api file) changes, the major version number must be incremented and the minor version number must be set to 0.

If not specified, the minor version number will be 0.

minor

Defines the minor version number of the project.

Each time the implementation of a project (i.e. the contents of the .psi file) changes but the public API remains unchanged (i.e. the contents of the .api file), the minor version number must be incremented.

If not specified, the minor version number will be 1.

<target/>

Defines a target for code generation.

Native code blocks are collected and stored separately for each defined target language.

When using a single target for a programming language, native code blocks may need to do compile-time branching (e.g. pre-processor #ifdef). By using language tags, separate targets may be defined for the same programming language, which will allow the native code blocks to be separated, as well.

<target/>
Parent

<project/>

Children

<options/> - zero or one

Attributes

language - required
language-tag - optional
path-suffix - optional
full-source - optional

<target language=".." language-tag="..."
        path-suffix=".." full-source="...">
  <options>...</options>
</target>

language

Depicts the programming language to generate.

Before generating code, the output directory is cleaned by deleting all files, except certain retained files.

May be one of the following:

CPP

The C++ programming language, version 11.

Retained files:

  • CodeX_System*.h

  • CodeX_System*.cpp

  • *.Test.*

  • *.Native.*

  • stdafx.cpp

  • stdafx.h

  • *.natvis

CS

The C# programming language, version 7.3.

Retained files:

  • AssemblyInfo.cs

  • SafeNativeMethods*.cs

JAVA

The Java programming language, version 11.

Retained files:

  • none

language-tag

Optional tag to use for discriminating this target against others with the same language.

path-suffix

The output path suffix to use for this language.

full-source

The full-source tag to use for this language.

Gpu-X Workflow

This section explains those Code-X Project File elements that belong to the Gpu-X workflow.

<options/>

This section lists the <options/> that may be configured for the Gpu-X Workflow.

hourglass This section is not yet available, see roadmap for details.

<shaders/>

hourglass This section is not yet available, see roadmap for details.