UMMF::XForm::AssocClassLinks - Create Assoociations for each AssociationEnd of each AssociationClass.
use UMMF::XForm::AssocClassLinks; my $xform = UMMF::XForm::AssocClassLinks->new(); $model = $xform->apply_Model($model);
This UML transform greatly simplifes and standardizes code generation for AssociationClasses.
This transform creates a new Association for each AssociationEnd of an AssociationClass. The new Association links the participants of the AssociationClass's AssociationEnds directly to the AssociationClass using the suffix '_AC' to distinguish it from the links specified by the AssociationClass's AssociationEnds itself.
'_AC'
For example:
__________ __________ | XClass | | YClass | |__________| |__________| | | 2 3 | | |__________|---x-----------------------y---|__________| | . | . | . __________________ | AssocClass | |__________________| | | |__________________|
AssociationEnd x has a multiplicity of 2, AssociationEnd y has a multiplicity of 3. This transformation results in:
x
multiplicity
2
y
3
__________ __________ | XClass | | YClass | |__________| |__________| | | 2 3 | | |__________|---x-----------------------y---|__________| | | | |1 . |1 x | y | . | | | | | . | | __________________ | | | AssocClass | | | 3 |__________________| 2 | +-y_AC--| |--x_AC------+ |__________________|
The AssocClass has outbound AssociationEnd with multiplicity of 1. And:
1. XClass => YClass multiplicity == XClass => AssocClass multiplicity 2. YClass => XClass multiplicity == YClass => AssocClass multiplicity
This provides direct navigation along the original AssociationClass Association behavior, while providing additional navigation to AssociationClass Class Attributes through the *_AC links.
*_AC
None exported.
Kurt Stephens, kstephens@users.sourceforge.net 2003/05/04
UMMF::UML::MetaMetaModel
$Revision: 1.9 $
To install UMMF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UMMF
CPAN shell
perl -MCPAN -e shell install UMMF
For more information on module installation, please visit the detailed CPAN module installation guide.