From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

XDCscript - xdc.om.$name

Model name

Contents

Synopsis

 
var name = xdc.om.$name;

Description

Each domain object model has a name that can be used by scripts that need to run in multiple models. The name of the current object model can be accessed via the $name property of xdc.om; i.e., xdc.om.$name. The current model names include the following:

  • "bld" - build model
  • "cfg" - configuration model
  • "rov" - runtime object view model

Example

This property is often used within package methods for packages that are loaded and used in more than one model. For example, a package that is can be used in both the build model and the configuration model might have the following close() implementation.

 
 
 
 
 
 
 
 
 
function close()
{
    if (xdc.om.$name == "cfg") {
        /* Program is defined by the config model but not the build model */
        if (Program.stackSize < 512) {
            :
        }
    }
}

See Also

XDCscript - xdc.om Top-Level object of current domain model

[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference