umbrello: umbrello/codegenerators/cpp/cppheadercodedocument.h Source File

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

cppheadercodedocument.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef CPPHEADERCODEDOCUMENT_H
13 #define CPPHEADERCODEDOCUMENT_H
14
15 #include "codeclassfieldlist.h"
16 #include "classifiercodedocument.h"
17 #include "hierarchicalcodeblock.h"
18
19 #include <QString>
20
21 class CPPHeaderClassDeclarationBlock;
22
35 class CPPHeaderCodeDocument : public ClassifierCodeDocument
36 {
37 Q_OBJECT
38 public:
39
40 explicit CPPHeaderCodeDocument(UMLClassifier* classifier);
41 virtual ~CPPHeaderCodeDocument();
42
43 bool addCodeOperation(CodeOperation* op);
44
45 void updateContent();
46
50 //virtual void saveToXMI1(QXmlStreamWriter& writer);
51
52 protected:
53
54 // reset/clear our inventory of textblocks in this document
55 void resetTextBlocks();
56
61 virtual void loadChildTextBlocksFromNode(QDomElement & root);
62
63 void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, CPPHeaderClassDeclarationBlock * codeBlock);
64
68 CodeComment * newCodeComment();
69
70 private:
71
72 CPPHeaderClassDeclarationBlock * m_classDeclCodeBlock;
73
74 HierarchicalCodeBlock * m_publicBlock;
75 HierarchicalCodeBlock * m_privateBlock;
76 HierarchicalCodeBlock * m_protectedBlock;
77
78 HierarchicalCodeBlock * m_namespaceBlock;
79
80 HierarchicalCodeBlock * m_pubConstructorBlock;
81 HierarchicalCodeBlock * m_protConstructorBlock;
82 HierarchicalCodeBlock * m_privConstructorBlock;
83
84 HierarchicalCodeBlock * m_pubOperationsBlock;
85 HierarchicalCodeBlock * m_privOperationsBlock;
86 HierarchicalCodeBlock * m_protOperationsBlock;
87
88 CPPHeaderClassDeclarationBlock * getClassDecl();
89
90 };
91
92 #endif // CPPHEADERCODEDOCUMENT_H
CPPHeaderClassDeclarationBlock
Definition: cppheaderclassdeclarationblock.h:21
CPPHeaderCodeDocument
Definition: cppheadercodedocument.h:36
CPPHeaderCodeDocument::m_publicBlock
HierarchicalCodeBlock * m_publicBlock
Definition: cppheadercodedocument.h:74
CPPHeaderCodeDocument::m_pubOperationsBlock
HierarchicalCodeBlock * m_pubOperationsBlock
Definition: cppheadercodedocument.h:84
CPPHeaderCodeDocument::newCodeComment
CodeComment * newCodeComment()
CPPHeaderCodeDocument::resetTextBlocks
void resetTextBlocks()
Definition: cppheadercodedocument.cpp:218
CPPHeaderCodeDocument::updateContent
void updateContent()
Definition: cppheadercodedocument.cpp:336
CPPHeaderCodeDocument::CPPHeaderCodeDocument
CPPHeaderCodeDocument(UMLClassifier *classifier)
Definition: cppheadercodedocument.cpp:37
CPPHeaderCodeDocument::m_protectedBlock
HierarchicalCodeBlock * m_protectedBlock
Definition: cppheadercodedocument.h:76
CPPHeaderCodeDocument::m_privOperationsBlock
HierarchicalCodeBlock * m_privOperationsBlock
Definition: cppheadercodedocument.h:85
CPPHeaderCodeDocument::addCodeOperation
bool addCodeOperation(CodeOperation *op)
Definition: cppheadercodedocument.cpp:277
CPPHeaderCodeDocument::~CPPHeaderCodeDocument
virtual ~CPPHeaderCodeDocument()
Definition: cppheadercodedocument.cpp:65
CPPHeaderCodeDocument::m_protOperationsBlock
HierarchicalCodeBlock * m_protOperationsBlock
Definition: cppheadercodedocument.h:86
CPPHeaderCodeDocument::m_protConstructorBlock
HierarchicalCodeBlock * m_protConstructorBlock
Definition: cppheadercodedocument.h:81
CPPHeaderCodeDocument::getClassDecl
CPPHeaderClassDeclarationBlock * getClassDecl()
Definition: cppheadercodedocument.cpp:70
CPPHeaderCodeDocument::m_pubConstructorBlock
HierarchicalCodeBlock * m_pubConstructorBlock
Definition: cppheadercodedocument.h:80
CPPHeaderCodeDocument::addOrUpdateCodeClassFieldMethodsInCodeBlock
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, CPPHeaderClassDeclarationBlock *codeBlock)
CPPHeaderCodeDocument::m_classDeclCodeBlock
CPPHeaderClassDeclarationBlock * m_classDeclCodeBlock
Definition: cppheadercodedocument.h:72
CPPHeaderCodeDocument::m_namespaceBlock
HierarchicalCodeBlock * m_namespaceBlock
Definition: cppheadercodedocument.h:78
CPPHeaderCodeDocument::m_privConstructorBlock
HierarchicalCodeBlock * m_privConstructorBlock
Definition: cppheadercodedocument.h:82
CPPHeaderCodeDocument::loadChildTextBlocksFromNode
virtual void loadChildTextBlocksFromNode(QDomElement &root)
Definition: cppheadercodedocument.cpp:84
CPPHeaderCodeDocument::m_privateBlock
HierarchicalCodeBlock * m_privateBlock
Definition: cppheadercodedocument.h:75
ClassifierCodeDocument
Definition: classifiercodedocument.h:33
CodeComment
Definition: codecomment.h:24
CodeOperation
Definition: codeoperation.h:24
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:25
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
classifiercodedocument.h
codeclassfieldlist.h
CodeClassFieldList
QList< CodeClassField * > CodeClassFieldList
Definition: codeclassfieldlist.h:17
hierarchicalcodeblock.h