element <expandMacro>

Namespace: | http://www.nokia.com/sdt/emf/component
Type: | embedded (extension of ConditionalSourceGen)
Content: | complex, 7+any attributes, 1 element
Defined: | globally within component.xsd, see XML source
Used: | at 4 locations

XML Representation Summary
<expandMacro
| dontPassArguments | = | list of xsd:string
| forms | = | list of xsd:string
| help | = | xsd:string
| ifEvents | = | list of xsd:string
| ifExpr | = | xsd:string
| name | = | xsd:string
| passArguments | = | list of xsd:string
| {any attribute with any namespace}
| >
Content: | expandArgument*
</expandMacro>

May contain elements (1):

  expandArgument

May be included in elements (4):

  defineLocation, defineMacro, sourceGen, templateGroup

Known Usage Locations

- Within embedded complexTypes of elements (4):
  defineLocation [ref], defineMacro [ref], sourceGen [ref], templateGroup [ref]

Embedded Type Detail

Type Derivation Summary ConditionalSourceGen complexType

XML Source

<xsd:element name="expandMacro"> <xsd:annotation> <xsd:documentation> <p> Added post 1.1. Expands a given macro into the sourceGen of the caller. This has the same effect as inserting the same templates and inlines from the macro's definition at the point of call. Variable references from those templates and inlines are substituted with the values provided in attributes (e.g. variableName="value") or expandArgument child elements. The latter may be preferred for cases where code is substituted, so the formatting may be retained. </p> <p> As a special case, variable references may have modifiers to modify the formatting of a variable when it is expanded. Modifiers are appended to the variable name as in: $(varName::modifier). </p> <p> Currently supported modifiers are all for tweaking canonical function argument lists, which match the format of declaration, with spaces, argument names, default values, etc: </p> <ul> <li>as-function-declaration-args: identity</li> <li> as-function-definition-args: removes default argument values </li> <li> as-function-location-args: removes argument names, default arguments, and spaces </li> </ul> </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:complexContent> <xsd:extension base="ConditionalSourceGen"> <xsd:sequence> <xsd:element maxOccurs="unbounded" minOccurs="0" ref="expandArgument"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> The macro to invoke (matching the id from defineMacro). </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="passArguments" type="listOfStrings" use="optional"> <xsd:annotation> <xsd:documentation> A list of arguments defined in the current calling macro to pass unchanged to the called macro, excluding any arguments that are not defined in the current call. This attribute is only valid in expandMacro called from a defineMacro. Passing arguments is different from adding attributes argName="$(argName)" because it avoids defining otherwise undefined arguments. (A missing optional argument is null, not the empty string. The '::is-defined' modifier can be used to check this.) Elements in the list of strings are names of arguments, or renames of the form targetArgumentName=hostArgumentName which passes hostArgumentName from the hosting macro with the name targetArgumentName (again, only if the argument is actually defined in the call). If this argument is not specified, all the arguments in the invoked macro are passed (zero or more may have defaults which are overridden in this macro). </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="dontPassArguments" type="listOfStrings" use="optional"> <xsd:annotation> <xsd:documentation> This is primarily used when passArguments is not specified. It specifies which arguments not to pass to the invoked macro, which become undefined in the expansion of that macro. This is useful when this macro takes over the work of one or more arguments from the invoked macro. </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="help" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation> Help/usage text for a documentation generating tool. </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:anyAttribute processContents="lax"> <xsd:annotation> <xsd:documentation> Any attribute matching the variables used in the given named macro may appear here. </xsd:documentation> </xsd:annotation> </xsd:anyAttribute> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:element>

Attribute Detail
dontPassArguments

  This is primarily used when passArguments is not specified.
  It specifies which arguments not to pass to the invoked macro,
  which become undefined in the expansion of that macro.
  This is useful when this macro takes over the work of one or more
  arguments from the invoked macro.

  Type: | listOfStrings
  Use: | optional
  Defined: | locally, within this element

  XML Source

  <xsd:attribute name="dontPassArguments" type="listOfStrings" use="optional"> <xsd:annotation> <xsd:documentation> This is primarily used when passArguments is not specified. It specifies which arguments not to pass to the invoked macro, which become undefined in the expansion of that macro. This is useful when this macro takes over the work of one or more arguments from the invoked macro. </xsd:documentation> </xsd:annotation> </xsd:attribute>

