id
int64
0
755k
file_name
stringlengths
3
109
file_path
stringlengths
13
185
content
stringlengths
31
9.38M
size
int64
31
9.38M
language
stringclasses
1 value
extension
stringclasses
11 values
total_lines
int64
1
340k
avg_line_length
float64
2.18
149k
max_line_length
int64
7
2.22M
alphanum_fraction
float64
0
1
repo_name
stringlengths
6
65
repo_stars
int64
100
47.3k
repo_forks
int64
0
12k
repo_open_issues
int64
0
3.4k
repo_license
stringclasses
9 values
repo_extraction_date
stringclasses
92 values
exact_duplicates_redpajama
bool
2 classes
near_duplicates_redpajama
bool
2 classes
exact_duplicates_githubcode
bool
2 classes
exact_duplicates_stackv2
bool
1 class
exact_duplicates_stackv1
bool
2 classes
near_duplicates_githubcode
bool
2 classes
near_duplicates_stackv1
bool
2 classes
near_duplicates_stackv2
bool
1 class
749,976
umlobjectprivate.h
KDE_umbrello/umbrello/umlmodel/umlobjectprivate.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2016 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLOBJECTPRIVATE_H #define UMLOBJECTPRIVATE_H class UMLObjectPrivate { public: UMLObjectPrivate() : isSaved(false) { } bool isSaved; }; #endif // UMLOBJECTPRIVATE_H
326
C++
.h
12
24.416667
87
0.76699
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,977
umlattributelist.h
KDE_umbrello/umbrello/umlmodel/umlattributelist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLATTRIBUTELIST_H #define UMLATTRIBUTELIST_H #include <QList> #include "attribute.h" //typedef QPtrList<UMLAttribute> UMLAttributeList; typedef QListIterator<UMLAttribute*> UMLAttributeListIt; /** * This sub-class adds copyInto and clone to the QPtrList<UMLAttribute> * base class. */ class UMLAttributeList : public QList<UMLAttribute*> { public: UMLAttributeList(); virtual ~UMLAttributeList(); virtual void copyInto(UMLAttributeList *rhs) const; virtual UMLAttributeList* clone() const; }; #endif
684
C++
.h
23
27.086957
92
0.786154
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,978
component.h
KDE_umbrello/umbrello/umlmodel/component.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef COMPONENT_H #define COMPONENT_H #include "package.h" /** * This class contains the non-graphical information required for a * UML Component. * This class inherits from @ref UMLPackage which contains most * of the information. * * @short Non-graphical information for a Component. * @author Jonathan Riddell * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLComponent : public UMLPackage { Q_OBJECT public: explicit UMLComponent(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLComponent(); virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); void setExecutable(bool executable); bool getExecutable() const; protected: bool load1(QDomElement & element); private: bool m_executable; ///< holds whether this is an executable component or not }; #endif
1,069
C++
.h
34
28.588235
94
0.750487
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,979
umloperationlist.h
KDE_umbrello/umbrello/umlmodel/umloperationlist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2007 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLOPERATIONLIST_H #define UMLOPERATIONLIST_H #include <qlist.h> // forward declaration class UMLOperation; typedef QList<UMLOperation*> UMLOperationList; typedef QListIterator<UMLOperation*> UMLOperationListIt; #endif
377
C++
.h
12
29.333333
92
0.822222
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,980
folder.h
KDE_umbrello/umbrello/umlmodel/folder.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2006-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLFOLDER_H #define UMLFOLDER_H #include "package.h" #include "umlviewlist.h" #include "optionstate.h" /** * This class manages the UMLObjects and UMLViews of a Folder. * This class inherits from UMLPackage which contains most * of the information. * * The UMLDoc class allocates a fixed instance of this class for * each of the predefined Logical, UseCase, Component, Deployment, and * Entity-Relationship folders. Further instances are created on demand * for user folders. * * @short Non-graphical management of objects and diagrams of a Folder * @author Oliver Kellogg * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org * * TODO: This whole class needs a relook regarding view/scene. */ class UMLFolder : public UMLPackage { Q_OBJECT public: explicit UMLFolder(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLFolder(); virtual UMLObject* clone() const; void setLocalName(const QString& localName); QString localName() const; void addView(UMLView *view); void removeView(UMLView *view); void appendViews(UMLViewList& viewList, bool includeNested = true); void activateViews(); UMLView* findView(Uml::ID::Type id); UMLView* findView(Uml::DiagramType::Enum type, const QString &name, bool searchAllScopes = true); void setViewOptions(const Settings::OptionState& optionState); void removeAllViews(); void setFolderFile(const QString& fileName); QString folderFile() const; bool showPropertiesDialog(QWidget *parent); void saveToXMI(QXmlStreamWriter& writer); friend QDebug operator<<(QDebug out, const UMLFolder& item); protected: void saveContents(QXmlStreamWriter& writer); void save1(QXmlStreamWriter& writer); bool loadDiagramsFromXMI1(QDomNode& node); bool loadFolderFile(const QString& path); bool load1(QDomElement & element); private: QString m_localName; ///< i18n name, only used for predefined root folders /** * If m_folderFile is not empty then it contains a file name to which * this folder is saved. * In this case the folder file acts as a physically separate submodel. * What is saved in the main model is not the folder contents but a * reference to the folder file. */ QString m_folderFile; UMLViewList m_diagrams; friend class UMLDoc; }; #endif
2,558
C++
.h
67
34.298507
101
0.743008
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,981
foreignkeyconstraint.h
KDE_umbrello/umbrello/umlmodel/foreignkeyconstraint.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef FOREIGNKEYCONSTRAINT_H #define FOREIGNKEYCONSTRAINT_H // appl includes #include "basictypes.h" #include "entityconstraint.h" // qt includes #include <QMap> //forward declarations class UMLEntityAttribute; class UMLEntity; /** * This class is used to set up information for a foreign key entity constraint. * @short Sets up Foreign Key entity constraint information. * @author Sharan Rao * @see UMLObject UMLClassifierListItem UMLEntityConstraint * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLForeignKeyConstraint : public UMLEntityConstraint { Q_OBJECT public: /** * Update/Delete Action: Action to be taken on Update or Delete of a referenced attribute * is either, No Action, Restrict, Cascade, Set nullptr, Set Default. */ enum UpdateDeleteAction { uda_NoAction = 0, uda_Restrict, uda_Cascade, uda_SetNull, uda_SetDefault }; UMLForeignKeyConstraint(UMLObject *parent, const QString& name, Uml::ID::Type id = Uml::ID::None); explicit UMLForeignKeyConstraint(UMLObject *parent); bool operator==(const UMLForeignKeyConstraint &rhs) const; virtual ~UMLForeignKeyConstraint(); virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false) const; void setReferencedEntity(UMLEntity* ent); UMLEntity* getReferencedEntity() const; void saveToXMI(QXmlStreamWriter& writer); virtual bool showPropertiesDialog(QWidget *parent = nullptr); bool addEntityAttributePair(UMLEntityAttribute* pAttr, UMLEntityAttribute* rAttr); bool removeEntityAttributePair(UMLEntityAttribute* /*key*/ pAttr); bool hasEntityAttributePair(UMLEntityAttribute* pAttr, UMLEntityAttribute* rAttr) const; QMap<UMLEntityAttribute*, UMLEntityAttribute*> getEntityAttributePairs(); void setDeleteAction(UpdateDeleteAction uda); UpdateDeleteAction getDeleteAction() const; void setUpdateAction(UpdateDeleteAction uda); UpdateDeleteAction getUpdateAction() const; void clearMappings(); bool resolveRef(); Q_SIGNALS: void sigReferencedEntityChanged(); private Q_SLOTS: void slotReferencedEntityChanged(); protected: bool load1(QDomElement & element); private: Uml::ID::Type m_pReferencedEntityID; ///< Used to resolve forward references to UMLEntity. /** * Used to resolve forward references to UMLEntityAttributes * Key -> The local attribute * Value -> Id of the attribute it is mapping to */ QMap<UMLEntityAttribute*, Uml::ID::Type> m_pEntityAttributeIDMap; void init(); UMLEntity* m_ReferencedEntity; ///< The UMLEntity that this foreign key references. /** * Stores the Mapping of attributes between parent table and referenced table */ QMap<UMLEntityAttribute*, UMLEntityAttribute*> m_AttributeMap; UpdateDeleteAction m_UpdateAction; ///< What to do on Update of referenced attributes. UpdateDeleteAction m_DeleteAction; ///< What to do on Deletion of referenced attributes. }; #endif
3,462
C++
.h
81
36.703704
95
0.727137
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,982
umltemplatelist.h
KDE_umbrello/umbrello/umlmodel/umltemplatelist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2007 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLTEMPLATELIST_H #define UMLTEMPLATELIST_H #include <qlist.h> // forward declaration class UMLTemplate; typedef QList<UMLTemplate*> UMLTemplateList; typedef QListIterator<UMLTemplate*> UMLTemplateListIt; #endif
371
C++
.h
12
28.75
92
0.818697
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,983
stereotype.h
KDE_umbrello/umbrello/umlmodel/stereotype.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef STEREOTYPE_H #define STEREOTYPE_H #include "umlobject.h" /** * This class is used to set up information for a stereotype. * Stereotypes are used essentially as properties of * attributes and operations etc. * * Each stereotype object is reference counted, i.e. client code * manages it such that it comes into existence as soon as there is * at least one user, and ceases existing when the number of users * drops to 0. * m_refCount reflects the number of users. It is externally managed, * i.e. client code must take care to call incrRefCount() and * decrRefCount() as appropriate. * * The one and only owner of all stereotypes is the UMLDoc, and the * ownership is specially managed (umlPackage() returns nullptr for a * UMLStereotype.) The reason for this special treatment is that * class UMLDoc does not inherit from class UMLPackage, and therefore * setUMLPackage() cannot be used for stereotypes. * * @short Sets up stereotype information. * @author Jonathan Riddell * @author Oliver Kellogg * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLStereotype : public UMLObject { Q_OBJECT public: explicit UMLStereotype(const QString &name, Uml::ID::Type id = Uml::ID::None); UMLStereotype(); virtual ~UMLStereotype(); bool operator==(const UMLStereotype &rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; void incrRefCount(); void decrRefCount(); int refCount() const; QString name(bool includeAdornments=false) const; class AttributeDef { public: QString name; Uml::PrimitiveTypes::Enum type; QString defaultVal; AttributeDef() : type(Uml::PrimitiveTypes::String) {} AttributeDef(QString nm, Uml::PrimitiveTypes::Enum t, QString dfltVal = QString()) : name(nm), type(t), defaultVal(dfltVal) {} virtual ~AttributeDef() {} }; typedef QVector<AttributeDef> AttributeDefs; ///< size is at most N_STEREOATTRS void clearAttributeDefs(); void setAttributeDefs(const AttributeDefs& adefs); const AttributeDefs& getAttributeDefs() const; AttributeDefs& getAttributeDefs(); void saveToXMI(QXmlStreamWriter& writer); bool load1(QDomElement& element); virtual bool showPropertiesDialog(QWidget* parent); protected: int m_refCount; AttributeDefs m_attrDefs; }; #endif
2,655
C++
.h
69
34.130435
92
0.715732
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,984
node.h
KDE_umbrello/umbrello/umlmodel/node.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef NODE_H #define NODE_H #include "umlcanvasobject.h" /** * This class contains the non-graphical information required for a UML Node. * This class inherits from @ref UMLCanvasObject which contains most of the * information. * * @short Non-graphical information for a Node. * @author Jonathan Riddell * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLNode : public UMLCanvasObject { Q_OBJECT public: explicit UMLNode(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLNode(); virtual void init(); virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); protected: bool load1(QDomElement & element); }; #endif
912
C++
.h
30
27.533333
92
0.745121
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,985
umlassociationlist.h
KDE_umbrello/umbrello/umlmodel/umlassociationlist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2007 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLASSOCIATIONLIST_H #define UMLASSOCIATIONLIST_H #include <qlist.h> // forward declaration class UMLAssociation; typedef QList<UMLAssociation*> UMLAssociationList; typedef QListIterator<UMLAssociation*> UMLAssociationListIt; #endif
391
C++
.h
12
30.5
92
0.828877
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,986
uniqueconstraint.h
KDE_umbrello/umbrello/umlmodel/uniqueconstraint.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UNIQUECONSTRAINT_H #define UNIQUECONSTRAINT_H #include "basictypes.h" #include "classifierlistitem.h" #include "entityconstraint.h" #include "umlclassifierlist.h" #include "umlentityattributelist.h" /** * This class is used to set up information for a unique entity constraint. * * @short Sets up Unique entity constraint information. * @author Sharan Rao * @see UMLObject UMLClassifierListItem UMLEntityConstraint * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLUniqueConstraint : public UMLEntityConstraint { public: UMLUniqueConstraint(UMLObject *parent, const QString& name, Uml::ID::Type id = Uml::ID::None); explicit UMLUniqueConstraint(UMLObject *parent); virtual ~UMLUniqueConstraint(); bool operator==(const UMLUniqueConstraint &rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false) const; QString getFullyQualifiedName(const QString& separator = QString(), bool includeRoot = false) const; void saveToXMI(QXmlStreamWriter& writer); virtual bool showPropertiesDialog(QWidget *parent = nullptr); bool hasEntityAttribute(UMLEntityAttribute* attr) const; bool addEntityAttribute(UMLEntityAttribute* attr); bool removeEntityAttribute(UMLEntityAttribute* attr); UMLEntityAttributeList getEntityAttributeList() const; void clearAttributeList(); protected: bool load1(QDomElement & element); private: void init(); /** * The list of entity attributes that together make up the unique constraint. */ UMLEntityAttributeList m_EntityAttributeList; }; #endif
1,977
C++
.h
50
34.48
92
0.747374
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,987
artifact.h
KDE_umbrello/umbrello/umlmodel/artifact.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ARTIFACT_H #define ARTIFACT_H #include "package.h" /** * This class contains the non-graphical information required for a UML * Artifact. * This class inherits from @ref UMLCanvasObject which contains most of the * information. * * @short Non-graphical information for a Artifact. * @author Jonathan Riddell * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLArtifact : public UMLPackage { Q_OBJECT public: /** * Artifacts can be drawn using one of several icons. */ enum Draw_Type { defaultDraw, file, library, table }; explicit UMLArtifact(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLArtifact(); virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); void setDrawAsType(Draw_Type type); Draw_Type getDrawAsType() const; QString fullPath() const; protected: bool load1(QDomElement & element); private: /** * Artifacts can be drawn as one of several different icons, * this value choosing how to draw them. */ Draw_Type m_drawAsType; }; #endif
1,347
C++
.h
48
24.020833
93
0.706386
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,988
enum.h
KDE_umbrello/umbrello/umlmodel/enum.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ENUM_H #define ENUM_H #include "classifier.h" class UMLEnumLiteral; /** * This class contains the non-graphical information required for a UML * Enum. * This class inherits from @ref UMLClassifier which contains most of the * information. * * @short Non-graphical Information for an Enum. * @author Jonathan Riddell * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLEnum : public UMLClassifier { Q_OBJECT public: explicit UMLEnum(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLEnum(); bool operator==(const UMLEnum& rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; UMLObject* createEnumLiteral(const QString& name = QString()); UMLObject* addEnumLiteral(const QString &name, Uml::ID::Type id = Uml::ID::None, const QString& value = QString()); bool addEnumLiteral(UMLEnumLiteral *literal, IDChangeLog *Log = nullptr); bool addEnumLiteral(UMLEnumLiteral* literal, int position); int removeEnumLiteral(UMLEnumLiteral* literal); int enumLiterals() const; void signalEnumLiteralRemoved(UMLClassifierListItem *elit); virtual void saveToXMI(QXmlStreamWriter& writer); virtual UMLClassifierListItem* makeChildObject(const QString& xmiTag); Q_SIGNALS: void enumLiteralAdded(UMLClassifierListItem*); void enumLiteralRemoved(UMLClassifierListItem*); protected: bool load1(QDomElement & element); private: void init(); }; #endif // ENUM_H
1,755
C++
.h
47
32.617021
92
0.73013
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,989
umlobject.h
KDE_umbrello/umbrello/umlmodel/umlobject.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLOBJECT_H #define UMLOBJECT_H #include "basictypes.h" #include "icon_utils.h" #include "umlpackagelist.h" //qt includes #include <QDomDocument> #include <QDomElement> #include <QObject> #include <QPointer> #include <QString> #include <QXmlStreamWriter> class UMLActor; class UMLArtifact; class UMLAssociation; class UMLAttribute; class UMLCanvasObject; class UMLCategory; class UMLCheckConstraint; class UMLClassifier; class UMLClassifierListItem; class UMLClassifierSet; class UMLComponent; class UMLDatatype; class UMLEntity; class UMLEntityAttribute; class UMLEntityConstraint; class UMLEnum; class UMLEnumLiteral; class UMLFolder; class UMLForeignKeyConstraint; class UMLInstance; class UMLInstanceAttribute; class UMLNode; class UMLOperation; class UMLPackage; class UMLPort; class UMLRole; class UMLStereotype; class UMLTemplate; class UMLUniqueConstraint; class UMLUseCase; class UMLObjectPrivate; /** * This class is the non-graphical version of @ref UMLWidget. These are * created and maintained in the class @ref UMLDoc. This class holds all * the generic information needed for all UML objects. * * @ref clone needs to be implemented by each child class. * * @ref saveToXMI saves the XMI attributes of each specific model class. * It needs to be implemented by each child class. * For creating the XMI element and saving the common XMI parts, * it can use the save1() method. * * @short The base class for UML objects. * @author Paul Hensgen <phensgen@techie.com> * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLObject : public QObject { Q_OBJECT Q_ENUMS(ObjectType) public: enum ObjectType { ot_Unknown = -1, ot_UMLObject = 100, ot_Actor, ot_UseCase, ot_Package, ot_Interface, ot_Datatype, ot_Enum, ot_Class, ot_Instance, ot_Association, ot_Attribute, ot_Operation, ot_EnumLiteral, ot_Template, ot_Component, ot_Artifact, ot_Node, ot_Stereotype, ot_Role, ot_Entity, ot_EntityAttribute, ot_Folder, ot_EntityConstraint, ot_UniqueConstraint, ot_ForeignKeyConstraint, ot_CheckConstraint, ot_Category, ot_Port, ot_InstanceAttribute, ot_SubSystem ///< no real object type }; static QString toString(ObjectType ot); static QString toI18nString(ObjectType t); static Icon_Utils::IconType toIcon(ObjectType t); explicit UMLObject(const UMLObject& other); explicit UMLObject(UMLObject* parent, const QString& name, Uml::ID::Type id = Uml::ID::None); explicit UMLObject(UMLObject* parent); explicit UMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLObject(); bool operator==(const UMLObject & rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; virtual void setBaseType(ObjectType ot); ObjectType baseType() const; QLatin1String baseTypeStr() const; virtual void setID(Uml::ID::Type NewID); virtual Uml::ID::Type id() const; QString doc() const; bool hasDoc() const; void setDoc(const QString &d); void setVisibility(Uml::Visibility::Enum visibility); void setVisibilityCmd(Uml::Visibility::Enum visibility); Uml::Visibility::Enum visibility() const; void setStereotype(const QString &_name); void setStereotypeCmd(const QString &_name); QString stereotype(bool includeAdornments = false) const; void setUMLStereotype(UMLStereotype *stereo); UMLStereotype *umlStereotype() const; QStringList& tags(); QString package(const QString& separator = QString(), bool includeRoot = false) const; UMLPackageList packages(bool includeRoot = false) const; bool setUMLPackage(UMLPackage* pPkg); UMLPackage* umlPackage() const; void setUMLParent(UMLObject* parent); UMLObject* umlParent() const; virtual void setName(const QString &strName); virtual void setNameCmd(const QString &strName) ; QString name() const; virtual QString fullyQualifiedName(const QString& separator = QString(), bool includeRoot = false) const; void setAbstract(bool bAbstract); bool isAbstract() const; virtual bool showPropertiesDialog(QWidget *parent = nullptr); virtual bool resolveRef(); virtual void saveToXMI(QXmlStreamWriter& writer); virtual bool loadFromXMI(QDomElement & element); bool loadStereotype(QDomElement & element); void setStatic(bool bStatic); bool isStatic() const; virtual bool acceptAssociationType(Uml::AssociationType::Enum) const; //:TODO: check if this is really needed here void setSecondaryId(const QString& id); QString secondaryId() const; void setSecondaryFallback(const QString& id); QString secondaryFallback() const; void save1(QXmlStreamWriter& writer, const QString& type, const QString& tag = QString()); friend QDebug operator<< (QDebug out, const UMLObject& obj); bool isUMLActor() const { return baseType() == ot_Actor; } bool isUMLArtifact() const { return baseType() == ot_Artifact; } bool isUMLAssociation() const { return baseType() == ot_Association; } bool isUMLAttribute() const { return baseType() == ot_Attribute; } //bool isUMLCanvasObject() const { return baseType() == ot_CanvasObject; } bool isUMLCategory() const { return baseType() == ot_Category; } bool isUMLCheckConstraint() const { return baseType() == ot_CheckConstraint; } bool isUMLClassifier() const { return baseType() == ot_Class; } bool isUMLComponent() const { return baseType() == ot_Component; } bool isUMLDatatype() const { return baseType() == ot_Datatype; } bool isUMLEntity() const { return baseType() == ot_Entity; } bool isUMLEntityAttribute() const { return baseType() == ot_EntityAttribute; } bool isUMLEntityConstraint() const { return baseType() == ot_EntityConstraint; } bool isUMLEnum() const { return baseType() == ot_Enum; } bool isUMLEnumLiteral() const { return baseType() == ot_EnumLiteral; } bool isUMLFolder() const { return baseType() == ot_Folder; } bool isUMLForeignKeyConstraint() const { return baseType() == ot_ForeignKeyConstraint; } bool isUMLInstance() const { return baseType() == ot_Instance; } bool isUMLInstanceAttribute() const { return baseType() == ot_InstanceAttribute; } bool isUMLNode() const { return baseType() == ot_Node; } bool isUMLObject() const { return baseType() == ot_UMLObject; } bool isUMLOperation() const { return baseType() == ot_Operation; } bool isUMLPackage() const { return baseType() == ot_Package; } bool isUMLPort() const { return baseType() == ot_Port; } bool isUMLRole() const { return baseType() == ot_Role; } bool isUMLStereotype() const { return baseType() == ot_Stereotype; } bool isUMLTemplate() const { return baseType() == ot_Template; } 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(); const UMLActor * asUMLActor() const; const UMLArtifact * asUMLArtifact() const; const UMLAssociation * asUMLAssociation() const; const UMLAttribute * asUMLAttribute() const; const UMLCanvasObject * asUMLCanvasObject() const; const UMLCategory * asUMLCategory() const; const UMLCheckConstraint * asUMLCheckConstraint() const; const UMLClassifier * asUMLClassifier() const; const UMLClassifierListItem * asUMLClassifierListItem() const; const UMLClassifierSet * asUMLClassifierSet() const; const UMLComponent * asUMLComponent() const; const UMLDatatype * asUMLDatatype() const; const UMLEntity * asUMLEntity() const; const UMLEntityAttribute * asUMLEntityAttribute() const; const UMLEntityConstraint * asUMLEntityConstraint() const; const UMLEnum * asUMLEnum() const; const UMLEnumLiteral * asUMLEnumLiteral() const; const UMLFolder * asUMLFolder() const; const UMLForeignKeyConstraint * asUMLForeignKeyConstraint() const; const UMLInstance * asUMLInstance() const; const UMLInstanceAttribute * asUMLInstanceAttribute() const; const UMLNode * asUMLNode() const; const UMLObject * asUMLObject() const; const UMLOperation * asUMLOperation() const; const UMLPackage * asUMLPackage() const; const UMLPort * asUMLPort() const; const UMLRole * asUMLRole() const; const UMLStereotype * asUMLStereotype() const; const UMLTemplate * asUMLTemplate() const; const UMLUniqueConstraint * asUMLUniqueConstraint() const; const UMLUseCase * asUMLUseCase() const; public Q_SLOTS: void emitModified(); Q_SIGNALS: void modified(); protected: void init(); void maybeSignalObjectCreated(); void save1end(QXmlStreamWriter& writer); virtual bool load1(QDomElement& element); Uml::ID::Type m_nId; ///< object's id QString m_Doc; ///< object's documentation QPointer<UMLStereotype> m_pStereotype; ///< stereotype of the object if applicable QString m_name; ///< objects name ObjectType m_BaseType; ///< objects type Uml::Visibility::Enum m_visibility; ///< objects visibility bool m_bAbstract; ///< state of whether the object is abstract or not bool m_bStatic; ///< flag for instance scope bool m_bCreationWasSignalled; ///< auxiliary to maybeSignalObjectCreated() QPointer<UMLObject> m_pSecondary; ///< pointer to an associated object ///< Only a few of the classes inheriting from UMLObject use this. ///< However, it needs to be here because of inheritance graph ///< disjunctness. QString m_SecondaryId; ///< xmi.id of the secondary object for intermediate use during ///< loading. The secondary ID is resolved to the m_pSecondary ///< in the course of resolveRef() at the end of loading. QString m_SecondaryFallback; ///< Last-chance backup for when m_SecondaryId is not found. ///< Used by Rose import: MDL files specify both a "quidu" ///< (which corresponds to m_SecondaryId) and the human readable ///< fully qualified target name of a reference. ///< In case the quidu is not found, the human readable name is ///< used which we store in m_SecondaryFallback. QStringList m_TaggedValues; ///< Concrete values of UMLStereotype::AttributeDefs if a ///< stereotype is applied and has attributes. ///< The order of elements is the same as in ///< UMLStereotype::AttributeDefs. ///< At most N_STEREOATTRS are used (see dialogs/n_stereoattrs.h) UMLObjectPrivate *m_d; ///< private data friend class ObjectsModel; }; #endif
14,249
C++
.h
289
42.553633
119
0.614561
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,990
package.h
KDE_umbrello/umbrello/umlmodel/package.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PACKAGE_H #define PACKAGE_H #include "umlcanvasobject.h" #include "umlclassifierlist.h" #include "umlentitylist.h" // forward declarations class UMLAssociation; /** * This class contains the non-graphical information required for a UML * Package. * This class inherits from @ref UMLCanvasObject which contains most of the * information. * * @short Non-graphical information for a Package. * @author Jonathan Riddell * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLPackage : public UMLCanvasObject { Q_OBJECT public: explicit UMLPackage(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLPackage(); virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; bool addObject(UMLObject *pObject, bool interactOnConflict = true); virtual void removeObject(UMLObject *pObject); virtual void removeAllObjects(); UMLObjectList containedObjects(bool includeInactive = false) const; void addAssocToConcepts(UMLAssociation* assoc); void removeAssocFromConcepts(UMLAssociation *assoc); UMLObject * findObject(const QString &name) const; UMLObject * findObjectById(Uml::ID::Type id) const; void appendPackages(UMLPackageList& packages, bool includeNested = true) const; void appendClassifiers(UMLClassifierList& classifiers, bool includeNested = true) const; void appendClassesAndInterfaces(UMLClassifierList& classifiers, bool includeNested = true) const; void appendEntities(UMLEntityList& entities, bool includeNested = true) const; virtual bool resolveRef(); virtual void saveToXMI(QXmlStreamWriter& writer); protected: virtual bool load1(QDomElement& element); /** * References to the objects contained in this package. * The UMLPackage is the owner of the objects. * The objects stored here are "standalone" objects which have an existence * on their own (such as classifiers, packages). * On the other hand, the objects stored in UMLCanvasObject::m_List are * "subordinate" objects which cannot exist on their own (such as attributes, * operations). They are always slaved to a "standalone" object. * * This design may be revisited - m_objects could be merged into * UMLCanvasObject::m_List. */ UMLObjectList m_objects; }; #endif
2,643
C++
.h
64
36.125
92
0.730964
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,991
port.h
KDE_umbrello/umbrello/umlmodel/port.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2014-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PORT_H #define PORT_H #include "umlcanvasobject.h" /** * This class contains the non-graphical information required for a UML Port. * This class inherits from @ref UMLCanvasObject which contains most of the * information. * * @short Non-graphical information for a Port. * @author Oliver Kellogg * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLPort : public UMLCanvasObject { Q_OBJECT public: explicit UMLPort(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLPort(); virtual void init(); virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); protected: bool load1(QDomElement & element); }; #endif
910
C++
.h
30
27.466667
92
0.744534
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,992
category.h
KDE_umbrello/umbrello/umlmodel/category.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CATEGORY_H #define CATEGORY_H #include "umlcanvasobject.h" /** * This class contains the non-graphical information required for a UML Category. * This class inherits from @ref UMLCanvasObject which contains most of the * information. * The @ref UMLDoc class creates instances of this type. * * @short Information for a non-graphical UML Category. * @author Sharan Rao * @see UMLCanvasObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLCategory : public UMLCanvasObject { Q_OBJECT public: enum Category_Type { ct_Disjoint_Specialisation, ct_Overlapping_Specialisation, ct_Union }; explicit UMLCategory(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); ~UMLCategory(); virtual void init(); void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); UMLCategory::Category_Type getType(); void setType(Category_Type type); protected: bool load1(QDomElement & element); private: Category_Type m_CategoryType; }; #endif
1,280
C++
.h
40
28.25
93
0.736928
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,993
classifierlistitem.h
KDE_umbrello/umbrello/umlmodel/classifierlistitem.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CLASSIFIERLISTITEM_H #define CLASSIFIERLISTITEM_H #include "umlobject.h" // forward declaration class UMLClassifier; /** * Classifiers (classes, interfaces) have lists of operations, * attributes, templates and others. This is a base class for * the items in this list. This abstraction should remove * duplication of dialogs and allow for stereotypes in lists. * * @short A base class for classifier list items (e.g. attributes) * @author Jonathan Riddell * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLClassifierListItem : public UMLObject { Q_OBJECT public: UMLClassifierListItem(UMLObject *parent, const QString& name, Uml::ID::Type id = Uml::ID::None); explicit UMLClassifierListItem(UMLObject *parent); virtual ~UMLClassifierListItem(); virtual void setType(UMLObject *type); UMLClassifier * getType() const; void setTypeName(const QString &type); virtual QString getTypeName() const; virtual QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false) const; virtual void copyInto(UMLObject *lhs) const; /** * The abstract method UMLObject::clone() must be implemented * by the classes inheriting from UMLClassifierListItem. */ virtual UMLObject* clone() const = 0; }; #endif
1,580
C++
.h
42
32.5
92
0.717562
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,994
umlstereotypelist.h
KDE_umbrello/umbrello/umlmodel/umlstereotypelist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2012 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLSTEREOTYPELIST_H #define UMLSTEREOTYPELIST_H #include <QList> // forward declaration class UMLStereotype; typedef QList<UMLStereotype*> UMLStereotypeList; typedef QListIterator<UMLStereotype*> UMLStereotypeListIt; #endif
382
C++
.h
12
29.75
92
0.827397
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,995
umlclassifierlistitemlist.h
KDE_umbrello/umbrello/umlmodel/umlclassifierlistitemlist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLCLASSIFIERLISTITEMLIST_H #define UMLCLASSIFIERLISTITEMLIST_H #include <QList> // forward declaration class UMLClassifierListItem; //typedef QPtrList<UMLClassifierListItem> UMLClassifierListItemList; typedef QListIterator<UMLClassifierListItem*> UMLClassifierListItemListIt; /** * This sub-class adds copyInto and clone to the QPtrList<UMLClassifierListItem> * base class. */ class UMLClassifierListItemList : public QList<UMLClassifierListItem*> { public: UMLClassifierListItemList(); virtual ~UMLClassifierListItemList(); virtual void copyInto (UMLClassifierListItemList *rhs) const; virtual UMLClassifierListItemList* clone() const; }; #endif
831
C++
.h
24
32.041667
92
0.822864
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,996
instance.h
KDE_umbrello/umbrello/umlmodel/instance.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2016-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLINSTANCE_H #define UMLINSTANCE_H #include "umlcanvasobject.h" #include "instanceattribute.h" class UMLClassifier; class UMLClassifierListItem; /** * This class contains the non-graphical information required for a UML * Instance. An Instance may be either standalone not tied to any other * object, or it may be the instance of a classifier. * If it represents a classifier then it will contain concrete values for * the attributes of the classifier (see UMLCanvasObject::m_List). * Conversely, in Umbrello a standalone instance cannot have attributes. * UMLObject::m_pSecondary is used for storing the reference to the * classifier. In case of a standalone instance, m_pSecondary is nullptr. * UMLObject::m_name is used for storing the instance name. * The notation for an instance is * instanceName : classifierName * where the entire text is underlined. * Both instanceName and classifierName are optional. * The notation for a standalone instance not representing a classifier is * instanceName : * The notation for an anonymous instance of a classifier is * : classifierName * This class inherits from @ref UMLCanvasObject which contains most of the * information. * * @short Non-graphical Information for an Instance. * @author Lays Rodrigues * @author Ralf Habacker * @author Oliver Kellogg * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLInstance : public UMLCanvasObject { Q_OBJECT public: explicit UMLInstance(const QString& instanceName = QString(), Uml::ID::Type id = Uml::ID::None, UMLClassifier *classifier = nullptr); void setClassifier(UMLClassifier *classifier); void setClassifierCmd(UMLClassifier *classifier, bool emitSignal = true); UMLClassifier *classifier() const; virtual void saveToXMI(QXmlStreamWriter& writer); protected: bool load1(QDomElement& element); virtual bool resolveRef(); bool showPropertiesDialog(QWidget *parent); public Q_SLOTS: void attributeAdded(UMLClassifierListItem*); void attributeRemoved(UMLClassifierListItem*); }; #endif // UMLINSTANCE_H
2,316
C++
.h
57
37.22807
92
0.764
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,997
instanceattribute.h
KDE_umbrello/umbrello/umlmodel/instanceattribute.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2016-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLINSTANCEATTRIBUTE_H #define UMLINSTANCEATTRIBUTE_H #include "umlobject.h" class UMLInstance; class UMLAttribute; /** * This class is used to set up information for an instanceattribute. * It has a pointer to the attribute which it represents and a value. * Member UMLObject::m_pSecondary is used for storing the pointer to the * UMLAttribute. * Member m_value is used for storing the value. * If the value is empty but the associated UMLAttribute has a non empty * initial value then the attribute initial value is copied to m_value. * A UMLInstanceAttribute is strictly slaved to its corresponding * UMLClassifier attribute. This means that a UMLInstanceAttribute is * not created or removed by the user; instead, it is created or removed * automatically when the UMLClassifier attribute is created or removed. * * @short Sets up instanceattribute information * @author Lays Rodrigues * @author Ralf Habacker * @author Oliver Kellogg * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLInstanceAttribute : public UMLObject { Q_OBJECT public: UMLInstanceAttribute(UMLInstance *parent, UMLAttribute *umlAttr, const QString& value = QString()); void setAttribute(UMLAttribute *umlAttr); UMLAttribute *getAttribute() const; void setValue(const QString& value); QString getValue() const; QString toString() const; virtual void saveToXMI(QXmlStreamWriter& writer); virtual bool showPropertiesDialog(QWidget *parent = nullptr); protected: virtual bool load1(QDomElement &element); private: void init(); QString m_value; }; #endif // UMLINSTANCEATTRIBUTE_H
1,840
C++
.h
48
35.020833
92
0.769101
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,998
entity.h
KDE_umbrello/umbrello/umlmodel/entity.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ENTITY_H #define ENTITY_H #include "classifier.h" // forward declarations class UMLEntityAttribute; class UMLEntityConstraint; class UMLUniqueConstraint; class UMLForeignKeyConstraint; class UMLCheckConstraint; class UMLEntityAttributeList; /** * This class contains the non-graphical information required for a UML * Entity. * This class inherits from @ref UMLClassifier which contains most of the * information. * * @short Non-graphical Information for an Entity. * @author Jonathan Riddell * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLEntity : public UMLClassifier { Q_OBJECT public: explicit UMLEntity(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None); virtual ~UMLEntity(); bool operator==(const UMLEntity& rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; virtual UMLAttribute* createAttribute(const QString &name = QString(), UMLObject *type = nullptr, Uml::Visibility::Enum vis = Uml::Visibility::Private, const QString &init = QString()); UMLUniqueConstraint* createUniqueConstraint(const QString &name = QString()); UMLForeignKeyConstraint* createForeignKeyConstraint(const QString &name = QString()); UMLCheckConstraint* createCheckConstraint(const QString &name = QString()); UMLObject* addEntityAttribute(const QString &name, Uml::ID::Type id = Uml::ID::None); bool addEntityAttribute(UMLEntityAttribute *att, IDChangeLog *log = nullptr); bool addEntityAttribute(UMLEntityAttribute* att, int position); int removeEntityAttribute(UMLClassifierListItem* att); void signalEntityAttributeRemoved(UMLClassifierListItem *eattr); int entityAttributes() const; bool setAsPrimaryKey(UMLUniqueConstraint* uconstr); void unsetPrimaryKey(); bool hasPrimaryKey() const; bool isPrimaryKey(const UMLUniqueConstraint* uConstr) const; bool addConstraint(UMLEntityConstraint* constr); bool removeConstraint(UMLEntityConstraint* constr); virtual bool resolveRef(); virtual void saveToXMI(QXmlStreamWriter& writer); UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const; UMLEntityAttributeList getEntityAttributes() const; virtual UMLClassifierListItem* makeChildObject(const QString& xmiTag); private Q_SLOTS: void slotEntityAttributeRemoved(UMLClassifierListItem*); Q_SIGNALS: void entityAttributeAdded(UMLClassifierListItem*); void entityAttributeRemoved(UMLClassifierListItem*); void entityConstraintAdded(UMLClassifierListItem*); void entityConstraintRemoved(UMLClassifierListItem*); protected: bool load1(QDomElement& element); private: /** * Primary Key of this Entity * This is a pointer kept for easy access to the primary key, and to distinguish it * from all other UniqueConstraints. It is also there in subordinates (inherited from * UMLCanvasObject) */ UMLUniqueConstraint* m_PrimaryKey; }; #endif // ENTITY_H
3,255
C++
.h
75
38.693333
115
0.763642
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
749,999
usecase.h
KDE_umbrello/umbrello/umlmodel/usecase.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef USECASE_H #define USECASE_H #include "umlcanvasobject.h" /** * This class contains the non-graphical information required for a UML UseCase. * This class inherits from @ref UMLCanvasObject which contains most of the information. * * @short Information for a non-graphical UML UseCase. * @author Paul Hensgen <phensgen@techie.com> * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLUseCase : public UMLCanvasObject { public: explicit UMLUseCase(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); ~UMLUseCase(); virtual void init(); virtual UMLObject* clone() const; void saveToXMI(QXmlStreamWriter& writer); protected: bool load1(QDomElement & element); }; #endif
904
C++
.h
27
30.740741
92
0.752589
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,000
entityconstraint.h
KDE_umbrello/umbrello/umlmodel/entityconstraint.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ENTITYCONSTRAINT_H #define ENTITYCONSTRAINT_H #include "basictypes.h" #include "classifierlistitem.h" #include "umlclassifierlist.h" /** * This class is used to set up information for a entity constraint. * * @short Sets up entity constraint information. * @author Sharan Rao * @see UMLObject UMLClassifierListItem * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLEntityConstraint : public UMLClassifierListItem { Q_OBJECT public: UMLEntityConstraint(UMLObject *parent, const QString& name, Uml::ID::Type id = Uml::ID::None); explicit UMLEntityConstraint(UMLObject *parent); bool operator==(const UMLEntityConstraint &rhs) const; virtual ~UMLEntityConstraint(); virtual void copyInto(UMLObject *lhs) const; /** * Make a clone of the UMLEntityConstraint. */ virtual UMLObject* clone() const = 0; }; #endif
1,076
C++
.h
33
28.787879
92
0.738372
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,001
umlenumliterallist.h
KDE_umbrello/umbrello/umlmodel/umlenumliterallist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2007 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef UMLENUMLITERALLIST_H #define UMLENUMLITERALLIST_H #include <QList> // forward declaration class UMLEnumLiteral; typedef QList<UMLEnumLiteral*> UMLEnumLiteralList; typedef QListIterator<UMLEnumLiteral*> UMLEnumLiteralListIt; #endif
389
C++
.h
12
30.333333
92
0.830645
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,002
template.h
KDE_umbrello/umbrello/umlmodel/template.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef TEMPLATE_H #define TEMPLATE_H #include "classifierlistitem.h" /** * This class holds information used by template classes, called * paramaterised class in UML and a generic in Java. It has a * type (usually just "class") and name. * * @short Sets up template information. * @author Jonathan Riddell * @see UMLObject * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class UMLTemplate : public UMLClassifierListItem { public: UMLTemplate(UMLObject *parent, const QString& name, Uml::ID::Type id = Uml::ID::None, const QString& type = QStringLiteral("class")); explicit UMLTemplate(UMLObject *parent); bool operator==(const UMLTemplate &rhs) const; virtual void copyInto(UMLObject *lhs) const; virtual UMLObject* clone() const; virtual ~UMLTemplate(); QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false) const; virtual QString getTypeName() const; virtual bool showPropertiesDialog(QWidget* parent); void saveToXMI(QXmlStreamWriter& writer); protected: bool load1(QDomElement & element); }; #endif
1,330
C++
.h
36
32.75
97
0.733751
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,003
debug_utils.h
KDE_umbrello/umbrello/debug/debug_utils.h
/* SPDX-FileCopyrightText: 2011 Andi Fischer <andi.fischer@hispeed.ch> SPDX-FileCopyrightText: 2012 Ralf Habacker <ralf.habacker@freenet.de> SPDX-FileCopyrightText: 2022 Oliver Kellogg <okellogg@users.sourceforge.net> SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ #ifndef DEBUG_UTILS_H #define DEBUG_UTILS_H /* This file shall only by #included by implementation files (.cpp), not by header files (.h) */ #include <QtGlobal> #include <QLoggingCategory> Q_DECLARE_LOGGING_CATEGORY(UMBRELLO) #include <QMetaEnum> #include <QTreeWidget> /** * @short The singleton class for switching on or off debug messages. * * This class provides a user controllable way to enable class related * debug output. * * Classes could be registered with the static method registerClass(). * * With show() a dialog will be shown, in which the user is able to * enable/disable debug output for each registered class. * * Class related debug output implementation * * To register classes independent from related object instantiation time * one of the macros * * DEBUG_REGISTER(className) * DEBUG_REGISTER_DISABLED(className) * * should be placed in the implementation part of a class before the * first class methods. The first macro enables debug output for the * related class, while the latter macro disables it by default. * * Debug output in class methods should use * * - QObject based classes * * DEBUG() << ... * * - other classes (Debug with given Name) * * DEBUG_N("class name") << ... */ class Tracer : public QTreeWidget { Q_OBJECT public: static Tracer* instance(); ~Tracer(); bool isEnabled(const QString& name) const; void enable(const QString& name); void disable(const QString& name); void enableAll(); void disableAll(); bool logToConsole(); static void registerClass(const char * name, bool state=true, const char *filePath = nullptr); protected: void update(const QString &name); void updateParentItemCheckBox(QTreeWidgetItem *parent); virtual void showEvent(QShowEvent*); private Q_SLOTS: void slotParentItemClicked(QTreeWidgetItem *parent); void slotItemClicked(QTreeWidgetItem* item, int column); private: class MapEntry { public: QString filePath; bool state; MapEntry() : state(false) {} MapEntry(const QString &_filePath, bool _state) : filePath(_filePath), state(_state) {} }; typedef QMap<QString, MapEntry> MapType; typedef QMap<QString,Qt::CheckState> StateMap; static Tracer* s_instance; static MapType* s_classes; static StateMap* s_states; static bool s_logToConsole; explicit Tracer(QWidget *parent = nullptr); }; // convenience macros for console output to the Umbrello area #define uDebug() qCDebug(UMBRELLO) #define uError() qCCritical(UMBRELLO) #define uWarning() qCWarning(UMBRELLO) #ifndef DBG_SRC #define DBG_SRC QString::fromLatin1(metaObject()->className()) #endif #define DEBUG_SHOW_FILTER() Tracer::instance()->show() #define DEBUG_N(latin1str) if (Tracer::instance()->logToConsole() || Tracer::instance()->isEnabled(latin1str)) uDebug() #define DEBUG() DEBUG_N(DBG_SRC) #define IS_DEBUG_ENABLED() Tracer::instance()->isEnabled(DBG_SRC) #define DEBUG_REGISTER(src) \ class src##Tracer { \ public: \ src##Tracer() { Tracer::registerClass(#src, true, __FILE__); } \ }; \ static src##Tracer src##TracerGlobal; #define DEBUG_REGISTER_DISABLED(src) \ class src##Tracer { \ public: \ src##Tracer() { Tracer::registerClass(#src, false, __FILE__); } \ }; \ static src##Tracer src##TracerGlobal; #define uIgnoreZeroPointer(a) if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; } /** * In a Q_OBJECT class define any enum as Q_ENUMS. * With the above the following macro returns the name of a given enum. * This can be used in debug output. * TODO: convert it to a function. */ #define ENUM_NAME(o, e, v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v))) #endif
4,299
C++
.h
118
32.805085
120
0.69697
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,004
codegenobjectwithtextblocks.h
KDE_umbrello/umbrello/codegenerators/codegenobjectwithtextblocks.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGENOBJECTWITHTEXTBLOCKS_H #define CODEGENOBJECTWITHTEXTBLOCKS_H #include "codeaccessormethod.h" #include "textblocklist.h" #include <QMap> class CodeBlock; class CodeBlockWithComments; class CodeClassField; class CodeComment; class CodeDocument; class HierarchicalCodeBlock; class QXmlStreamWriter; class TextBlock; /** * This abstract class is for code generator objects which 'own' text blocks. */ class CodeGenObjectWithTextBlocks { public: explicit CodeGenObjectWithTextBlocks(CodeDocument *parent); virtual ~CodeGenObjectWithTextBlocks(); virtual bool addTextBlock(TextBlock * add_object); virtual bool removeTextBlock(TextBlock * remove_object); /** * Insert a new text block before/after the existing text block. Returns * false if it cannot insert the textblock. */ virtual bool insertTextBlock(TextBlock * newBlock, TextBlock * existingBlock, bool after) = 0; TextBlockList * getTextBlockList() const; virtual HierarchicalCodeBlock * getHierarchicalCodeBlock(const QString &tag, const QString &comment, int indentLevel); virtual CodeBlockWithComments * getCodeBlockWithComments(const QString &tag, const QString &comment, int indentLevel); CodeComment * addOrUpdateTaggedCodeComment(const QString &tag = QString(), const QString &text = QString(), int indentationLevel = 0); CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate); TextBlock * findTextBlockByTag(const QString &tag); /** * @return QString * @param prefix */ virtual QString getUniqueTag(const QString& prefix = QString()) = 0; /** * Virtual methods that return a new code document objects. */ virtual CodeBlock * newCodeBlock() = 0; virtual CodeBlockWithComments * newCodeBlockWithComments() = 0; virtual HierarchicalCodeBlock * newHierarchicalCodeBlock() = 0; CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock(const QString & tag); protected: virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & element); /*virtual*/ void setAttributesFromObject(CodeGenObjectWithTextBlocks * obj); virtual void loadChildTextBlocksFromNode(QDomElement & root); virtual void resetTextBlocks(); /** * Find specific text block belonging to code classfields. * Block may not presently be allocated to the textblock list. */ virtual TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag) = 0; QMap<QString, TextBlock *> m_textBlockTagMap; TextBlockList m_textblockVector; private: // needed in order to use findTextBlocksByTag CodeDocument *m_pCodeDoc; }; #endif // CODEGENOBJECTWITHTEXTBLOCKS_H
3,152
C++
.h
71
39.464789
138
0.760656
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,005
codeclassfieldlist.h
KDE_umbrello/umbrello/codegenerators/codeclassfieldlist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODECLASSFIELDLIST_H #define CODECLASSFIELDLIST_H #include <QList> // forward declarations class CodeClassField; typedef QList<CodeClassField*> CodeClassFieldList; typedef QListIterator<CodeClassField*> CodeClassFieldListIt; #endif
390
C++
.h
12
30.416667
92
0.831099
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,006
ownedhierarchicalcodeblock.h
KDE_umbrello/umbrello/codegenerators/ownedhierarchicalcodeblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef OWNEDHIERARCHICALCODEBLOCK_H #define OWNEDHIERARCHICALCODEBLOCK_H #include "hierarchicalcodeblock.h" class UMLObject; class CodeDocument; /** * class OwnedHierarchicalCodeBlock * A "chunk" of code within the code document that is "owned" by some * umlobject. This is an abstract class that should be inherited. * Note: keep the inheritance sequence: QObject needs to be first in inheritance list. */ class OwnedHierarchicalCodeBlock : public OwnedCodeBlock, public HierarchicalCodeBlock { Q_OBJECT public: /** * Constructor with QString so we can create & populate it in * one step. */ OwnedHierarchicalCodeBlock (UMLObject * parent, CodeDocument * parentDoc, const QString &start = QString(), const QString &end = QString(), const QString &comment = QString()); /** * Empty Destructor */ virtual ~OwnedHierarchicalCodeBlock (); CodeDocument * getParentDocument(); virtual void updateContent () = 0; // these next 2 methods should be supplied by inheriting classes /** * Save the XMI representation of this object */ virtual void saveToXMI(QXmlStreamWriter& writer) = 0; /** * load params from the appropriate XMI element node. */ virtual void loadFromXMI (QDomElement & root) = 0; protected: virtual void release (); virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); virtual void setAttributesFromObject (TextBlock * obj); public Q_SLOTS: void syncToParent (); }; #endif // OWNEDHIERARCHICALCODEBLOCK_H
1,843
C++
.h
49
33.55102
180
0.744081
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,007
hierarchicalcodeblock.h
KDE_umbrello/umbrello/codegenerators/hierarchicalcodeblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef HIERARCHICALCODEBLOCK_H #define HIERARCHICALCODEBLOCK_H #include "codegenobjectwithtextblocks.h" #include "codeblockwithcomments.h" #include "codeclassfieldlist.h" #include <QMap> #include <QString> class QXmlStreamWriter; class HierarchicalCodeBlock : public CodeBlockWithComments, public CodeGenObjectWithTextBlocks { friend class CodeGenObjectWithTextBlocks; public: explicit HierarchicalCodeBlock (CodeDocument * doc, const QString &startString = QString(), const QString &endString = QString(), const QString &comment = QString()); /** * Empty Destructor */ virtual ~HierarchicalCodeBlock (); void setEndText (const QString &new_var); QString getEndText () const; bool addTextBlock (TextBlock * add_object); bool insertTextBlock (TextBlock * newBlock, TextBlock * existingBlock, bool after = true); bool removeTextBlock (TextBlock * remove_object); void setStartText (const QString &text); QString getStartText () const; virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); virtual QString toString () const; QString getUniqueTag(); QString getUniqueTag(const QString& prefix); void addCodeClassFieldMethods (CodeClassFieldList &list); virtual CodeBlock * newCodeBlock(); virtual CodeBlockWithComments * newCodeBlockWithComments(); virtual HierarchicalCodeBlock * newHierarchicalCodeBlock(); protected: virtual void release (); virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); virtual void setAttributesFromObject (TextBlock * obj); TextBlock * findCodeClassFieldTextBlockByTag (const QString &tag); private: QString m_startText; QString m_endText; QString childTextBlocksToString() const; void initAttributes () ; }; #endif // HIERARCHICALCODEBLOCK_H
2,161
C++
.h
51
38.039216
170
0.774302
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,008
codeblock.h
KDE_umbrello/umbrello/codegenerators/codeblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEBLOCK_H #define CODEBLOCK_H #include "textblock.h" /** * A "chunk" of code within the code document. */ class CodeBlock : public TextBlock { public: /** * Describes the creation of the content. */ enum ContentType { AutoGenerated=0, ///< the content was generated by code generation itself UserGenerated ///< the content was entered by the user }; explicit CodeBlock(CodeDocument * parent, const QString & body = QString()); virtual ~CodeBlock(); void setContentType(ContentType new_var); ContentType contentType() const; static QString enumToString(const ContentType& val); virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI(QDomElement & root); virtual void setAttributesFromObject(TextBlock * obj); friend QDebug operator<<(QDebug str, const CodeBlock& obj); protected: virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & element); private: // specifies whether the content (text) of this object // was generated by the code generator or was supplied by the user (or some other way). ContentType m_contentType; }; #endif // CODEBLOCK_H
1,472
C++
.h
39
33.538462
92
0.738701
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,009
advancedcodegenerator.h
KDE_umbrello/umbrello/codegenerators/advancedcodegenerator.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ADVANCEDCODEGENERATOR_H #define ADVANCEDCODEGENERATOR_H #include "codegenerator.h" /** * AdvancedCodeGenerator is the base class for advanced cocde generators like * CPPCodeGenerator, JavaCodeGenerator and so on. */ class AdvancedCodeGenerator : public CodeGenerator { Q_OBJECT public: AdvancedCodeGenerator(); virtual ~AdvancedCodeGenerator(); virtual CodeDocument * newClassifierCodeDocument(UMLClassifier * classifier) = 0; virtual CodeViewerDialog * getCodeViewerDialog(QWidget* parent, CodeDocument * doc, Settings::CodeViewerState & state); public Q_SLOTS: virtual void checkAddUMLObject(UMLObject * obj); virtual void checkRemoveUMLObject(UMLObject * obj); protected: virtual void initFromParentDocument(); void connectSlots(); }; #endif // ADVANCEDCODEGENERATOR_H
1,061
C++
.h
29
33.137931
92
0.783203
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,010
codeparameter.h
KDE_umbrello/umbrello/codegenerators/codeparameter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEPARAMETER_H #define CODEPARAMETER_H #include "basictypes.h" #include "codecomment.h" class ClassifierCodeDocument; class UMLObject; class QXmlStreamWriter; /** * class CodeParameter * A parameter on some type of code. */ class CodeParameter : public QObject { Q_OBJECT public: CodeParameter(ClassifierCodeDocument* doc, UMLObject* parentObj); virtual ~CodeParameter(); ClassifierCodeDocument* getParentDocument(); UMLObject* getParentObject(); bool getAbstract(); bool getStatic(); QString getName() const; virtual QString getTypeName(); Uml::Visibility::Enum getVisibility() const; virtual void setInitialValue(const QString &new_var); virtual QString getInitialValue(); void setComment(CodeComment* comment); CodeComment* getComment(); // the id of this parameter is the same as the parent UMLObject id. QString ID() const; virtual void updateContent() = 0; protected: virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement& element); private: ClassifierCodeDocument* m_parentDocument; UMLObject* m_parentObject; CodeComment* m_comment; QString m_initialValue; ///< initial value of this code parameter void initFields(ClassifierCodeDocument* doc, UMLObject* obj); public Q_SLOTS: void syncToParent(); }; #endif // CODEPARAMETER_H
1,688
C++
.h
49
30.591837
92
0.744114
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,011
codedocument.h
KDE_umbrello/umbrello/codegenerators/codedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEDOCUMENT_H #define CODEDOCUMENT_H #include "codegenobjectwithtextblocks.h" #include "hierarchicalcodeblock.h" #include <QMap> #include <QObject> #include <QString> class CodeBlockWithComments; class CodeComment; class QXmlStreamWriter; class TextBlock; class UMLPackage; /** * A document containing the code for one file. * "friend" status is needed for HBlock so it may call addChildTagToMap which * is protected. */ class CodeDocument : public QObject, public CodeGenObjectWithTextBlocks { friend class HierarchicalCodeBlock; Q_OBJECT public: CodeDocument (); virtual ~CodeDocument (); void setFileExtension (const QString &new_var); QString getFileExtension () const; void setFileName (const QString &new_var); QString getFileName () const; void setPackage (UMLPackage *new_var); QString getPackage () const; virtual QString getPath () const; void setID (const QString &new_id); QString ID () const; void setWriteOutCode (bool new_var); bool getWriteOutCode () const; void setHeader (CodeComment * comment); CodeComment * getHeader () const; bool insertTextBlock (TextBlock * newBlock, TextBlock * existingBlock, bool after = true); TextBlock * findTextBlockByTag(const QString &tag, bool descendIntoChildren = false) const; virtual QString toString () const; virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); virtual CodeBlock * newCodeBlock (); virtual HierarchicalCodeBlock * newHierarchicalCodeBlock (); virtual CodeBlockWithComments * newCodeBlockWithComments (); virtual QString getUniqueTag(const QString& prefix = QString()); QString cleanName (const QString &name); virtual void synchronize(); virtual void updateContent(); friend QDebug operator<<(QDebug os, const CodeDocument& obj); protected: virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); // these next 2 are needed by child hierarchical code blocks so // that when they call getUniqueTag, we really get a unique tag // Also, it allows 'findTextBlockByTag' To find any tagged text block // anywhere in the document, whether directly owned by the document OR // by some child hierarchical textblock void addChildTagToMap (const QString &tag, TextBlock * tb); void removeChildTagFromMap (const QString &tag); void updateHeader (); void resetTextBlocks(); virtual TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag); private: int m_lastTagIndex; QString m_filename; QString m_fileExtension; QString m_ID; QString m_pathName; UMLPackage *m_package; bool m_writeOutCode; // Whether or not to write out this code document // and any codeblocks, etc that it owns. CodeComment * m_header; // for recording all of the textblocks held by child hierarchical codeblocks QMap<QString, TextBlock *> m_childTextBlockTagMap; }; #endif // CODEDOCUMENT_H
3,347
C++
.h
82
36.317073
95
0.750232
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,012
codemethodblock.h
KDE_umbrello/umbrello/codegenerators/codemethodblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEMETHODBLOCK_H #define CODEMETHODBLOCK_H #include "basictypes.h" #include "ownedcodeblock.h" #include "codeblockwithcomments.h" #include <QString> class ClassifierCodeDocument; class QXmlStreamWriter; /** * class CodeMethodBlock * A common type of "code block" that occurs in OO code. * Note: keep the inheritance sequence: QObject needs to be first in inheritance list. */ class CodeMethodBlock : public OwnedCodeBlock, public CodeBlockWithComments { friend class CodeGenObjectWithTextBlocks; Q_OBJECT public: /** * Constructors */ CodeMethodBlock (ClassifierCodeDocument * doc, UMLObject * parentObj, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~CodeMethodBlock (); virtual QString toString () const; QString getStartMethodText () const; QString getEndMethodText () const; CodeDocument * getParentDocument(); /** * This is the method called from within syncToparent() * to update the *body* of the method. * It is only called if the method is Auto-generated. */ virtual void updateContent () = 0; protected: virtual void release (); void setStartMethodText (const QString &value); void setEndMethodText (const QString &value); /** * This is the method called from within syncToparent(). * To update the start and end Method text. It is called * whether or not the method is Auto or User generated. */ virtual void updateMethodDeclaration () = 0; virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); virtual void setAttributesFromObject (TextBlock * obj); private: QString m_startMethod; QString m_endMethod; public Q_SLOTS: virtual void syncToParent(); }; #endif // CODEMETHODBLOCK_H
2,151
C++
.h
62
30.258065
93
0.727977
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,013
codeclassfielddeclarationblock.h
KDE_umbrello/umbrello/codegenerators/codeclassfielddeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODECLASSFIELDDECLARATIONBLOCK_H #define CODECLASSFIELDDECLARATIONBLOCK_H class UMLObject; class CodeClassField; #include "codeblockwithcomments.h" #include "ownedcodeblock.h" /** * Used to declare classifier fields (e.g. either class attributes or classifier * associations) in the code document for any given code classfield. This is a * special CodeBlockWithComments which is "sync'd" to the parent CodeClassField. * Note: keep the inheritance sequence: QObject needs to be first in inheritance list. * Basically a class to allow for synchronization of the contents based on the * values of the parentClassField's parentObject. */ class CodeClassFieldDeclarationBlock : public OwnedCodeBlock, public CodeBlockWithComments { friend class CodeClassField; Q_OBJECT public: explicit CodeClassFieldDeclarationBlock(CodeClassField * parent); virtual ~CodeClassFieldDeclarationBlock(); CodeClassField * getParentClassField(); UMLObject * getParentObject(); virtual void setAttributesFromObject(TextBlock * obj); virtual void updateContent() = 0; virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI(QDomElement & root); protected: virtual void release(); virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & element); void forceRelease(); private: CodeClassField * m_parentclassfield; void init(CodeClassField * parent); public Q_SLOTS: virtual void syncToParent(); }; #endif // CODECLASSFIELDDECLARATIONBLOCK_H
1,814
C++
.h
44
37.727273
92
0.79565
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,014
codeblockwithcomments.h
KDE_umbrello/umbrello/codegenerators/codeblockwithcomments.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEBLOCKWITHCOMMENTS_H #define CODEBLOCKWITHCOMMENTS_H #include "codeblock.h" #include "codecomment.h" /** * class CodeBlockWithComments * A very common type of text block in any type of code. */ class CodeBlockWithComments : public CodeBlock { public: explicit CodeBlockWithComments (CodeDocument * parent, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~CodeBlockWithComments (); void setComment (CodeComment * object); CodeComment * getComment () const; virtual QString toString () const; void setOverallIndentationLevel (int level); virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); virtual void setAttributesFromObject (TextBlock * obj); protected: virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); private: CodeComment * m_comment; }; #endif // CODEBLOCKWITHCOMMENTS_H
1,269
C++
.h
35
32.457143
130
0.760923
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,015
codegenfactory.h
KDE_umbrello/umbrello/codegenerators/codegenfactory.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGENFACTORY_H #define CODEGENFACTORY_H #include "basictypes.h" #include "codeaccessormethod.h" // fwd decls class CodeGenerator; class ClassifierCodeDocument; class CodeOperation; class CodeClassField; class CodeClassFieldDeclarationBlock; class CodeGenPolicyExt; class UMLClassifier; class UMLOperation; class UMLAttribute; class UMLRole; /** * CodeGenFactory allows creating the available code generators as well * as the auxiliary objects required for the advanced code generators. * * @author Jonathan Riddell * @author Oliver Kellogg <okellogg@users.sourceforge.net> * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ namespace CodeGenFactory { CodeGenerator* createObject(Uml::ProgrammingLanguage::Enum pl); CodeOperation *newCodeOperation(ClassifierCodeDocument *cd, UMLOperation * op); CodeClassField *newCodeClassField(ClassifierCodeDocument *cd, UMLAttribute * at); CodeClassField *newCodeClassField(ClassifierCodeDocument *cd, UMLRole *role); CodeAccessorMethod *newCodeAccessorMethod(ClassifierCodeDocument *cd, CodeClassField *cf, CodeAccessorMethod::AccessorType type); CodeClassFieldDeclarationBlock *newDeclarationCodeBlock(ClassifierCodeDocument *cd, CodeClassField * cf); CodeComment *newCodeComment(CodeDocument *cd); CodeDocument *newClassifierCodeDocument(UMLClassifier *classifier); CodeGenPolicyExt* newCodeGenPolicyExt(Uml::ProgrammingLanguage::Enum pl); } #endif //CODEGENFACTORY_H
1,794
C++
.h
42
36.547619
92
0.751438
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,016
codecomment.h
KDE_umbrello/umbrello/codegenerators/codecomment.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODECOMMENT_H #define CODECOMMENT_H #include "textblock.h" #include <QString> /** * Text which will be comments. These should be bracketed by what ever code type * comment the language requires. */ class CodeComment : public TextBlock { public: explicit CodeComment(CodeDocument * doc, const QString & comment = QString()); virtual ~CodeComment(); virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI(QDomElement & root); protected: private: }; #endif // CODECOMMENT_H
751
C++
.h
24
28.541667
92
0.768156
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,017
ownedcodeblock.h
KDE_umbrello/umbrello/codegenerators/ownedcodeblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef OWNEDCODEBLOCK_H #define OWNEDCODEBLOCK_H #include <QDomDocument> #include <QDomElement> #include <QObject> class TextBlock; class UMLObject; class QXmlStreamWriter; /** * Describes any codeblock which is 'owned' by a UMLobject of some sort and should * be in sync with that parent. */ class OwnedCodeBlock : public QObject { Q_OBJECT public: explicit OwnedCodeBlock (UMLObject * parent); virtual ~OwnedCodeBlock (); UMLObject * getParentObject (); virtual void updateContent () = 0; protected: virtual void release (); virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); virtual void setAttributesFromObject (TextBlock * obj); private: void initFields (UMLObject * parent); UMLObject * m_parentObject; public Q_SLOTS: virtual void syncToParent (); }; #endif // OWNEDCODEBLOCK_H
1,144
C++
.h
37
27.810811
92
0.764652
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,018
textblock.h
KDE_umbrello/umbrello/codegenerators/textblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef TEXTBLOCK_H #define TEXTBLOCK_H #include <QDomDocument> #include <QDomElement> #include <QObject> #include <QXmlStreamWriter> class CodeDocument; class QXmlStreamWriter; /** * The fundamental unit of text within an output file containing code. */ class TextBlock { friend class CodeGenObjectWithTextBlocks; friend class ClassifierCodeDocument; public: explicit TextBlock(CodeDocument * parent, const QString & text = QString()); virtual ~TextBlock(); void setText(const QString & text); QString getText() const; void appendText(const QString & text); void setTag(const QString & value); QString getTag() const; CodeDocument * getParentDocument() const; void setWriteOutText(bool write); bool getWriteOutText() const; void setIndentationLevel(int level); int getIndentationLevel() const; QString getIndentationString(int level = 0) const; static QString getIndentation(); static QString getNewLineEndingChars(); static QString formatMultiLineText(const QString & work, const QString & linePrefix, const QString & breakStr, bool addBreak = true, bool lastLineHasBreak = true); virtual QString unformatText(const QString & text, const QString & indent = QString()); virtual QString toString() const; static QString encodeText(const QString & text, const QString & endLine); static QString decodeText(const QString & text, const QString & endLine); /** * Save the XMI representation of this object * @param writer the QXmlStreamWriter serialization target */ virtual void saveToXMI(QXmlStreamWriter& writer) = 0; /** * Load params from the appropriate XMI element node. * @param root the starting point in the xmi document to load from */ virtual void loadFromXMI(QDomElement & root) = 0; bool canDelete() const; virtual void setAttributesFromObject(TextBlock * obj); virtual QString getNewEditorLine(int amount = 0); virtual int firstEditableLine(); virtual int lastEditableLine(); friend QDebug operator<<(QDebug os, const TextBlock& obj); protected: void setCanDelete(bool canDelete); virtual void release(); virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & root); private: QString m_text; //< The actual text of this code block. QString m_tag; bool m_canDelete; bool m_writeOutText; //< Flag to write the text of this TextBlock into a file. int m_indentationLevel; CodeDocument * m_parentDocument; }; #endif // TEXTBLOCK_H
2,930
C++
.h
73
34.849315
92
0.725212
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,019
codeaccessormethod.h
KDE_umbrello/umbrello/codegenerators/codeaccessormethod.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEACCESSORMETHOD_H #define CODEACCESSORMETHOD_H #include "codemethodblock.h" #include <QString> class CodeClassField; class QXmlStreamWriter; class CodeAccessorMethod : public CodeMethodBlock { friend class CodeClassField; Q_OBJECT public: // some types of accessor methods that are possible: // "GET" is to retrieve single-valued (primitive or Object) fields // "SET" is to set single-valued (primitive or Object) fields // "ADD" is to add a value to a multiple-valued field of either primitive or Object items // "REMOVE" is to remove a value to a multiple-valued field of either primitive or Object items // "LIST" is to retrieve the entire list of items in a multiple-valued field enum AccessorType {GET=0, SET, ADD, REMOVE, LIST}; explicit CodeAccessorMethod(CodeClassField * field); virtual ~CodeAccessorMethod(); CodeClassField * getParentClassField(); AccessorType getType(); void setType(AccessorType type); // virtual UMLObject * getParentObject(); bool parentIsAttribute(); virtual void updateContent() = 0; virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI(QDomElement & root); virtual void setAttributesFromObject(TextBlock * obj); protected: virtual void release(); virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & element); virtual void updateMethodDeclaration() = 0; void forceRelease(); private: CodeClassField * m_parentclassfield; AccessorType m_accessorType; void initFields(CodeClassField * parentCF); }; #endif // CODEACCESSORMETHOD_H
1,913
C++
.h
46
37.326087
99
0.761543
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,020
codegenerationpolicy.h
KDE_umbrello/umbrello/codegenerators/codegenerationpolicy.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGENERATIONPOLICY_H #define CODEGENERATIONPOLICY_H #include "basictypes.h" #include <QDir> #include <QObject> class QWidget; class CodeGenerationPolicyPage; /** * class CodeGenerationPolicy * This class describes the code generation policy for this project. * Note that as the code gen policy may be the 'default' policy, it may * not be coupled with a code generator. */ class CodeGenerationPolicy : public QObject { Q_OBJECT public: /** * OverwritePolicy can have the following values * - Ok: if there is a file named the same as what you want to name your output file, * you can overwrite the old file. * - Ask:if there is a file named the same as what you want to name your output file, * you should ask the User what to do, and give him the option to overwrite the file * write the code to a different file, or to abort the generation of this class. * - Never: you cannot overwrite any files. Generates a new file name like "fileName1.h", "fileName2.h" * until you find an appropriate name. * - Cancel: Do not output anything. This is only set if the user chooses Apply to All Remaining Files * and clicks on Do not Output in the Ask dialog */ enum OverwritePolicy {Ok=0, Ask, Never, Cancel}; enum ModifyNamePolicy {No=0, Underscore, Capitalise}; enum WriteSectionCommentsPolicy { None=0, WhenNonEmpty, Always }; enum NewLineType {UNIX=0, DOS, MAC}; enum IndentationType {NONE=0, TAB, SPACE}; enum CommentStyle { SingleLine=0, MultiLine }; explicit CodeGenerationPolicy(CodeGenerationPolicy * clone); CodeGenerationPolicy(); virtual ~CodeGenerationPolicy(); void setOverwritePolicy(OverwritePolicy new_var); OverwritePolicy getOverwritePolicy() const; void setSectionCommentsPolicy(WriteSectionCommentsPolicy new_var); WriteSectionCommentsPolicy getSectionCommentsPolicy() const; void setCodeVerboseDocumentComments(bool new_var); bool getCodeVerboseDocumentComments() const; void setHeadingFileDir(const QString & path); QString getHeadingFileDir() const; void setIncludeHeadings(bool new_var); bool getIncludeHeadings() const; void setOutputDirectory(QDir new_var); QDir getOutputDirectory(); void setLineEndingType(NewLineType type); NewLineType getLineEndingType(); QString getNewLineEndingChars() const; void setIndentationType(IndentationType type); IndentationType getIndentationType(); void setIndentationAmount(int amount); int getIndentationAmount(); QString getIndentation() const; void setModifyPolicy(ModifyNamePolicy new_var); ModifyNamePolicy getModifyPolicy() const; void setAutoGenerateConstructors(bool var); bool getAutoGenerateConstructors(); void setAttributeAccessorScope(Uml::Visibility::Enum var); Uml::Visibility::Enum getAttributeAccessorScope(); void setAssociationFieldScope(Uml::Visibility::Enum var); Uml::Visibility::Enum getAssociationFieldScope(); virtual CodeGenerationPolicyPage * createPage(QWidget *parent = nullptr, const char *name = nullptr); QString getHeadingFile(const QString& str); virtual void setDefaults(CodeGenerationPolicy * defaults, bool emitUpdateSignal = true); virtual void setDefaults(bool emitUpdateSignal = true); virtual void writeConfig(); void emitModifiedCodeContentSig(); void setCommentStyle(CommentStyle new_var); CommentStyle getCommentStyle(); Q_SIGNALS: void modifiedCodeContent(); protected: /* // Policy of how to deal with overwriting existing files. Allowed values are "ask", "yes" and "no". OverwritePolicy m_overwritePolicy; // Whether or not verbose code commenting for sections is desired. // If true, comments for sections will be written even if the section is empty. WriteSectionCommentsPolicy m_sectionCommentsPolicy; // Whether or not verbose code commenting for documentation is desired. // If true, documentation for various code will be written even if no //code would normally be created at that point in the file. bool m_codeVerboseDocumentComments; QDir m_headingFiles; // location of the header file template. bool m_includeHeadings; QDir m_outputDirectory; // location of where output files will go. NewLineType m_lineEndingType; // What type of line ending characters to use. IndentationType m_indentationType; // The amount and type of whitespace to indent with. int m_indentationAmount; // The amount of units to indent with. ModifyNamePolicy m_modifyPolicy; bool m_autoGenerateConstructors; CommentStyle m_commentStyle; Uml::Visibility::Value m_attributeAccessorScope; Uml::Visibility::Value m_associationFieldScope; */ // these 2 private fields 'cache' the string values of other fields we may frequently call for QString m_lineEndingChars; QString m_indentation; void calculateIndentation(); /* protected: void initFields(); */ }; #endif // CODEGENERATIONPOLICY_H
5,337
C++
.h
114
42.254386
108
0.755646
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,021
textblocklist.h
KDE_umbrello/umbrello/codegenerators/textblocklist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef TEXTBLOCKLIST_H #define TEXTBLOCKLIST_H #include <QList> // forward declarations class TextBlock; typedef QList<TextBlock*> TextBlockList; typedef QListIterator<TextBlock*> TextBlockListIt; #endif
355
C++
.h
12
27.5
92
0.813609
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,022
codeoperation.h
KDE_umbrello/umbrello/codegenerators/codeoperation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEOPERATION_H #define CODEOPERATION_H #include "codemethodblock.h" #include "operation.h" #include <QString> /** * */ class CodeOperation : public CodeMethodBlock { Q_OBJECT public: /** * Constructors */ CodeOperation (ClassifierCodeDocument * doc, UMLOperation * parent, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~CodeOperation (); UMLOperation * getParentOperation(); virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); static QString findTag (UMLOperation * op) ; virtual void setAttributesFromObject (TextBlock * obj); virtual void updateMethodDeclaration() = 0; virtual void updateContent(); protected: // list of parameters used by this code operation. // QList<CodeParameter*> m_parameterVector; virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); private: void init (UMLOperation * parentOp); }; #endif // CODEOPERATION_H
1,370
C++
.h
42
28.238095
92
0.727064
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,023
codegen_utils.h
KDE_umbrello/umbrello/codegenerators/codegen_utils.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGEN_UTILS_H #define CODEGEN_UTILS_H #include <QStringList> namespace Codegen_Utils { QStringList cppDatatypes(); const QStringList reservedCppKeywords(); void createCppStereotypes(); QString capitalizeFirstLetter(const QString &string); } #endif // CODEGEN_UTILS_H
433
C++
.h
14
28.642857
92
0.806846
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,024
simplecodegenerator.h
KDE_umbrello/umbrello/codegenerators/simplecodegenerator.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef SIMPLECODEGENERATOR_H #define SIMPLECODEGENERATOR_H #include "basictypes.h" #include "codegenerator.h" #include <QMap> #include <QString> #include <QStringList> /** * A simple code generator interface designed to work with * the existing codewriters. * * Code can be entered into a QTextEdit widget in the ClassPropertiesDialog. This * code is then stored in the respective UMLOperation, written to the * xmi file, and also used when generating the source files. * The code fragments are stored into the xmi file in the section "codegeneration" * with the tag "sourcecode". */ class SimpleCodeGenerator : public CodeGenerator { Q_OBJECT public: explicit SimpleCodeGenerator(bool createDirHierarchyForPackages = true); virtual ~SimpleCodeGenerator(); void writeCodeToFile(UMLClassifierList & concepts); void writeCodeToFile(); /** * Call this method to generate code for a UMLClassifier * @param c the class you want to generate code for. */ virtual void writeClass(UMLClassifier *c) = 0; protected: QString className_; QString fileName_; QString findFileName(UMLPackage* classifier, const QString &ext); QString overwritableName(UMLPackage* classifier, const QString &name, const QString &ext); bool hasDefaultValueAttr(UMLClassifier *c); bool hasAbstractOps(UMLClassifier *c); QString indent(); /** * Maps UMLObjects to filenames. Used for finding out which file * each class was written to. */ QMap<UMLPackage*, QString> m_fileMap; /** * For some code generators, it does not make much sense to create a * directory for each package because that would lead to a rather * sparsely populated directory tree (maximum of just one source file * per directory.) */ bool m_createDirHierarchyForPackages; // old attributes writers will look for QString m_indentation; int m_indentLevel; QString m_endl; virtual void initFromParentDocument(); public Q_SLOTS: virtual void syncCodeToDocument(); }; #endif // SIMPLECODEGENERATOR_H
2,331
C++
.h
64
32.4375
94
0.748665
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,025
codedocumentlist.h
KDE_umbrello/umbrello/codegenerators/codedocumentlist.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEDOCUMENTLIST_H #define CODEDOCUMENTLIST_H #include <QList> // forward declarations class CodeDocument; typedef QList<CodeDocument*> CodeDocumentList; typedef QListIterator<CodeDocument*> CodeDocumentListIt; #endif
376
C++
.h
12
29.25
92
0.824513
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,026
codegenerator.h
KDE_umbrello/umbrello/codegenerators/codegenerator.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGENERATOR_H #define CODEGENERATOR_H #include "basictypes.h" #include "codegenpolicyext.h" #include "codegenerationpolicy.h" #include "umlpackagelist.h" #include "umlclassifierlist.h" #include "codedocumentlist.h" #include "codeviewerstate.h" #include <QDir> #include <QHash> #include <QList> class UMLDoc; class UMLObject; class ClassifierCodeDocument; class CodeDocument; class CodeViewerDialog; class QDomDocument; class QDomElement; class QXmlStreamWriter; /** * This class collects together all of the code documents which form this project, * and generates code for them in a given language. * * CodeGenerator is the abstract base class for all types of code generators. * It provides the interface through which all generators are invoked and * provides most of the basic functionality. * * If you want to implement a CodeGenerator for some language follow * these steps: * * Create a class which inherits SimpleCodeGenerator or AdvancedCodeGenerator. * This class can have any name, I use names like CppCodeGenerator * for the Cpp Generator, JavaCodeGenerator for the Java Generator and so on, * but you can use what you want. * * The code you generate should be output to getOutputDirectory() of the * CodeGenerationPolicy instance and you should respect the OverwritePolicy * specified. You should call findFileName(..) to get an appropriate file name, * and then you can call openFile() and write the generated content to this file. */ class CodeGenerator : public QObject { Q_OBJECT public: typedef enum {Generated, Failed, Skipped } GenerationState; CodeGenerator(); virtual ~CodeGenerator(); bool addCodeDocument(CodeDocument * add_object); bool removeCodeDocument(CodeDocument * remove_object); CodeDocumentList * getCodeDocumentList(); QString getUniqueID(CodeDocument * codeDoc); virtual void saveToXMI(QXmlStreamWriter& writer); CodeDocument * findCodeDocumentByID(const QString &id); virtual void writeCodeToFile(); virtual void writeCodeToFile(UMLClassifierList &list); void setIncludeHeadings(bool i); bool includeHeadings() const; void setHeadingFileDir(const QString &); QString headingFileDir() const; void setForceDoc(bool f); bool forceDoc() const; void setSectionCommentPolicy(CodeGenerationPolicy::WriteSectionCommentsPolicy f); bool forceSections() const; // TODO change to WriteSectionCommentsPolicy virtual QString getHeadingFile(const QString &file); QString findFileName(CodeDocument * codeDocument); static QString cleanName(const QString &name); static QString formatDoc(const QString& text, const QString& linePrefix = QStringLiteral(" *"), int lineWidth = 80); static QString formatFullDocBlock(const QString &text, const QString &blockHeader = QStringLiteral("/* "), const QString &blockFooter = QStringLiteral(" */"), const QString &linePrefix = QStringLiteral(" *"), int lineWidth = 80); static QString formatSourceCode(const QString& code, const QString& indentation); static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList); /** * A series of accessor method constructors that we need to define * for any particular language. */ virtual void loadFromXMI(QDomElement & element); /** * Return the unique language enum that identifies this type of code generator. */ virtual Uml::ProgrammingLanguage::Enum language() const = 0; CodeDocument * findCodeDocumentByClassifier(UMLClassifier * classifier); virtual QStringList defaultDatatypes() const; virtual bool isReservedKeyword(const QString & keyword); virtual QStringList reservedKeywords() const; virtual void createDefaultStereotypes(); /** * Initialize this code generator from its parent UMLDoc. */ virtual void initFromParentDocument() = 0; protected: QString overwritableName(const QString& name, const QString &extension); bool openFile(QFile& file, const QString &name); void writeListedCodeDocsToFile(CodeDocumentList * docs); virtual void finalizeRun(); // map of what code documents we currently have in this generator. QHash<QString, CodeDocument*> m_codeDocumentDictionary; /** * Used by OverwriteDialog to know if the apply to all * remaining files checkbox should be checked (is by default). */ bool m_applyToAllRemaining; /** * The document object. */ UMLDoc* m_document; private: CodeDocumentList m_codedocumentVector; int m_lastIDIndex; void loadCodeForOperation(const QString& id, const QDomElement& codeDocElement); public Q_SLOTS: virtual void syncCodeToDocument(); Q_SIGNALS: void codeGenerated(UMLClassifier* classifier, bool generated); void codeGenerated(UMLClassifier* classifier, CodeGenerator::GenerationState result); void showGeneratedFile(const QString& filename); }; #endif // CODEGENERATOR_H
5,322
C++
.h
125
37.832
120
0.751891
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,027
codeclassfield.h
KDE_umbrello/umbrello/codegenerators/codeclassfield.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODECLASSFIELD_H #define CODECLASSFIELD_H #include "codeaccessormethodlist.h" #include "codeclassfielddeclarationblock.h" #include "codeparameter.h" #include "codeaccessormethod.h" class ClassifierCodeDocument; class UMLAttribute; class UMLObject; class UMLRole; /** * class CodeClassField * a special type of parameter.. occurs on class declarations. */ class CodeClassField : public CodeParameter { Q_OBJECT public: enum ClassFieldType { Attribute, PlainAssociation, Self, Aggregation, Composition, Unknown_Assoc }; CodeClassField (ClassifierCodeDocument * parentDoc, UMLAttribute * attrib); CodeClassField (ClassifierCodeDocument * parentDoc, UMLRole * role); void finishInitialization(); // CodeClassField (ClassifierCodeDocument * doc, UMLRole role); virtual ~CodeClassField (); // /** // * Get the value of m_dialog // * @return the value of m_dialog // */ // CodeClassFieldDialog getDialog (); // Determine if this cf is attribute or some type of association QString getTypeName (); CodeClassFieldDeclarationBlock * getDeclarationCodeBlock(); CodeAccessorMethodList getMethodList() const; CodeAccessorMethod * findMethodByType(CodeAccessorMethod::AccessorType type, int role_id = -1); bool fieldIsSingleValue (); ClassFieldType getClassFieldType() const; // quick utility call to figure out if parent is an attribute or not bool parentIsAttribute () const; // get the type of object that will be added/removed from lists // of objects (as per specification of associations) QString getListObjectType(); bool getWriteOutMethods () const; void setWriteOutMethods(bool val); int minimumListOccurances(); int maximumListOccurances(); virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); virtual void synchronize (); void updateContent(); protected: void setParentUMLObject (UMLObject * obj); // CodeClassFieldDialog * m_dialog; QString cleanName(const QString &name); QString fixInitialStringDeclValue(const QString& val, const QString &type); // set the list class name void setListClassName (const QString &className); bool addMethod (CodeAccessorMethod * add); QString getUMLObjectName(UMLObject *obj); bool removeMethod (CodeAccessorMethod * remove); private: QString m_listClassName; ClassFieldType m_classFieldType; CodeClassFieldDeclarationBlock * m_declCodeBlock; CodeAccessorMethodList m_methodVector; // the list of methods related to this codeclassfield bool m_parentIsAttribute; /** * This flag tells if we want the methods to have the possibility * of being written out. IF the value is false, then all methods * are never written out. */ bool m_writeOutMethods; virtual void setAttributesOnNode (QXmlStreamWriter& writer); virtual void setAttributesFromNode (QDomElement & element); void initFields(bool inConstructor = false); // initialize the accessor methods for this field void initAccessorMethods(); Q_SIGNALS: void modified (); }; #endif // CODECLASSFIELD_H
3,441
C++
.h
85
36.211765
103
0.757026
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,028
codegenpolicyext.h
KDE_umbrello/umbrello/codegenerators/codegenpolicyext.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CODEGENPOLICYEXT_H #define CODEGENPOLICYEXT_H #include <QObject> class QWidget; class CodeGenerationPolicyPage; /** * Base class for programming language specific code generation policy extensions. * Not to be confused with CodeGenerationPolicy which contains the programming * language independent policies. * * @author Oliver Kellogg <okellogg@users.sourceforge.net> * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org */ class CodeGenPolicyExt : public QObject { Q_OBJECT public: CodeGenPolicyExt() {} virtual ~CodeGenPolicyExt() {} virtual CodeGenerationPolicyPage * createPage(QWidget *parent = nullptr, const char *name = nullptr) = 0; virtual void setDefaults(bool emitUpdateSignal = true) = 0; }; #endif
918
C++
.h
27
31.407407
109
0.780294
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,029
classifiercodedocument.h
KDE_umbrello/umbrello/codegenerators/classifiercodedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CLASSIFIERCODEDOCUMENT_H #define CLASSIFIERCODEDOCUMENT_H #include "classifier.h" #include "codeaccessormethod.h" #include "codedocument.h" #include "codeoperation.h" #include "codeclassfield.h" #include "codeclassfieldlist.h" #include "umlassociationlist.h" #include <QMap> #include <QList> #include <QString> /** * class ClassifierCodeDocument * A CodeDocument which represents a UMLClassifier (e.g. a Class or Interface) */ class ClassifierCodeDocument : public CodeDocument { friend class HierarchicalCodeBlock; Q_OBJECT public: // Constructors/Destructors explicit ClassifierCodeDocument(UMLClassifier * parent); virtual ~ClassifierCodeDocument(); bool addCodeClassField(CodeClassField * add_object); bool removeCodeClassField(CodeClassField * remove_object); CodeClassFieldList* getCodeClassFieldList(); // some Utility methods bool parentIsInterface() const; bool parentIsClass() const; bool hasAssociationClassFields() const; bool hasAttributeClassFields() const; bool hasObjectVectorClassFields() const; bool hasClassFields() const; QList<const CodeOperation*> getCodeOperations() const; CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType) const; CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType, bool isStatic) const; CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType, Uml::Visibility::Enum visibility) const; CodeClassFieldList getSpecificClassFields(CodeClassField::ClassFieldType cfType, bool isStatic, Uml::Visibility::Enum visibility) const; CodeClassField * findCodeClassFieldFromParentID (Uml::ID::Type id, int role_id = -1); UMLClassifier * getParentClassifier() const; void addCodeClassFieldMethods(CodeClassFieldList &list); virtual void initCodeClassFields(); virtual void synchronize(); /** Will add the code operation in the correct place in the document. * @return bool which is true IF the code operation was added successfully */ virtual bool addCodeOperation(CodeOperation *opBlock) = 0; virtual void updateContent() = 0; virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI(QDomElement &root); protected: void loadClassFieldsFromXMI(QDomElement &childElem); virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement &element); TextBlock * findCodeClassFieldTextBlockByTag(const QString &tag); void declareClassFields(CodeClassFieldList &list, CodeGenObjectWithTextBlocks *parent); void syncClassFields(); void syncNamesToParent(); private: CodeClassFieldList m_classfieldVector; UMLClassifier* m_parentclassifier; void updateAssociationClassFields(UMLAssociationList &assocList); void updateOperations(); /** * Maps CodeClassFields to UMLObjects. Used to prevent re-adding a class * field. */ QMap<UMLObject *, CodeClassField *> m_classFieldMap; void init(UMLClassifier *classifier); public Q_SLOTS: void addAttributeClassField(UMLClassifierListItem *at, bool syncToParentIfAdded = true); void addAssociationClassField(UMLAssociation *assoc, bool syncToParentIfAdded = true); void removeAttributeClassField(UMLClassifierListItem *at); void removeAssociationClassField(UMLAssociation *assoc); void addOperation(UMLClassifierListItem *obj); void removeOperation(UMLClassifierListItem *obj); void syncToParent(); }; #endif // CLASSIFIERCODEDOCUMENT_H
3,980
C++
.h
88
39.409091
101
0.762263
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,030
xmlelementcodeblock.h
KDE_umbrello/umbrello/codegenerators/xml/xmlelementcodeblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef XMLELEMENTCODEBLOCK_H #define XMLELEMENTCODEBLOCK_H #include "hierarchicalcodeblock.h" #include "umlattributelist.h" #include <QString> class CodeDocument; class UMLAttribute; class XMLElementCodeBlock : public HierarchicalCodeBlock { public: /** * Empty Constructor */ XMLElementCodeBlock (CodeDocument * parentDoc, const QString & nodeName, const QString & comment = QString()); /** * Empty Destructor */ virtual ~XMLElementCodeBlock (); /** * Save the XMI representation of this object */ virtual void saveToXMI(QXmlStreamWriter& writer); /** * Load params from the appropriate XMI element node. */ virtual void loadFromXMI (QDomElement & root); virtual UMLAttributeList * getAttributeList(); virtual void setNodeName (const QString &name); virtual QString getNodeName (); void addAttribute (UMLAttribute * at); /** * Update the start/end text of this codeblock. */ void updateContent (); protected: /** * Set attributes of the node that represents this class * in the XMI document. */ virtual void setAttributesOnNode (QXmlStreamWriter& writer); /** * Set the class attributes of this object from * the passed element node. */ virtual void setAttributesFromNode (QDomElement & element); private: UMLAttributeList m_attList; QString m_nodeName; void init (CodeDocument * parent, const QString &nodeName, const QString &comment); }; #endif // XMLELEMENTCODEBLOCK_H
1,782
C++
.h
56
27.303571
114
0.720235
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,031
xmlcodecomment.h
KDE_umbrello/umbrello/codegenerators/xml/xmlcodecomment.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef XMLCODECOMMENT_H #define XMLCODECOMMENT_H #include "codecomment.h" #include <QString> class CodeDocument; /** * class XMLCodeDocumentation * A XML (code) comment. */ class XMLCodeComment: virtual public CodeComment { public: /** * Constructors */ explicit XMLCodeComment (CodeDocument * doc, const QString & text = QString()); /** * Empty Destructor */ virtual ~XMLCodeComment(); /** * @return QString */ QString toString () const; protected: private: }; #endif // XMLCODECOMMENT_H
783
C++
.h
33
20.242424
92
0.712347
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,032
xmlschemawriter.h
KDE_umbrello/umbrello/codegenerators/xml/xmlschemawriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <brian.thomas@gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef XMLSCHEMAWRITER_H #define XMLSCHEMAWRITER_H #include "attribute.h" #include "association.h" #include "codegenerator.h" #include "umlclassifierlist.h" #include "umlattributelist.h" #include "umlobjectlist.h" #include "umlassociationlist.h" #include "simplecodegenerator.h" /** * Class XMLSchemaWriter is a code generator for UMLClassifier objects. * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate a XMLschema source file for * that concept * * Our basic approach is to map UMLClassifiers (classes/interfaces) into * XML elements (or nodes). We declare these element in the schema either * as complexType or as groups based on whether they are concrete or abstract * in nature. This is not a perfect decision, but that's life with XML Schema... * you cant fully represent Objects in the XML world ..yet. -b.t. */ class XMLSchemaWriter : public SimpleCodeGenerator { Q_OBJECT public: XMLSchemaWriter(); virtual ~XMLSchemaWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeClassifier(UMLClassifier *c, QTextStream &XMLSchema); void writeAbstractClassifier(UMLClassifier *c, QTextStream &XMLSchema); void writeConcreteClassifier(UMLClassifier *c, QTextStream &XMLSchema); void writeComplexTypeClassifierDecl(UMLClassifier *c, UMLAssociationList associations, UMLAssociationList aggregations, UMLAssociationList compositions, UMLClassifierList superclassifiers, QTextStream &XMLSchema); void writeGroupClassifierDecl(UMLClassifier *c, UMLClassifierList superclassifiers, QTextStream &XMLSchema); bool determineIfHasChildNodes(UMLClassifier *c); #if 0 /** * write all attributes for a given class * @param c the class for which we are generating code * @param j the stream associated with the output file */ void writeAttributes(UMLClassifier *c, QTextStream &j); #endif void writeElementDecl(const QString &elementName, const QString &elementTypeName, QTextStream &xs); void writeAttributeDecls(UMLAttributeList &attribs, QTextStream &xs); void writeAttributeDecl(UMLAttribute *attrib, QTextStream &xs); UMLAttributeList findAttributes(UMLClassifier *c); QStringList findAttributeGroups(UMLClassifier *c); bool writeAssociationDecls(UMLAssociationList associations, bool noRoleOK, bool didOne, Uml::ID::Type id, QTextStream &xs); void writeAttributeGroupDecl(const QString &elementName, UMLAttributeList &attribs, QTextStream &xs); void writeAssociationRoleDecl(UMLClassifier *c, const QString &multi, QTextStream &xs); QString makeSchemaTag(QString tagName); QString makePackageTag(QString tagName); void writeComment(const QString &text, QTextStream &xs); UMLObjectList findChildObjsInAssociations(UMLClassifier *c, UMLAssociationList associations); QString fixTypeName(const QString& string); QString fixInitialStringDeclValue(QString value, const QString &type); QString getElementName(UMLClassifier *c); QString getElementTypeName(UMLClassifier *c); QString getElementGroupTypeName(UMLClassifier *c); void writeChildObjsInAssociation(UMLClassifier *c, UMLAssociationList assoc, QTextStream &s); bool hasBeenWritten(UMLClassifier *c); void markAsWritten(UMLClassifier *c); QString schemaNamespaceTag; ///< basic schemaNamespace tag QString packageNamespaceTag; ///< basic packageNamespace tag QString schemaNamespaceURI; ///< basic schemaNamespace URI QString packageNamespaceURI; ///< basic packageNamespace URI QString startline; ///< a \n, used at the end of each line UMLClassifierList writtenClassifiers; ///< a list of UMLClassifiers we have already written }; #endif // XMLSCHEMAWRITER_H
4,464
C++
.h
87
44.034483
105
0.730433
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,033
jswriter.h
KDE_umbrello/umbrello/codegenerators/js/jswriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Alexander Blum <blum@kewbee.de> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef JSWRITER_H #define JSWRITER_H #include "simplecodegenerator.h" #include "umloperationlist.h" #include "umlassociationlist.h" class QTextStream; /** * Class JSWriter is a JavaScript code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class JSWriter : public SimpleCodeGenerator { Q_OBJECT public: JSWriter(); virtual ~JSWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeOperations(QString classname, UMLOperationList *opList, QTextStream &js); void writeAssociation(QString& classname, UMLAssociationList& assoclist, QTextStream &js); }; #endif //JSWRITER
990
C++
.h
29
31.103448
94
0.782929
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,034
sqlwriter.h
KDE_umbrello/umbrello/codegenerators/sql/sqlwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Nikolaus Gradwohl <guru@local-guru.net> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef SQLWRITER_H #define SQLWRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" //forward declarations class UMLEntity; class UMLEntityAttributeList; class UMLClassifierListItemList; /** * Class SQLWriter is a code generator for UMLClassifier objects. * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate a sql source file for * that concept. */ class SQLWriter : public SimpleCodeGenerator { Q_OBJECT public: SQLWriter(); virtual ~SQLWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList defaultDatatypes() const; virtual QStringList reservedKeywords() const; protected: QStringList m_enumsGenerated; UMLEntity* m_pEntity; virtual void printEntityAttributes(QTextStream& sql, UMLEntityAttributeList entityAttributeList); virtual void printUniqueConstraints(QTextStream& sql, UMLClassifierListItemList constrList); virtual void printForeignKeyConstraints(QTextStream& sql, UMLClassifierListItemList constrList); virtual void printCheckConstraints(QTextStream& sql, UMLClassifierListItemList constrList); virtual void printIndex(QTextStream& sql, UMLEntity* ent, UMLEntityAttributeList entAttList); virtual void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList); }; #endif // SQLWRITER_H
1,663
C++
.h
40
38.325
101
0.807453
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,035
mysqlwriter.h
KDE_umbrello/umbrello/codegenerators/sql/mysqlwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef MYSQLWRITER_H #define MYSQLWRITER_H #include "sqlwriter.h" #include "umlattributelist.h" //forward declarations class UMLClassifierListItemList; /** * Class MySQLWriter is a sql code generator for MySQL. * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate a sql source file for * that concept. */ class MySQLWriter : public SQLWriter { Q_OBJECT public: MySQLWriter(); virtual ~MySQLWriter(); Uml::ProgrammingLanguage::Enum language() const; QStringList defaultDatatypes() const; void printForeignKeyConstraints(QTextStream& sql, UMLClassifierListItemList constrList); void printCheckConstraints(QTextStream& sql, UMLClassifierListItemList constrList); protected: virtual void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList); }; #endif // MySQLWRITER_H
1,043
C++
.h
30
31.7
92
0.79021
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,036
postgresqlwriter.h
KDE_umbrello/umbrello/codegenerators/sql/postgresqlwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef POSTGRESQLWRITER_H #define POSTGRESQLWRITER_H #include "sqlwriter.h" /** * class PostgreSQLWriter is a sql code generator for PostgreSQL * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate a sql source file for * that concept */ class PostgreSQLWriter : public SQLWriter { Q_OBJECT public: PostgreSQLWriter(); virtual ~PostgreSQLWriter(); Uml::ProgrammingLanguage::Enum language() const; QStringList defaultDatatypes() const; protected: void printAutoIncrements(QTextStream& sql, UMLEntityAttributeList entAttList); }; #endif // PostgreSQLWRITER_H
804
C++
.h
25
29.08
92
0.777633
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,037
pascalwriter.h
KDE_umbrello/umbrello/codegenerators/pascal/pascalwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2006-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PASCALWRITER_H #define PASCALWRITER_H #include "simplecodegenerator.h" class UMLAssociation; class UMLOperation; class QTextStream; /** * Pascal class writer. * @author Oliver Kellogg * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org. */ class PascalWriter : public SimpleCodeGenerator { Q_OBJECT public: PascalWriter(); virtual ~PascalWriter (); virtual void writeClass (UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; QStringList defaultDatatypes() const; virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword); virtual QStringList reservedKeywords() const; private: void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false); void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName); bool isOOClass (const UMLClassifier *c); QString qualifiedName (UMLPackage *p, bool withType = false, bool byValue = false); static const QString defaultPackageSuffix; }; #endif // PASCALWRITER_H
1,230
C++
.h
34
32.735294
92
0.773152
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,038
valawriter.h
KDE_umbrello/umbrello/codegenerators/vala/valawriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2009-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ // // C++ Interface: valawriter // #ifndef VALAWRITER_H #define VALAWRITER_H #include "classifierlistitem.h" #include "simplecodegenerator.h" #include "umlassociationlist.h" #include "umlattributelist.h" #include "umloperationlist.h" /** * Class ValaWriter is a Vala code generator for UMLClassifier objects * Just call writeClass and feed it a UMLClassifier; */ class ValaWriter : public SimpleCodeGenerator { Q_OBJECT public: ValaWriter(); virtual ~ValaWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; QStringList defaultDatatypes() const; private: /// Adds extra indenting if the class is in a container (namespace). QString m_container_indent; /// Collection of included namespaces, to skip them from variable types. UMLPackageList m_seenIncludes; /// Counts associations without a role name for giving a default name. int m_unnamedRoles; void writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs); void writeOperations(UMLClassifier *c, QTextStream &cs); void writeOperations(UMLOperationList opList, QTextStream &cs, bool interface = false, bool isOverride = false, bool generateErrorStub = false); void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs); void writeAttributes(UMLClassifier *c, QTextStream &cs); void writeAttributes(UMLAttributeList &atList, QTextStream &cs); void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs); void writeAttribute(const QString& doc, Uml::Visibility::Enum visibility, bool isStatic, const QString& typeName, const QString& name, const QString& initialValue, bool asProperty, QTextStream &cs); QString makeLocalTypeName(UMLClassifierListItem *cl); }; #endif
2,426
C++
.h
59
32.322034
102
0.673487
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,039
phpwriter.h
KDE_umbrello/umbrello/codegenerators/php/phpwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002 Heiko Nardmann <h.nardmann@secunet.de> SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PHPWRITER_H #define PHPWRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" #include "umloperationlist.h" /** * Class PhpWriter is a PHP code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class PhpWriter : public SimpleCodeGenerator { Q_OBJECT public: PhpWriter(); virtual ~PhpWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeOperations(UMLClassifier *c, QTextStream &php); void writeOperations(const QString& classname, UMLOperationList &opList, QTextStream &php); void writeAttributes(UMLClassifier *c, QTextStream &php); void writeAttributes(UMLAttributeList &atList, QTextStream &php); }; #endif //PHPWRITER
1,132
C++
.h
32
30.75
92
0.743802
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,040
php5writer.h
KDE_umbrello/umbrello/codegenerators/php/php5writer.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002 Heiko Nardmann <h.nardmann@secunet.de> SPDX-FileCopyrightText: 2004 Thorsten Kunz <tk AT bytecrash DOT net> SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PHP5WRITER_H #define PHP5WRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" #include "umloperationlist.h" /** * Class Php5Writer is a PHP code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class Php5Writer : public SimpleCodeGenerator { Q_OBJECT public: Php5Writer(); virtual ~Php5Writer(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeOperations(UMLClassifier *c, QTextStream &php); void writeOperations(const QString &classname, UMLOperationList &opList, QTextStream &php, bool interface = false, bool generateErrorStub = false); void writeAttributes(UMLClassifier *c, QTextStream &php); void writeAttributes(UMLAttributeList &atList, QTextStream &php); }; #endif //PHP5WRITER
1,269
C++
.h
33
33.787879
92
0.749183
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,041
perlwriter.h
KDE_umbrello/umbrello/codegenerators/perl/perlwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 David Hugh-Jones <hughjonesd@yahoo.co.uk> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PERLWRITER_H #define PERLWRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" #include "umloperationlist.h" class UMLOperation; class UMLAttribute; class UMLClassifier; /** * Class PerlWriter is a Perl code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class PerlWriter : public SimpleCodeGenerator { Q_OBJECT public: PerlWriter(); virtual ~PerlWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; QStringList defaultDatatypes() const; private: void writeOperations(UMLClassifier *c, QTextStream &perl); void writeOperations(const QString &classname, UMLOperationList &opList, QTextStream &perl); void writeAttributes(UMLClassifier *c, QTextStream &perl); void writeAttributes(UMLAttributeList &atList, QTextStream &perl); bool GetUseStatements(UMLClassifier *c, QString &Ret, QString &ThisPkgName); }; #endif //PERLWRITER
1,336
C++
.h
37
31.621622
92
0.755452
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,042
pythonwriter.h
KDE_umbrello/umbrello/codegenerators/python/pythonwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2002 Vincent Decorges <vincent.decorges@eivd.ch> SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef PYTHONWRITER_H #define PYTHONWRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" #include "umloperationlist.h" /** * Class PythonWriter is a python code generator for UMLClassifier objects * Just call writeClass and feed it a UMLClassifier. * * NOTE: There is a unit test available for this class. * Please, use and adapt it when necessary. */ class PythonWriter : public SimpleCodeGenerator { Q_OBJECT public: PythonWriter(); virtual ~PythonWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; QStringList defaultDatatypes() const; private: void writeAttributes(UMLAttributeList atList, QTextStream &py); void writeOperations(UMLClassifier *c, QTextStream &h); void writeOperations(const QString& classname, UMLOperationList &opList, QTextStream &h, Uml::Visibility::Enum access); static bool hasContainer(const QString &string); static QString fixTypeName(const QString &string); QString findIncludeFromType(const QString &string); bool m_bNeedPass; ///< True as long as no "pass" has been written }; #endif //PYTHONWRITER
1,494
C++
.h
38
35.131579
92
0.754861
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,043
csharpwriter.h
KDE_umbrello/umbrello/codegenerators/csharp/csharpwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2007-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CSHARPWRITER_H #define CSHARPWRITER_H #include "classifierlistitem.h" #include "simplecodegenerator.h" #include "umlassociationlist.h" #include "umlattributelist.h" #include "umloperationlist.h" /** * Class CSharpWriter is a C# code generator for UMLClassifier objects * Just call writeClass and feed it a UMLClassifier; * @author Ferenc Veres */ class CSharpWriter : public SimpleCodeGenerator { Q_OBJECT public: CSharpWriter(); virtual ~CSharpWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; QStringList defaultDatatypes() const; private: /** * Adds extra indenting if the class is in a container (namespace). */ QString m_container_indent; /** * Collection of included namespaces, to skip them from variable types. */ UMLPackageList m_seenIncludes; /** * Counts associations without a role name for giving a default name. */ int m_unnamedRoles; void writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs); void writeOperations(UMLClassifier *c, QTextStream &cs); void writeOperations(UMLOperationList opList, QTextStream &cs, bool interface = false, bool isOverride = false, bool generateErrorStub = false); void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs); void writeAttributes(UMLClassifier *c, QTextStream &cs); void writeAttributes(UMLAttributeList &atList, QTextStream &cs); void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs); void writeAttribute(const QString& doc, Uml::Visibility::Enum visibility, bool isStatic, const QString& typeName, const QString& name, const QString& initialValue, bool asProperty, QTextStream &cs); QString makeLocalTypeName(UMLClassifierListItem *cl); }; #endif
2,469
C++
.h
63
30.412698
102
0.664711
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,044
cppheadercodedocument.h
KDE_umbrello/umbrello/codegenerators/cpp/cppheadercodedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPHEADERCODEDOCUMENT_H #define CPPHEADERCODEDOCUMENT_H #include "codeclassfieldlist.h" #include "classifiercodedocument.h" #include "hierarchicalcodeblock.h" #include <QString> class CPPHeaderClassDeclarationBlock; /** * class CPPHeaderCodeDocument * A CPP UMLClassifier Header Code Document. * We carve the CPP document up into 2 documents, "source" and "header". * This one represents the header portion. * The sections of each are as follows: * - header * - includes * - import statements * - class declaration * - guts of the class (e.g. field decl, accessor methods, operations, dependent classes) */ class CPPHeaderCodeDocument : public ClassifierCodeDocument { Q_OBJECT public: explicit CPPHeaderCodeDocument(UMLClassifier* classifier); virtual ~CPPHeaderCodeDocument(); bool addCodeOperation(CodeOperation* op); void updateContent(); /** * Save the XMI representation of this object */ //virtual void saveToXMI(QXmlStreamWriter& writer); protected: // reset/clear our inventory of textblocks in this document void resetTextBlocks(); /** * Need to overwrite this for cpp header since we need to pick up the * header class declaration block. */ virtual void loadChildTextBlocksFromNode(QDomElement & root); void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, CPPHeaderClassDeclarationBlock * codeBlock); /** * Create a new code comment. IN this case it is a CPPCodeDocumentation object. */ CodeComment * newCodeComment(); private: CPPHeaderClassDeclarationBlock * m_classDeclCodeBlock; HierarchicalCodeBlock * m_publicBlock; HierarchicalCodeBlock * m_privateBlock; HierarchicalCodeBlock * m_protectedBlock; HierarchicalCodeBlock * m_namespaceBlock; HierarchicalCodeBlock * m_pubConstructorBlock; HierarchicalCodeBlock * m_protConstructorBlock; HierarchicalCodeBlock * m_privConstructorBlock; HierarchicalCodeBlock * m_pubOperationsBlock; HierarchicalCodeBlock * m_privOperationsBlock; HierarchicalCodeBlock * m_protOperationsBlock; CPPHeaderClassDeclarationBlock * getClassDecl(); }; #endif // CPPHEADERCODEDOCUMENT_H
2,454
C++
.h
64
34.4375
123
0.775993
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,045
cppheadercodeoperation.h
KDE_umbrello/umbrello/codegenerators/cpp/cppheadercodeoperation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPHEADERCODEOPERATION_H #define CPPHEADERCODEOPERATION_H #include "codeoperation.h" #include <QString> class CPPHeaderCodeDocument; class CPPHeaderCodeOperation : virtual public CodeOperation { Q_OBJECT public: /** * Constructor */ CPPHeaderCodeOperation (CPPHeaderCodeDocument * doc, UMLOperation * op, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~CPPHeaderCodeOperation (); virtual int lastEditableLine(); virtual void updateMethodDeclaration(); virtual void updateContent(); protected: /** * Check to see if we have a valid stereotype to apply in the operation */ virtual void applyStereotypes (QString&, UMLOperation *, bool, bool, QString&, QString&); }; #endif // CPPHEADERCODEOPERATION_H
1,101
C++
.h
33
28.575758
100
0.721063
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,046
cppheaderclassdeclarationblock.h
KDE_umbrello/umbrello/codegenerators/cpp/cppheaderclassdeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPHEADERCLASSDECLARATIONBLOCK_H #define CPPHEADERCLASSDECLARATIONBLOCK_H #include "cppheadercodedocument.h" #include "ownedhierarchicalcodeblock.h" #include <QString> class CPPHeaderClassDeclarationBlock : public OwnedHierarchicalCodeBlock { Q_OBJECT public: /** * Empty Constructor */ explicit CPPHeaderClassDeclarationBlock (CPPHeaderCodeDocument * parentDoc, const QString &start = QString(), const QString &endText = QStringLiteral("}"), const QString &comment = QString()); /** * Empty Destructor */ virtual ~CPPHeaderClassDeclarationBlock (); /** * Update the start/end text of this codeblock. */ void updateContent (); /** * Save the XMI representation of this object. */ virtual void saveToXMI(QXmlStreamWriter& writer); virtual void loadFromXMI (QDomElement & root); protected: /** * Set the class attributes from a passed object. */ virtual void setAttributesFromObject (TextBlock * obj); private: void init (CPPHeaderCodeDocument * parent, const QString &comment); }; #endif // CPPHEADERCLASSDECLARATIONBLOCK_H
1,371
C++
.h
40
30.025
196
0.741445
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,047
cppcodeclassfield.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodeclassfield.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODECLASSFIELD_H #define CPPCODECLASSFIELD_H #include "codeclassfield.h" #include <QString> class ClassifierCodeDocument; class CPPCodeClassField : public CodeClassField { Q_OBJECT public: /** * Constructors */ CPPCodeClassField (ClassifierCodeDocument * parentDoc, UMLRole * role); CPPCodeClassField (ClassifierCodeDocument * parentDoc, UMLAttribute * attrib); /** * Empty Destructor */ virtual ~CPPCodeClassField (); QString getFieldType(); QString getFieldName(); QString getInitialValue(); /** * Get the name of the class which holds lists, e.g. "QPtrlist" or * "Vector" or "List" and so on. */ QString getListFieldClassName(); protected: private: }; #endif // CPPCODECLASSFIELD_H
1,012
C++
.h
35
24.885714
92
0.72973
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,048
cppsourcecodeaccessormethod.h
KDE_umbrello/umbrello/codegenerators/cpp/cppsourcecodeaccessormethod.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPSOURCECODEACCESSORMETHOD_H #define CPPSOURCECODEACCESSORMETHOD_H #include "codeaccessormethod.h" #include <QString> class CodeClassField; class CPPSourceCodeAccessorMethod : public CodeAccessorMethod { Q_OBJECT public: /** * Empty Constructor */ CPPSourceCodeAccessorMethod (CodeClassField * field, CodeAccessorMethod::AccessorType type); /** * Empty Destructor */ virtual ~CPPSourceCodeAccessorMethod (); /** * Must be called before this object is usable */ void update(); virtual void updateMethodDeclaration(); virtual void updateContent(); private: }; #endif // CPPSOURCECODEACCESSORMETHOD_H
908
C++
.h
31
25.354839
96
0.75463
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,049
cppcodecomment.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodecomment.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODECOMMENT_H #define CPPCODECOMMENT_H #include "codecomment.h" #include <QString> /** * A CPP code comment. There is only a single styles of comments: * these are simply started with double slash sequence and no terminating * characters. */ class CPPCodeComment : virtual public CodeComment { public: /** * Constructors. */ explicit CPPCodeComment (CodeDocument * doc, const QString & text = QString()); /** * Empty Destructor. */ virtual ~CPPCodeComment (); /** * Save the XMI representation of this object. */ virtual void saveToXMI(QXmlStreamWriter& writer); /** * @return QString */ QString toString () const; /** * UnFormat a long text string. Typically, this means removing * the indentation (linePrefix) and/or newline chars from each line. */ virtual QString unformatText (const QString & text, const QString & indent = QString()); /** * A special version here because we want to not only indent * the new line, but to add the "//" sequence as well. */ virtual QString getNewEditorLine (int amount); }; #endif // CPPCODECOMMENT_H
1,408
C++
.h
45
27.022222
92
0.695556
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,050
cppsourcecodeclassfielddeclarationblock.h
KDE_umbrello/umbrello/codegenerators/cpp/cppsourcecodeclassfielddeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H #define CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H #include "codeclassfielddeclarationblock.h" #include <QString> class CPPSourceCodeClassFieldDeclarationBlock : public CodeClassFieldDeclarationBlock { Q_OBJECT public: /** * Constructor */ explicit CPPSourceCodeClassFieldDeclarationBlock (CodeClassField * parent); /** * Empty Destructor */ virtual ~CPPSourceCodeClassFieldDeclarationBlock (); /** * This will be called by syncToParent whenever the parent object is "modified" */ void updateContent (); private: }; #endif // CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H
908
C++
.h
28
28.535714
92
0.776755
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,051
cppsourcecodeoperation.h
KDE_umbrello/umbrello/codegenerators/cpp/cppsourcecodeoperation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPSOURCECODEOPERATION_H #define CPPSOURCECODEOPERATION_H #include "codeoperation.h" #include <QString> class CPPSourceCodeDocument; class CPPSourceCodeOperation : virtual public CodeOperation { Q_OBJECT public: /** * Constructor. */ CPPSourceCodeOperation(CPPSourceCodeDocument * doc, UMLOperation * op, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~CPPSourceCodeOperation(); /** * Update the doc and start text of this method. */ virtual void updateMethodDeclaration(); /** * Just want to know whether or not to print out * the body of the operation. * In C++ if the operations are inline, then we DON'T print out * the body text. */ virtual void updateContent(); }; #endif // CPPSOURCECODEOPERATION_H
1,098
C++
.h
35
27.085714
146
0.714558
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,052
cppheadercodeaccessormethod.h
KDE_umbrello/umbrello/codegenerators/cpp/cppheadercodeaccessormethod.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPHEADERCODEACCESSORMETHOD_H #define CPPHEADERCODEACCESSORMETHOD_H #include "codeaccessormethod.h" #include <QString> class CodeClassField; class CPPHeaderCodeAccessorMethod : public CodeAccessorMethod { Q_OBJECT public: /** * Empty Constructor */ CPPHeaderCodeAccessorMethod (CodeClassField * field, CodeAccessorMethod::AccessorType type); /** * Empty Destructor */ virtual ~CPPHeaderCodeAccessorMethod (); /** * Must be called before this object is usable */ void update(); virtual void updateMethodDeclaration(); virtual void updateContent(); private: }; #endif // CPPHEADERCODEACCESSORMETHOD_H
908
C++
.h
31
25.354839
96
0.75463
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,053
cppheadercodeclassfielddeclarationblock.h
KDE_umbrello/umbrello/codegenerators/cpp/cppheadercodeclassfielddeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H #define CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H #include "codeclassfielddeclarationblock.h" #include <QString> class CPPHeaderCodeClassFieldDeclarationBlock : public CodeClassFieldDeclarationBlock { Q_OBJECT public: /** * Constructor */ explicit CPPHeaderCodeClassFieldDeclarationBlock (CodeClassField * parent); /** * Empty Destructor */ virtual ~CPPHeaderCodeClassFieldDeclarationBlock (); /** * This will be called by syncToParent whenever the parent object is "modified" */ void updateContent (); private: }; #endif // CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H
909
C++
.h
28
28.535714
92
0.776755
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,054
cppwriter.h
KDE_umbrello/umbrello/codegenerators/cpp/cppwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <brian.thomas@gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPWRITER_H #define CPPWRITER_H #include "simplecodegenerator.h" #include "cppcodegenerationpolicy.h" #include "umloperationlist.h" #include "umlattributelist.h" #include "umlassociationlist.h" class QFile; /** * Class CppWriter is a code generator for UMLClassifier objects. * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate both a header (.h) and * source (.cpp) file for that classifier. * Note: * This is the "old" code generator that does not support code editing * in the Modeller but uses significantly less file space because the * source code is not replicated in the XMI file. */ class CppWriter : public SimpleCodeGenerator { public: CppWriter(); virtual ~CppWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; QStringList defaultDatatypes() const; virtual QStringList reservedKeywords() const; private: void writeIncludes(UMLClassifier *c, QTextStream &cpp); void writeClassDecl(UMLClassifier *c, QTextStream &cpp); void writeConstructorDecls(QTextStream &h); void writeConstructorMethods(UMLClassifier * c, QTextStream &cpp); // /** // * Write all field declarations, for both attributes and associations for the // * given permitted scope. // */ // void writeFieldDecl(UMLClassifier *c, Uml::Visibility::Enum permitScope, QTextStream &stream); // /** // * Write all method declarations, for attributes and associations // * for the given permitted scope. // */ // void writeAccessorMethodDecl(UMLClassifier *c, Uml::Visibility::Enum permitScope, QTextStream &stream); void writeOperations(UMLClassifier *c, bool isHeaderMethod, Uml::Visibility::Enum permitScope, QTextStream &cpp); void writeOperations(UMLClassifier *c, UMLOperationList &oplist, bool isHeaderMethod, QTextStream &cpp); // /** // * Write all attributes for a given class. // * @param c the class for which we are generating code // * @param j the stream associated with the output file // */ // void writeAttributes(UMLClassifier *c, QTextStream &j); void writeAttributeDecls(UMLClassifier *c, Uml::Visibility::Enum visibility, bool writeStatic, QTextStream &stream); void writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility::Enum permitVisibility, QTextStream &stream); void writeHeaderAttributeAccessorMethods(UMLClassifier *c, Uml::Visibility::Enum visibility, bool writeStatic, QTextStream &stream); void writeHeaderAttributeAccessorMethodDecls(UMLClassifier *c, Uml::Visibility::Enum permitVisibility, QTextStream &stream); void writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility::Enum permitScope, QTextStream &stream); void writeAssociationDecls(UMLAssociationList associations, Uml::Visibility::Enum permit, Uml::ID::Type id, QTextStream &stream); void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi, QString doc, QTextStream &stream); void writeAttributeMethods(UMLAttributeList attribs, Uml::Visibility::Enum visib, bool isHeaderMethod, bool isStatic, bool writeMethodBody, QTextStream &stream); void writeAssociationMethods(UMLAssociationList associations, Uml::Visibility::Enum permitVisib, bool isHeaderMethod, bool writeMethodBody, bool writePointerVar, Uml::ID::Type id, QTextStream &stream); void writeAssociationRoleMethod(const QString &fieldClassName, bool isHeaderMethod, bool writeMethodBody, const QString &roleName, const QString &multi, const QString &description, Uml::Changeability::Enum change, QTextStream &stream); void writeSingleAttributeAccessorMethods( const QString &fieldClassName, const QString &Name, const QString &fieldName, const QString &description, Uml::Changeability::Enum change, bool isHeaderMethod, bool isStatic, bool writeMethodBody, QTextStream &cpp); void writeVectorAttributeAccessorMethods( const QString &fieldClassName, const QString &fieldVarName, const QString &fieldName, const QString &description, Uml::Changeability::Enum change, bool isHeaderMethod, bool writeMethodBody, QTextStream &stream); void writeComment(const QString &text, const QString &indent, QTextStream &cpp); void writeDocumentation(QString header, QString body, QString end, QTextStream &cpp); void writeHeaderFile(UMLClassifier *c, QFile &file); void writeSourceFile(UMLClassifier *c, QFile &file); void printTextAsSeparateLinesWithIndent (const QString &text, const QString &indent, QTextStream &stream); void printAssociationIncludeDecl(UMLAssociationList list, Uml::ID::Type this_id, QTextStream &stream); void writeInitAttributeMethod(UMLClassifier * c, QTextStream &stream); void writeInitAttributeDecl(UMLClassifier * c, QTextStream &stream); void writeDataTypes(UMLClassifier *c, Uml::Visibility::Enum permitScope, QTextStream &stream); QString umlObjectName(UMLObject *obj); QString fixTypeName(const QString &string); QString fixInitialStringDeclValue(const QString &value, const QString &type); QString getAttributeVariableName(UMLAttribute *at); QString getAttributeMethodBaseName(const QString &fieldName); void writeBlankLine(QTextStream &stream); CPPCodeGenerationPolicy *policyExt(); QString VECTOR_METHOD_APPEND; QString VECTOR_METHOD_REMOVE; QString VECTOR_METHOD_INIT; QString OBJECT_METHOD_INIT; /** * Create association methods for class attributes/associations/operations as inline decl in header. */ bool INLINE_ASSOCIATION_METHODS; QStringList ObjectFieldVariables; QStringList VectorFieldVariables; bool m_stringIncludeRequired; }; #endif // CPPWRITER_H
6,465
C++
.h
118
47.661017
136
0.726134
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,055
cppcodegenerationpolicypage.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodegenerationpolicypage.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODEGENERATIONPOLICYPAGE_H #define CPPCODEGENERATIONPOLICYPAGE_H #include "codegenerationpolicypage.h" #include "cppcodegenerationform.h" #include "cppcodegenerationpolicy.h" /** * @author Brian Thomas */ class CPPCodeGenerationPolicyPage : public CodeGenerationPolicyPage { Q_OBJECT public: explicit CPPCodeGenerationPolicyPage (QWidget *parent = nullptr, const char *name = nullptr, CPPCodeGenerationPolicy *policy = nullptr); virtual ~CPPCodeGenerationPolicyPage(); protected: CPPCodeGenerationForm * form; public Q_SLOTS: void apply(); }; #endif
739
C++
.h
24
28.083333
140
0.801136
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,056
cppcodegenerationpolicy.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodegenerationpolicy.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODEGENERATIONPOLICY_H #define CPPCODEGENERATIONPOLICY_H #include "codegenpolicyext.h" #include "codegenerationpolicy.h" #include <QString> class CodeGenerationPolicyPage; class CPPCodeGenerationPolicy : public CodeGenPolicyExt { Q_OBJECT public: static const char * DEFAULT_VECTOR_METHOD_APPEND; static const char * DEFAULT_VECTOR_METHOD_REMOVE; static const char * DEFAULT_VECTOR_METHOD_INIT; static const char * DEFAULT_OBJECT_METHOD_INIT; CPPCodeGenerationPolicy(); virtual ~CPPCodeGenerationPolicy(); void setAccessorsAreInline(bool var); bool getAccessorsAreInline(); void setOperationsAreInline(bool var); bool getOperationsAreInline(); void setDestructorsAreVirtual(bool var); bool getDestructorsAreVirtual(); void setPackageIsNamespace(bool var); bool getPackageIsNamespace(); void setAutoGenerateAccessors(bool var); bool getAutoGenerateAccessors(); void setAccessorsArePublic(bool var); bool getAccessorsArePublic(); void setGetterWithGetPrefix(bool var); bool getGetterWithGetPrefix(); void setRemovePrefixFromAccessorMethods(bool var); bool getRemovePrefixFromAccessorMethods(); bool getAccessorMethodsStartWithUpperCase(); void setAccessorMethodsStartWithUpperCase(bool var); /** * We want to be flexible about which classes are allowed for generation * of the CPP code. In the next 4 method pairs, we give accessors that allow setting and getting * the names of the classes, and their include files for string and vectors. */ void setStringClassName(const QString &value); QString getStringClassName(); void setStringClassNameInclude(const QString &value); QString getStringClassNameInclude(); void setVectorClassName(const QString &value); QString getVectorClassName(); void setVectorClassNameInclude(const QString &value); QString getVectorClassNameInclude(); void setClassMemberPrefix(const QString &value); QString getClassMemberPrefix(); void setDocToolTag(const QString &value); QString getDocToolTag(); void setStringIncludeIsGlobal (bool value); bool stringIncludeIsGlobal (); void setVectorIncludeIsGlobal (bool value); bool vectorIncludeIsGlobal (); /** More flexible generation. We want to allow the user to specify how the * bodies of the vector methods should be auto-generated. */ QString getVectorMethodAppend(const QString & variableName = QString(), const QString & itemClassName = QString()); QString getVectorMethodRemove(const QString & variableName = QString(), const QString & itemClassName = QString()); QString getVectorMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString()); QString getObjectMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString()); virtual void setDefaults (CPPCodeGenerationPolicy * cppclone, bool emitUpdateSignal = true); virtual void setDefaults(bool emitUpdateSignal = true); CodeGenerationPolicyPage *createPage (QWidget *parent = nullptr, const char *name = nullptr); protected: void init(); private: QString m_vectorMethodAppendBase; QString m_vectorMethodRemoveBase; QString m_vectorMethodInitBase; QString m_objectMethodInitBase; }; #endif // CPPCODEGENERATIONPOLICY_H
3,634
C++
.h
79
41.291139
119
0.77412
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,057
cppmakecodedocument.h
KDE_umbrello/umbrello/codegenerators/cpp/cppmakecodedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPMAKECODEDOCUMENT_H #define CPPMAKECODEDOCUMENT_H #include "codedocument.h" #include <QString> /** * class CPPMakefileCodeDocument * Represents */ class CPPMakefileCodeDocument : public CodeDocument { Q_OBJECT public: static const char * DOCUMENT_ID_VALUE; /** * Constructor */ CPPMakefileCodeDocument (); /** * Empty Destructor */ virtual ~CPPMakefileCodeDocument (); /** * @return QString */ QString toString () const; QString getPath () const; void updateContent(); protected: private: }; #endif // CPPMAKECODEDOCUMENT_H
845
C++
.h
36
19.694444
92
0.716625
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,058
cppsourcecodedocument.h
KDE_umbrello/umbrello/codegenerators/cpp/cppsourcecodedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPSOURCECODEDOCUMENT_H #define CPPSOURCECODEDOCUMENT_H #include "classifiercodedocument.h" #include "hierarchicalcodeblock.h" #include <QString> /** * A CPP UMLClassifier Source Code Document. */ class CPPSourceCodeDocument : public ClassifierCodeDocument { Q_OBJECT public: /** * Constructor */ explicit CPPSourceCodeDocument(UMLClassifier * classifier); /** * Empty Destructor */ virtual ~CPPSourceCodeDocument(); /** * Add a code operation to this cpp classifier code document. * In the vanilla version, we just tack all operations on the end * of the document. * @param op the code operation * @return bool which is true IF the code operation was added successfully */ bool addCodeOperation(CodeOperation * op); /** * This method will cause the class to rebuild its text representation. * based on the parent classifier object. * For any situation in which this is called, we are either building the code * document up, or replacing/regenerating the existing auto-generated parts. As * such, we will want to insert everything we reasonably will want * during creation. We can set various parts of the document (esp. the * comments) to appear or not, as needed. */ void updateContent(); protected: /** * Reset/clear our inventory of textblocks in this document. */ void resetTextBlocks(); private: HierarchicalCodeBlock * m_constructorBlock; HierarchicalCodeBlock * m_methodsBlock; }; #endif // CPPSOURCECODEDOCUMENT_H
1,750
C++
.h
52
29.269231
92
0.723278
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,059
cppcodegenerator.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodegenerator.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODEGENERATOR_H #define CPPCODEGENERATOR_H #include "codedocumentlist.h" #include "codeviewerstate.h" #include "advancedcodegenerator.h" #include "cppmakecodedocument.h" #include "umldoc.h" #include <QString> class CodeViewerDialog; class CPPHeaderCodeDocument; class CPPCodeGenerator : public AdvancedCodeGenerator { Q_OBJECT public: static const bool DEFAULT_BUILD_MAKEFILE; CPPCodeGenerator(); virtual ~CPPCodeGenerator(); void setCreateProjectMakefile(bool buildIt); bool getCreateProjectMakefile(); QString fixTypeName(const QString &name); bool addHeaderCodeDocument (CPPHeaderCodeDocument * doc); bool removeHeaderCodeDocument (CPPHeaderCodeDocument * remove_object); Uml::ProgrammingLanguage::Enum language() const; CodeDocument * newClassifierCodeDocument (UMLClassifier * classifier); CPPHeaderCodeDocument * newHeaderClassifierCodeDocument (UMLClassifier * classifier); virtual CodeViewerDialog * getCodeViewerDialog(QWidget* parent, CodeDocument * doc, Settings::CodeViewerState & state); virtual void writeCodeToFile(); virtual void writeCodeToFile(UMLClassifierList &list); QStringList defaultDatatypes() const; virtual void saveToXMI(QXmlStreamWriter& writer); virtual QStringList reservedKeywords() const; virtual void createDefaultStereotypes (); void initFromParentDocument(); protected: CPPMakefileCodeDocument * newMakefileCodeDocument (); CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier (UMLClassifier * classifier); private: bool m_createMakefile; CodeDocumentList m_headercodedocumentVector; //< a separate list for recording the header documents public Q_SLOTS: virtual void checkAddUMLObject (UMLObject * obj); virtual void checkRemoveUMLObject (UMLObject * obj); virtual void syncCodeToDocument (); }; #endif // CPPCODEGENERATOR_H
2,159
C++
.h
51
38.254902
104
0.789726
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,060
cppcodedocumentation.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodedocumentation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODEDOCUMENTATION_H #define CPPCODEDOCUMENTATION_H #include "codecomment.h" #include <QString> class CodeDocument; /** * class CPPCodeDocumentation * A CPP code comment. There is only a single styles of comments: * these are simply started with double slash sequence and no terminating * characters */ class CPPCodeDocumentation : virtual public CodeComment { public: /** * Constructors */ explicit CPPCodeDocumentation (CodeDocument * doc, const QString & text = QString()); /** * Empty Destructor */ virtual ~CPPCodeDocumentation (); /** * Save the XMI representation of this object */ virtual void saveToXMI(QXmlStreamWriter& writer); /** * @return QString */ QString toString () const; /** UnFormat a long text string. Typically, this means removing * the indentation (linePrefix) and/or newline chars from each line. */ virtual QString unformatText (const QString & text, const QString & indent = QString()); /** a special version here because we want to not only indent * the new line, but to add the " * " sequence as well. */ virtual QString getNewEditorLine (int amount); /** Ush. These are terrifically bad and must one day go away. * Both methods indicate the range of lines in this textblock * which may be edited by the codeeditor (assuming that any are * actually editable). The default case is no lines are editable. * The line numbering starts with '0' and a '-1' means no line * qualifies. */ virtual int firstEditableLine(); virtual int lastEditableLine(); protected: private: }; #endif // CPPCODEDOCUMENTATION_H
1,938
C++
.h
56
30.321429
92
0.713673
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,061
cppcodegenerationform.h
KDE_umbrello/umbrello/codegenerators/cpp/cppcodegenerationform.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef CPPCODEGENERATIONFORM_H #define CPPCODEGENERATIONFORM_H #include "ui_cppcodegenerationformbase.h" class QListWidgetItem; /** * @author Brian Thomas */ class CPPCodeGenerationForm : public QWidget, private Ui::CPPCodeGenerationFormBase { Q_OBJECT public: explicit CPPCodeGenerationForm (QWidget *parent = nullptr, const char *name = nullptr); virtual ~CPPCodeGenerationForm(); void setPackageIsANamespace(bool bFlag = true); void setVirtualDestructors(bool bFlag = true); void setGenerateEmptyConstructors(bool bFlag = true); void setGenerateAccessorMethods(bool bFlag = true); void setOperationsAreInline(bool bFlag = true); void setAccessorsAreInline(bool bFlag = true); void setAccessorsArePublic(bool bFlag = true); void setGenerateMakefileDocument(bool bFlag = true); void setDocToolTag(const QString &value); void setGetterWithoutGetPrefix(bool bFlag = true); void setRemovePrefixFromAccessorMethodName(bool bFlag = true); void setAccessorMethodsStartWithUpperCase(bool bFlag); void setClassMemberPrefix(const QString &value); bool getPackageIsANamespace(); bool getVirtualDestructors(); bool getGenerateEmptyConstructors(); bool getGenerateAccessorMethods(); bool getOperationsAreInline(); bool getAccessorsAreInline(); bool getAccessorsArePublic(); bool getGenerateMakefileDocument(); QString getDocToolTag(); bool getGettersWithGetPrefix(); bool getRemovePrefixFromAccessorMethodName(); bool getAccessorMethodsStartWithUpperCase(); QString getClassMemberPrefix(); public Q_SLOTS: virtual void browseClicked(); private Q_SLOTS: virtual void generalOptionsListWidgetClicked(QListWidgetItem *); private: friend class CPPCodeGenerationPolicyPage; // check boxes for the available options QListWidgetItem *m_optionPackageIsANamespace; QListWidgetItem *m_optionVirtualDestructors; QListWidgetItem *m_optionGenerateEmptyConstructors; QListWidgetItem *m_optionGenerateAccessorMethods; QListWidgetItem *m_optionOperationsAreInline; QListWidgetItem *m_optionAccessorsAreInline; QListWidgetItem *m_optionAccessorsArePublic; QListWidgetItem *m_optionDocToolTag; QListWidgetItem *m_optionGetterWithGetPrefix; QListWidgetItem *m_optionRemovePrefixFromAccessorMethodName; QListWidgetItem *m_optionAccessorMethodsStartWithUpperCase; static Qt::CheckState toCheckState(bool value); }; #endif
2,638
C++
.h
64
36.96875
93
0.798905
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,062
aswriter.h
KDE_umbrello/umbrello/codegenerators/as/aswriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2003 Alexander Blum <blum@kewbee.de> SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef ASWRITER_H #define ASWRITER_H #include "simplecodegenerator.h" #include "umloperationlist.h" #include "umlassociationlist.h" class QTextStream; /** * Class ASWriter is a ActionScript code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class ASWriter : public SimpleCodeGenerator { Q_OBJECT public: ASWriter(); virtual ~ASWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeOperations(QString classname, UMLOperationList *opList, QTextStream &as); void writeAssociation(QString& classname, UMLAssociationList& assoclist, QTextStream &as); }; #endif //ASWRITER
992
C++
.h
29
31.172414
94
0.783386
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,063
tclwriter.h
KDE_umbrello/umbrello/codegenerators/tcl/tclwriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Rene Meyer <rene.meyer@sturmit.de> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef TCLWRITER_H #define TCLWRITER_H #include "simplecodegenerator.h" #include "umloperationlist.h" #include "umlattributelist.h" #include "umlassociationlist.h" #include <QStringList> class QFile; class QTextStream; /** * Class TclWriter is a code generator for UMLClassifier objects. * Create an instance of this class, and feed it a UMLClassifier when * calling writeClass and it will generate both a header (.h) and * source (.tcl) file for that classifier. */ class TclWriter : public SimpleCodeGenerator { public: TclWriter(); virtual ~TclWriter(); virtual void writeClass(UMLClassifier * c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: void writeHeaderFile(UMLClassifier * c, QFile & file); void writeSourceFile(UMLClassifier * c, QFile & file); void writeCode(const QString &text); void writeComm(const QString &text); void writeDocu(const QString &text); void writeConstructorDecl(); void writeDestructorDecl(); void writeAttributeDecl(UMLClassifier * c, Uml::Visibility::Enum visibility, bool writeStatic); void writeAssociationIncl(UMLAssociationList list, Uml::ID::Type myId, const QString &type); void writeAssociationDecl(UMLAssociationList associations, Uml::Visibility::Enum permit, Uml::ID::Type id, const QString &type); void writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName, const QString &multi, const QString &doc, const QString &docname); void writeInitAttributeHeader(UMLClassifier * c); void writeInitAttributeSource(UMLClassifier* c); void writeConstructorHeader(); void writeConstructorSource(UMLClassifier * c); void writeDestructorHeader(); void writeDestructorSource(); void writeOperationHeader(UMLClassifier * c, Uml::Visibility::Enum permitScope); void writeOperationSource(UMLClassifier * c, Uml::Visibility::Enum permitScope); void writeAttributeSource(UMLClassifier * c); void writeAssociationSource(UMLAssociationList associations, Uml::ID::Type id); void writeAssociationRoleSource(const QString &fieldClassName, const QString &roleName, const QString &multi); void writeUse(UMLClassifier * c); QString getUMLObjectName(UMLObject * obj); QString fixTypeName(const QString &string); QTextStream* mStream; ///< current output stream QString mNamespace; ///< namespace information QString mClassGlobal; ///< information about current classifier QStringList ObjectFieldVariables; QStringList VectorFieldVariables; }; #endif // TCLWRITER_H
3,213
C++
.h
71
37.098592
99
0.690331
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,064
rubycodeclassfield.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodeclassfield.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODECLASSFIELD_H #define RUBYCODECLASSFIELD_H #include "codeclassfield.h" #include <QString> class ClassifierCodeDocument; class RubyCodeClassField : public CodeClassField { Q_OBJECT public: /** * Constructors */ RubyCodeClassField (ClassifierCodeDocument * parentDoc, UMLRole * role); RubyCodeClassField (ClassifierCodeDocument * parentDoc, UMLAttribute * attrib); /** * Empty Destructor */ virtual ~RubyCodeClassField (); QString getFieldType(); QString getFieldName(); QString getInitialValue(); QString getTypeName (); protected: private: // void initDeclCodeBlock (); }; #endif // RUBYCODECLASSFIELD_H
925
C++
.h
32
25.0625
92
0.749431
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,065
rubycodecomment.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodecomment.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODECOMMENT_H #define RUBYCODECOMMENT_H #include "codecomment.h" #include <QString> /** * class RubyCodeComment * A Ruby code comment. There are two styles of comments: * these are simply started with a hash and no terminating * characters, or delimited by '=begin' and '=end' tags at the * start of lines */ class RubyCodeComment : virtual public CodeComment { public: /** * Constructors */ explicit RubyCodeComment (CodeDocument * doc, const QString & text = QString()); /** * Empty Destructor */ virtual ~RubyCodeComment (); /** * @return QString */ QString toString () const; /** * UnFormat a long text string. Typically, this means removing * the indentation (linePrefix) and/or newline chars from each line. */ virtual QString unformatText (const QString & text, const QString & indent = QString()); /** * A special version here because we want to not only indent * the new line, but to add the "#" as well. */ virtual QString getNewEditorLine (int amount); protected: private: }; #endif // RUBYCODECOMMENT_H
1,376
C++
.h
45
26.666667
92
0.701062
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,066
rubyclassdeclarationblock.h
KDE_umbrello/umbrello/codegenerators/ruby/rubyclassdeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCLASSDECLARATIONBLOCK_H #define RUBYCLASSDECLARATIONBLOCK_H #include "rubyclassifiercodedocument.h" #include "ownedhierarchicalcodeblock.h" #include <QString> class RubyClassDeclarationBlock : public OwnedHierarchicalCodeBlock { Q_OBJECT public: /** * Empty Constructor */ explicit RubyClassDeclarationBlock (RubyClassifierCodeDocument * parentDoc, const QString &start = QString(), const QString &endText = QStringLiteral("end"), const QString &comment = QString()); /** * Empty Destructor */ virtual ~RubyClassDeclarationBlock (); /** * Update the start/end text of this codeblock. */ void updateContent (); /** * Save the XMI representation of this object */ virtual void saveToXMI(QXmlStreamWriter& writer); /** * load params from the appropriate XMI element node. */ virtual void loadFromXMI (QDomElement & root); private: void init (RubyClassifierCodeDocument * parent, const QString &comment); }; #endif // RUBYCLASSDECLARATIONBLOCK_H
1,293
C++
.h
38
29.763158
198
0.738114
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,067
rubycodeoperation.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodeoperation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEOPERATION_H #define RUBYCODEOPERATION_H #include "codeoperation.h" #include <QString> class RubyClassifierCodeDocument; class RubyCodeOperation : virtual public CodeOperation { Q_OBJECT public: /** * Empty Constructor */ RubyCodeOperation (RubyClassifierCodeDocument * doc, UMLOperation * op, const QString & body = QString(), const QString & comment = QString()); /** * Empty Destructor */ virtual ~RubyCodeOperation (); virtual int lastEditableLine(); protected: void updateMethodDeclaration(); }; #endif // RUBYCODEOPERATION_H
834
C++
.h
27
27.185185
147
0.74937
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,068
rubycodegenerationpolicy.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodegenerationpolicy.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEGENERATIONPOLICY_H #define RUBYCODEGENERATIONPOLICY_H #include "codegenpolicyext.h" #include "codegenerationpolicy.h" #include <QString> class CodeGenerationPolicyPage; class RubyCodeGenerationPolicy : public CodeGenPolicyExt { Q_OBJECT public: RubyCodeGenerationPolicy(); virtual ~RubyCodeGenerationPolicy(); void setAutoGenerateAttribAccessors(bool var); bool getAutoGenerateAttribAccessors(); void setAutoGenerateAssocAccessors(bool var); bool getAutoGenerateAssocAccessors(); virtual void setDefaults(CodeGenPolicyExt * defaults, bool emitUpdateSignal = true); virtual void setDefaults(bool emitUpdateSignal = true); CodeGenerationPolicyPage *createPage (QWidget *parent = nullptr, const char *name = nullptr); private: CodeGenerationPolicy *m_commonPolicy; void init(); }; #endif // RUBYCODEGENERATIONPOLICY_H
1,123
C++
.h
29
35.137931
99
0.799815
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,069
rubycodegenerator.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodegenerator.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEGENERATOR_H #define RUBYCODEGENERATOR_H #include "codeviewerstate.h" #include "advancedcodegenerator.h" #include "rubyclassifiercodedocument.h" #include "rubycodegenerationpolicy.h" #include "umldoc.h" #include <QString> class CodeBlockWithComments; class CodeViewerDialog; class RubyCodeGenerator : public AdvancedCodeGenerator { Q_OBJECT public: RubyCodeGenerator(); virtual ~RubyCodeGenerator(); bool getAutoGenerateAttribAccessors(); bool getAutoGenerateAssocAccessors(); static QString getListFieldClassName(); virtual CodeViewerDialog * getCodeViewerDialog(QWidget* parent, CodeDocument * doc, Settings::CodeViewerState & state); RubyCodeGenerationPolicy * getRubyPolicy(); CodeDocument * newClassifierCodeDocument(UMLClassifier * classifier); Uml::ProgrammingLanguage::Enum language() const; static QString cppToRubyType(const QString &cppType); static QString cppToRubyName(const QString &cppName); virtual QStringList reservedKeywords() const; protected: // CodeBlockWithComments * createClassDecl(UMLClassifier *c, RubyClassifierCodeDocument * doc); }; #endif // RUBYCODEGENERATOR_H
1,422
C++
.h
36
35.861111
98
0.797366
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,070
rubyclassifiercodedocument.h
KDE_umbrello/umbrello/codegenerators/ruby/rubyclassifiercodedocument.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCLASSIFIERCODEDOCUMENT_H #define RUBYCLASSIFIERCODEDOCUMENT_H #include "codeclassfieldlist.h" #include "classifiercodedocument.h" #include "classifier.h" #include "hierarchicalcodeblock.h" #include "rubycodeclassfield.h" #include "rubycodeoperation.h" #include <QString> class RubyClassDeclarationBlock; class RubyCodeGenerationPolicy; /** * class RubyClassifierCodeDocument * A Ruby UMLClassifier Code Document. * We carve the Ruby document up into sections as follows: * - header * - class declaration * - guts of the class (e.g. accessor methods, operations, dependent classes) */ class RubyClassifierCodeDocument : public ClassifierCodeDocument { Q_OBJECT public: explicit RubyClassifierCodeDocument(UMLClassifier * classifier); virtual ~RubyClassifierCodeDocument(); //CodeDocumentDialog getDialog(); RubyCodeGenerationPolicy * getRubyPolicy() const; QString getRubyClassName(const QString &name) const; QString getPath() const; bool addCodeOperation(CodeOperation * op); void updateContent(); protected: void resetTextBlocks(); virtual void loadChildTextBlocksFromNode(QDomElement & root); void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, RubyClassDeclarationBlock * codeBlock); bool forceDoc(); private: RubyClassDeclarationBlock * classDeclCodeBlock; HierarchicalCodeBlock * constructorBlock; HierarchicalCodeBlock * operationsBlock; HierarchicalCodeBlock * publicBlock; HierarchicalCodeBlock * privateBlock; HierarchicalCodeBlock * protectedBlock; // HierarchicalCodeBlock * namespaceBlock; HierarchicalCodeBlock * pubConstructorBlock; HierarchicalCodeBlock * protConstructorBlock; HierarchicalCodeBlock * privConstructorBlock; HierarchicalCodeBlock * pubOperationsBlock; HierarchicalCodeBlock * privOperationsBlock; HierarchicalCodeBlock * protOperationsBlock; void init(); RubyClassDeclarationBlock * getClassDecl(); }; #endif // RUBYCLASSIFIERCODEDOCUMENT_H
2,282
C++
.h
59
35.067797
118
0.804645
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,071
rubycodeclassfielddeclarationblock.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodeclassfielddeclarationblock.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODECLASSFIELDDECLARATIONBLOCK_H #define RUBYCODECLASSFIELDDECLARATIONBLOCK_H #include "codeclassfielddeclarationblock.h" #include <QString> class RubyCodeClassFieldDeclarationBlock : public CodeClassFieldDeclarationBlock { Q_OBJECT public: explicit RubyCodeClassFieldDeclarationBlock(CodeClassField * parent); virtual ~RubyCodeClassFieldDeclarationBlock(); void updateContent(); private: }; #endif // RUBYCODECLASSFIELDDECLARATIONBLOCK_H
704
C++
.h
19
34.052632
92
0.82963
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,072
rubywriter.h
KDE_umbrello/umbrello/codegenerators/ruby/rubywriter.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYWRITER_H #define RUBYWRITER_H #include "simplecodegenerator.h" #include "umlattributelist.h" #include "umloperationlist.h" #include <QStringList> /** * Class RubyWriter is a ruby code generator for UMLClassifier objects. * Just call writeClass and feed it a UMLClassifier. */ class RubyWriter : public SimpleCodeGenerator { Q_OBJECT public: RubyWriter(); virtual ~RubyWriter(); virtual void writeClass(UMLClassifier *c); virtual Uml::ProgrammingLanguage::Enum language() const; virtual QStringList reservedKeywords() const; private: QString cppToRubyType(const QString &typeStr); QString cppToRubyName(const QString &nameStr); void writeAttributeMethods(UMLAttributeList attribs, Uml::Visibility::Enum visibility, QTextStream &stream); void writeSingleAttributeAccessorMethods(const QString &fieldName, const QString &descr, QTextStream &h); void writeOperations(UMLClassifier *c, QTextStream &h); void writeOperations(const QString &classname, const UMLOperationList &opList, Uml::Visibility::Enum permitScope, QTextStream &h); }; #endif //RUBYWRITER
1,504
C++
.h
37
33.567568
92
0.709855
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,073
rubycodedocumentation.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodedocumentation.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEDOCUMENTATION_H #define RUBYCODEDOCUMENTATION_H #include "codecomment.h" #include <QString> class RubyClassifierCodeDocument; /** * class RubyCodeDocumentation * A Ruby code comment. There is only a single styles of comments: * these are simply started with a hash and no terminating * characters */ class RubyCodeDocumentation : virtual public CodeComment { public: /** * Constructors */ explicit RubyCodeDocumentation (RubyClassifierCodeDocument * doc, const QString & text = QString()); /** * Empty Destructor */ virtual ~RubyCodeDocumentation (); /** * Save the XMI representation of this object */ virtual void saveToXMI(QXmlStreamWriter& writer); /** * @return QString */ QString toString () const; /** * UnFormat a long text string. Typically, this means removing * the indentation (linePrefix) and/or newline chars from each line. */ virtual QString unformatText (const QString & text, const QString & indent = QString()); /** * A special version here because we want to not only indent * the new line, but to add the "# " sequence as well. */ virtual QString getNewEditorLine (int amount); /** * Ush. These are terrifically bad and must one day go away. * Both methods indicate the range of lines in this textblock * which may be edited by the codeeditor (assuming that any are * actually editable). The default case is no lines are editable. * The line numbering starts with '0' and a '-1' means no line * qualifies. */ virtual int firstEditableLine(); virtual int lastEditableLine(); protected: private: }; #endif // RUBYCODEDOCUMENTATION_H
1,986
C++
.h
59
29.271186
104
0.710843
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,074
rubycodegenerationpolicypage.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodegenerationpolicypage.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEGENERATIONPOLICYPAGE_H #define RUBYCODEGENERATIONPOLICYPAGE_H #include "codegenerationpolicypage.h" #include "ui_rubycodegenerationformbase.h" #include "rubycodegenerationpolicy.h" class RubyCodeGenerationPolicyPage : public CodeGenerationPolicyPage { Q_OBJECT public: explicit RubyCodeGenerationPolicyPage (QWidget *parent= nullptr, const char *name= nullptr, RubyCodeGenerationPolicy *policy = nullptr); virtual ~RubyCodeGenerationPolicyPage(); protected: Ui::RubyCodeGenerationFormBase form; public Q_SLOTS: void apply(); }; #endif
814
C++
.h
22
33.954545
143
0.811297
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false
750,075
rubycodeaccessormethod.h
KDE_umbrello/umbrello/codegenerators/ruby/rubycodeaccessormethod.h
/* SPDX-License-Identifier: GPL-2.0-or-later SPDX-FileCopyrightText: 2005 Richard Dale <Richard_Dale@tipitina.demon.co.uk> SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> */ #ifndef RUBYCODEACCESSORMETHOD_H #define RUBYCODEACCESSORMETHOD_H #include "codeaccessormethod.h" #include "rubycodeclassfield.h" #include <QString> class RubyCodeAccessorMethod : public CodeAccessorMethod { Q_OBJECT public: RubyCodeAccessorMethod(CodeClassField * field, CodeAccessorMethod::AccessorType type); virtual ~RubyCodeAccessorMethod(); void update(); virtual void updateMethodDeclaration(); virtual void updateContent(); protected: virtual void setAttributesOnNode(QXmlStreamWriter& writer); virtual void setAttributesFromNode(QDomElement & element); private: }; #endif // RUBYCODEACCESSORMETHOD_H
881
C++
.h
25
31.96
92
0.803084
KDE/umbrello
114
36
0
GPL-2.0
9/20/2024, 9:41:49 PM (Europe/Amsterdam)
false
false
false
false
false
false
false
false