# HG changeset patch # User stechong # Date 1258140874 21600 # Node ID 41edc8c123d608eab50963e984f2c890497cd437 # Parent 22956bdb436ebea63882b55b9eeaad10caf175cc# Parent b46382ab04d23acd1e4a17374829a9bc3406f4d7 Merge commit. diff -r 22956bdb436e -r 41edc8c123d6 uidesigner/com.nokia.sdt.component.symbian/src/com/nokia/sdt/component/symbian/sourcegen/macrohelp/MacroHelpGenerator.java --- a/uidesigner/com.nokia.sdt.component.symbian/src/com/nokia/sdt/component/symbian/sourcegen/macrohelp/MacroHelpGenerator.java Fri Nov 13 13:34:02 2009 -0600 +++ b/uidesigner/com.nokia.sdt.component.symbian/src/com/nokia/sdt/component/symbian/sourcegen/macrohelp/MacroHelpGenerator.java Fri Nov 13 13:34:34 2009 -0600 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" @@ -25,16 +25,14 @@ import com.nokia.sdt.emf.component.loader.Loader; import com.nokia.cpp.internal.api.utils.core.FileUtils; import com.nokia.cpp.internal.api.utils.core.MessageLocation; -import com.sun.org.apache.html.internal.dom.HTMLDOMImplementationImpl; import org.eclipse.core.runtime.Path; import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; +import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -import org.w3c.dom.html.HTMLDOMImplementation; -import org.w3c.dom.html.HTMLDocument; import java.io.File; import java.io.FileOutputStream; @@ -46,6 +44,7 @@ import java.util.List; import java.util.Map; +import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; @@ -62,6 +61,7 @@ public class MacroHelpGenerator { private SourceGenMacroSupport macroSupport; private Map> macroMap; + private Document document; public static void main(String[] args) { MacroHelpGenerator generator = new MacroHelpGenerator(); @@ -130,22 +130,29 @@ } private void generate(String fName) throws Exception { - HTMLDOMImplementation domImpl = HTMLDOMImplementationImpl.getHTMLDOMImplementation(); - HTMLDocument document = domImpl.createHTMLDocument( - "Help for Macros in " + new File(fName).getName()); + document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); + Element html = document.createElement("html"); + document.appendChild(html); + html.setAttribute("xmlns", "http://www.w3.org/1999/xhtml"); + Element head = document.createElement("head"); + html.appendChild(head); + Element title = document.createElement("title"); + head.appendChild(title); + title.setTextContent("Help for Macros in " + new File(fName).getName()); + Element body = document.createElement("body"); + html.appendChild(body); Element tocParent = document.createElement("p"); - document.getBody().appendChild(tocParent); + body.appendChild(tocParent); Element tocTitle = document.createElement("h1"); tocTitle.setTextContent("Table of contents"); tocParent.appendChild(tocTitle); Element helpParent = document.createElement("p"); - document.getBody().appendChild(helpParent); + body.appendChild(helpParent); for (ResolvedMacro macro : macroMap.get(fName)) { - generateMacroHelp(document, - tocParent, + generateMacroHelp(tocParent, helpParent, macro); tocParent.appendChild(document.createTextNode("\n")); @@ -173,9 +180,8 @@ private void generateMacroHelp( - HTMLDocument document, Element tocParent, - Element helpParent, + Element helpParent, ResolvedMacro macro) { String id = macro.macro.getId(); @@ -201,11 +207,11 @@ helpEntry.setTextContent(id); helpParent.appendChild(helpEntry); - generateMacroDescription(document, helpParent, macro); + generateMacroDescription(helpParent, macro); } - private void generateMacroDescription(HTMLDocument document, - Element helpEntry, ResolvedMacro macro) { + private void generateMacroDescription(Element helpEntry, + ResolvedMacro macro) { DefineMacroType dmt = macro.macro; String help = dmt.getHelp(); @@ -215,7 +221,7 @@ helpEntry.appendChild(para); } else { - helpEntry.appendChild(encodeHTML(document, help)); + helpEntry.appendChild(encodeHTML(help)); } Element header = document.createElement("h3"); @@ -223,12 +229,12 @@ helpEntry.appendChild(header); //Element ul = document.createElement("ul"); - generateMacroArgumentsHelp(document, helpEntry, macro); + generateMacroArgumentsHelp(helpEntry, macro); //helpEntry.appendChild(ul); } - private void generateMacroArgumentsHelp(HTMLDocument document, - Element ul, ResolvedMacro macro) { + private void generateMacroArgumentsHelp(Element ul, + ResolvedMacro macro) { // organize arguments by their origin: // these are already ordered as @@ -269,7 +275,7 @@ } } - private void emitArgumentGroup(HTMLDocument document, + private void emitArgumentGroup(Document document, Element parent, boolean isInherited, ResolvedMacro fromMacro, @@ -321,13 +327,13 @@ }); for (MacroArgumentType argument : arguments) { - generateMacroArgumentHelp(document, table, fromMacro, argument); + generateMacroArgumentHelp(table, fromMacro, argument); } } - private void generateMacroArgumentHelp(HTMLDocument document, - Element table, ResolvedMacro macro, MacroArgumentType argument) { + private void generateMacroArgumentHelp(Element table, + ResolvedMacro macro, MacroArgumentType argument) { Element tr = document.createElement("tr"); table.appendChild(tr); @@ -349,7 +355,7 @@ td = document.createElement("td"); if (argument.getHelp() != null && argument.getHelp().length() > 0) - td.appendChild(encodeHTML(document, argument.getHelp())); + td.appendChild(encodeHTML(argument.getHelp())); else td.setTextContent("\u00A0"); tr.appendChild(td); @@ -357,7 +363,7 @@ //static Pattern PARAGRAPH_PATTERN = Pattern.compile("(.*)(\r?\n)\\s*(\r?\n)", Pattern.MULTILINE); - private Node encodeHTML(HTMLDocument document, String help) { + private Node encodeHTML(String help) { Node el = document.createTextNode(""); boolean hadParagraphs = false; int idx = 0; diff -r 22956bdb436e -r 41edc8c123d6 uidesigner/com.nokia.sdt.series60.componentlibrary/components/CommonMacros.inc.html --- a/uidesigner/com.nokia.sdt.series60.componentlibrary/components/CommonMacros.inc.html Fri Nov 13 13:34:02 2009 -0600 +++ b/uidesigner/com.nokia.sdt.series60.componentlibrary/components/CommonMacros.inc.html Fri Nov 13 13:34:34 2009 -0600 @@ -1,1393 +1,19 @@ - - - -Help for Macros in CommonMacros.inc - - -

-

Table of contents

-

-DeclareMethod -

- -

-GenerateDefaultFunctionBody -

- -

-DefineMethod -

- -

-GenerateMethod -

- -

-DefineMethodWithOwnedBody -

- -

-GenerateMethodWithOwnedBody -

- -

-GenerateMethodWithVariantArguments -

- -

-GenerateVirtualMethodOverrideForEventHandler -

- -

-GenerateUserEventHandlerFunction -

- -

-

- -

DeclareMethod

-

-

Declares a method, e.g., the prototype.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsStaticnofalse -

-

is the function static?

-

-
IsVirtualnofalse -

-

is the function virtual? (ignored if IsStatic)

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsStaticnofalse -

-

is the function static?

-

-
IsVirtualnofalse -

-

is the function virtual? (ignored if IsStatic)

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
- - -

GenerateDefaultFunctionBody

