getInclusions | R Documentation |
This function computes which header files a source file includes, both directly and indirectly and which file includes which other files.
getInclusions(file, flat = FALSE,
fun = if(flat)
genInclusionCollector()
else
genHierarchicalInclusionCollector(),
...)
file |
the name of a source file or a previously parsed translation unit |
flat |
a logical value indicating whether we want the inclusion information organized as a flat character vector or with the files grouped by their "includer". |
fun |
a visitory function or object used to process the callbacks by libclang. |
... |
additional arguments that are passed to
|
a collection of the included files.
If flat
is TRUE
, this is
a character vector with an element for each file included.
The corresponding element name is the file that included it.
If flat
is FALSE
, this returns a list with
a character vector for each element. The names of the list
are the names of the files that include others.
The corresponding character vector contains the names of the files
that that file includes.
One can get transform the flat version to the non-flat version with
a simple call split(inc, names(inc))
.
Duncan Temple Lang
libclang http://clang.llvm.org/doxygen/group__CINDEX.html
createTU
inc = getInclusions(system.file("exampleCode", "file1.c", package = "RCIndex"), FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.