Commit 7a8d1cfb authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

Address remaining trivial const correctness fixes from attachment 141364.

Suggestions that require code change beyond function signature are postponed to a further batch.

CCBUG: 442134
parent 0372f89d
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
// own header
......@@ -177,7 +177,7 @@ void MultiPageDialogBase::reject()
m_pageDialog->reject();
}
KPageWidgetItem *MultiPageDialogBase::currentPage()
KPageWidgetItem *MultiPageDialogBase::currentPage() const
{
if (m_pageDialog)
return m_pageDialog->currentPage();
......@@ -229,7 +229,7 @@ int MultiPageDialogBase::exec()
*
* @return true data has been changed
*/
bool MultiPageDialogBase::isModified()
bool MultiPageDialogBase::isModified() const
{
return m_isModified;
}
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#ifndef MULTIPAGEDIALOGBASE_H
......@@ -68,13 +68,13 @@ public:
void setCaption(const QString &caption);
void accept();
void reject();
KPageWidgetItem *currentPage();
KPageWidgetItem *currentPage() const;
void addPage(KPageWidgetItem *page);
void setCurrentPage(KPageWidgetItem *page);
static int spacingHint();
int exec();
virtual bool isModified();
virtual bool isModified() const;
signals:
void okClicked();
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
// self includes
......@@ -186,7 +186,7 @@ void DotGenerator::setGeneratorName(const QString &name)
uDebug() << "found graphviz generator at " << generatorFullPath() << " with version " << m_version;
}
QString DotGenerator::generatorFullPath()
QString DotGenerator::generatorFullPath() const
{
return m_dotPath + QLatin1Char('/') + m_generator;
}
......@@ -196,7 +196,7 @@ QString DotGenerator::generatorFullPath()
*
* @return true if position are used
*/
bool DotGenerator::usePosition()
bool DotGenerator::usePosition() const
{
return m_usePosition;
}
......@@ -216,7 +216,7 @@ void DotGenerator::setUsePosition(bool state)
*
* @return true if position are used
*/
bool DotGenerator::useFullNodeLabels()
bool DotGenerator::useFullNodeLabels() const
{
return m_useFullNodeLabels;
}
......@@ -577,7 +577,7 @@ QString DotGenerator::fixID(const QString &_id)
* get generator version
* @return version for example 20130928
*/
int DotGenerator::generatorVersion()
int DotGenerator::generatorVersion() const
{
QProcess p;
QStringList args;
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#ifndef DOTGENERATOR_H
......@@ -21,10 +21,10 @@ class DotGenerator
public:
DotGenerator();
bool usePosition();
bool usePosition() const;
void setUsePosition(bool state);
bool useFullNodeLabels();
bool useFullNodeLabels() const;
void setUseFullNodeLabels(bool state);
static bool availableConfigFiles(UMLScene *scene, QHash<QString, QString> &configFiles);
......@@ -34,12 +34,12 @@ public:
static QString currentDotPath();
void setGeneratorName(const QString &name);
QString generatorFullPath();
QString generatorFullPath() const;
protected:
bool findItem(QStringList &params, const QString &search);
QString fixID(const QString &_id);
int generatorVersion();
int generatorVersion() const;
double m_scale; ///< scale factor
QString m_configFileName; ///< template filename
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#include "layoutgenerator.h"
......@@ -91,7 +91,7 @@ LayoutGenerator::LayoutGenerator()
*
* @return true if enabled
*/
bool LayoutGenerator::isEnabled()
bool LayoutGenerator::isEnabled() const
{
return !m_dotPath.isEmpty();
}
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2012-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2012-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#ifndef LAYOUTGENERATOR_H
......@@ -40,7 +40,7 @@ public:
LayoutGenerator();
bool isEnabled();
bool isEnabled() const;
bool generate(UMLScene *scene, const QString &variant = QString());
bool apply(UMLScene *scene);
static bool availableConfigFiles(UMLScene *scene, QHash<QString,QString> &configFiles);
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
// own header
......@@ -87,7 +87,7 @@ void ToolBarStateOther::mouseReleaseEmpty()
* Returns the object type of this tool.
* @return The object type of this tool.
*/
UMLObject::ObjectType ToolBarStateOther::getObjectType()
UMLObject::ObjectType ToolBarStateOther::getObjectType() const
{
UMLObject::ObjectType ot;
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#ifndef TOOLBARSTATEOTHER_H
......@@ -29,7 +29,7 @@ private:
virtual void mouseReleaseEmpty();
UMLObject::ObjectType getObjectType();
UMLObject::ObjectType getObjectType() const;
bool newWidget();
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
// own header
......@@ -2121,7 +2121,7 @@ bool UMLApp::isCutCopyState() const
*
* @return True if undo is enabled.
*/
bool UMLApp::isUndoEnabled()
bool UMLApp::isUndoEnabled() const
{
return m_undoEnabled;
......@@ -2217,7 +2217,7 @@ bool UMLApp::editCutCopy(bool bFromView)
* Not in @ref readOptions as it needs to be read earlier than some
* of the other options, before some items are created.
*/
void UMLApp::readOptionState()
void UMLApp::readOptionState() const
{
Settings::OptionState& optionState = Settings::optionState();
......@@ -2362,7 +2362,7 @@ CodeGenerator* UMLApp::generator() const
*
* @return true if SimpleCodeGenerator is active.
*/
bool UMLApp::isSimpleCodeGeneratorActive()
bool UMLApp::isSimpleCodeGeneratorActive() const
{
if (m_codegen && dynamic_cast<SimpleCodeGenerator*>(m_codegen)) {
return true;
......@@ -2537,7 +2537,7 @@ Uml::ProgrammingLanguage::Enum UMLApp::activeLanguage() const
/**
* Return true if the active language is case sensitive.
*/
bool UMLApp::activeLanguageIsCaseSensitive()
bool UMLApp::activeLanguageIsCaseSensitive() const
{
Uml::ProgrammingLanguage::Enum pl = activeLanguage();
return Uml::ProgrammingLanguage::isCaseSensitive(pl);
......@@ -2546,7 +2546,7 @@ bool UMLApp::activeLanguageIsCaseSensitive()
/**
* Return the target language depedent scope separator.
*/
QString UMLApp::activeLanguageScopeSeparator()
QString UMLApp::activeLanguageScopeSeparator() const
{
Uml::ProgrammingLanguage::Enum pl = activeLanguage();
return Uml::ProgrammingLanguage::scopeSeparator(pl);
......@@ -2915,7 +2915,7 @@ void UMLApp::slotCloseDiagram(QWidget* tab)
* If the activeLanguage is not found in the KConfig then use Uml::ProgrammingLanguage::Cpp
* as the default.
*/
Uml::ProgrammingLanguage::Enum UMLApp::defaultLanguage()
Uml::ProgrammingLanguage::Enum UMLApp::defaultLanguage() const
{
Settings::OptionState& optionState = Settings::optionState();
return optionState.generalState.defaultLanguage;
......@@ -3066,7 +3066,7 @@ void UMLApp::newDocument()
* Returns the widget used as the parent for UMLViews.
* @return The main view widget.
*/
QWidget* UMLApp::mainViewWidget()
QWidget* UMLApp::mainViewWidget() const
{
Settings::OptionState& optionState = Settings::optionState();
if (optionState.generalState.tabdiagrams) {
......@@ -3378,7 +3378,7 @@ KTabWidget* UMLApp::tabWidget()
*
* @return The text in the status bar.
*/
QString UMLApp::statusBarMsg()
QString UMLApp::statusBarMsg() const
{
return m_statusBarMessage->text();
}
......@@ -3502,7 +3502,7 @@ void UMLApp::endMacro()
/**
* Return the config data.
*/
KConfig* UMLApp::config()
KConfig* UMLApp::config() const
{
return m_config.data();
}
......
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
*/
#ifndef UML_H
......@@ -115,7 +115,7 @@ public:
DocWindow * docWindow() const;
QListWidget *logWindow() const;
QCursor defaultCursor();
QCursor defaultCursor() const;
void setModified(bool _m);
......@@ -124,7 +124,7 @@ public:
bool isPasteState() const;
bool isCutCopyState() const;
bool isUndoEnabled();
bool isUndoEnabled() const;
void enableUndo(bool enable);
bool isUndoActionEnabled() const;
......@@ -133,7 +133,7 @@ public:
bool isRedoActionEnabled() const;
void enableRedoAction(bool enable);
bool isSimpleCodeGeneratorActive();
bool isSimpleCodeGeneratorActive() const;
void setGenerator(CodeGenerator* gen, bool giveWarning = true);
CodeGenerator* setGenerator(Uml::ProgrammingLanguage::Enum pl);
......@@ -148,7 +148,7 @@ public:
void setDiagramMenuItemsState(bool bState);
QWidget* mainViewWidget();
QWidget* mainViewWidget() const;
void setCurrentView(UMLView* view, bool updateTreeView = true);
UMLView* currentView() const;
......@@ -164,7 +164,7 @@ public:
KTabWidget *tabWidget();
#endif
QString statusBarMsg();
QString statusBarMsg() const;
CodeGenerationPolicy *commonPolicy() const;
......@@ -183,13 +183,13 @@ public:
void setActiveLanguage(Uml::ProgrammingLanguage::Enum pl);
Uml::ProgrammingLanguage::Enum activeLanguage() const;
Uml::ProgrammingLanguage::Enum defaultLanguage();
Uml::ProgrammingLanguage::Enum defaultLanguage() const;
bool activeLanguageIsCaseSensitive();
bool activeLanguageIsCaseSensitive() const;
QString activeLanguageScopeSeparator();
QString activeLanguageScopeSeparator() const;
KConfig* config();
KConfig* config() const;
void importFiles(QStringList& fileList, const QString &rootPath = QString());
static bool shuttingDown();
......@@ -365,7 +365,7 @@ private:
static bool canDecode(const QMimeData* mimeSource);
void readOptionState();
void readOptionState() const;
void initClip();
void initSavedCodeGenerators();
......
......@@ -538,7 +538,8 @@ UMLOperationList UMLClassifier::findOperations(const QString &n) const
* @param considerAncestors flag whether the ancestors should be considered during search
* @return the found child object or NULL
*/
UMLObject* UMLClassifier::findChildObjectById(Uml::ID::Type id, bool considerAncestors /* =false */)
UMLObject* UMLClassifier::findChildObjectById(Uml::ID::Type id,
bool considerAncestors /* =false */) const
{
UMLObject *o = UMLCanvasObject::findChildObjectById(id);
if (o) {
......
......@@ -107,7 +107,8 @@ public:
UMLOperationList findOperations(const QString &n) const;
virtual UMLObject* findChildObjectById(Uml::ID::Type id, bool considerAncestors = false);
virtual UMLObject* findChildObjectById(Uml::ID::Type id,
bool considerAncestors = false) const;
UMLOperation* findOperation(const QString& name,
Model_Utils::NameAndType_List params) const;
......
......@@ -93,7 +93,7 @@ bool UMLCanvasObject::addAssociationEnd(UMLAssociation* assoc)
*
* @param assoc The association to check.
*/
bool UMLCanvasObject::hasAssociation(UMLAssociation* assoc)
bool UMLCanvasObject::hasAssociation(UMLAssociation* assoc) const
{
uint cnt = subordinates().count(assoc);
DEBUG(DBG_SRC) << "count is " << cnt;
......@@ -173,7 +173,7 @@ void UMLCanvasObject::removeAllChildObjects()
* @return Unique name string for the ObjectType given.
*/
QString UMLCanvasObject::uniqChildName(const UMLObject::ObjectType type,
const QString &prefix /* = QString() */)
const QString &prefix /* = QString() */) const
{
QString currentName;
currentName = prefix;
......@@ -230,7 +230,7 @@ QString UMLCanvasObject::uniqChildName(const UMLObject::ObjectType type,
* any object type will match.
* @return Pointer to the object found; NULL if none found.
*/
UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::ObjectType t)
UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::ObjectType t) const
{
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
foreach (UMLObject *obj, subordinates()) {
......@@ -253,7 +253,7 @@ UMLObject * UMLCanvasObject::findChildObject(const QString &n, UMLObject::Object
* @param considerAncestors boolean switch to consider ancestors while searching
* @return Pointer to the object found (NULL if not found.)
*/
UMLObject* UMLCanvasObject::findChildObjectById(Uml::ID::Type id, bool considerAncestors)
UMLObject* UMLCanvasObject::findChildObjectById(Uml::ID::Type id, bool considerAncestors) const
{
Q_UNUSED(considerAncestors);
foreach (UMLObject *o, subordinates()) {
......@@ -306,7 +306,7 @@ void UMLCanvasObject::copyInto(UMLObject *lhs) const
*
* @return The number of associations for the Concept.
*/
int UMLCanvasObject::associations()
int UMLCanvasObject::associations() const
{
int count = 0;
foreach (UMLObject *obj, subordinates()) {
......
......@@ -45,13 +45,13 @@ public:
bool addAssociationEnd(UMLAssociation* assoc);
bool hasAssociation(UMLAssociation* assoc);
bool hasAssociation(UMLAssociation* assoc) const;
int removeAssociationEnd(UMLAssociation *assoc);
void removeAllAssociationEnds();
int associations();
int associations() const;
UMLAssociationList getAssociations() const;
......@@ -67,12 +67,11 @@ public:
UMLAssociationList getRelationships() const;
virtual UMLObject *findChildObject(const QString &n,
UMLObject::ObjectType t = UMLObject::ot_UMLObject);
virtual UMLObject *findChildObjectById(Uml::ID::Type id, bool considerAncestors = false);
UMLObject::ObjectType t = UMLObject::ot_UMLObject) const;
virtual UMLObject *findChildObjectById(Uml::ID::Type id, bool considerAncestors = false) const;
virtual QString uniqChildName(const UMLObject::ObjectType type,
const QString &prefix = QString());
const QString &prefix = QString()) const;
virtual void removeAllChildObjects();
UMLObjectList &subordinates() const {
......
......@@ -543,7 +543,7 @@ void UMLObject::setStereotypeCmd(const QString& name)
*
* @return Returns the classes UMLStereotype object.
*/
UMLStereotype * UMLObject::umlStereotype()
UMLStereotype * UMLObject::umlStereotype() const
{
return m_pStereotype;
}
......@@ -578,7 +578,7 @@ QStringList & UMLObject::tags()
* Default: false.
* @return The UMLObject's enclosing package(s) as a text.
*/
QString UMLObject::package(const QString& separator, bool includeRoot)
QString UMLObject::package(const QString& separator, bool includeRoot) const
{
QString tempSeparator = separator;
if (tempSeparator.isEmpty())
......@@ -1379,34 +1379,34 @@ QDebug operator<<(QDebug out, const UMLObject& obj)
#include "usecase.h"
UMLActor* UMLObject::asUMLActor() { return dynamic_cast<UMLActor*>(this); }
UMLArtifact* UMLObject::asUMLArtifact() { return dynamic_cast<UMLArtifact*>(this); }
UMLAssociation* UMLObject::asUMLAssociation() { return dynamic_cast<UMLAssociation*>(this); }
UMLAttribute* UMLObject::asUMLAttribute() { return dynamic_cast<UMLAttribute*>(this); }
UMLCanvasObject* UMLObject::asUMLCanvasObject() { return dynamic_cast<UMLCanvasObject*>(this); }
UMLCategory* UMLObject::asUMLCategory() { return dynamic_cast<UMLCategory*>(this); }
UMLCheckConstraint* UMLObject::asUMLCheckConstraint() { return dynamic_cast<UMLCheckConstraint*>(this); }
UMLClassifier* UMLObject::asUMLClassifier() { return dynamic_cast<UMLClassifier*>(this); }
UMLClassifierListItem *UMLObject::asUMLClassifierListItem() { return dynamic_cast<UMLClassifierListItem*>(this); }
UMLComponent* UMLObject::asUMLComponent() { return dynamic_cast<UMLComponent*>(this); }
UMLDatatype *UMLObject::asUMLDatatype() { return dynamic_cast<UMLDatatype*>(this); }
UMLEntity* UMLObject::asUMLEntity() { return dynamic_cast<UMLEntity*>(this); }
UMLEntityAttribute* UMLObject::asUMLEntityAttribute() { return dynamic_cast<UMLEntityAttribute*>(this); }
UMLEntityConstraint* UMLObject::asUMLEntityConstraint() { return dynamic_cast<UMLEntityConstraint*>(this); }
UMLEnum* UMLObject::asUMLEnum() { return dynamic_cast<UMLEnum*>(this); }
UMLEnumLiteral* UMLObject::asUMLEnumLiteral() { return dynamic_cast<UMLEnumLiteral*>(this); }
UMLFolder* UMLObject::asUMLFolder() { return dynamic_cast<UMLFolder*>(this); }
UMLForeignKeyConstraint* UMLObject::asUMLForeignKeyConstraint() { return dynamic_cast<UMLForeignKeyConstraint*>(this); }
UMLInstance *UMLObject::asUMLInstance() { return dynamic_cast<UMLInstance*>(this); }
UMLInstanceAttribute *UMLObject::asUMLInstanceAttribute() { return dynamic_cast<UMLInstanceAttribute*>(this); }
UMLNode* UMLObject::asUMLNode() { return dynamic_cast<UMLNode*>(this); }
UMLObject* UMLObject::asUMLObject() { return dynamic_cast<UMLObject*>(this); }
UMLOperation* UMLObject::asUMLOperation() { return dynamic_cast<UMLOperation*>(this); }
UMLPackage* UMLObject::asUMLPackage() { return dynamic_cast<UMLPackage*>(this); }
UMLPort* UMLObject::asUMLPort() { return dynamic_cast<UMLPort*>(this); }
UMLRole* UMLObject::asUMLRole() { return dynamic_cast<UMLRole*>(this); }
UMLStereotype* UMLObject::asUMLStereotype() { return dynamic_cast<UMLStereotype*>(this); }
UMLTemplate* UMLObject::asUMLTemplate() { return dynamic_cast<UMLTemplate*>(this); }
UMLUniqueConstraint* UMLObject::asUMLUniqueConstraint() { return dynamic_cast<UMLUniqueConstraint*>(this); }
UMLUseCase* UMLObject::asUMLUseCase() { return dynamic_cast<UMLUseCase*>(this); }
UMLActor * UMLObject::asUMLActor() { return dynamic_cast<UMLActor*>(this); }
UMLArtifact * UMLObject::asUMLArtifact() { return dynamic_cast<UMLArtifact*>(this); }
UMLAssociation * UMLObject::asUMLAssociation() { return dynamic_cast<UMLAssociation*>(this); }
UMLAttribute * UMLObject::asUMLAttribute() { return dynamic_cast<UMLAttribute*>(this); }
UMLCanvasObject * UMLObject::asUMLCanvasObject() { return dynamic_cast<UMLCanvasObject*>(this); }
UMLCategory * UMLObject::asUMLCategory() { return dynamic_cast<UMLCategory*>(this); }
UMLCheckConstraint * UMLObject::asUMLCheckConstraint() { return dynamic_cast<UMLCheckConstraint*>(this); }
UMLClassifier * UMLObject::asUMLClassifier() { return dynamic_cast<UMLClassifier*>(this); }
UMLClassifierListItem * UMLObject::asUMLClassifierListItem() { return dynamic_cast<UMLClassifierListItem*>(this); }
UMLComponent * UMLObject::asUMLComponent() { return dynamic_cast<UMLComponent*>(this); }
UMLDatatype * UMLObject::asUMLDatatype() { return dynamic_cast<UMLDatatype*>(this); }
UMLEntity * UMLObject::asUMLEntity() { return dynamic_cast<UMLEntity*>(this); }
UMLEntityAttribute * UMLObject::asUMLEntityAttribute() { return dynamic_cast<UMLEntityAttribute*>(this); }
UMLEntityConstraint * UMLObject::asUMLEntityConstraint() { return dynamic_cast<UMLEntityConstraint*>(this); }
UMLEnum * UMLObject::asUMLEnum() { return dynamic_cast<UMLEnum*>(this); }
UMLEnumLiteral * UMLObject::asUMLEnumLiteral() { return dynamic_cast<UMLEnumLiteral*>(this); }
UMLFolder * UMLObject::asUMLFolder() { return dynamic_cast<UMLFolder*>(this); }
UMLForeignKeyConstraint * UMLObject::asUMLForeignKeyConstraint() { return dynamic_cast<UMLForeignKeyConstraint*>(this); }
UMLInstance * UMLObject::asUMLInstance() { return dynamic_cast<UMLInstance*>(this); }
UMLInstanceAttribute * UMLObject::asUMLInstanceAttribute() { return dynamic_cast<UMLInstanceAttribute*>(this); }
UMLNode * UMLObject::asUMLNode() { return dynamic_cast<UMLNode*>(this); }
UMLObject * UMLObject::asUMLObject() { return dynamic_cast<UMLObject*>(this); }
UMLOperation * UMLObject::asUMLOperation() { return dynamic_cast<UMLOperation*>(this); }
UMLPackage * UMLObject::asUMLPackage() { return dynamic_cast<UMLPackage*>(this); }
UMLPort * UMLObject::asUMLPort() { return dynamic_cast<UMLPort*>(this); }
UMLRole * UMLObject::asUMLRole() { return dynamic_cast<UMLRole*>(this); }
UMLStereotype * UMLObject::asUMLStereotype() { return dynamic_cast<UMLStereotype*>(this); }
UMLTemplate * UMLObject::asUMLTemplate() { return dynamic_cast<UMLTemplate*>(this); }
UMLUniqueConstraint * UMLObject::asUMLUniqueConstraint() { return dynamic_cast<UMLUniqueConstraint*>(this); }
UMLUseCase * UMLObject::asUMLUseCase() { return dynamic_cast<UMLUseCase*>(this); }
......@@ -143,12 +143,12 @@ public:
QString stereotype(bool includeAdornments = false) const;
void setUMLStereotype(UMLStereotype *stereo);
UMLStereotype *umlStereotype();
UMLStereotype *umlStereotype() const;
QStringList& tags();
QString package(const QString& separator = QString(),
bool includeRoot = false);
bool includeRoot = false) const;
UMLPackageList packages(bool includeRoot = false) const;
......@@ -222,37 +222,37 @@ public:
bool isUMLUniqueConstraint() const { return baseType() == ot_UniqueConstraint; }
bool isUMLUseCase() const { return baseType() == ot_UseCase; }
UMLActor* asUMLActor();
UMLArtifact* asUMLArtifact();
UMLAssociation* asUMLAssociation();
UMLAttribute* asUMLAttribute();
UMLCanvasObject* asUMLCanvasObject();
UMLCategory* asUMLCategory();
UMLCheckConstraint* asUMLCheckConstraint();
UMLClassifier* asUMLClassifier();
UMLClassifierListItem* asUMLClassifierListItem();
UMLClassifierSet* asUMLClassifierSet();
UMLComponent* asUMLComponent();
UMLDatatype* asUMLDatatype();
UMLEntity* asUMLEntity();
UMLEntityAttribute* asUMLEntityAttribute();
UMLEntityConstraint* asUMLEntityConstraint();
UMLEnum* asUMLEnum();
UMLEnumLiteral* asUMLEnumLiteral();
UMLFolder* asUMLFolder();
UMLForeignKeyConstraint* asUMLForeignKeyConstraint();
UMLInstance* asUMLInstance();
UMLInstanceAttribute* asUMLInstanceAttribute();
UMLNode* asUMLNode();
UMLObject* asUMLObject();
UMLOperation* asUMLOperation();
UMLPackage* asUMLPackage();
UMLPort* asUMLPort();
UMLRole* asUMLRole();
UMLStereotype* asUMLStereotype();
UMLTemplate* asUMLTemplate();
UMLUniqueConstraint* asUMLUniqueConstraint();
UMLUseCase* asUMLUseCase();
UMLActor * asUMLActor();
UMLArtifact * asUMLArtifact();
UMLAssociation * asUMLAssociation();
UMLAttribute * asUMLAttribute();
UMLCanvasObject * asUMLCanvasObject();
UMLCategory * asUMLCategory();
UMLCheckConstraint * asUMLCheckConstraint();
UMLClassifier * asUMLClassifier();
UMLClassifierListItem * asUMLClassifierListItem();
UMLClassifierSet * asUMLClassifierSet();
UMLComponent * asUMLComponent();
UMLDatatype * asUMLDatatype();
UMLEntity * asUMLEntity();
UMLEntityAttribute * asUMLEntityAttribute();
UMLEntityConstraint * asUMLEntityConstraint();
UMLEnum * asUMLEnum();
UMLEnumLiteral * asUMLEnumLiteral();
UMLFolder * asUMLFolder();
UMLForeignKeyConstraint * asUMLForeignKeyConstraint();
UMLInstance