Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CppImport::StandardMetaDefinitions Class Reference

creates and stores all MetaDefinitions that are not x-Macro MetaDefinitions. More...

Public Member Functions

 StandardMetaDefinitions (ClangHelpers &clang, const MacroDefinitions &definitionManager, MacroExpansions &macroExpansions)
 
OOModel::MetaDefinitioncreateMetaDef (const clang::MacroDirective *md)
 
void createMetaDefinitionBody (OOModel::MetaDefinition *metaDef, QList< Model::Node * > nodes, MacroExpansion *expansion, NodeToCloneMap &mapping, QList< MacroArgumentInfo > &arguments)
 
OOModel::MetaDefinitionmetaDefinition (const clang::MacroDirective *md)
 

Private Member Functions

void childrenUnownedByExpansion (Model::Node *node, MacroExpansion *expansion, NodeToCloneMap &mapping, QList< Model::Node * > &result)
 return all children of node that do not belong to expansion. More...
 
void insertArgumentSplices (NodeToCloneMap &mapping, NodeToCloneMap &childMapping, QList< MacroArgumentInfo > &arguments)
 insert splices for all nodes in childMapping that are a macro argument. More...
 
void insertChildMetaCalls (MacroExpansion *expansion, NodeToCloneMap &childMapping)
 insert all non-xMacro child meta calls into metaDef. More...
 
bool removeUnownedNodes (Model::Node *cloned, MacroExpansion *expansion, NodeToCloneMap &mapping)
 remove all children of node that do not belong to expansion. More...
 

Private Attributes

ClangHelpersclang_
 
const MacroDefinitionsdefinitionManager_
 
MacroExpansionsmacroExpansions_
 
QHash< QString, OOModel::MetaDefinition * > standardMetaDefinitions_
 

Detailed Description

creates and stores all MetaDefinitions that are not x-Macro MetaDefinitions.

processes all syntactically complete macro definitions.

Constructor & Destructor Documentation

◆ StandardMetaDefinitions()

CppImport::StandardMetaDefinitions::StandardMetaDefinitions ( ClangHelpers clang,
const MacroDefinitions definitionManager,
MacroExpansions macroExpansions 
)

Member Function Documentation

◆ childrenUnownedByExpansion()

void CppImport::StandardMetaDefinitions::childrenUnownedByExpansion ( Model::Node node,
MacroExpansion expansion,
NodeToCloneMap mapping,
QList< Model::Node * > &  result 
)
private

return all children of node that do not belong to expansion.

◆ createMetaDef()

OOModel::MetaDefinition * CppImport::StandardMetaDefinitions::createMetaDef ( const clang::MacroDirective *  md)

◆ createMetaDefinitionBody()

void CppImport::StandardMetaDefinitions::createMetaDefinitionBody ( OOModel::MetaDefinition metaDef,
QList< Model::Node * >  nodes,
MacroExpansion expansion,
NodeToCloneMap mapping,
QList< MacroArgumentInfo > &  arguments 
)

◆ insertArgumentSplices()

void CppImport::StandardMetaDefinitions::insertArgumentSplices ( NodeToCloneMap mapping,
NodeToCloneMap childMapping,
QList< MacroArgumentInfo > &  arguments 
)
private

insert splices for all nodes in childMapping that are a macro argument.

◆ insertChildMetaCalls()

void CppImport::StandardMetaDefinitions::insertChildMetaCalls ( MacroExpansion expansion,
NodeToCloneMap childMapping 
)
private

insert all non-xMacro child meta calls into metaDef.

◆ metaDefinition()

OOModel::MetaDefinition * CppImport::StandardMetaDefinitions::metaDefinition ( const clang::MacroDirective *  md)

◆ removeUnownedNodes()

bool CppImport::StandardMetaDefinitions::removeUnownedNodes ( Model::Node cloned,
MacroExpansion expansion,
NodeToCloneMap mapping 
)
private

remove all children of node that do not belong to expansion.

return true if node itself does not belong to expansion.

Member Data Documentation

◆ clang_

ClangHelpers& CppImport::StandardMetaDefinitions::clang_
private

◆ definitionManager_

const MacroDefinitions& CppImport::StandardMetaDefinitions::definitionManager_
private

◆ macroExpansions_

MacroExpansions& CppImport::StandardMetaDefinitions::macroExpansions_
private

◆ standardMetaDefinitions_

QHash<QString, OOModel::MetaDefinition*> CppImport::StandardMetaDefinitions::standardMetaDefinitions_
private