1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
<html><head>
<title>nx::current - </title>
<link rel="stylesheet" href="man.css" type="text/css">
</head>
<! -- Generated from file 'current.man' by tcllib/doctools with format 'html'
-->
<! -- Copyright © 2014 Stefan Sobernig <stefan.sobernig@wu.ac.at>, Gustaf Neumann <gustaf.neumann@wu.ac.at>; available under the Creative Commons Attribution 3.0 Austria license (CC BY 3.0 AT).
-->
<! -- CVS: $Id$ nx::current.3
-->
<body><div class="doctools">
<h1 class="title">nx::current(3) 2.0 current ""</h1>
<div id="name" class="section"><h2><a name="name">Name</a></h2>
<p>nx::current - Return information about the method callstack</p>
</div>
<div id="toc" class="section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="toc">
<li class="section"><a href="#toc">Table Of Contents</a></li>
<li class="section"><a href="#synopsis">Synopsis</a></li>
<li class="section"><a href="#section1">Description</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="synopsis">
<ul class="syntax">
<li><a href="#1"><b class="cmd">current</b> <span class="opt">?<i class="arg">option</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<dl class="definitions">
<dt><a name="1"><b class="cmd">current</b> <span class="opt">?<i class="arg">option</i>?</span></a></dt>
<dd><p>This introspection command provides information about various details,
to be identified using <i class="arg">option</i>, on the callstack. The command is
invoked from a method body. If <i class="arg">option</i> is not provided, <b class="cmd">nx::current</b> will
default to option <b class="option">object</b> (see below). <b class="cmd">nx::current</b> operates on the
Tcl callstack and is aware of NX-specific callstack and stackframe
details. <i class="arg">option</i> can be any of the following:</p>
<ul class="itemized">
<li><p><b class="option">activelevel</b> returns the actual callstack level which
calls into the currently executing method directly. This <b class="option">activelevel</b> might
correspond the <b class="option">callinglevel</b>, but this is not necessarily
the case. The <b class="option">activelevel</b> also includes
intermediate calls, such as <b class="cmd">nx::next</b> invocations. The level is
reported as an absolute level number (# followed by a digit) to be
directly used as the first argument to <b class="cmd">uplevel</b> or <b class="cmd">upvar</b>.</p></li>
<li><p><b class="option">args</b> returns the list of argument values passed into the currently executing method implementation.</p></li>
<li><p><b class="option">calledclass</b> returns the name of the class that provides
the method implementation to which the intercepted method call is to be redirected (only available from within filter methods).</p></li>
<li><p><b class="option">calledmethod</b> returns the original method name
requested by intercepted method call (only available from within
filter methods).</p></li>
<li><p><b class="option">callingclass</b> returns the name of the class which
provides the method implementation calling into the currently
executing method. See also <b class="option">callingobject</b>.</p></li>
<li><p><b class="option">callinglevel</b> resolves the callstack level of the
originating invocation of the currently executing method
implementation. Callstack levels introduced by method interception
(e.g., filters) and by method combination (<b class="cmd">nx::next</b>) are
ignored. The level is reported as an absolute level number (<b class="const">#</b> followed
by a digit) to be directly used as the first argument to <b class="cmd">uplevel</b>
or <b class="cmd">upvar</b>. See also <b class="option">activelevel</b>.</p></li>
<li><p><b class="option">callingobject</b> returns the name of the object which is
calling into the currently executing method. See also <b class="option">callingclass</b>.</p></li>
<li><p><b class="option">class</b> returns the name of the class providing the
currently executing method implementation. The returned
method-providing class may be different to the class of the current
object. If called from within a method implementation provided by the
current object itself, an empty string is returned.</p></li>
<li><p><b class="option">filterreg</b> returns the object (class) on which the
currently executing method was registered as a filter method (only
available from within filter methods).</p></li>
<li><p><b class="option">isnextcall</b> will return 1, if the currently executing
method implementation was invoked via <b class="cmd">nx::next</b>; 0 otherwise.</p></li>
<li><p><b class="option">method</b> returns the name of the currently executing
method. If an ensemble-method call, the name of the bottom-most
("leaf") method is returned.</p></li>
<li><p><b class="option">methodpath</b> returns the combined name of the
currently executing method (including all ensemble levels) in an
ensemble-method call. Otherwise, for a regular method call, the result
corresponds to the result of option <b class="option">method</b>.</p></li>
<li><p><b class="option">nextmethod</b> returns the name of the next most
specific method implementation to be called when invoking <b class="cmd">nx::next</b>.</p></li>
<li><p><b class="option">object</b> gives the name of the object on which the
currently executing method implementation is evaluated.</p></li>
</ul></dd>
</dl>
</div>
<div id="copyright" class="section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright © 2014 Stefan Sobernig <stefan.sobernig@wu.ac.at>, Gustaf Neumann <gustaf.neumann@wu.ac.at>; available under the Creative Commons Attribution 3.0 Austria license (CC BY 3.0 AT).</p>
</div>
</div></body></html>
|