umbrello: AssocRules Class Reference

umbrello 2.37.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
AssocRules Class Reference

`#include <assocrules.h>`

## Classes
class | Assoc_Rule

## Public Types
enum | Language { All , Java }
enum | Level { Any , UML1 , UML2 }

## Public Member Functions
| AssocRules ()
| ~AssocRules ()

## Static Public Member Functions
static bool | allowAssociation (Uml::AssociationType::Enum assocType, UMLWidget *widget)
static bool | allowAssociation (Uml::AssociationType::Enum assocType, UMLWidget *widgetA, UMLWidget *widgetB)
static bool | allowRole (Uml::AssociationType::Enum assocType)
static bool | allowMultiplicity (Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
static bool | allowSelf (Uml::AssociationType::Enum assocType, WidgetBase::WidgetType widgetType)
static Uml::AssociationType::Enum | isGeneralisationOrRealisation (UMLWidget *widgetA, UMLWidget *widgetB)

## Static Private Attributes
static const Assoc_Rule | m_AssocRules []
| Container that holds all the rules.
static const int | m_nNumRules = sizeof(m_AssocRules) / sizeof(AssocRules::Assoc_Rule)
| The number of rules known about.

## Detailed Description

Used to determine rules for associations.

Author
  Paul Hensgen Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Enumeration Documentation

## ◆ Language

enum AssocRules::Language

Enumerator
All |
Java |

## ◆ Level

enum AssocRules::Level

Enumerator
Any |
UML1 |
UML2 |

## Constructor & Destructor Documentation

## ◆ AssocRules()

AssocRules::AssocRules | ( |  | ) |

Constructor.

## ◆ ~AssocRules()

AssocRules::~AssocRules | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ allowAssociation() [1/2]

bool AssocRules::allowAssociation | ( | Uml::AssociationType::Enum | assocType,
|  | UMLWidget * | widget
| ) |  |
| static

Returns whether an association is going to be allowed for the given values. This method is used to test if you can start an association.

## ◆ allowAssociation() [2/2]

bool AssocRules::allowAssociation | ( | Uml::AssociationType::Enum | assocType,
|  | UMLWidget * | widgetA,
|  | UMLWidget * | widgetB
| ) |  |
| static

Returns whether an association is valid with the given variables. This method is used to finish an association. When we know what we are going to connect both ends of the association to, we can use this method.

## ◆ allowMultiplicity()

bool AssocRules::allowMultiplicity | ( | Uml::AssociationType::Enum | assocType,
|  | WidgetBase::WidgetType | widgetType
| ) |  |
| static

Returns whether to allow a multiplicity text for the given association and widget type.

## ◆ allowRole()

bool AssocRules::allowRole | ( | Uml::AssociationType::Enum | assocType | ) |
| static

Returns whether to allow a role text for the given association type.

## ◆ allowSelf()

bool AssocRules::allowSelf | ( | Uml::AssociationType::Enum | assocType,
|  | WidgetBase::WidgetType | widgetType
| ) |  |
| static

Returns whether to allow an association to self for given variables.

## ◆ isGeneralisationOrRealisation()

Uml::AssociationType::Enum AssocRules::isGeneralisationOrRealisation | ( | UMLWidget * | widgetA,
|  | UMLWidget * | widgetB
| ) |  |
| static

Returns whether an implements association should be a Realisation or a Generalisation. as defined in m_AssocRules.

## Member Data Documentation

## ◆ m_AssocRules

const AssocRules::Assoc_Rule AssocRules::m_AssocRules
| staticprivate

Container that holds all the rules.

## ◆ m_nNumRules

const int AssocRules::m_nNumRules = sizeof(m_AssocRules) / sizeof(AssocRules::Assoc_Rule)
| staticprivate

The number of rules known about.

The documentation for this class was generated from the following files:

- umbrello/assocrules.h
- umbrello/assocrules.cpp