Description Objects from the Class Extends Methods Author(s) References See Also
This class is merely a convience class that is used to
represent in R the result of parsing a translation unit from GCC using
Perl tools. The class identifies a reference to a Perl array of
nodes. We typically get this array via a call to
readTU
and then we access elements
of the array by "following"nodes based on the
INDEX field of another node.
These INDEX values are strings that identify the nominal
index of the element of interest. However, these need
to be converted to the actual index by adding 1 to the
integer value.
The purpose of this class is to provide a method that
handles indexing by these INDEX strings which does the
necessary conversion. This makes the manipulation
of the node paths easier at an interactive level.
A virtual Class: No objects may be created from it.
Class "oldClass"
, directly.
This is an old-style, S3 class that is used simply to
provide a method for [[
.
Currently, there are methods for accessing individual elements using the position or the node name. These take into account the extra first element in the Perl array that requires us to add one to the node name to get the actual index in the array.
The other two methods defined for this class are
lapply
and sapply
. These hide the details how we loop
over the Perl array. They might be better defined for PerlArray
references directly in the RSPerl package.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.omegahat.org/RGCCTranslationUnit
readTU
The internal function getIndex
which returns the actual integer index of a node
along with its string identifier which is one less.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.