Deriving files and building applications

Derive both source and header from a single tree


Code to be derived is written by the programmer in the descendants of the main node.
Code generation is affected by headlines. (See the Headline Rules below)

During the build process, the compiler, linker and debugger outputs are redirected to the parent xcc node as comments.
Error & warning messages are taken into account to place the cursor on the appropriate line, expanding the outline if necessary.
(See the seek errors and breakpoints options in the Option Panel )


Headline rules act as 'flags' to derive code in different ways and simplify syntax :
"At" Rule

If a headline start with "@", the node and its childs are ignored. (not to interfere with other kinds of nodes)
"Semicolon" Rule

optional "!"

If a headline ends with ";" the body & that of it's descendants will be written in the source file, as opposed to a header file. (any other compatible rule can also triger)
The chosen extention must be one that generates c or cpp files for this rule to have any effect.
To avoid a global function to be declared in the header, such as the main function, append an exclamation mark after the semicolon.
"Comment" Rule

If a headline start with "//", all its body and childs are commented out.
This rule is compatible with the semicolon rule.
"Function" Rule

Shown here also with semicolon, so to be declared in the header but defined in the source.
If a headline ends with ")", the headline is used as funtion prototype, the body and childs are encased automatically in curly braces.
Class and Function rules are disabled for any descendants.
This rule is compatible with the semicolon rule, if there is a header in the project, the function will be declared in the header and defined in the source.
"Class" Rule
If a headline start with "class", a class is declared and opening and closing curly braces are automatically written, descendants of this node are class members, the functions are correctly dispatched between header and source. Access specifier is appended if it needs to.
This rule is compatible with the semicolon rule.
"Default" Rule

By default, a headline is written as a comment, it's body and that of it's descendants are written as is.
This rule is compatible with the semicolon rule.