-

-

Create the default body for a function. If FunctionBody is set, emits that. If ReturnType is not void and DefaultReturn is set, create a return statement using its value.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
FunctionBodyno  -

-

text inside function body (comment and/or code)

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
FunctionBodyno  -

-

text inside function body (comment and/or code)

-

-
- - -

DefineMethod

-

-

Defines a method to one location, optionally generating body text, or a default return statement. The generated function is owned by default.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
DefnLocationyes  -

-

name of location into which to add the function

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
-

Inherited from GenerateDefaultFunctionBody:

- - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
FunctionBodyno  -

-

text inside function body (comment and/or code)

-

-
- - -

GenerateMethod

-

-

Declares and defines a method to one location and adds the prototype to another location.

-

-

Arguments

- - -
ArgumentReq'd?DefaultDescription
-

Inherited from DeclareMethod:

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsStaticnofalse -

-

is the function static?

-

-
IsVirtualnofalse -

-

is the function virtual? (ignored if IsStatic)

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
-

Inherited from DefineMethod:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
FunctionBodyno  -

-

text inside function body (comment and/or code)

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
- - -

DefineMethodWithOwnedBody

-

-

Defines a method with an owned body section.

-

The generated function is not owned by default, unlike Method. There may be uses for an owned function with a named owned region, though.

-

Also, no default function code is generated, so the provided StartFunctionBody, FunctionBody, and EndFunctionBody must account for any return statements.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionBodyno  -

-

text inside owned part of function body

-

-
OwnedRegionLocationIdno$(FunctionLocationId)_BODY -

-

location id for enclosed body

-

-
OwnedRegionNamenoGenerated Contents -

-

region name for enclosed body

-

-
StartFunctionBodyno  -

-

text inside function body (comment and/or code) before the owned section

-

-
EndFunctionBodyno  -

-

text inside function body (comment and/or code) after the owned section

-

-
FunctionBodyno  -

-

text inside owned part of function body

-

-
OwnedRegionLocationIdno$(FunctionLocationId)_BODY -

-

location id for enclosed body

-

-
OwnedRegionNamenoGenerated Contents -

-

region name for enclosed body

-

-
StartFunctionBodyno  -

-

text inside function body (comment and/or code) before the owned section

-

-
EndFunctionBodyno  -

-

text inside function body (comment and/or code) after the owned section

-

-
-

Inherited from DefineMethod:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
- - -

GenerateMethodWithOwnedBody

-

-

Declares and defines a method with an owned body section to one location and adds the prototype to another location.

-

The generated function is not owned by default, unlike Method. There may be uses for an owned function with a named owned region, though.

-

-

Arguments

- - -
ArgumentReq'd?DefaultDescription
-

Inherited from DefineMethodWithOwnedBody:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
FunctionBodyno  -

-

text inside owned part of function body

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
OwnedRegionLocationIdno$(FunctionLocationId)_BODY -

-

location id for enclosed body

-

-
OwnedRegionNamenoGenerated Contents -

-

region name for enclosed body

-

-
StartFunctionBodyno  -

-

text inside function body (comment and/or code) before the owned section

-

-
EndFunctionBodyno  -

-

text inside function body (comment and/or code) after the owned section

-

-
-

Inherited from DeclareMethod:

- - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
IsStaticnofalse -

-

is the function static?

-

-
IsVirtualnofalse -

-

is the function virtual? (ignored if IsStatic)

-

-
- - -

GenerateMethodWithVariantArguments

-

-

Declares and defines an owned method with variant arguments to one location and adds the prototype to another location.

-

Variant arguments means design-time variable (not C varargs). The function has a non-empty list of fixed arguments followed by a non-empty list of variable arguments which are generated by a Javascript expression.

-

The generated function is owned by default. It doesn't make sense to use this non-owned, since this will introduce compile errors when the prototype changes and the old body remains behind.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionArgsyes  -

-

canonical leading static argument list (e.g. "const TInt& aArg, TInt aFoo = 3") Do not include a trailing comma

-

-
FunctionVarArgsAllowEmptyyes  -

-

tell whether the varargs may be empty

-

-
FunctionVarArgsDeclExpryes  -

-

