umbrello/umbrello
dwriter.cpp
Go to the documentation of this file.
67 UMLAssociationList associations = c->getSpecificAssocs(Uml::AssociationType::Association); // BAD! only way to get "general" associations.
200 UMLAssociationList associations = c->getSpecificAssocs(Uml::AssociationType::Association); // BAD! only way to get "general" associations.
206 bool hasAssociations = aggregations.count() + associations.count() + compositions.count() + uniAssociations.count() > 0;
379 void DWriter::writeAttributeDecl(Uml::Visibility::Enum visibility, UMLAttributeList &atlist, QTextStream &d)
424 void DWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility::Enum visibility, QTextStream &d)
471 void DWriter::writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &d)
488 void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::ID::Type id, QTextStream &d)
502 // First: we insert documentaion for association IF it has either role AND some documentation (!)
510 writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::RoleType::B), a->getMultiplicity(Uml::RoleType::B), a->getRoleDoc(Uml::RoleType::B), a->visibility(Uml::RoleType::B), d);
517 writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::RoleType::A), a->getMultiplicity(Uml::RoleType::A), a->getRoleDoc(Uml::RoleType::A), a->visibility(Uml::RoleType::A), d);
561 void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, QTextStream &d)
595 void DWriter::writeAssociationRoleMethod (QString fieldClassName, QString roleName, QString multi,
612 void DWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QString fieldVarName,
663 QString fieldVarName, QString fieldName, QString description, Uml::Visibility::Enum /*visibility*/,
794 void DWriter::getSuperImplementedOperations(UMLClassifier *c, UMLOperationList &yetImplementedOpList, UMLOperationList &toBeImplementedOpList, bool noClassInPath)
799 getSuperImplementedOperations(concept, yetImplementedOpList, toBeImplementedOpList, (concept->isInterface() && noClassInPath));
815 void DWriter::getInterfacesOperationsToBeImplemented(UMLClassifier *c, UMLOperationList &opList)
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
Definition: classifier.h:47
UMLAssociationList getSpecificAssocs(Uml::AssociationType::Enum assocType)
Return the subset of m_List that matches the given type.
Definition: umlcanvasobject.cpp:61
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
virtual QString getTypeName() const
Overrides method from UMLClassifierListItem.
Definition: template.cpp:72
Definition: basictypes.h:210
Definition: basictypes.h:176
This sub-class adds copyInto and clone to the QPtrList base class.
Definition: umlattributelist.h:26
This class holds information used by template classes, called paramaterised class in UML and a generi...
Definition: template.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
Definition: basictypes.h:58
This class contains the non-graphic representation of an association.
Definition: association.h:32
Definition: basictypes.h:246
QString capitalizeFirstLetter(const QString &string)
Return the input string with the first letter capitalized.
Definition: codegen_utils.cpp:421
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)
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Returns the changeability.
Definition: association.cpp:518
UMLAssociationList getCompositions()
Shorthand for getSpecificAssocs(Uml::at_Composition)
Definition: umlcanvasobject.cpp:431
virtual UMLAssociationList getUniAssociationToBeImplemented()
Return the list of unidirectional association that should show up in the code.
Definition: classifier.cpp:1369
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 void writeClass(UMLClassifier *c)
Call this method to generate d code for a UMLClassifier.
Definition: dwriter.cpp:100
Definition: basictypes.h:177
Definition: basictypes.h:57
UMLClassifierList findSuperClassConcepts(ClassifierType type=ALL)
Returns a list of concepts which this concept inherits from.
Definition: classifier.cpp:616
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
Definition: classifier.h:47
QString package(const QString &separator=QString(), bool includeRoot=false)
Return the package(s) in which this UMLObject is contained as a text.
Definition: umlobject.cpp:603
QString getSourceCode() const
Returns the source code for this operation.
Definition: operation.cpp:440
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
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:488
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:536
virtual QString getTypeName() const
Returns the type name of the UMLClassifierListItem.
Definition: classifierlistitem.cpp:110
Definition: basictypes.h:59
Definition: umlobject.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 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:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.