Description Usage Arguments Author(s)
This function searches the nodes in a parsed translation unit object in R
and finds the nodes that define data types in C/C++.
These nodes include struct and union types, typedef declarations.
They do not (currently) include enumerations or C++ classes (?).
One can change the type of nodes considered via the types
parameter.
One can fetch all the declarations or restrict to one or more source files by specifying their (partial) name.
1 | getDataStructures(p, files = character(), types = c("GCC::Node::type_decl", "GCC::Node::record_type"), includeMissingSource = TRUE)
|
p |
the translation object returned by |
files |
a character vector giving the names (or partial names) of
files of interest. This is used as part of a filter
that compares the source attribute of a matching node
to elements of this vector. If they "match",
the node is included in the return. The concept of match
uses |
types |
a character vector specifying the |
includeMissingSource |
a logical value that controls whether nodes which have no source attribute are included or excluded in the resulting list of nodes |
Duncan Temple Lang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.