umbrello/umbrello
tclwriter.cpp
Go to the documentation of this file.
281 writeAssociationDecl(c->getSpecificAssocs(Uml::AssociationType::Association), Uml::Visibility::Public, c->id(),
296 writeAssociationDecl(c->getSpecificAssocs(Uml::AssociationType::Association), Uml::Visibility::Protected,
311 writeAssociationDecl(c->getSpecificAssocs(Uml::AssociationType::Association), Uml::Visibility::Private,
319 writeInitAttributeHeader(c); // this is always private, used by constructors to initialize class
485 writeCode(mClassGlobal + QLatin1String("::destructor {} {") + m_endl + QLatin1Char('}') + m_endl);
494 void TclWriter::writeAttributeDecl(UMLClassifier * c, Uml::Visibility::Enum visibility, bool writeStatic)
522 writeDocu(m_endl + QLatin1String("@var ") + scope + QLatin1Char(' ') + type + QLatin1Char(' ') + typeName + QLatin1Char(' ') +
549 // First: we insert documentaion for association IF it has either role AND some documentation (!)
577 void TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName,
600 writeDocu(m_endl + QLatin1String("@var ") + scope + QLatin1String(" variable <") + fieldClassName +
610 writeDocu(m_endl + QLatin1String("@var") + scope + QLatin1String(" variable <") + fieldClassName +
736 code += QLatin1String(" {") + atName + QLatin1Char(' ') + at->getInitialValue() + QLatin1String("} ");
794 code += QLatin1String(" {") + atName + QLatin1Char(' ') + at->getInitialValue() + QLatin1String("} ");
822 writeCode(QLatin1String("configbody ") + name + QLatin1String(" {} {") + m_endl + QLatin1Char('}') + m_endl);
879 writeCode(QLatin1String("configbody ") + mClassGlobal + QLatin1String("::") + fieldVarName + QLatin1String(" {} {"));
881 writeCode(QLatin1String("if {![$") + fieldVarName + QLatin1String(" isa ") + fieldClassName + QLatin1String("]} {"));
892 writeCode(QLatin1String("configbody ") + mClassGlobal + QLatin1String("::") + fieldVarName + QLatin1String(" {} {"));
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()
Definition: umlobject.h:61
QString toString() const
Returns a String representation of this UMLAssociation.
Definition: association.cpp:111
This sub-class adds copyInto and clone to the QPtrList base class...
Definition: umlclassifierlistitemlist.h:26
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
UMLAssociationList getSpecificAssocs(Uml::AssociationType::Enum assocType)
Return the subset of m_List that matches the given type.
Definition: umlcanvasobject.cpp:61
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
UMLAttributeList getAttributeListStatic(Uml::Visibility::Enum scope) const
Returns the static attributes for the specified scope.
Definition: classifier.cpp:501
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Returns the entries in m_List that are of the requested type.
Definition: classifier.cpp:1027
bool openFile(QFile &file, const QString &name)
Opens a file named "name" for writing in the outputDirectory.
Definition: codegenerator.cpp:601
Definition: umlobject.h:56
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
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:216
QString fileName() const
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
Definition: basictypes.h:265
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
Definition: basictypes.h:58
This class contains the non-graphic representation of an association.
Definition: association.h:32
const char * name() const
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
typedef Iterator
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
iterator end()
QString toLower() const
bool contains(QChar ch, Qt::CaseSensitivity cs) const
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
UMLClassifierList getSuperClasses(bool withRealizations=true)
Return a list of the superclasses of this concept.
Definition: umlcanvasobject.cpp:360
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:601
virtual void writeClass(UMLClassifier *c)
Call this method to generate tcl code for a UMLClassifier.
Definition: tclwriter.cpp:104
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:968
Uml::Visibility::Enum visibility(Uml::RoleType::Enum role) const
Returns the Visibility of the given role.
Definition: association.cpp:550
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
int indexOf(const QRegExp &rx, int from) const
static QString cleanName(const QString &name)
Replaces spaces with underscores and capitalises as defined in m_modname.
Definition: codegenerator.cpp:627
virtual QStringList reservedKeywords() const
Get list of reserved keywords.
Definition: tclwriter.cpp:932
void showGeneratedFile(const QString &filename)
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:509
bool hasAbstractOps(UMLClassifier *c)
Check whether classifier has abstract operations.
Definition: simplecodegenerator.cpp:256
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:559
virtual QString getTypeName() const
Returns the type name of the UMLClassifierListItem.
Definition: classifierlistitem.cpp:110
iterator begin()
Definition: basictypes.h:59
QString indent()
Returns the current indent string based on m_indentLevel and m_indentation.
Definition: simplecodegenerator.cpp:74
bool hasAssociations()
Return true if this classifier has associations.
Definition: classifier.cpp:1307
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 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:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.