forms

  Added post 1.1 to inline.
  A list of tokens used to select a particular kind of source for a parent.
  The namespace is determined implicitly by what a parent requests.
  For instance, a parent may have special sourcegen, and pass
  the form "SpecialCase" to its children. Elements specifying
  form="SpecialCase" will be selected. Other parents will not see
  such elements if they do not specify that form.
  If the form does not match, the element is not invoked.

  Type: | listOfStrings
  Use: | optional
  Defined: | locally, within ConditionalSourceGenAttributes attributeGroup

help

  Help/usage text for a documentation generating tool.

  Type: | xsd:string
  Use: | optional
  Defined: | locally, within this element

  XML Source

  <xsd:attribute name="help" type="xsd:string" use="optional"> <xsd:annotation> <xsd:documentation> Help/usage text for a documentation generating tool. </xsd:documentation> </xsd:annotation> </xsd:attribute>

ifEvents

  Added post 1.1 to inline.
  If defined, a list of events, any of which must be bound for the
  element to be invoked.

  Type: | listOfStrings
  Use: | optional
  Defined: | locally, within ConditionalSourceGenAttributes attributeGroup

ifExpr

  Added post 1.1.
  If defined, a Javascript expression which must evaluate to
  true (or non-zero) for the element to be invoked.

  Type: | xsd:string
  Use: | optional
  Defined: | locally, within ConditionalSourceGenAttributes attributeGroup

name

  The macro to invoke (matching the id from defineMacro).

  Type: | xsd:string
  Use: | required
  Defined: | locally, within this element

  XML Source

  <xsd:attribute name="name" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> The macro to invoke (matching the id from defineMacro). </xsd:documentation> </xsd:annotation> </xsd:attribute>

passArguments

  A list of arguments defined in the current calling macro to
  pass unchanged to the called macro, excluding any arguments
  that are not defined in the current call.
  This attribute is only valid in expandMacro called from
  a defineMacro.
  Passing arguments is different from adding attributes
  argName="$(argName)" because it avoids defining otherwise
  undefined arguments. (A missing optional argument is null,
  not the empty string. The '::is-defined' modifier can be
  used to check this.)
  Elements in the list of strings are names of arguments, or
  renames of the form targetArgumentName=hostArgumentName which
  passes hostArgumentName from the hosting macro with the name
  targetArgumentName (again, only if the argument is actually
  defined in the call).
  If this argument is not specified, all the arguments in the
  invoked macro are passed (zero or more may have defaults which
  are overridden in this macro).

  Type: | listOfStrings
  Use: | optional
  Defined: | locally, within this element

  XML Source

  <xsd:attribute name="passArguments" type="listOfStrings" use="optional"> <xsd:annotation> <xsd:documentation> A list of arguments defined in the current calling macro to pass unchanged to the called macro, excluding any arguments that are not defined in the current call. This attribute is only valid in expandMacro called from a defineMacro. Passing arguments is different from adding attributes argName="$(argName)" because it avoids defining otherwise undefined arguments. (A missing optional argument is null, not the empty string. The '::is-defined' modifier can be used to check this.) Elements in the list of strings are names of arguments, or renames of the form targetArgumentName=hostArgumentName which passes hostArgumentName from the hosting macro with the name targetArgumentName (again, only if the argument is actually defined in the call). If this argument is not specified, all the arguments in the invoked macro are passed (zero or more may have defaults which are overridden in this macro). </xsd:documentation> </xsd:annotation> </xsd:attribute>

Content Element Detail
expandArgument

  Type: | embedded (extension of xsd:string), simple content
  Defined: | by reference, within this element

  XML Source

  <xsd:element maxOccurs="unbounded" minOccurs="0" ref="expandArgument"/>