XDCspec - @TargetHeader

From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 18-Nov-2017 00:11 UTC

XDCspec - @TargetHeader

This metaonly module generates a header

Contents

Synopsis

 
 
 
 
 
@TargetHeader("«template»")
metaonly module «Mod» {
    :
}
 

Description

Interfaces and metaonly modules that want to generate a header file can use this attribute to specify a template. The output of evaluation of the template file «template» is then saved as that unit's header file «Mod».h.

The template is expanded as part of the "compilation" of module specifications. In addition, the following global variables are set:

$args
an array of length 1, where $args[0] is the "specification object" for the module with the TargetHeader attribute. The specification object for a module is a xdc.services.spec.Unit that provides access to all the information provided by the module's specification. To get the module object itself, simply use xdc.module($args[0].getQualName()).

The template file is located using the same search algorithm as xdc.findFile(). So, templates can be located in other packages and will be found along the package path.

See also

XDCscript - Template-Body Contents of the template file
XDCscript - xdc.module Return specified module or interface object
XDCspec - @CustomHeader This module's header includes handcrafted headers
xdc.services.spec Client documentation for xdc.services.spec

[printable version]  [offline version]offline version generated on 18-Nov-2017 00:11 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved
Personal tools
package reference