![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Parser of C/C++ declarations used by the code model tools. More...
#include <picodeparser.h>
Classes | |
| struct | Entity |
| Parsed class, struct or namespace. More... | |
| struct | Enum |
| Parsed enumeration. More... | |
| struct | EnumeratorInfo |
| Parsed enumerator entry. More... | |
| struct | Macro |
| Parsed function-like macro. More... | |
| struct | Member |
| Parsed member declaration or function signature. More... | |
Public Types | |
| enum | Visibility { Global , Public , Protected , Private } |
| Visibility of a parsed declaration inside the current scope. More... | |
| enum | Attribute |
| Parsed declaration attributes. | |
| typedef PIFlags< Attribute > | Attributes |
| Bitmask of parsed declaration attributes. | |
| typedef PIPair< PIString, PIString > | Define |
| Preprocessor define name and value. | |
| typedef PIPair< PIString, PIString > | Typedef |
| Typedef alias and target type. | |
| typedef PIMap< PIString, PIString > | MetaMap |
| Parsed metadata map. | |
Public Member Functions | |
| PICodeParser () | |
| Constructs a parser with built-in PIP macro presets. | |
| void | parseFile (const PIString &file, bool follow_includes=true) |
| Parses one source file and optionally follows its includes. | |
| void | parseFiles (const PIStringList &files, bool follow_includes=true) |
| Parses several source files into one parser state. | |
| void | parseFileContent (PIString fc) |
| Parses source text provided directly in memory. | |
| void | includeDirectory (const PIString &dir) |
| Adds a directory to the include search list. | |
| void | addDefine (const PIString &def_name, const PIString &def_value) |
| Adds a custom preprocessor definition before parsing. | |
| bool | isEnum (const PIString &name) |
| Returns whether an enum with name was parsed. | |
| Entity * | findEntityByName (const PIString &en) |
| Finds a parsed entity by its full name. | |
| PIStringList | parsedFiles () const |
| Returns the set of files already processed by the parser. | |
| PIString | mainFile () const |
| Returns the file detected as the main translation unit. | |
| const PICodeParser::Entity * | global () const |
| Returns the synthetic global scope entity. | |
| int | macrosSubstitutionMaxIterations () const |
| Returns the maximum number of macro substitution passes. | |
| void | setMacrosSubstitutionMaxIterations (int value) |
| Sets the maximum number of macro substitution passes. | |
Public Attributes | |
| PIVector< Define > | defines |
Parsed define directives, including built-in and custom ones. | |
| PIVector< Macro > | macros |
| Parsed function-like macros. | |
| PIVector< Enum > | enums |
| Parsed enums from the processed files. | |
| PIVector< Typedef > | typedefs |
| Parsed top-level typedef declarations. | |
| PIVector< Entity * > | entities |
| Parsed entities discovered in the processed files. | |
Parser of C/C++ declarations used by the code model tools.
Parser for analyzing C++ source files. Extracts information about classes, structures, enums, macros, functions, and members.