• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

umlnamespace.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   This program is free software; you can redistribute it and/or modify  *
00003  *   it under the terms of the GNU General Public License as published by  *
00004  *   the Free Software Foundation; either version 2 of the License, or     *
00005  *   (at your option) any later version.                                   *
00006  *                                                                         *
00007  *   copyright (C) 2002-2009                                               *
00008  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00009  ***************************************************************************/
00010 
00011 #ifndef UMLNAMESPACE_H
00012 #define UMLNAMESPACE_H
00013 
00014 #include <string>
00015 #include <QtCore/QString>
00016 #include <kdebug.h>
00017 
00022 namespace Uml
00023 {
00024 
00025     enum Model_Type
00026     {
00027         mt_Logical,
00028         mt_UseCase,
00029         mt_Component,
00030         mt_Deployment,
00031         mt_EntityRelationship,
00032         N_MODELTYPES   // must remain last
00033     };
00034 
00035     enum Object_Type
00036     {
00037         ot_UMLObject  = 100,
00038         ot_Actor,
00039         ot_UseCase,
00040         ot_Package,
00041         ot_Interface,
00042         ot_Datatype,
00043         ot_Enum,
00044         ot_Class,
00045         ot_Association,
00046         ot_Attribute,
00047         ot_Operation,
00048         ot_EnumLiteral,
00049         ot_Template,
00050         ot_Component,
00051         ot_Artifact,
00052         ot_Node,
00053         ot_Stereotype,
00054         ot_Role,
00055         ot_Entity,
00056         ot_EntityAttribute,
00057         ot_Folder,
00058         ot_EntityConstraint,
00059         ot_UniqueConstraint,
00060         ot_ForeignKeyConstraint,
00061         ot_CheckConstraint,
00062         ot_Category
00063     };
00064 
00065     class Visibility {
00066     public:
00067         enum Value {
00068             Public,
00069             Private,
00070             Protected,
00071             Implementation, // objects marked with this are declared in the implementation file.
00072             FromParent = 3  // alias for Implementation, used by CodeGenerationPolicy
00073         };
00074         Visibility();
00075         Visibility(Value v);
00076         static QString toString(Value value, bool mnemonic = false);
00077         static Visibility fromString(const QString& vis);
00078 
00079         QString toString(bool mnemonic = false) const;
00080         operator Value () const;
00081     private:
00082         Value _v;
00083     };
00084 
00085     enum Widget_Type
00086     {
00087         wt_UMLWidget = 300,         // does not have UMLObject representation
00088         wt_Actor,                   // has UMLObject representation
00089         wt_UseCase,                 // has UMLObject representation
00090         wt_Class,                   // has UMLObject representation
00091         wt_Interface,               // has UMLObject representation
00092         wt_Datatype,                // has UMLObject representation
00093         wt_Enum,                    // has UMLObject representation
00094         wt_Entity,                  // has UMLObject representation
00095         wt_Package,                 // has UMLObject representation
00096         wt_Object,                  // has UMLObject representation
00097         wt_Note,                    // does not have UMLObject representation
00098         wt_Box,                     // does not have UMLObject representation
00099         wt_Message,                 // does not have UMLObject representation
00100         wt_Text,                    // does not have UMLObject representation
00101         wt_State,                   // does not have UMLObject representation
00102         wt_Activity,                // does not have UMLObject representation
00103         wt_Component,               // has UMLObject representation
00104         wt_Artifact,                // has UMLObject representation
00105         wt_Node,                    // has UMLObject representation
00106         wt_Association,             // has UMLObject representation
00107         wt_ForkJoin,                // does not have UMLObject representation
00108         wt_Precondition,            // does not have UMLObject representation
00109         wt_CombinedFragment,        // does not have UMLObject representation
00110         wt_FloatingDashLine,        // does not have UMLObject representation
00111         wt_Signal,                  // does not have UMLObject representation
00112         wt_Pin,
00113         wt_ObjectNode,
00114         wt_Region,
00115         wt_Category                 // has UMLObject representation
00116     };
00117 
00118     enum Diagram_Type
00119     {
00120         //the values in this enum are saved out to the file
00121         //for file compatibility, only add new values to the end
00122         dt_Undefined = 0,
00123         dt_Class,
00124         dt_UseCase,
00125         dt_Sequence,
00126         dt_Collaboration,
00127         dt_State,
00128         dt_Activity,
00129         dt_Component,
00130         dt_Deployment,
00131         dt_EntityRelationship,
00132         N_DIAGRAMTYPES   // must remain last
00133     };
00134 
00135     enum Association_Type
00136     {
00137         at_Generalization  =  500,
00138         at_Aggregation,
00139         at_Dependency,
00140         at_Association,
00141         at_Association_Self,
00142         at_Coll_Message,
00143         at_Seq_Message,
00144         at_Coll_Message_Self,
00145         at_Seq_Message_Self,
00146         at_Containment,
00147         at_Composition,
00148         at_Realization,
00149         at_UniAssociation,
00150         at_Anchor,
00151         at_State,
00152         at_Activity,
00153         at_Exception,
00154         at_Category2Parent,
00155         at_Child2Category,
00156         at_Relationship,
00157         at_Unknown  =  - 1
00158     };
00159 
00160     enum Signature_Type
00161     {
00162         st_NoSig  =  600,
00163         st_ShowSig,
00164         st_SigNoVis,
00165         st_NoSigNoVis
00166     };
00167 
00168     enum Text_Role
00169     {
00170         tr_Floating  =  700,   //text widget on diagrams
00171         tr_MultiA,             //Text for Multiple A
00172         tr_MultiB,             //Text for Multiple B
00173         tr_Name,               //middle text on most associations
00174         tr_Seq_Message,        //message on seq diagram between two objects
00175         tr_Seq_Message_Self,   //message to self on seq diagram - feature not implemented yet
00176         tr_Coll_Message,       //message between two objects on a collab diagram
00177         tr_Coll_Message_Self,  //message to object self on collab diagram
00178         tr_State,
00179         tr_RoleAName,          //RoleA text on associations
00180         tr_RoleBName,          //RoleB text on associations
00181         tr_ChangeA,            //Changeability A text on associations
00182         tr_ChangeB             //Changeability B text on associations
00183     };
00184 
00185     enum ListView_Type
00186     {
00187         //the values in this enum are saved out to the file
00188         //for file compatibility, only add new values to the end
00189         lvt_View  =  800,
00190         lvt_Logical_View,
00191         lvt_UseCase_View,
00192         lvt_Logical_Folder,
00193         lvt_UseCase_Folder,
00194         lvt_UseCase_Diagram,
00195         lvt_Collaboration_Diagram,
00196         lvt_Class_Diagram,
00197         lvt_State_Diagram,
00198         lvt_Activity_Diagram,
00199         lvt_Sequence_Diagram,
00200         lvt_Actor,
00201         lvt_UseCase,
00202         lvt_Class,
00203         lvt_Attribute,
00204         lvt_Operation,
00205         lvt_Template,
00206         lvt_Interface,
00207         lvt_Package,
00208         lvt_Component_Diagram,
00209         lvt_Component_Folder,
00210         lvt_Component_View,
00211         lvt_Component,
00212         lvt_Diagrams,  // currently unused
00213         lvt_Artifact,
00214         lvt_Deployment_Diagram,
00215         lvt_Deployment_Folder,
00216         lvt_Deployment_View,
00217         lvt_Node,
00218         lvt_Datatype,
00219         lvt_Datatype_Folder,
00220         lvt_Enum,
00221         lvt_Entity,
00222         lvt_EntityAttribute,
00223         lvt_EntityRelationship_Diagram,
00224         lvt_EntityRelationship_Folder,
00225         lvt_EntityRelationship_Model,
00226         lvt_Subsystem,
00227         lvt_Model,
00228         lvt_EnumLiteral,
00229         lvt_UniqueConstraint,
00230         lvt_PrimaryKeyConstraint,
00231         lvt_ForeignKeyConstraint,
00232         lvt_CheckConstraint,
00233         lvt_Category,
00234         lvt_Unknown = -1
00235     };
00236 
00237     enum Changeability_Type
00238     {
00239         chg_Changeable = 900,
00240         chg_Frozen,
00241         chg_AddOnly
00242     };
00243 
00244     enum Sequence_Message_Type
00245     {
00246         //This is saved out to the file so only add new entries at the end
00247         sequence_message_synchronous = 1000,
00248         sequence_message_asynchronous,
00249         sequence_message_creation,
00250         sequence_message_lost,
00251         sequence_message_found
00252     };
00253 
00254     enum DBIndex_Type
00255     {
00256         None  =  1100,
00257         Primary,
00258         Index,
00259         Unique
00260     };
00261 
00265     enum Role_Type { A, B };
00266 
00274     enum Parameter_Direction { pd_In, pd_InOut, pd_Out };
00275 
00279     enum Programming_Language {
00280         pl_ActionScript,
00281         pl_Ada,
00282         pl_Cpp,
00283         pl_CSharp,
00284         pl_D,
00285         pl_IDL,
00286         pl_Java,
00287         pl_JavaScript,
00288         pl_MySQL,
00289         pl_Pascal,
00290         pl_Perl,
00291         pl_PHP,
00292         pl_PHP5,
00293         pl_PostgreSQL,
00294         pl_Python,
00295         pl_Ruby,
00296         pl_SQL,
00297         pl_Tcl,
00298         pl_Vala,
00299         pl_XMLSchema,
00300         pl_Reserved
00301     };
00302 
00307     enum Region {
00308         reg_Error = 0,
00309         reg_West,
00310         reg_North,
00311         reg_East,
00312         reg_South,
00313         reg_NorthWest,
00314         reg_NorthEast,
00315         reg_SouthEast,
00316         reg_SouthWest
00317     };
00318 
00319     enum Corner {
00320         corner_TopLeft = 0x1,
00321         corner_TopRight = 0x2,
00322         corner_BottomRight = 0x4,
00323         corner_BottomLeft = 0x8
00324     };
00325     Q_DECLARE_FLAGS(Corners, Corner)
00326 
00327     
00330     typedef std::string IDType;
00331 
00335     const IDType id_None = "-1";
00336     const IDType id_Reserved = "0";
00337 
00338     bool tagEq (const QString& tag, const QString& pattern);
00339 
00340 }  // end namespace Uml
00341 
00342 # define STR2ID(id)  qPrintable(id)
00343 # define ID2STR(id)  QString(id.c_str())
00344 
00345 // convenience macros for console output to the Umbrello area
00346 #define uDebug()   kDebug(8060)
00347 #define uError()   kError(8060)
00348 #define uWarning() kWarning(8060)
00349 
00350 #define DISABLE_COPY(Class)                     \
00351     Class(const Class &);                       \
00352     Class &operator=(const Class &);
00353 
00354 #define uIgnoreZeroPointer(a) if (!a) { uDebug() << "zero pointer detected" << __FILE__ << __LINE__; continue; }
00355 
00362 #define ENUM_NAME(o,e,v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v)))
00363 
00364 #endif

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal