umbrello 25.04.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
CppTree2Uml Class Reference

#include <cpptree2uml.h>

Inheritance diagram for CppTree2Uml:
Collaboration diagram for CppTree2Uml:

Public Member Functions

 CppTree2Uml (const QString &fileName, CodeImpThread *thread=nullptr)
virtual ~CppTree2Uml ()
void clear ()
void setRootPath (const QString &rootPath)
virtual void parseTranslationUnit (const ParsedFile &file)
virtual void parseNamespace (NamespaceAST *)
virtual void parseTypedef (TypedefAST *)
virtual void parseTemplateDeclaration (TemplateDeclarationAST *)
virtual void parseSimpleDeclaration (SimpleDeclarationAST *)
virtual void parseFunctionDefinition (FunctionDefinitionAST *)
virtual void parseAccessDeclaration (AccessDeclarationAST *)
virtual void parseClassSpecifier (ClassSpecifierAST *)
virtual void parseEnumSpecifier (EnumSpecifierAST *)
virtual void parseElaboratedTypeSpecifier (ElaboratedTypeSpecifierAST *)
virtual void parseDeclaration2 (GroupAST *funSpec, GroupAST *storageSpec, TypeSpecifierAST *typeSpec, InitDeclaratorAST *decl)
virtual void parseFunctionDeclaration (GroupAST *funSpec, GroupAST *storageSpec, TypeSpecifierAST *typeSpec, InitDeclaratorAST *decl)
void parseFunctionArguments (DeclaratorAST *declarator, UMLOperation *method)
virtual void parseBaseClause (BaseClauseAST *baseClause, UMLClassifier *klass)

Private Member Functions

QString typeOfDeclaration (TypeSpecifierAST *typeSpec, DeclaratorAST *declarator)
QStringList scopeOfName (NameAST *id, const QStringList &scope)
QStringList scopeOfDeclarator (DeclaratorAST *d, const QStringList &scope)
void flushTemplateParams (UMLClassifier *klass)
 CppTree2Uml (const CppTree2Uml &source)
void operator= (const CppTree2Uml &source)

Private Attributes

QString m_fileName
QStringList m_currentScope
Uml::Visibility::Enum m_currentAccess
bool m_inSlots
bool m_inSignals
int m_anon
bool m_inStorageSpec
bool m_inTypedef
QString m_comment
Model_Utils::NameAndType_List m_templateParams
DeclaratorAST * m_currentDeclarator
UMLPackagem_currentNamespace [STACKSIZE+1]
 stack
UMLClassifierm_currentClass [STACKSIZE+1]
 stack
int m_nsCnt
 stack top for m_currentNamespace
int m_clsCnt
 stack top for m_currentClass
CodeImpThreadm_thread
QString m_rootPath
 root path of project
UMLFolderm_rootFolder
UMLDocm_doc

Constructor & Destructor Documentation

◆ CppTree2Uml() [1/2]

CppTree2Uml::CppTree2Uml ( const QString & fileName,
CodeImpThread * thread = nullptr )
explicit
Here is the call graph for this function:

◆ ~CppTree2Uml()

CppTree2Uml::~CppTree2Uml ( )
virtual

◆ CppTree2Uml() [2/2]

CppTree2Uml::CppTree2Uml ( const CppTree2Uml & source)
private
Here is the call graph for this function:

Member Function Documentation

◆ clear()

void CppTree2Uml::clear ( )

◆ flushTemplateParams()

void CppTree2Uml::flushTemplateParams ( UMLClassifier * klass)
private

Flush template parameters pending in m_templateParams to the klass.

Here is the call graph for this function:

◆ operator=()

void CppTree2Uml::operator= ( const CppTree2Uml & source)
private
Here is the call graph for this function:

◆ parseAccessDeclaration()

void CppTree2Uml::parseAccessDeclaration ( AccessDeclarationAST * access)
virtual
Here is the call graph for this function:

◆ parseBaseClause()

void CppTree2Uml::parseBaseClause ( BaseClauseAST * baseClause,
UMLClassifier * klass )
virtual
Here is the call graph for this function:

◆ parseClassSpecifier()

void CppTree2Uml::parseClassSpecifier ( ClassSpecifierAST * ast)
virtual
Here is the call graph for this function:

◆ parseDeclaration2()

void CppTree2Uml::parseDeclaration2 ( GroupAST * funSpec,
GroupAST * storageSpec,
TypeSpecifierAST * typeSpec,
InitDeclaratorAST * decl )
virtual
Here is the call graph for this function:

