Envision
A visual programming IDE for object-oriented languages
|
uses the information provided by the ClangAstVisitor and the Preprocessor to transform a completely expanded Envision AST without macros into an Envision AST with MetaDefinitions and MetaCalls. More...
Public Member Functions | |
MacroImporter (OOModel::Project *root, ClangHelpers &clang) | |
void | endEntireImport () |
insert top level meta calls and remove nodes generated from top level expansions. More... | |
void | endTranslationUnit () |
invoked after every imported translation unit to perform macro import. More... | |
void | startTranslationUnit () |
Private Member Functions | |
void | allArguments (Model::Node *node, QList< MacroArgumentInfo > &result, NodeToCloneMap &mapping) |
return all arguments which are associated to children of node. More... | |
QList< MacroArgumentLocation > | argumentHistory (clang::SourceRange range) |
QList< MacroArgumentLocation > | argumentHistory (Model::Node *node) |
Model::Node * | bestContext (MacroExpansion *expansion) |
if a macro expansion does not generate any nodes this method can be used to infer the best context the corresponding meta call can be put in based on its presumed location. More... | |
void | clear () |
clear all information for the current translation unit. More... | |
void | handleMacroExpansion (QList< Model::Node * > nodes, MacroExpansion *expansion, NodeToCloneMap &mapping, QList< MacroArgumentInfo > &arguments) |
void | handleQEmit (MacroExpansion *emitExpansion, Model::Node *context) |
void | handleQSignals (clang::SourceLocation signalsLocation, OOModel::Class *classContext) |
adds predefined meta calls to all signaling methods in classContext. More... | |
void | insertArguments (QList< MacroArgumentInfo > &allArguments) |
insert gathered argument nodes at their original (logical) location. More... | |
bool | insertMetaCall (MacroExpansion *expansion) |
Private Attributes | |
AllMetaDefinitions | allMetaDefinitions_ |
ClangHelpers & | clang_ |
QHash< Model::Node *, MacroExpansion * > | finalizationMetaCalls |
MacroDefinitions | macroDefinitions_ |
MacroExpansions | macroExpansions_ |
QHash< QString, OOModel::MetaCallExpression * > | metaCalls_ |
QSet< Model::Node * > | nodesToBeRemoved_ |
QSet< Model::Node * > | nodesToBeRetained_ |
OOModel::Project * | root_ {} |
uses the information provided by the ClangAstVisitor and the Preprocessor to transform a completely expanded Envision AST without macros into an Envision AST with MetaDefinitions and MetaCalls.
CppImport::MacroImporter::MacroImporter | ( | OOModel::Project * | root, |
ClangHelpers & | clang | ||
) |
|
private |
return all arguments which are associated to children of node.
|
private |
|
private |
|
private |
if a macro expansion does not generate any nodes this method can be used to infer the best context the corresponding meta call can be put in based on its presumed location.
|
private |
clear all information for the current translation unit.
void CppImport::MacroImporter::endEntireImport | ( | ) |
insert top level meta calls and remove nodes generated from top level expansions.
invoked after all translation units have been processed.
void CppImport::MacroImporter::endTranslationUnit | ( | ) |
invoked after every imported translation unit to perform macro import.
|
private |
|
private |
|
private |
adds predefined meta calls to all signaling methods in classContext.
a method is determined to be signaling if it appears after the signalsLocation and there is no other class access specifier (private:, protected:, public:) on a separate line between the signalsLocation and the candidate method.
|
private |
insert gathered argument nodes at their original (logical) location.
|
private |
void CppImport::MacroImporter::startTranslationUnit | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |