clang API Documentation

Typedefs | Functions
Module introspection
libclang: C Interface to Clang
Collaboration diagram for Module introspection:

Typedefs

typedef void * CXModule

Functions

CINDEX_LINKAGE CXModule clang_Cursor_getModule (CXCursor C)
 Given a CXCursor_ModuleImportDecl cursor, return the associated module.
CINDEX_LINKAGE CXModule clang_getModuleForFile (CXTranslationUnit, CXFile)
 Given a CXFile header file, return the module that contains it, if one exists.
CINDEX_LINKAGE CXFile clang_Module_getASTFile (CXModule Module)
CINDEX_LINKAGE CXModule clang_Module_getParent (CXModule Module)
CINDEX_LINKAGE CXString clang_Module_getName (CXModule Module)
CINDEX_LINKAGE CXString clang_Module_getFullName (CXModule Module)
CINDEX_LINKAGE int clang_Module_isSystem (CXModule Module)
CINDEX_LINKAGE unsigned clang_Module_getNumTopLevelHeaders (CXTranslationUnit, CXModule Module)
CINDEX_LINKAGE CXFile clang_Module_getTopLevelHeader (CXTranslationUnit, CXModule Module, unsigned Index)

Detailed Description

The functions in this group provide access to information about modules.


Typedef Documentation

typedef void* CXModule

Definition at line 3829 of file Index.h.


Function Documentation

Given a CXCursor_ModuleImportDecl cursor, return the associated module.

Given a CXFile header file, return the module that contains it, if one exists.

Parameters:
Modulea module object.
Returns:
the module file where the provided module object came from.
Parameters:
Modulea module object.
Returns:
the full name of the module, e.g. "std.vector".
Parameters:
Modulea module object.
Returns:
the name of the module, e.g. for the 'std.vector' sub-module it will return "vector".
Parameters:
Modulea module object.
Returns:
the number of top level headers associated with this module.
Parameters:
Modulea module object.
Returns:
the parent of a sub-module or NULL if the given module is top-level, e.g. for 'std.vector' it will return the 'std' module.
Parameters:
Modulea module object.
Indextop level header index (zero-based).
Returns:
the specified top level header associated with the module.
Parameters:
Modulea module object.
Returns:
non-zero if the module is a system one.