1 /* 2 SPDX-License-Identifier: GPL-2.0-or-later 3 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> 4 */ 5 6 #ifndef CLASSIFIERLISTITEM_H 7 #define CLASSIFIERLISTITEM_H 8 9 #include "umlobject.h" 10 11 // forward declaration 12 class UMLClassifier; 13 14 /** 15 * Classifiers (classes, interfaces) have lists of operations, 16 * attributes, templates and others. This is a base class for 17 * the items in this list. This abstraction should remove 18 * duplication of dialogs and allow for stereotypes in lists. 19 * 20 * @short A base class for classifier list items (e.g. attributes) 21 * @author Jonathan Riddell 22 * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org 23 */ 24 class UMLClassifierListItem : public UMLObject 25 { 26 Q_OBJECT 27 public: 28 29 UMLClassifierListItem(UMLObject *parent, 30 const QString& name, 31 Uml::ID::Type id = Uml::ID::None); 32 explicit UMLClassifierListItem(UMLObject *parent); 33 virtual ~UMLClassifierListItem(); 34 35 virtual void setType(UMLObject *type); 36 UMLClassifier * getType() const; 37 38 void setTypeName(const QString &type); 39 virtual QString getTypeName() const; 40 41 virtual QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, 42 bool withStereotype=false) const; 43 44 virtual void copyInto(UMLObject *lhs) const; 45 46 /** 47 * The abstract method UMLObject::clone() must be implemented 48 * by the classes inheriting from UMLClassifierListItem. 49 */ 50 virtual UMLObject* clone() const = 0; 51 52 }; 53 54 #endif 55