From RTSC-Pedia
revision tip
LANDSCAPE orientation![]() | [printable version] [offline version] | offline version generated on 11-Jun-2009 18:06 UTC | ![]() |
XDCscript - Instance-Body
The implementation of a module's instance methods
A capsule that implements all (inherited) module-wide and per-instance metaonly functions declared in a module's unit-specification. These capsule files are named UnitName.xs and reside in the base directory of the containing package. A special capsule named package.xs implements the (module-wide) functions specified in the xdc.IPackage interface.
| function fxnName(arg ... ) { // Typed-Assignment of callee's values to this function's params this.$private = ...; // 'this' references the appropriate module or instance object return (expr) // Typed-Assignment of expr to a return of a typed value } |
The preceding fragment implements a module-wide or per-instance function specified for this module. The keyword this references the corresponding Module or Instance object, whose $private state is manipulated in this capsule. Typed-Assignment rules are enforced upon function entry and exit.
![]() | [printable version] [offline version] | offline version generated on 11-Jun-2009 18:06 UTC | ![]() |
Copyright © 2008 The Eclipse Foundation. All Rights Reserved