umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
AssocRules Class Reference

#include <assocrules.h>

Collaboration diagram for AssocRules:

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. More...
 
static const int m_nNumRules = sizeof(m_AssocRules) / sizeof(AssocRules::Assoc_Rule)
 The number of rules known about. More...
 

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

Enumerator
All 
Java 

◆ 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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ allowRole()

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

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

Here is the call graph for this function:

◆ allowSelf()

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

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

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

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: