Class: ClangDocumentScanner

ClangDocumentScanner(cpp_source_code_documents)

Clang Document Scanner

Constructor

new ClangDocumentScanner(cpp_source_code_documents)

constructor
Parameters:
Name Type Description
cpp_source_code_documents Array.<Object> Clang documents
Source:

Methods

(static) find(document, key, value) → {Object}

Find a matching subdocument which has a property (key) with a specific value
Parameters:
Name Type Description
document Object a document
key string property name
value string | number a value
Source:
Returns:
a matching subdocument, otherwise undefined
Type
Object

get_typedef_type(document) → {Object}

Get typedefed record/enum type
Parameters:
Name Type Description
document Object typedef document
Source:
Returns:
record or enum type document if existing, otherwise undefined
Type
Object

global_find(key, value) → {Object}

Globally find a matching document which has a property (key) with a specific value
Parameters:
Name Type Description
key string property name
value string | number a value
Source:
Returns:
a matching document, otherwise undefined
Type
Object

log(msg)

Log a message
Parameters:
Name Type Description
msg string a message
Source:

rec_scan(parent, document, template_decl, template_args, path, full_name, from_typedef, visitors)

Recursively scan documents
Parameters:
Name Type Description
parent Object parent of document
document Object document to scan
template_decl Array.<string> stack of template declaration (template <>)
template_args Array.<string> array of template args (< T1, T2, V1, V2 >)
path string abtract full_name of parent document
full_name string full_name of parent document
from_typedef Object either undefined or reference to typedef object from where the scan was initiated
visitors Array.<Object> a array of visitors
Source:

scan(document, visitors)

Scan a Clang document
Parameters:
Name Type Description
document Object a clang document
visitors Array.<Object> a array of visitors
Source:

warn(msg)

Log a warning message
Parameters:
Name Type Description
msg string a warning message
Source: