genFunctionCollector: Constructor functions for collectors of information within...

View source: R/collectors.R

genFunctionCollectorR Documentation

Constructor functions for collectors of information within translation unit

Description

These functions are used to create closure functions that collect information across calls. The update function returned can be used as the visitor function in calls to parseTU and visitChildren.

Usage

genFunctionCollector(makeRoutine = FALSE, clone = TRUE)
genCallCollector()
genDataStructCollector(leaveAsCursor = FALSE)
genDefinesCollector(names = character())
genEnumCollector()
genVariablesCollector(clone = TRUE, recurse = FALSE)
combineCollectors(..., .funs = list()) 

Arguments

makeRoutine

logical scalar value. If FALSE, the cursor is stored; If TRUE, we store the result of makeRoutineObject.

leaveAsCursor

a logical value that controls whether we return the cursors representing the data types or convert them to R objects.

clone

a logical value. If TRUE and we are collecting the CXCursor objects, we clone the cursor objects to avoid them being garbage collected when the TU disappears.

names

ignored for now

...

the individual collectors that are to be combined.

recurse

logical value that indicates whether to recursively descend down the cursor tree or to process only the top-level objects, e.g., the top-level declarations.

.funs

a list of the collectors to be combined.

Value

The collectors typically return an S4CursorVisitor-class object.

Author(s)

Duncan Temple Lang

References

libclang http://clang.llvm.org/doxygen/group__CINDEX.html


omegahat/RClangSimple documentation built on Aug. 17, 2024, 10:23 a.m.