clang 20.0.0git
Typedefs | Functions
Module introspection

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

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

◆ CXModule

typedef void* CXModule

Definition at line 4411 of file Index.h.

Function Documentation

◆ clang_Cursor_getModule()

CINDEX_LINKAGE CXModule clang_Cursor_getModule ( CXCursor  C)

Given a CXCursor_ModuleImportDecl cursor, return the associated module.

◆ clang_getModuleForFile()

CINDEX_LINKAGE CXModule clang_getModuleForFile ( CXTranslationUnit  ,
CXFile   
)

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

◆ clang_Module_getASTFile()

CINDEX_LINKAGE CXFile clang_Module_getASTFile ( CXModule  Module)
Parameters
Modulea module object.
Returns
the module file where the provided module object came from.

◆ clang_Module_getFullName()

CINDEX_LINKAGE CXString clang_Module_getFullName ( CXModule  Module)
Parameters
Modulea module object.
Returns
the full name of the module, e.g. "std.vector".

◆ clang_Module_getName()

CINDEX_LINKAGE CXString clang_Module_getName ( CXModule  Module)
Parameters
Modulea module object.
Returns
the name of the module, e.g. for the 'std.vector' sub-module it will return "vector".

◆ clang_Module_getNumTopLevelHeaders()

CINDEX_LINKAGE unsigned clang_Module_getNumTopLevelHeaders ( CXTranslationUnit  ,
CXModule  Module 
)
Parameters
Modulea module object.
Returns
the number of top level headers associated with this module.

◆ clang_Module_getParent()

CINDEX_LINKAGE CXModule clang_Module_getParent ( CXModule  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.

◆ clang_Module_getTopLevelHeader()

CINDEX_LINKAGE CXFile clang_Module_getTopLevelHeader ( CXTranslationUnit  ,
CXModule  Module,
unsigned  Index 
)
Parameters
Modulea module object.
Indextop level header index (zero-based).
Returns
the specified top level header associated with the module.

◆ clang_Module_isSystem()

CINDEX_LINKAGE int clang_Module_isSystem ( CXModule  Module)
Parameters
Modulea module object.
Returns
non-zero if the module is a system one.