|
CppParser
|
Represents an entire C++ program. More...
#include <cppprog.h>

Public Member Functions | |
| CppProgram (const std::string &folder, CppParser parser=CppParser(), const CppProgFileSelecter &fileSelector=selectHeadersOnly) | |
| CppProgram (const std::vector< std::string > &files, CppParser parser=CppParser()) | |
| const CppTypeTreeNode * | nameLookup (const std::string &name, const CppTypeTreeNode *beginFrom=nullptr) const |
| Finds the CppTypeTreeNode object corresponding to a given name. More... | |
| const CppTypeTreeNode * | searchTypeNode (const std::string &name, const CppTypeTreeNode *parentNode=nullptr) const |
| Searches down (in breadth first manner) the CppTypeTreeNode object corresponding to a given name. More... | |
| const CppTypeTreeNode * | typeTreeNodeFromCppObj (CppObj *cppObj) const |
| CppCompoundArray & | getFileAsts () |
| void | addCppAst (CppCompoundPtr cppAst) |
| Adds a new file AST to this program. More... | |
| void | addCompound (CppCompound *compound, CppCompound *parent) |
| void | addCompound (CppCompound *compound, CppTypeTreeNode *parentTypeNode) |
Private Types | |
| using | CppObjToTypeNodeMap = std::map< CppObj *, CppTypeTreeNode * > |
Private Member Functions | |
| void | loadType (CppCompound *cppCompound, CppTypeTreeNode *typeNode) |
Private Attributes | |
| CppCompoundArray | fileAsts_ |
| Array of all top level ASTs corresponding to files. More... | |
| CppTypeTreeNode | cppTypeTreeRoot_ |
| Repository of all compound objects arranged as type-tree. More... | |
| CppObjToTypeNodeMap | cppObjToTypeNode_ |
|
private |
| CppProgram::CppProgram | ( | const std::string & | folder, |
| CppParser | parser = CppParser(), |
||
| const CppProgFileSelecter & | fileSelector = selectHeadersOnly |
||
| ) |
Definition at line 50 of file cppprog.cpp.
| void CppProgram::addCompound | ( | CppCompound * | compound, |
| CppCompound * | parent | ||
| ) |
Definition at line 74 of file cppprog.cpp.


| void CppProgram::addCompound | ( | CppCompound * | compound, |
| CppTypeTreeNode * | parentTypeNode | ||
| ) |
| void CppProgram::addCppAst | ( | CppCompoundPtr | cppAst | ) |
Adds a new file AST to this program.
Definition at line 55 of file cppprog.cpp.


|
inline |
|
private |
Definition at line 81 of file cppprog.cpp.


| const CppTypeTreeNode * CppProgram::nameLookup | ( | const std::string & | name, |
| const CppTypeTreeNode * | beginFrom = nullptr |
||
| ) | const |
Finds the CppTypeTreeNode object corresponding to a given name.
| name | Name of type for which CppTypeTreeNode needs to be found. |
| beginFrom | CppTypeTreeNode object from where the find should begin. It can be nullptr, in that case the global space is looked for the name. |
Definition at line 141 of file cppprog.cpp.


| const CppTypeTreeNode * CppProgram::searchTypeNode | ( | const std::string & | name, |
| const CppTypeTreeNode * | parentNode = nullptr |
||
| ) | const |
Searches down (in breadth first manner) the CppTypeTreeNode object corresponding to a given name.
| name | Name of type for which CppTypeTreeNode needs to be found. |
| parentNode | CppTypeTreeNode object from where the search should begin. It can be nullptr, in that case search starts from the top. |
Definition at line 181 of file cppprog.cpp.

|
inline |
|
private |
|
private |
|
private |