assocrules.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ASSOCRULES_H
00013 #define ASSOCRULES_H
00014
00015 #include "umlnamespace.h"
00016 namespace std
00017 { class type_info; }
00018
00019 class UMLWidget;
00020
00027 class AssocRules {
00028 public:
00032 AssocRules();
00033
00037 ~AssocRules();
00038
00043 static bool allowAssociation( Uml::Association_Type assocType, UMLWidget * widget );
00044
00045 static bool allowAssociation( Uml::Association_Type assocType, const std::type_info & );
00046
00051 static bool allowAssociation( Uml::Association_Type assocType,
00052 UMLWidget * widgetA, UMLWidget * widgetB,
00053 bool extendedCheck = true );
00054
00058 static bool allowRole( Uml::Association_Type assocType );
00059
00064 static bool allowMultiplicity( Uml::Association_Type assocType, Uml::Widget_Type widgetType );
00065
00069 static bool allowSelf( Uml::Association_Type assocType, Uml::Widget_Type widgetType );
00070
00076 static Uml::Association_Type isGeneralisationOrRealisation(UMLWidget* widgetA, UMLWidget* widgetB);
00077
00078 private:
00079
00083 struct Assoc_Rule {
00084 Uml::Association_Type assoc_type;
00085 Uml::Widget_Type widgetA_type;
00086 Uml::Widget_Type widgetB_type;
00087 bool role;
00088 bool multiplicity;
00089
00090 bool directional;
00091
00092 bool self;
00093 };
00094
00098 static Assoc_Rule m_AssocRules[];
00099
00103 static int m_nNumRules;
00104 };
00105
00106 #endif
This file is part of the documentation for umbrello Version 3.1.0.