The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

UMMF::XForm::AssocClassLinks - Create Assoociations for each AssociationEnd of each AssociationClass.

SYNOPSIS

  use UMMF::XForm::AssocClassLinks;

  my $xform = UMMF::XForm::AssocClassLinks->new();
  $model = $xform->apply_Model($model);

DESCRIPTION

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.

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:

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

USAGE

PATTERNS

EXPORT

None exported.

AUTHOR

Kurt Stephens, kstephens@users.sourceforge.net 2003/05/04

SEE ALSO

UMMF::UML::MetaMetaModel

VERSION

$Revision: 1.9 $

METHODS