umbrello/umbrello
valawriter.cpp
Go to the documentation of this file.
264 cs << formatDoc(c->doc(), m_container_indent + QLatin1String(" * TODO: Add documentation here."));
306 cs << m_endl << "//WARNING: Vala does not support multiple inheritance but there is more than 1 superclass defined in your UML model!" << m_endl;
326 cs << m_endl << m_container_indent << m_indentation << "//region Aggregations" << m_endl << m_endl;
333 cs << m_endl << m_container_indent << m_indentation << "//region Compositions" << m_endl << m_endl;
404 cs << m_endl << m_container_indent << m_indentation << "//region Public methods" << m_endl << m_endl;
411 cs << m_endl << m_container_indent << m_indentation << "//region Protected methods" << m_endl << m_endl;
418 cs << m_endl << m_container_indent << m_indentation << "//region Private methods" << m_endl << m_endl;
453 cs << m_endl << m_container_indent << m_indentation << "//region " << obj->name() << " members" << m_endl << m_endl;
474 void ValaWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs)
491 cs << m_endl << m_container_indent << m_indentation << "//region " << real->name() << " members" << m_endl << m_endl;
529 cs << formatDoc(op->doc(), m_container_indent + m_indentation + QLatin1String(" * TODO: Add documentation here. "));
664 cs << m_endl << m_container_indent << m_indentation << "//region Attributes" << m_endl << m_endl;
714 void ValaWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs)
735 if (a->getMultiplicity(Uml::RoleType::B).isEmpty() || a->getMultiplicity(Uml::RoleType::B) == QLatin1String("1")) {
737 writeAttribute(roleDoc, a->visibility(Uml::RoleType::B), false, typeName, roleName, QString(), (a->visibility(Uml::RoleType::B) != Uml::Visibility::Private), cs);
742 writeAttribute(roleDoc, a->visibility(Uml::RoleType::B), false, QLatin1String("ArrayList"), roleName, QString(), (a->visibility(Uml::RoleType::B) != Uml::Visibility::Private), cs);
770 cs << formatDoc(doc, m_container_indent + m_indentation + QLatin1String(" * TODO: Add documentation here."));
796 cs << m_container_indent << m_indentation << m_indentation << m_indentation << "return m_" << cleanName(name) << ";" << m_endl;
801 cs << m_container_indent << m_indentation << m_indentation << m_indentation << "m_" << cleanName(name) << " = value;" << m_endl;
UMLAssociationList getAggregations()
Shorthand for getSpecificAssocs(Uml::at_Aggregation)
Definition: umlcanvasobject.cpp:423
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:497
void clear()
This class contains the non-graphical information required for a UML Package.
Definition: package.h:32
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
UMLClassifier * getType() const
Returns the type of the UMLClassifierListItem.
Definition: classifierlistitem.cpp:100
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
QString getInitialValue() const
Returns The initial value of the UMLAttribute.
Definition: attribute.cpp:99
Definition: basictypes.h:215
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:431
bool openFile(QFile &file, const QString &name)
Opens a file named "name" for writing in the outputDirectory.
Definition: codegenerator.cpp:601
QString findFileName(UMLPackage *concept, const QString &ext)
Determine the file name.
Definition: simplecodegenerator.cpp:89
Definition: basictypes.h:216
QString fileName() const
A simple code generator interface designed to work with the existing codewriters. ...
Definition: simplecodegenerator.h:27
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
virtual QString getHeadingFile(const QString &file)
Gets the heading file (as a string) to be inserted at the beginning of the generated file...
Definition: codegenerator.cpp:497
QString & remove(int position, int n)
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
virtual Uml::ProgrammingLanguage::Enum language() const
Returns "Vala".
Definition: valawriter.cpp:838
Definition: basictypes.h:58
This class contains the non-graphic representation of an association.
Definition: association.h:32
int indexOf(const T &value, int from) const
bool isLifeOperation()
Shortcut for (isConstructorOperation() || isDestructorOperation()).
Definition: operation.cpp:395
Definition: basictypes.h:266
int count(const T &value) const
void append(const T &value)
bool isInterface() const
Returns true if this classifier represents an interface.
Definition: classifier.cpp:117
bool isEmpty() const
void codeGenerated(UMLClassifier *concept, bool generated)
bool isEmpty() const
UMLAssociationList getCompositions()
Shorthand for getSpecificAssocs(Uml::at_Composition)
Definition: umlcanvasobject.cpp:433
QString toString(Enum item, bool mnemonic)
Convert Visibility item into QString representation.
Definition: basictypes.cpp:99
static QString formatSourceCode(const QString &code, const QString &indentation)
Format source code for output in source files by adding the correct indentation to every line of code...
Definition: codegenerator.cpp:821
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Finds all classes in the current document to which objects of class c are in some way related...
Definition: codegenerator.cpp:700
virtual QStringList reservedKeywords() const
Get list of reserved keywords.
Definition: valawriter.cpp:847
Definition: basictypes.h:57
virtual void close()
QString & replace(int position, int n, QChar after)
bool isStatic() const
Returns true if this UMLObject has classifier scope, otherwise false (the default).
Definition: umlobject.cpp:331
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:449
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:639
virtual void writeClass(UMLClassifier *c)
Call this method to generate Vala code for a UMLClassifier.
Definition: valawriter.cpp:183
UMLClassifierList getSuperClasses(bool withRealizations=true)
Return a list of the superclasses of this concept.
Definition: umlcanvasobject.cpp:360
bool hasAbstractOps()
Return true if this classifier has abstract operations.
Definition: classifier.cpp:938
QString getSourceCode() const
Returns the source code for this operation.
Definition: operation.cpp:440
Definition: basictypes.h:39
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Return a list of operations for the Classifier.
Definition: classifier.cpp:968
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Returns the Visibility of the given role.
Definition: association.cpp:550
QString fromLatin1(const char *str, int size)
QString getRoleDoc(Uml::RoleType::Enum role) const
Returns the documentation assigned to the given role.
Definition: association.cpp:577
QString getRoleName(Uml::RoleType::Enum role) const
Returns the name assigned to the role A.
Definition: association.cpp:568
static QString formatDoc(const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80)
Format documentation for output in source files.
Definition: codegenerator.cpp:790
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:627
void showGeneratedFile(const QString &filename)
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:559
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Returns the fully qualified name, i.e.
Definition: umlobject.cpp:202
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
virtual QString getTypeName() const
Returns the type name of the UMLClassifierListItem.
Definition: classifierlistitem.cpp:110
Definition: basictypes.h:59
virtual UMLAssociationList getRealizations()
Shorthand for getSpecificAssocs(Uml::at_Realization)
Definition: umlcanvasobject.cpp:413
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Return the predefined root folder of the given type.
Definition: umldoc.cpp:2721
bool hasNext() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:27 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:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.