umbrello/umbrello
cppheadercodeaccessormethod.cpp
Go to the documentation of this file.
27 CPPHeaderCodeAccessorMethod::CPPHeaderCodeAccessorMethod(CodeClassField * field, CodeAccessorMethod::AccessorType type)
99 QString methodParams = QChar(QLatin1Char(' ')); // QLatin1String("get") + cppdoc->capitalizeFirstLetter(fieldName);
108 headerText = QLatin1String("Add a ") + fieldName + QLatin1String(" object to the ") + fieldName + QLatin1String("List") + endLine + getParentObject()->doc() + endLine + tag + QLatin1String("return void");
114 headerText = QLatin1String("Remove a ") + fieldName + QLatin1String(" object from the ") + fieldName + QLatin1String("List") + endLine + getParentObject()->doc() + endLine + tag + QLatin1String("return void");
119 headerText = QLatin1String("Get the ") + fieldName + QLatin1String("List") + endLine + getParentObject()->doc() + endLine + tag + QLatin1String("return ") + vectorClassName + QLatin1String("with list of objects");
125 headerText = QLatin1String("Set the value of ") + fieldName + endLine + getParentObject()->doc() + endLine + tag + QLatin1String("param value the value of ") + fieldName;
131 headerText = QLatin1String("Get the value of ") + fieldName + endLine + getParentObject()->doc() + endLine + tag + QLatin1String("return the value of ") + fieldName;
142 QString startText = methodReturnType + QLatin1Char(' ') + methodName + QLatin1String(" (") + methodParams + QLatin1Char(')');
void setType(AccessorType type)
Set the type of accessor method this is.
Definition: codeaccessormethod.cpp:72
QString getVectorClassName()
Definition: cppcodegenerationpolicy.cpp:172
void setEndMethodText(const QString &value)
Set the ending text that finishes this method after the body is printed.
Definition: codemethodblock.cpp:66
void setStartMethodText(const QString &value)
Set the starting text that begins this method before the body is printed.
Definition: codemethodblock.cpp:58
CPPHeaderCodeAccessorMethod(CodeClassField *field, CodeAccessorMethod::AccessorType type)
Empty Constructor.
Definition: cppheadercodeaccessormethod.cpp:27
class ClassifierCodeDocument A CodeDocument which represents a UMLClassifier (e.g.
Definition: classifiercodedocument.h:32
void setText(const QString &text)
Set the value of m_text The actual text of this code block.
Definition: textblock.cpp:80
QString getNewLineEndingChars() const
Utility function to get the actual characters.
Definition: codegenerationpolicy.cpp:248
AccessorType getType()
Utility method to get the value of the parent object of the parent classifield.
Definition: codeaccessormethod.cpp:64
CodeClassField * getParentClassField()
Get the value of m_parentclassfield.
Definition: codeaccessormethod.cpp:40
void setOverallIndentationLevel(int level)
A utility method that causes the comment and body of the code block to have the same indentation leve...
Definition: codeblockwithcomments.cpp:163
virtual void updateContent()
This is the method called from within syncToparent() to update the body of the method.
Definition: cppheadercodeaccessormethod.cpp:44
virtual ~CPPHeaderCodeAccessorMethod()
Empty Destructor.
Definition: cppheadercodeaccessormethod.cpp:39
ClassifierCodeDocument * getParentDocument()
Get the parent Code Document.
Definition: codeparameter.cpp:133
Definition: codeaccessormethod.h:32
bool getAccessorsAreInline()
Get the value of m_inlineAccessors.
Definition: cppcodegenerationpolicy.cpp:81
bool isEmpty() const
Definition: codeaccessormethod.h:32
Definition: cppcodeclassfield.h:21
Definition: codeaccessormethod.h:20
Definition: codeaccessormethod.h:32
class CPPCodeDocumentation A CPP code comment.
Definition: cppcodedocumentation.h:27
CodeGenerationPolicy * commonPolicy() const
Returns the default code generation policy.
Definition: uml.cpp:2219
void update()
Must be called before this object is usable.
Definition: cppheadercodeaccessormethod.cpp:33
Definition: codeaccessormethod.h:32
Base class for programming language specific code generation policy extensions.
Definition: codegenpolicyext.h:27
QString getVectorMethodRemove(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition: cppcodegenerationpolicy.cpp:266
QString getVectorMethodAppend(const QString &variableName=QString(), const QString &itemClassName=QString())
More flexible generation.
Definition: cppcodegenerationpolicy.cpp:255
virtual void updateMethodDeclaration()
This is the method called from within syncToparent().
Definition: cppheadercodeaccessormethod.cpp:79
void setComment(CodeComment *object)
Set the Comment object.
Definition: codeblockwithcomments.cpp:38
QString getDocToolTag()
Definition: cppcodegenerationpolicy.cpp:212
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.