generator for the variable arguments as appearing in the declaration (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

-

-
FunctionVarArgsDefnExpryes  -

-

generator for the variable arguments as appearing in the definition (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

-

-
FunctionArgsyes  -

-

canonical leading static argument list (e.g. "const TInt& aArg, TInt aFoo = 3") Do not include a trailing comma

-

-
FunctionVarArgsAllowEmptyyes  -

-

tell whether the varargs may be empty

-

-
FunctionVarArgsDeclExpryes  -

-

generator for the variable arguments as appearing in the declaration (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

-

-
FunctionVarArgsDefnExpryes  -

-

generator for the variable arguments as appearing in the definition (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

-

-
IsOwnednotrue -

-

tell whether the function is owned. In general, it should be, otherwise compile errors will be introduced when the method's signature changes and the old version is left behind.

-

-
IsOwnednotrue -

-

tell whether the function is owned. In general, it should be, otherwise compile errors will be introduced when the method's signature changes and the old version is left behind.

-

-
-

Inherited from GenerateMethod:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionNameyes  -

-

name of function

-

-
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsStaticnofalse -

-

is the function static?

-

-
IsVirtualnofalse -

-

is the function virtual? (ignored if IsStatic)

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
FunctionBodyno  -

-

text inside function body (comment and/or code)

-

-
ClassNameno${className} -

-

the class name

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
- - -

GenerateVirtualMethodOverrideForEventHandler

-

-

Override a virtual method with a non-owned function with an owned body. This must be invoked in a templateGroup that has an ifEvents="..." attribute, so the 'event' variable is available.

-

-

Arguments

- - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
ClassNameno${handlerClassName} -

-

the name of the class

-

-
UserHandlerFunctionArgsno  -

-

the arguments passed to the user handler function (== FunctionArgs by default)

-

-
ClassNameno${handlerClassName} -

-

the name of the class

-

-
UserHandlerFunctionArgsno  -

-

the arguments passed to the user handler function (== FunctionArgs by default)

-

-
-

Inherited from GenerateMethodWithOwnedBody:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

name of the function location to define; body is named id+_BODY

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
FunctionNameyes  -

-

name of function

-

-
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
ReturnTypenovoid -

-

return type for function

-

-
FunctionBodyno  -

-

text inside owned part of function body

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
FunctionCommentno  -

-

comment appearing before function defn

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
OwnedRegionLocationIdno$(FunctionLocationId)_BODY -

-

location id for enclosed body

-

-
OwnedRegionNamenoGenerated Contents -

-

region name for enclosed body

-

-
StartFunctionBodyno  -

-

text inside function body (comment and/or code) before the owned section

-

-
EndFunctionBodyno  -

-

text inside function body (comment and/or code) after the owned section

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
- - -

GenerateUserEventHandlerFunction

-

-

Define a user handler declaration and function.

-

Provides a default header comment and body comment.

-

This is NOT conditional, so include it in a <templateGroup ifEvents="..." />

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionLocationIdyes  -

-

the id for the event handler function

-

-
FunctionLocationIdyes  -

-

the id for the event handler function

-

-
FunctionNameno${event.handlerName} -

-

the name of the function/method for the handler; generally the default should be used (the name specified in the Events view)

-

-
FunctionBodyno  -

-

the body of the function, which by default is a TODO comment

-

-
ClassNameno${handlerClassName} -

-

the name of the class that receives the handler

-

-
FunctionCommentno  -

-

the comment for the function

-

-
FunctionNameno${event.handlerName} -

-

the name of the function/method for the handler; generally the default should be used (the name specified in the Events view)

-

-
FunctionBodyno  -

-

the body of the function, which by default is a TODO comment

-

-
ClassNameno${handlerClassName} -

-

the name of the class that receives the handler

-

-
FunctionCommentno  -

-

the comment for the function

-

-
-

Inherited from GenerateMethod:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
FunctionArgsyes  -

-

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

-

-
DefnLocationyes  -

-

name of location into which to add the function

-

-
DeclLocationno  -

-

name of location into which to add the prototype (either this or DeclPhase must be defined)

-

-
DeclPhaseno  -

-

name of phase into which to add the prototype (either this or DeclLocation must be defined)

-

-
ReturnTypenovoid -

-

return type for function

-

-
IsConstnofalse -

-

add 'const' modifier to function?

-

-
DefaultReturnno  -

-

default value to return; overridden if FunctionBody is specified

-

-
IsOwnednotrue -

-

is the function body owned?

-

-
IsEventHandlernofalse -

-

is the function body the user event handler?

-

-
Initializersno  -

-

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

-

-
- -

- - +Help for Macros in CommonMacros.inc

Table of contents

DeclareMethod

+

GenerateDefaultFunctionBody

+

DefineMethod

+

GenerateMethod

+

DefineMethodWithOwnedBody

+

GenerateMethodWithOwnedBody

+

GenerateMethodWithVariantArguments

+

GenerateVirtualMethodOverrideForEventHandler

+

GenerateUserEventHandlerFunction

+

DeclareMethod

Declares a method, e.g., the prototype.

Arguments

ArgumentReq'd?DefaultDescription
FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

ReturnTypenovoid

return type for function

IsStaticnofalse

is the function static?

IsVirtualnofalse

is the function virtual? (ignored if IsStatic)

IsConstnofalse

add 'const' modifier to function?

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

ReturnTypenovoid

return type for function

IsStaticnofalse

is the function static?

IsVirtualnofalse

is the function virtual? (ignored if IsStatic)

IsConstnofalse

add 'const' modifier to function?

+

GenerateDefaultFunctionBody

Create the default body for a function. If FunctionBody is set, emits that. If ReturnType is not void and DefaultReturn is set, create a return statement using its value.

Arguments

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

FunctionBodyno 

text inside function body (comment and/or code)

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

FunctionBodyno 

text inside function body (comment and/or code)

+

DefineMethod

Defines a method to one location, optionally generating body text, or a default return statement. The generated function is owned by default.

Arguments

ArgumentReq'd?DefaultDescription
DefnLocationyes 

name of location into which to add the function

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DefnLocationyes 

name of location into which to add the function

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

IsOwnednotrue

is the function body owned?

IsConstnofalse

add 'const' modifier to function?

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

IsOwnednotrue

is the function body owned?

IsConstnofalse

add 'const' modifier to function?

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

Inherited from GenerateDefaultFunctionBody:

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

FunctionBodyno 

text inside function body (comment and/or code)

+

GenerateMethod

Declares and defines a method to one location and adds the prototype to another location.

Arguments

ArgumentReq'd?DefaultDescription

Inherited from DeclareMethod:

ArgumentReq'd?DefaultDescription
FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

ReturnTypenovoid

return type for function

IsStaticnofalse

is the function static?

IsVirtualnofalse

is the function virtual? (ignored if IsStatic)

IsConstnofalse

add 'const' modifier to function?

Inherited from DefineMethod:

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefnLocationyes 

name of location into which to add the function

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

FunctionBodyno 

text inside function body (comment and/or code)

IsOwnednotrue

is the function body owned?

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

+

DefineMethodWithOwnedBody

Defines a method with an owned body section.

The generated function is not owned by default, unlike Method. There may be uses for an owned function with a named owned region, though.

Also, no default function code is generated, so the provided StartFunctionBody, FunctionBody, and EndFunctionBody must account for any return statements.

Arguments

ArgumentReq'd?DefaultDescription
FunctionBodyno 

text inside owned part of function body

OwnedRegionLocationIdno$(FunctionLocationId)_BODY

location id for enclosed body

OwnedRegionNamenoGenerated Contents

region name for enclosed body

StartFunctionBodyno 

text inside function body (comment and/or code) before the owned section

EndFunctionBodyno 

text inside function body (comment and/or code) after the owned section

FunctionBodyno 

text inside owned part of function body

OwnedRegionLocationIdno$(FunctionLocationId)_BODY

location id for enclosed body

OwnedRegionNamenoGenerated Contents

region name for enclosed body

StartFunctionBodyno 

text inside function body (comment and/or code) before the owned section

EndFunctionBodyno 

text inside function body (comment and/or code) after the owned section

Inherited from DefineMethod:

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefnLocationyes 

name of location into which to add the function

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

IsOwnednotrue

is the function body owned?

IsConstnofalse

add 'const' modifier to function?

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

+

GenerateMethodWithOwnedBody

Declares and defines a method with an owned body section to one location and adds the prototype to another location.

The generated function is not owned by default, unlike Method. There may be uses for an owned function with a named owned region, though.

Arguments

ArgumentReq'd?DefaultDescription

Inherited from DefineMethodWithOwnedBody:

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefnLocationyes 

name of location into which to add the function

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

FunctionBodyno 

text inside owned part of function body

IsOwnednotrue

is the function body owned?

IsConstnofalse

add 'const' modifier to function?

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

OwnedRegionLocationIdno$(FunctionLocationId)_BODY

location id for enclosed body

OwnedRegionNamenoGenerated Contents

region name for enclosed body

StartFunctionBodyno 

text inside function body (comment and/or code) before the owned section

EndFunctionBodyno 

text inside function body (comment and/or code) after the owned section

Inherited from DeclareMethod:

ArgumentReq'd?DefaultDescription
DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

IsStaticnofalse

is the function static?

IsVirtualnofalse

is the function virtual? (ignored if IsStatic)

+

GenerateMethodWithVariantArguments

Declares and defines an owned method with variant arguments to one location and adds the prototype to another location.

Variant arguments means design-time variable (not C varargs). The function has a non-empty list of fixed arguments followed by a non-empty list of variable arguments which are generated by a Javascript expression.

The generated function is owned by default. It doesn't make sense to use this non-owned, since this will introduce compile errors when the prototype changes and the old body remains behind.

Arguments

ArgumentReq'd?DefaultDescription
FunctionArgsyes 

canonical leading static argument list (e.g. "const TInt& aArg, TInt aFoo = 3") Do not include a trailing comma

FunctionVarArgsAllowEmptyyes 

tell whether the varargs may be empty

FunctionVarArgsDeclExpryes 

generator for the variable arguments as appearing in the declaration (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

FunctionVarArgsDefnExpryes 

generator for the variable arguments as appearing in the definition (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

FunctionArgsyes 

canonical leading static argument list (e.g. "const TInt& aArg, TInt aFoo = 3") Do not include a trailing comma

FunctionVarArgsAllowEmptyyes 

tell whether the varargs may be empty

FunctionVarArgsDeclExpryes 

generator for the variable arguments as appearing in the declaration (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

FunctionVarArgsDefnExpryes 

generator for the variable arguments as appearing in the definition (a Javascript expression); if FunctionVarArgsAllowEmpty==false, do not generate a leading comma

IsOwnednotrue

tell whether the function is owned. In general, it should be, otherwise compile errors will be introduced when the method's signature changes and the old version is left behind.

IsOwnednotrue

tell whether the function is owned. In general, it should be, otherwise compile errors will be introduced when the method's signature changes and the old version is left behind.

Inherited from GenerateMethod:

ArgumentReq'd?DefaultDescription
FunctionNameyes 

name of function

FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefnLocationyes 

name of location into which to add the function

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

ReturnTypenovoid

return type for function

IsStaticnofalse

is the function static?

IsVirtualnofalse

is the function virtual? (ignored if IsStatic)

IsConstnofalse

add 'const' modifier to function?

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

FunctionBodyno 

text inside function body (comment and/or code)

ClassNameno${className}

the class name

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

+

GenerateVirtualMethodOverrideForEventHandler

Override a virtual method with a non-owned function with an owned body. This must be invoked in a templateGroup that has an ifEvents="..." attribute, so the 'event' variable is available.

Arguments

ArgumentReq'd?DefaultDescription
ClassNameno${handlerClassName}

the name of the class

UserHandlerFunctionArgsno 

the arguments passed to the user handler function (== FunctionArgs by default)

ClassNameno${handlerClassName}

the name of the class

UserHandlerFunctionArgsno 

the arguments passed to the user handler function (== FunctionArgs by default)

Inherited from GenerateMethodWithOwnedBody:

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

name of the function location to define; body is named id+_BODY

DefnLocationyes 

name of location into which to add the function

FunctionNameyes 

name of function

FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

ReturnTypenovoid

return type for function

FunctionBodyno 

text inside owned part of function body

IsOwnednotrue

is the function body owned?

IsConstnofalse

add 'const' modifier to function?

FunctionCommentno 

comment appearing before function defn

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

OwnedRegionLocationIdno$(FunctionLocationId)_BODY

location id for enclosed body

OwnedRegionNamenoGenerated Contents

region name for enclosed body

StartFunctionBodyno 

text inside function body (comment and/or code) before the owned section

EndFunctionBodyno 

text inside function body (comment and/or code) after the owned section

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

+

GenerateUserEventHandlerFunction

Define a user handler declaration and function.

Provides a default header comment and body comment.

This is NOT conditional, so include it in a <templateGroup ifEvents="..." />

Arguments

ArgumentReq'd?DefaultDescription
FunctionLocationIdyes 

the id for the event handler function

FunctionLocationIdyes 

the id for the event handler function

FunctionNameno${event.handlerName}

the name of the function/method for the handler; generally the default should be used (the name specified in the Events view)

FunctionBodyno 

the body of the function, which by default is a TODO comment

ClassNameno${handlerClassName}

the name of the class that receives the handler

FunctionCommentno 

the comment for the function

FunctionNameno${event.handlerName}

the name of the function/method for the handler; generally the default should be used (the name specified in the Events view)

FunctionBodyno 

the body of the function, which by default is a TODO comment

ClassNameno${handlerClassName}

the name of the class that receives the handler

FunctionCommentno 

the comment for the function

Inherited from GenerateMethod:

ArgumentReq'd?DefaultDescription
FunctionArgsyes 

canonical argument list (e.g. "const TInt& aArg, TInt aFoo = 3")

DefnLocationyes 

name of location into which to add the function

DeclLocationno 

name of location into which to add the prototype (either this or DeclPhase must be defined)

DeclPhaseno 

name of phase into which to add the prototype (either this or DeclLocation must be defined)

ReturnTypenovoid

return type for function

IsConstnofalse

add 'const' modifier to function?

DefaultReturnno 

default value to return; overridden if FunctionBody is specified

IsOwnednotrue

is the function body owned?

IsEventHandlernofalse

is the function body the user event handler?

Initializersno 

provide any initializer expressions, e.g. for constructors, appearing on a separate line after the argument list and before the function body. Do not provide the leading colon (':') as this is added automatically

Realizenofalse

If true, force the function to be generated. Otherwise, the function is generated only if the FunctionBody is non-empty or if another template contributions to the FunctionLocationId.

+

\ No newline at end of file diff -r 22956bdb436e -r 41edc8c123d6 uidesigner/com.nokia.sdt.series60.componentlibrary/components/FileAndClassMacros.inc.html --- a/uidesigner/com.nokia.sdt.series60.componentlibrary/components/FileAndClassMacros.inc.html Fri Nov 13 13:34:02 2009 -0600 +++ b/uidesigner/com.nokia.sdt.series60.componentlibrary/components/FileAndClassMacros.inc.html Fri Nov 13 13:34:34 2009 -0600 @@ -1,1097 +1,11 @@ - - - -Help for Macros in FileAndClassMacros.inc - - -

-

Table of contents

-

-SourceFileTemplate -

- -

-HeaderFileTemplate -

- -

-ClassTemplate -

- -

-AddCppIncludes -

- -

-ResolvePhases -

- -

-

- -

SourceFileTemplate

-

-

Defines the basic structure for a source file. This defines a file with system includes, user includes, and constants.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
Dirno${src} -

-

Project-relative directory for file

-

-
FileNameno${instanceName$title}.cpp -

-

Filename, inside $(Dir), to create

-

-
HeaderFileNameno${instanceName$title}.h -

-

Filename of associated header to #include, or blank for no #include

-

-
LocationPrefixnoSOURCE -

-

String which is prefixed to the location ids defined by this macro.

-

-
InitialFileHeadContentno  -

-

optional stock text for the source file (before system includes, user includes, constants).

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: does not need to specify default source file template (comments), which is automatic.

-

-
RealizeSystemIncludesnotrue -

-

flag that can be used to avoid generating the system includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

-

-
SystemIncludesRegionNamenoGenerated System Includes -

-

name of the generated section for system includes

-

-
InitialSystemIncludesContentno  -

-

optional stock text for the system includes

-

-
RealizeUserIncludesnotrue -

-

flag that can be used to avoid generating the user includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

-

-
UserIncludesRegionNamenoGenerated User Includes -

-

name of the generated section for user includes

-

-
InitialUserIncludesContentno  -

-

optional stock text for the user includes

-

-
RealizeConstantsnotrue -

-

flag that can be used to avoid generating the constants section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

-

-
ConstantsRegionNamenoGenerated Constants -

-

name of the generated section for constants

-

-
InitialConstantsContentno  -

-

optional stock text for the constants

-

-
InitialFileTailContentno  -

-

optional stock text for the source file (after system includes, user includes, constants) which appears at the very end of the file.

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)_FILE".

-

-
Dirno${src} -

-

Project-relative directory for file

-

-
FileNameno${instanceName$title}.cpp -

-

Filename, inside $(Dir), to create

-

-
HeaderFileNameno${instanceName$title}.h -

-

Filename of associated header to #include, or blank for no #include

-

-
LocationPrefixnoSOURCE -

-

String which is prefixed to the location ids defined by this macro.

-

-
InitialFileHeadContentno  -

-

optional stock text for the source file (before system includes, user includes, constants).

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: does not need to specify default source file template (comments), which is automatic.

-

-
RealizeSystemIncludesnotrue -

-

flag that can be used to avoid generating the system includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

-

-
SystemIncludesRegionNamenoGenerated System Includes -

-

name of the generated section for system includes

-

-
InitialSystemIncludesContentno  -

-

optional stock text for the system includes

-

-
RealizeUserIncludesnotrue -

-

flag that can be used to avoid generating the user includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

-

-
UserIncludesRegionNamenoGenerated User Includes -

-

name of the generated section for user includes

-

-
InitialUserIncludesContentno  -

-

optional stock text for the user includes

-

-
RealizeConstantsnotrue -

-

flag that can be used to avoid generating the constants section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

-

-
ConstantsRegionNamenoGenerated Constants -

-

name of the generated section for constants

-

-
InitialConstantsContentno  -

-

optional stock text for the constants

-

-
InitialFileTailContentno  -

-

optional stock text for the source file (after system includes, user includes, constants) which appears at the very end of the file.

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)_FILE".

-

-
- - -

HeaderFileTemplate

-

-

Defines the basic structure for a header file.

-

This defines a file with an include guard, system includes, user includes, event handler includes (non-owned but modifiable), constants, and forward declarations.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
Dirno${inc} -

-

Project-relative directory for file

-

-
FileNameno${instanceName$title}.h -

-

Filename, inside $(Dir), to create

-

-
IncludeGuardMacrono${instanceName$upper}_H -

-

Include guard macro (#ifndef ...) to use

-

-
LocationPrefixnoHEADER -

-

String which is prefixed to the location ids defined by this macro.

-

-
InitialFileHeadContentno  -

-

optional stock text for the top of the header file. NOTE: one-time text, should not depend on modifiable properties NOTE: does not need to specify header file template (comments) or #ifdef guards.

-

-
RealizeEventHandlerIncludesnotrue -

-

flag that can be used to avoid generating the section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no event handler includes ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialEventHandlerIncludesContentno  -

-

optional stock text for the event handler includes.

-

NOTE: one-time text, should not depend on modifiable properties

-

-
RealizeOwnedSystemIncludesnotrue -

-

flag that can be used to avoid generating the system includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

-

-
OwnedSystemIncludesRegionNamenoGenerated System Includes -

-

name of the generated section for system includes

-

-
RealizeOwnedUserIncludesnotrue -

-

flag that can be used to avoid generating the user includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

-

-
OwnedUserIncludesRegionNamenoGenerated User Includes -

-

name of the generated section for user includes

-

-
InitialOwnedSystemIncludesContentno  -

-

optional stock text for the added system includes

-

-
InitialOwnedUserIncludesContentno  -

-

optional stock text for the user includes.

-

-
RealizeOwnedConstantsnotrue -

-

flag that can be used to avoid generating the constants section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialOwnedConstantsContentno  -

-

optional stock text for the constants

-

-
RealizeOwnedForwardDeclarationsnotrue -

-

flag that can be used to avoid generating the forward declarations section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no forward decls ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialOwnedForwardDeclarationsContentno  -

-

optional stock text for the forward declarations

-

-
InitialFileTailContentno  -

-

optional stock text for the end of the header file.

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)HEADER_FILE".

-

-
Dirno${inc} -

-

Project-relative directory for file

-

-
FileNameno${instanceName$title}.h -

-

Filename, inside $(Dir), to create

-

-
IncludeGuardMacrono${instanceName$upper}_H -

-

Include guard macro (#ifndef ...) to use

-

-
LocationPrefixnoHEADER -

-

String which is prefixed to the location ids defined by this macro.

-

-
InitialFileHeadContentno  -

-

optional stock text for the top of the header file. NOTE: one-time text, should not depend on modifiable properties NOTE: does not need to specify header file template (comments) or #ifdef guards.

-

-
RealizeEventHandlerIncludesnotrue -

-

flag that can be used to avoid generating the section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no event handler includes ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialEventHandlerIncludesContentno  -

-

optional stock text for the event handler includes.

-

NOTE: one-time text, should not depend on modifiable properties

-

-
RealizeOwnedSystemIncludesnotrue -

-

flag that can be used to avoid generating the system includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

-

-
OwnedSystemIncludesRegionNamenoGenerated System Includes -

-

name of the generated section for system includes

-

-
RealizeOwnedUserIncludesnotrue -

-

flag that can be used to avoid generating the user includes section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

-

-
OwnedUserIncludesRegionNamenoGenerated User Includes -

-

name of the generated section for user includes

-

-
InitialOwnedSystemIncludesContentno  -

-

optional stock text for the added system includes

-

-
InitialOwnedUserIncludesContentno  -

-

optional stock text for the user includes.

-

-
RealizeOwnedConstantsnotrue -

-

flag that can be used to avoid generating the constants section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialOwnedConstantsContentno  -

-

optional stock text for the constants

-

-
RealizeOwnedForwardDeclarationsnotrue -

-

flag that can be used to avoid generating the forward declarations section unless it is used.

-

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no forward decls ever defined, otherwise, the section will appear out of order when generated.

-

-
InitialOwnedForwardDeclarationsContentno  -

-

optional stock text for the forward declarations

-

-
InitialFileTailContentno  -

-

optional stock text for the end of the header file.

-

NOTE: one-time text, should not depend on modifiable properties

-

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)HEADER_FILE".

-

-
- - -

ClassTemplate

-

-

Defines the basic structure for a class with public, protected, and private regions, with owned sections therein for common purposes.

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
BaseClassNameyes  -

-

name of the base class, from which this class derives

-

-
BaseClassNameyes  -

-

name of the base class, from which this class derives

-

-
LocationPrefixno  -

-

String which is prefixed to the location ids defined by this macro. Useful when one component defines multiple files.

-

-
BaseLocationnoHEADER_FILE -

-

name of the base location in which to place the class, defaults to HEADER_FILE

-

-
ClassNameno${className} -

-

name of the class to generate

-

-
BaseClassAccessornopublic -

-

accessor for the base class, from which this class derives

-

-
ExtraBaseClassesno  -

-

extra interface classes, separated by commas

-

-
ClassCommentno  -

-

optional text for the class comment

-

-
InitialClassHeadContentno  -

-

optional text for the start of the class

-

NOTE: one-time code, should not depend on modifiable properties

-

-
InitialPublicHeadContentno  -

-

optional text for the start of the public section (follows "public:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizePublicOwnedTypesnotrue -

-

flag that can be used to avoid generating the public types section unless it is used.

-

NOTE: if InitialPublicOwnedTypesContent is set, this flag is ignored.

-

-
InitialPublicOwnedTypesContentno  -

-

optional text for the public owned types section

-

-
RealizePublicOwnedMethodsnotrue -

-

flag that can be used to avoid generating the public owned methods section unless it is used.

-

NOTE: if InitialPublicOwnedMethodsContent is set, this flag is ignored.

-

-
InitialPublicOwnedMethodsContentno  -

-

optional text for the public owned methods section

-

-
InitialPublicTailContentno  -

-

optional text for the end of the public section (follows "public:")

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated public content.

-

-
InitialProtectedHeadContentno  -

-

optional text for the start of the protected section (follows "protected:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizeProtectedOverriddenMethodsnotrue -

-

flag that can be used to avoid generating the protected overridden methods section unless it is used.

-

-
InitialProtectedOverriddenMethodsContentno  -

-

optional text for the the protected overridden methods section

-

-
RealizeProtectedUserHandlersnotrue -

-

flag that can be used to avoid generating the protected user handlers section unless it is used. This is used for the prototypes for the user-editable event handler methods.

-

-
InitialProtectedUserHandlersContentno  -

-

optional text for the protected user handlers section

-

-
InitialProtectedTailContentno  -

-

optional text for the end of the protected section

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated protected content.

-

-
InitialPrivateHeadContentno  -

-

optional text for the start of the private section (follows "private:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizePrivateOwnedTypesnotrue -

-

flag that can be used to avoid generating the private owned types section unless it is used.

-

NOTE: if InitialPrivateOwnedTypesContent is set, this flag is ignored.

-

-
InitialPrivateOwnedTypesContentno  -

-

optional text for the the private types section

-

-
RealizePrivateOwnedInstanceVariablesnotrue -

-

flag that can be used to avoid generating the private instance variables section unless it is used.

-

-
InitialPrivateOwnedInstanceVariablesContentno  -

-

optional text for the the private instance variables section

-

-
RealizePrivateOwnedMethodsnotrue -

-

flag that can be used to avoid generating the private owned methods section unless it is used.

-

-
InitialPrivateOwnedMethodsContentno  -

-

optional text for the the private methods section

-

-
InitialPrivateTailContentno  -

-

optional text for the end of the private section

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated private content.

-

-
InitialClassTailContentno  -

-

optional text for the end of the class

-

NOTE: one-time code, should not depend on modifiable properties

-

-
LocationPrefixno  -

-

String which is prefixed to the location ids defined by this macro. Useful when one component defines multiple files.

-

-
BaseLocationnoHEADER_FILE -

-

name of the base location in which to place the class, defaults to HEADER_FILE

-

-
ClassNameno${className} -

-

name of the class to generate

-

-
BaseClassAccessornopublic -

-

accessor for the base class, from which this class derives

-

-
ExtraBaseClassesno  -

-

extra interface classes, separated by commas

-

-
ClassCommentno  -

-

optional text for the class comment

-

-
InitialClassHeadContentno  -

-

optional text for the start of the class

-

NOTE: one-time code, should not depend on modifiable properties

-

-
InitialPublicHeadContentno  -

-

optional text for the start of the public section (follows "public:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizePublicOwnedTypesnotrue -

-

flag that can be used to avoid generating the public types section unless it is used.

-

NOTE: if InitialPublicOwnedTypesContent is set, this flag is ignored.

-

-
InitialPublicOwnedTypesContentno  -

-

optional text for the public owned types section

-

-
RealizePublicOwnedMethodsnotrue -

-

flag that can be used to avoid generating the public owned methods section unless it is used.

-

NOTE: if InitialPublicOwnedMethodsContent is set, this flag is ignored.

-

-
InitialPublicOwnedMethodsContentno  -

-

optional text for the public owned methods section

-

-
InitialPublicTailContentno  -

-

optional text for the end of the public section (follows "public:")

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated public content.

-

-
InitialProtectedHeadContentno  -

-

optional text for the start of the protected section (follows "protected:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizeProtectedOverriddenMethodsnotrue -

-

flag that can be used to avoid generating the protected overridden methods section unless it is used.

-

-
InitialProtectedOverriddenMethodsContentno  -

-

optional text for the the protected overridden methods section

-

-
RealizeProtectedUserHandlersnotrue -

-

flag that can be used to avoid generating the protected user handlers section unless it is used. This is used for the prototypes for the user-editable event handler methods.

-

-
InitialProtectedUserHandlersContentno  -

-

optional text for the protected user handlers section

-

-
InitialProtectedTailContentno  -

-

optional text for the end of the protected section

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated protected content.

-

-
InitialPrivateHeadContentno  -

-

optional text for the start of the private section (follows "private:")

-

NOTE: one-time code, should not depend on modifiable properties

-

-
RealizePrivateOwnedTypesnotrue -

-

flag that can be used to avoid generating the private owned types section unless it is used.

-

NOTE: if InitialPrivateOwnedTypesContent is set, this flag is ignored.

-

-
InitialPrivateOwnedTypesContentno  -

-

optional text for the the private types section

-

-
RealizePrivateOwnedInstanceVariablesnotrue -

-

flag that can be used to avoid generating the private instance variables section unless it is used.

-

-
InitialPrivateOwnedInstanceVariablesContentno  -

-

optional text for the the private instance variables section

-

-
RealizePrivateOwnedMethodsnotrue -

-

flag that can be used to avoid generating the private owned methods section unless it is used.

-

-
InitialPrivateOwnedMethodsContentno  -

-

optional text for the the private methods section

-

-
InitialPrivateTailContentno  -

-

optional text for the end of the private section

-

NOTE: one-time code, should not depend on modifiable properties

-

NOTE: content appears at the end of all initially generated private content.

-

-
InitialClassTailContentno  -

-

optional text for the end of the class

-

NOTE: one-time code, should not depend on modifiable properties

-

-
- - -

AddCppIncludes

-

-

Generate #includes for a space-separated list of headers.

-

Note: you cannot use variable substitution, script escapes, etc. in the list. Instead, just write explicit contributions for the include, e.g. <template location="MAIN_OWNED_SYSTEM_INCLUDE"> ...

-

-

Arguments

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
Headersyes  -

-

a space-separated list of header files

-

-
Headersyes  -

-

a space-separated list of header files

-

-
Locationno  -

-

location where includes should go (either this or Phase should be set)

-

-
Phaseno  -

-

phase where includes should go (either this or Location should be set)

-

-
IsUsernofalse -

-

"User" or <system> includes?

-

-
Locationno  -

-

location where includes should go (either this or Phase should be set)

-

-
Phaseno  -

-

phase where includes should go (either this or Location should be set)

-

-
IsUsernofalse -

-

"User" or <system> includes?

-

-
- - -

ResolvePhases

-

-

This macro fixes up phase -> location mappings on the current contributions, or optionally, another list.

-

The mappings are Phase=Location pairs separated by spaces.

-

This may be called multiple times.

-

-

Arguments

- - - - - - - - - - - - - - -
ArgumentReq'd?DefaultDescription
Mappingsyes  -

-

A space-separated list of Phase=Location mappings.

-

-
Mappingsyes  -

-

A space-separated list of Phase=Location mappings.

-

-
ContribsListnocontribs -

-

The array or list of IContribution upon which to apply the fixups.

-

-
ContribsListnocontribs -

-

The array or list of IContribution upon which to apply the fixups.

-

-
- -

- - +Help for Macros in FileAndClassMacros.inc

Table of contents

SourceFileTemplate

+

HeaderFileTemplate

+

ClassTemplate

+

AddCppIncludes

+

ResolvePhases

+

SourceFileTemplate

Defines the basic structure for a source file. This defines a file with system includes, user includes, and constants.

Arguments

ArgumentReq'd?DefaultDescription
Dirno${src}

Project-relative directory for file

FileNameno${instanceName$title}.cpp

Filename, inside $(Dir), to create

HeaderFileNameno${instanceName$title}.h

Filename of associated header to #include, or blank for no #include

LocationPrefixnoSOURCE

String which is prefixed to the location ids defined by this macro.

InitialFileHeadContentno 

optional stock text for the source file (before system includes, user includes, constants).

NOTE: one-time text, should not depend on modifiable properties

NOTE: does not need to specify default source file template (comments), which is automatic.

RealizeSystemIncludesnotrue

flag that can be used to avoid generating the system includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

SystemIncludesRegionNamenoGenerated System Includes

name of the generated section for system includes

InitialSystemIncludesContentno 

optional stock text for the system includes

RealizeUserIncludesnotrue

flag that can be used to avoid generating the user includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

UserIncludesRegionNamenoGenerated User Includes

name of the generated section for user includes

InitialUserIncludesContentno 

optional stock text for the user includes

RealizeConstantsnotrue

flag that can be used to avoid generating the constants section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

ConstantsRegionNamenoGenerated Constants

name of the generated section for constants

InitialConstantsContentno 

optional stock text for the constants

InitialFileTailContentno 

optional stock text for the source file (after system includes, user includes, constants) which appears at the very end of the file.

NOTE: one-time text, should not depend on modifiable properties

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)_FILE".

Dirno${src}

Project-relative directory for file

FileNameno${instanceName$title}.cpp

Filename, inside $(Dir), to create

HeaderFileNameno${instanceName$title}.h

Filename of associated header to #include, or blank for no #include

LocationPrefixnoSOURCE

String which is prefixed to the location ids defined by this macro.

InitialFileHeadContentno 

optional stock text for the source file (before system includes, user includes, constants).

NOTE: one-time text, should not depend on modifiable properties

NOTE: does not need to specify default source file template (comments), which is automatic.

RealizeSystemIncludesnotrue

flag that can be used to avoid generating the system includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

SystemIncludesRegionNamenoGenerated System Includes

name of the generated section for system includes

InitialSystemIncludesContentno 

optional stock text for the system includes

RealizeUserIncludesnotrue

flag that can be used to avoid generating the user includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

UserIncludesRegionNamenoGenerated User Includes

name of the generated section for user includes

InitialUserIncludesContentno 

optional stock text for the user includes

RealizeConstantsnotrue

flag that can be used to avoid generating the constants section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

ConstantsRegionNamenoGenerated Constants

name of the generated section for constants

InitialConstantsContentno 

optional stock text for the constants

InitialFileTailContentno 

optional stock text for the source file (after system includes, user includes, constants) which appears at the very end of the file.

NOTE: one-time text, should not depend on modifiable properties

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)_FILE".

+

HeaderFileTemplate

Defines the basic structure for a header file.

This defines a file with an include guard, system includes, user includes, event handler includes (non-owned but modifiable), constants, and forward declarations.

Arguments

ArgumentReq'd?DefaultDescription
Dirno${inc}

Project-relative directory for file

FileNameno${instanceName$title}.h

Filename, inside $(Dir), to create

IncludeGuardMacrono${instanceName$upper}_H

Include guard macro (#ifndef ...) to use

LocationPrefixnoHEADER

String which is prefixed to the location ids defined by this macro.

InitialFileHeadContentno 

optional stock text for the top of the header file. NOTE: one-time text, should not depend on modifiable properties NOTE: does not need to specify header file template (comments) or #ifdef guards.

RealizeEventHandlerIncludesnotrue

flag that can be used to avoid generating the section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no event handler includes ever defined, otherwise, the section will appear out of order when generated.

InitialEventHandlerIncludesContentno 

optional stock text for the event handler includes.

NOTE: one-time text, should not depend on modifiable properties

RealizeOwnedSystemIncludesnotrue

flag that can be used to avoid generating the system includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

OwnedSystemIncludesRegionNamenoGenerated System Includes

name of the generated section for system includes

RealizeOwnedUserIncludesnotrue

flag that can be used to avoid generating the user includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

OwnedUserIncludesRegionNamenoGenerated User Includes

name of the generated section for user includes

InitialOwnedSystemIncludesContentno 

optional stock text for the added system includes

InitialOwnedUserIncludesContentno 

optional stock text for the user includes.

RealizeOwnedConstantsnotrue

flag that can be used to avoid generating the constants section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

InitialOwnedConstantsContentno 

optional stock text for the constants

RealizeOwnedForwardDeclarationsnotrue

flag that can be used to avoid generating the forward declarations section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no forward decls ever defined, otherwise, the section will appear out of order when generated.

InitialOwnedForwardDeclarationsContentno 

optional stock text for the forward declarations

RealizeOwnedTypedefsnotrue

flag that can be used to avoid generating the typedefs section unless it is used.

NOTE: due to issues with the source generator, this should't be set 'false' unless you really expect there to be no typedefs ever defined, otherwise, the section will appear out of order when generated.

OwnedTypedefsRegionNamenoGenerated Typedefs

name of the generated section for owned typedefs

InitialOwnedTypedefsContentno 

optional stock text for the initial typedefs

InitialFileTailContentno 

optional stock text for the end of the header file.

NOTE: one-time text, should not depend on modifiable properties

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)HEADER_FILE".

Dirno${inc}

Project-relative directory for file

FileNameno${instanceName$title}.h

Filename, inside $(Dir), to create

IncludeGuardMacrono${instanceName$upper}_H

Include guard macro (#ifndef ...) to use

LocationPrefixnoHEADER

String which is prefixed to the location ids defined by this macro.

InitialFileHeadContentno 

optional stock text for the top of the header file. NOTE: one-time text, should not depend on modifiable properties NOTE: does not need to specify header file template (comments) or #ifdef guards.

RealizeEventHandlerIncludesnotrue

flag that can be used to avoid generating the section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no event handler includes ever defined, otherwise, the section will appear out of order when generated.

InitialEventHandlerIncludesContentno 

optional stock text for the event handler includes.

NOTE: one-time text, should not depend on modifiable properties

RealizeOwnedSystemIncludesnotrue

flag that can be used to avoid generating the system includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no system includes ever defined, otherwise, the section will appear out of order when generated.

OwnedSystemIncludesRegionNamenoGenerated System Includes

name of the generated section for system includes

RealizeOwnedUserIncludesnotrue

flag that can be used to avoid generating the user includes section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no user includes ever defined, otherwise, the section will appear out of order when generated.

OwnedUserIncludesRegionNamenoGenerated User Includes

name of the generated section for user includes

InitialOwnedSystemIncludesContentno 

optional stock text for the added system includes

InitialOwnedUserIncludesContentno 

optional stock text for the user includes.

RealizeOwnedConstantsnotrue

flag that can be used to avoid generating the constants section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no constants ever defined, otherwise, the section will appear out of order when generated.

InitialOwnedConstantsContentno 

optional stock text for the constants

RealizeOwnedForwardDeclarationsnotrue

flag that can be used to avoid generating the forward declarations section unless it is used.

NOTE: due to issues with the source generator, this shouldn't be set 'false' unless you really expect there to be no forward decls ever defined, otherwise, the section will appear out of order when generated.

InitialOwnedForwardDeclarationsContentno 

optional stock text for the forward declarations

RealizeOwnedTypedefsnotrue

flag that can be used to avoid generating the typedefs section unless it is used.

NOTE: due to issues with the source generator, this should't be set 'false' unless you really expect there to be no typedefs ever defined, otherwise, the section will appear out of order when generated.

OwnedTypedefsRegionNamenoGenerated Typedefs

name of the generated section for owned typedefs

InitialOwnedTypedefsContentno 

optional stock text for the initial typedefs

InitialFileTailContentno 

optional stock text for the end of the header file.

NOTE: one-time text, should not depend on modifiable properties

NOTE: this really comes at the very end during initial file generation (unless you emit other templates with mode="at-end"), so if you simply want content after these sections but before other templates you add, just create templates for location="$(LocationPrefix)HEADER_FILE".

+

ClassTemplate

Defines the basic structure for a class with public, protected, and private regions, with owned sections therein for common purposes.

Arguments

ArgumentReq'd?DefaultDescription
BaseClassNameyes 

name of the base class, from which this class derives

BaseClassNameyes 

name of the base class, from which this class derives

LocationPrefixno 

String which is prefixed to the location ids defined by this macro. Useful when one component defines multiple files.

BaseLocationnoHEADER_FILE

name of the base location in which to place the class, defaults to HEADER_FILE

ClassNameno${className}

name of the class to generate

BaseClassAccessornopublic

accessor for the base class, from which this class derives

ExtraBaseClassesno 

extra interface classes, separated by commas

ClassCommentno 

optional text for the class comment

InitialClassHeadContentno 

optional text for the start of the class

NOTE: one-time code, should not depend on modifiable properties

InitialPublicHeadContentno 

optional text for the start of the public section (follows "public:")

NOTE: one-time code, should not depend on modifiable properties

RealizePublicOwnedTypesnotrue

flag that can be used to avoid generating the public types section unless it is used.

NOTE: if InitialPublicOwnedTypesContent is set, this flag is ignored.

InitialPublicOwnedTypesContentno 

optional text for the public owned types section

RealizePublicOwnedMethodsnotrue

flag that can be used to avoid generating the public owned methods section unless it is used.

NOTE: if InitialPublicOwnedMethodsContent is set, this flag is ignored.

InitialPublicOwnedMethodsContentno 

optional text for the public owned methods section

InitialPublicTailContentno 

optional text for the end of the public section (follows "public:")

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated public content.

InitialProtectedHeadContentno 

optional text for the start of the protected section (follows "protected:")

NOTE: one-time code, should not depend on modifiable properties

RealizeProtectedOverriddenMethodsnotrue

flag that can be used to avoid generating the protected overridden methods section unless it is used.

InitialProtectedOverriddenMethodsContentno 

optional text for the the protected overridden methods section

RealizeProtectedUserHandlersnotrue

flag that can be used to avoid generating the protected user handlers section unless it is used. This is used for the prototypes for the user-editable event handler methods.

InitialProtectedUserHandlersContentno 

optional text for the protected user handlers section

InitialProtectedTailContentno 

optional text for the end of the protected section

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated protected content.

InitialPrivateHeadContentno 

optional text for the start of the private section (follows "private:")

NOTE: one-time code, should not depend on modifiable properties

RealizePrivateOwnedTypesnotrue

flag that can be used to avoid generating the private owned types section unless it is used.

NOTE: if InitialPrivateOwnedTypesContent is set, this flag is ignored.

InitialPrivateOwnedTypesContentno 

optional text for the the private types section

RealizePrivateOwnedInstanceVariablesnotrue

flag that can be used to avoid generating the private instance variables section unless it is used.

InitialPrivateOwnedInstanceVariablesContentno 

optional text for the the private instance variables section

RealizePrivateOwnedMethodsnotrue

flag that can be used to avoid generating the private owned methods section unless it is used.

InitialPrivateOwnedMethodsContentno 

optional text for the the private methods section

InitialPrivateTailContentno 

optional text for the end of the private section

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated private content.

InitialClassTailContentno 

optional text for the end of the class

NOTE: one-time code, should not depend on modifiable properties

LocationPrefixno 

String which is prefixed to the location ids defined by this macro. Useful when one component defines multiple files.

BaseLocationnoHEADER_FILE

name of the base location in which to place the class, defaults to HEADER_FILE

ClassNameno${className}

name of the class to generate

BaseClassAccessornopublic

accessor for the base class, from which this class derives

ExtraBaseClassesno 

extra interface classes, separated by commas

ClassCommentno 

optional text for the class comment

InitialClassHeadContentno 

optional text for the start of the class

NOTE: one-time code, should not depend on modifiable properties

InitialPublicHeadContentno 

optional text for the start of the public section (follows "public:")

NOTE: one-time code, should not depend on modifiable properties

RealizePublicOwnedTypesnotrue

flag that can be used to avoid generating the public types section unless it is used.

NOTE: if InitialPublicOwnedTypesContent is set, this flag is ignored.

InitialPublicOwnedTypesContentno 

optional text for the public owned types section

RealizePublicOwnedMethodsnotrue

flag that can be used to avoid generating the public owned methods section unless it is used.

NOTE: if InitialPublicOwnedMethodsContent is set, this flag is ignored.

InitialPublicOwnedMethodsContentno 

optional text for the public owned methods section

InitialPublicTailContentno 

optional text for the end of the public section (follows "public:")

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated public content.

InitialProtectedHeadContentno 

optional text for the start of the protected section (follows "protected:")

NOTE: one-time code, should not depend on modifiable properties

RealizeProtectedOverriddenMethodsnotrue

flag that can be used to avoid generating the protected overridden methods section unless it is used.

InitialProtectedOverriddenMethodsContentno 

optional text for the the protected overridden methods section

RealizeProtectedUserHandlersnotrue

flag that can be used to avoid generating the protected user handlers section unless it is used. This is used for the prototypes for the user-editable event handler methods.

InitialProtectedUserHandlersContentno 

optional text for the protected user handlers section

InitialProtectedTailContentno 

optional text for the end of the protected section

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated protected content.

InitialPrivateHeadContentno 

optional text for the start of the private section (follows "private:")

NOTE: one-time code, should not depend on modifiable properties

RealizePrivateOwnedTypesnotrue

flag that can be used to avoid generating the private owned types section unless it is used.

NOTE: if InitialPrivateOwnedTypesContent is set, this flag is ignored.

InitialPrivateOwnedTypesContentno 

optional text for the the private types section

RealizePrivateOwnedInstanceVariablesnotrue

flag that can be used to avoid generating the private instance variables section unless it is used.

InitialPrivateOwnedInstanceVariablesContentno 

optional text for the the private instance variables section

RealizePrivateOwnedMethodsnotrue

flag that can be used to avoid generating the private owned methods section unless it is used.

InitialPrivateOwnedMethodsContentno 

optional text for the the private methods section

InitialPrivateTailContentno 

optional text for the end of the private section

NOTE: one-time code, should not depend on modifiable properties

NOTE: content appears at the end of all initially generated private content.

InitialClassTailContentno 

optional text for the end of the class

NOTE: one-time code, should not depend on modifiable properties

+

AddCppIncludes

Generate #includes for a space-separated list of headers.

Note: you cannot use variable substitution, script escapes, etc. in the list. Instead, just write explicit contributions for the include, e.g. <template location="MAIN_OWNED_SYSTEM_INCLUDES"> ...

Arguments

ArgumentReq'd?DefaultDescription
Headersyes 

a space-separated list of header files

Headersyes 

a space-separated list of header files

Locationno 

location where includes should go (either this or Phase should be set)

Phaseno 

phase where includes should go (either this or Location should be set)

IsUsernofalse

"User" or <system> includes?

Locationno 

location where includes should go (either this or Phase should be set)

Phaseno 

phase where includes should go (either this or Location should be set)

IsUsernofalse

"User" or <system> includes?

+

ResolvePhases

This macro fixes up phase -> location mappings on the current contributions, or optionally, another list.

The mappings are Phase=Location pairs separated by spaces.

This may be called multiple times.

Arguments

ArgumentReq'd?DefaultDescription
Mappingsyes 

A space-separated list of Phase=Location mappings.

Mappingsyes 

A space-separated list of Phase=Location mappings.

ContribsListnocontribs

The array or list of IContribution upon which to apply the fixups.

ContribsListnocontribs

The array or list of IContribution upon which to apply the fixups.

+

\ No newline at end of file