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

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
assocrules.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2002-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef ASSOCRULES_H
12 #define ASSOCRULES_H
13 
14 #include "umlobject.h"
15 #include "widgetbase.h"
16 
17 class UMLWidget;
18 
25 class AssocRules
26 {
27 public:
28 
29  AssocRules();
30  ~AssocRules();
31 
32  static bool allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget * widget);
33  static bool allowAssociation(Uml::AssociationType::Enum assocType,
34  UMLWidget * widgetA, UMLWidget * widgetB);
35 
36  static bool allowRole(Uml::AssociationType::Enum assocType);
37 
38  static bool allowMultiplicity(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType);
39 
40  static bool allowSelf(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType);
41 
42  static Uml::AssociationType::Enum isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB);
43 
44 private:
45 
46  struct Assoc_Rule {
47  Uml::AssociationType::Enum assoc_type;
48  WidgetBase::WidgetType widgetA_type;
49  WidgetBase::WidgetType widgetB_type;
50  bool role;
51  bool multiplicity;
52  bool bidirectional;
53  bool self;
54  };
55 
56  static Assoc_Rule m_AssocRules[];
57  static int m_nNumRules;
58 };
59 
60 #endif
umlobject.h
AssocRules::isGeneralisationOrRealisation
static Uml::AssociationType::Enum isGeneralisationOrRealisation(UMLWidget *widgetA, UMLWidget *widgetB)
Returns whether an implements association should be a Realisation or a Generalisation.
Definition: assocrules.cpp:343
AssocRules::AssocRules
AssocRules()
Constructor.
Definition: assocrules.cpp:35
AssocRules::allowMultiplicity
static bool allowMultiplicity(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
Returns whether to allow a multiplicity text for the given association and widget type...
Definition: assocrules.cpp:316
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:41
AssocRules
Used to determine rules for associations.
Definition: assocrules.h:25
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:99
AssocRules::~AssocRules
~AssocRules()
Destructor.
Definition: assocrules.cpp:42
AssocRules::allowSelf
static bool allowSelf(Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
Returns whether to allow an association to self for given variables.
Definition: assocrules.cpp:328
widgetbase.h
AssocRules::allowRole
static bool allowRole(Uml::AssociationType::Enum assocType)
Returns whether to allow a role text for the given association type.
Definition: assocrules.cpp:304
AssocRules::allowAssociation
static bool allowAssociation(Uml::AssociationType::Enum assocType, UMLWidget *widget)
Returns whether an association is going to be allowed for the given values.
Definition: assocrules.cpp:50
UMLWidget
This is the base class for nearly all graphical widgets.
Definition: umlwidget.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal