metaonly module xdc.bld.Utils

Utility functions to simplify creation of targets and platforms

XDCspec summary sourced in xdc/bld/Utils.xdc
metaonly module Utils {  ...
XDCscript usage meta-domain
var Utils = xdc.useModule('xdc.bld.Utils');
module-wide functions
    Utils.display// Recursively print arbitrary object( String msg, Any obj ) returns Void
    Utils.expandString// Expand references within a string to specified values( String cmd, Any values ) returns String
 
XDCspec declarations sourced in xdc/bld/Utils.xdc
package xdc.bld;
 
metaonly module Utils {
module-wide functions
    Void display// Recursively print arbitrary object( String msg, Any obj );
    String expandString// Expand references within a string to specified values( String cmd, Any values );
}
 
Utils.display( )  // module-wide

Recursively print arbitrary object

XDCscript usage meta-domain
Utils.display( String msg, Any obj ) returns Void
 
ARGUMENTS
msg — a string to print before printing the object
obj — an arbitrary object to display
 
Utils.expandString( )  // module-wide

Expand references within a string to specified values

XDCscript usage meta-domain
Utils.expandString( String cmd, Any values ) returns String
 
ARGUMENTS
cmd — a string with embeded references to values defined in the values hashtable parameter
values — an arbitrary hash of name-value pairs; these values are used to substitute for references of the form $(name) that appear within cmd.
DETAILS
All references of the form "$(<name>)" within the command string, cmd are replaced with the string value having key <name> in the hashtable values.
If <name> appears in values and its value is null or undefined, then $(<name>) is replaced with the empty string. If <name> does not appear in values, then $(<name>) is not replaced.
RETURNS
string with references replaced as specified by the values hash.
THROWS
Error exceptions are thrown for fatal errors
generated on Sat, 01 Aug 2009 01:23:50 GMT