◆ parseElaboratedTypeSpecifier()

void CppTree2Uml::parseElaboratedTypeSpecifier ( ElaboratedTypeSpecifierAST * typeSpec)
virtual
Todo
Refine - Currently only handles class forward declarations.
  • Using typeSpec->text() is probably not good, decode the kind() instead.
Here is the call graph for this function:

◆ parseEnumSpecifier()

void CppTree2Uml::parseEnumSpecifier ( EnumSpecifierAST * ast)
virtual
Here is the call graph for this function:

◆ parseFunctionArguments()

void CppTree2Uml::parseFunctionArguments ( DeclaratorAST * declarator,
UMLOperation * method )
Here is the call graph for this function:

◆ parseFunctionDeclaration()

void CppTree2Uml::parseFunctionDeclaration ( GroupAST * funSpec,
GroupAST * storageSpec,
TypeSpecifierAST * typeSpec,
InitDeclaratorAST * decl )
virtual
Here is the call graph for this function:

◆ parseFunctionDefinition()

void CppTree2Uml::parseFunctionDefinition ( FunctionDefinitionAST * ast)
virtual
Here is the call graph for this function:

◆ parseNamespace()

void CppTree2Uml::parseNamespace ( NamespaceAST * ast)
virtual
Here is the call graph for this function:

◆ parseSimpleDeclaration()

void CppTree2Uml::parseSimpleDeclaration ( SimpleDeclarationAST * ast)
virtual
Here is the call graph for this function:

◆ parseTemplateDeclaration()

void CppTree2Uml::parseTemplateDeclaration ( TemplateDeclarationAST * ast)
virtual
Here is the call graph for this function:

◆ parseTranslationUnit()

void CppTree2Uml::parseTranslationUnit ( const ParsedFile & file)
virtual
Here is the call graph for this function:

◆ parseTypedef()

void CppTree2Uml::parseTypedef ( TypedefAST * ast)
virtual
Here is the call graph for this function:

◆ scopeOfDeclarator()

QStringList CppTree2Uml::scopeOfDeclarator ( DeclaratorAST * d,
const QStringList & scope )
private
Here is the call graph for this function:

◆ scopeOfName()

QStringList CppTree2Uml::scopeOfName ( NameAST * id,
const QStringList & scope )
private

◆ setRootPath()

void CppTree2Uml::setRootPath ( const QString & rootPath)
Here is the call graph for this function:

◆ typeOfDeclaration()

QString CppTree2Uml::typeOfDeclaration ( TypeSpecifierAST * typeSpec,
DeclaratorAST * declarator )
private

Member Data Documentation

◆ m_anon

int CppTree2Uml::m_anon
private

◆ m_clsCnt

int CppTree2Uml::m_clsCnt
private

stack top for m_currentClass

◆ m_comment

QString CppTree2Uml::m_comment
private

◆ m_currentAccess

Uml::Visibility::Enum CppTree2Uml::m_currentAccess
private

◆ m_currentClass

UMLClassifier* CppTree2Uml::m_currentClass[STACKSIZE+1]
private

stack

◆ m_currentDeclarator

DeclaratorAST* CppTree2Uml::m_currentDeclarator
private

◆ m_currentNamespace

UMLPackage* CppTree2Uml::m_currentNamespace[STACKSIZE+1]
private

stack

◆ m_currentScope

QStringList CppTree2Uml::m_currentScope
private

◆ m_doc

UMLDoc* CppTree2Uml::m_doc
private

◆ m_fileName

QString CppTree2Uml::m_fileName
private

◆ m_inSignals

bool CppTree2Uml::m_inSignals
private

◆ m_inSlots

bool CppTree2Uml::m_inSlots
private

◆ m_inStorageSpec

bool CppTree2Uml::m_inStorageSpec
private

◆ m_inTypedef

bool CppTree2Uml::m_inTypedef
private

◆ m_nsCnt

int CppTree2Uml::m_nsCnt
private

stack top for m_currentNamespace

◆ m_rootFolder

UMLFolder* CppTree2Uml::m_rootFolder
private

◆ m_rootPath

QString CppTree2Uml::m_rootPath
private

root path of project

◆ m_templateParams

Model_Utils::NameAndType_List CppTree2Uml::m_templateParams
private

◆ m_thread

CodeImpThread* CppTree2Uml::m_thread
private

The documentation for this class was generated from the following files: