umbrello/umbrello
valawriter.cpp
Go to the documentation of this file.
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 + " * TODO: Add documentation here. ");
661 cs << m_endl << m_container_indent << m_indentation << "//region Attributes" << m_endl << m_endl;
711 void ValaWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs)
732 if (a->getMultiplicity(Uml::RoleType::B).isEmpty() || a->getMultiplicity(Uml::RoleType::B) == "1") {
734 writeAttribute(roleDoc, a->visibility(Uml::RoleType::B), false, typeName, roleName, "", (a->visibility(Uml::RoleType::B) != Uml::Visibility::Private), cs);
739 writeAttribute(roleDoc, a->visibility(Uml::RoleType::B), false, "ArrayList", roleName, "", (a->visibility(Uml::RoleType::B) != Uml::Visibility::Private), cs);
793 cs << m_container_indent << m_indentation << m_indentation << m_indentation << "return m_" << cleanName(name) << ";" << m_endl;
798 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:421
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:476
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:98
Definition: basictypes.h:209
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:435
bool openFile(QFile &file, const QString &name)
Opens a file named "name" for writing in the outputDirectory.
Definition: codegenerator.cpp:586
static QString formatDoc(const QString &text, const QString &linePrefix=" *", int lineWidth=80)
Format documentation for output in source files.
Definition: codegenerator.cpp:772
QString findFileName(UMLPackage *concept, const QString &ext)
Determine the file name.
Definition: simplecodegenerator.cpp:89
Definition: basictypes.h:210
A simple code generator interface designed to work with the existing codewriters. ...
Definition: simplecodegenerator.h:28
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:482
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:872
virtual Uml::ProgrammingLanguage::Enum language() const
Returns "Vala".
Definition: valawriter.cpp:835
Definition: basictypes.h:58
This class contains the non-graphic representation of an association.
Definition: association.h:32
bool isLifeOperation()
Shortcut for (isConstructorOperation() || isDestructorOperation()).
Definition: operation.cpp:395
Definition: basictypes.h:260
bool isInterface() const
Returns true if this classifier represents an interface.
Definition: classifier.cpp:112
QListIterator< UMLAttribute * > UMLAttributeListIt
Definition: umlattributelist.h:20
void codeGenerated(UMLClassifier *concept, bool generated)
UMLAssociationList getCompositions()
Shorthand for getSpecificAssocs(Uml::at_Composition)
Definition: umlcanvasobject.cpp:431
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:803
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:682
virtual QStringList reservedKeywords() const
Get list of reserved keywords.
Definition: valawriter.cpp:844
Definition: basictypes.h:57
UMLClassifierList getSuperClasses()
Return a list of the superclasses of this concept.
Definition: umlcanvasobject.cpp:359
bool isStatic() const
Returns true if this UMLObject has classifier scope, otherwise false (the default).
Definition: umlobject.cpp:335
UMLAttributeList getAttributeList() const
Returns the attributes for the specified scope.
Definition: classifier.cpp:441
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:641
virtual void writeClass(UMLClassifier *c)
Call this method to generate Vala code for a UMLClassifier.
Definition: valawriter.cpp:183
bool hasAbstractOps()
Return true if this classifier has abstract operations.
Definition: classifier.cpp:930
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:960
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Returns the Visibility of the given role.
Definition: association.cpp:527
QString getRoleDoc(Uml::RoleType::Enum role) const
Returns the documentation assigned to the given role.
Definition: association.cpp:554
QString getRoleName(Uml::RoleType::Enum role) const
Returns the name assigned to the role A.
Definition: association.cpp:545
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:609
void showGeneratedFile(const QString &filename)
QListIterator< UMLAssociation * > UMLAssociationListIt
Definition: umlassociationlist.h:21
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:536
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Returns the fully qualified name, i.e.
Definition: umlobject.cpp:201
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:411
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Return the predefined root folder of the given type.
Definition: umldoc.cpp:2676
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.