umbrello: CppTree2Uml Class Reference

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Member Functions | Private Member Functions | Private Attributes | List of all members
CppTree2Uml Class Reference

`#include <cpptree2uml.h>`

Inheritance diagram for CppTree2Uml:

## Public Member Functions
| CppTree2Uml (const QString &fileName, CodeImpThread *thread=0)
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
UMLPackage * | m_currentNamespace [STACKSIZE+1]
| stack More...
UMLClassifier * | m_currentClass [STACKSIZE+1]
| stack More...
int | m_nsCnt
| stack top for m_currentNamespace More...
int | m_clsCnt
| stack top for m_currentClass More...
CodeImpThread * | m_thread
QString | m_rootPath
| root path of project More...
UMLFolder * | m_rootFolder
UMLDoc * | m_doc

## Constructor & Destructor Documentation

## ◆ CppTree2Uml() [1/2]

CppTree2Uml::CppTree2Uml | ( | const QString & | fileName,
|  | CodeImpThread * | thread = `0`
| ) |  |
| explicit

## ◆ ~CppTree2Uml()

CppTree2Uml::~CppTree2Uml | ( |  | ) |
| virtual

## ◆ CppTree2Uml() [2/2]

CppTree2Uml::CppTree2Uml | ( | const CppTree2Uml & | source | ) |
| private

## Member Function Documentation

## ◆ clear()

void CppTree2Uml::clear | ( |  | ) |

## ◆ flushTemplateParams()

void CppTree2Uml::flushTemplateParams | ( | UMLClassifier * | klass | ) |
| private

Flush template parameters pending in m_templateParams to the klass.

## ◆ operator=()

void CppTree2Uml::operator= | ( | const CppTree2Uml & | source | ) |
| private

## ◆ parseAccessDeclaration()

void CppTree2Uml::parseAccessDeclaration | ( | AccessDeclarationAST * | access | ) |
| virtual

## ◆ parseBaseClause()

void CppTree2Uml::parseBaseClause | ( | BaseClauseAST * | baseClause,
|  | UMLClassifier * | klass
| ) |  |
| virtual

## ◆ parseClassSpecifier()

void CppTree2Uml::parseClassSpecifier | ( | ClassSpecifierAST * | ast | ) |
| virtual

## ◆ parseDeclaration2()

void CppTree2Uml::parseDeclaration2 | ( | GroupAST * | funSpec,
|  | GroupAST * | storageSpec,
|  | TypeSpecifierAST * | typeSpec,
|  | InitDeclaratorAST * | decl
| ) |  |
| virtual

## ◆ 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.

## ◆ parseEnumSpecifier()

void CppTree2Uml::parseEnumSpecifier | ( | EnumSpecifierAST * | ast | ) |
| virtual

## ◆ parseFunctionArguments()

void CppTree2Uml::parseFunctionArguments | ( | DeclaratorAST * | declarator,
|  | UMLOperation * | method
| ) |  |

## ◆ parseFunctionDeclaration()

void CppTree2Uml::parseFunctionDeclaration | ( | GroupAST * | funSpec,
|  | GroupAST * | storageSpec,
|  | TypeSpecifierAST * | typeSpec,
|  | InitDeclaratorAST * | decl
| ) |  |
| virtual

## ◆ parseFunctionDefinition()

void CppTree2Uml::parseFunctionDefinition | ( | FunctionDefinitionAST * | ast | ) |
| virtual

## ◆ parseNamespace()

void CppTree2Uml::parseNamespace | ( | NamespaceAST * | ast | ) |
| virtual

## ◆ parseSimpleDeclaration()

void CppTree2Uml::parseSimpleDeclaration | ( | SimpleDeclarationAST * | ast | ) |
| virtual

## ◆ parseTemplateDeclaration()

void CppTree2Uml::parseTemplateDeclaration | ( | TemplateDeclarationAST * | ast | ) |
| virtual

## ◆ parseTranslationUnit()

void CppTree2Uml::parseTranslationUnit | ( | const ParsedFile & | file | ) |
| virtual

## ◆ parseTypedef()

void CppTree2Uml::parseTypedef | ( | TypedefAST * | ast | ) |
| virtual

## ◆ scopeOfDeclarator()

QStringList CppTree2Uml::scopeOfDeclarator | ( | DeclaratorAST * | d,
|  | const QStringList & | scope
| ) |  |
| private

## ◆ scopeOfName()

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

## ◆ setRootPath()

void CppTree2Uml::setRootPath | ( | const QString & | rootPath | ) |

## ◆ 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:

- umbrello/codeimport/kdevcppparser/cpptree2uml.h
- umbrello/codeimport/kdevcppparser/cpptree2uml.cpp