| UMMF documentation | Contained in the UMMF distribution. |
interaction : THIS 0..* <---> context : UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration 11changeableinstance1compositepublicSet::Object
interaction : THIS 0..1 <---> interactionInstanceSet : UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet 0..*0..*changeableinstance1noneprivateSet::Object
interaction : THIS 1 <---> message : UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message 1..*__validate_type__typecheckisaInteractionisaBehavioral_Elements__Collaborations__Interaction__model_name __isAbstract__tangram_schema___initialize__initialize__createcontextset_contextadd_contextremove_contextclear_contextcount_contextinteractionInstanceSetset_interactionInstanceSetadd_interactionInstanceSetremove_interactionInstanceSetclear_interactionInstanceSetcount_interactionInstanceSetmessageset_messageadd_messageremove_messageclear_messagecount_message
UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction --
1.5
NO ATTRIBUTES
interaction : THIS 0..* <---> context : UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration 11changeableinstancecompositepublicSet::Objectinteraction : THIS 0..1 <---> interactionInstanceSet : UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet 0..*0..*changeableinstancenoneprivateSet::Objectinteraction : THIS 1 <---> message : UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message 1..*1..*changeableinstancenonepublicSet::Object__validate_typeUMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.
__typecheckUMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction-__validate_type($value)>> is false.
isaInteractionReturns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction. Other receivers will return false.
isaBehavioral_Elements__Collaborations__InteractionReturns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.
Other receivers will return false.
This is the fully qualified version of the isaInteraction method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Behavioral_Elements::Collaborations::Interaction') for an object or package of
this Classifier.
__isAbstract$package->__isAbstract;
Returns 0.
__tangram_schemamy $tangram_schema $obj_or_package->__tangram_schema
Returns a HASH ref that describes this Classifier for Tangram.
___initializeInitialize all Attributes and AssociationEnds in a instance of this Classifier. Does not initalize slots in its Generalizations.
See also: __initialize.
__initializeInitialize all slots in this Classifier and all its Generalizations.
See also: ___initialize.
__createCalls all <<create>> Methods for this Classifier and all Generalizations.
See also: ___create.
contextmy $val = $obj->context;
Returns the AssociationEnd context value of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration (UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration).
set_context$obj->set_context($val);
Sets the AssociationEnd context value.
$val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration (UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration).
Returns $obj.
add_context$obj->add_context($val);
Adds the AssociationEnd context value.
$val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration (UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration).
Throws exception if a value already exists.
Returns $obj.
remove_context$obj->remove_context($val);
Removes the AssociationEnd context value $val.
Returns $obj.
clear_context$obj->clear_context;
Clears the AssociationEnd context links to UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration (UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration).
Returns $obj.
count_context$obj->count_context;
Returns the number of elements of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration (UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration) associated with context.
interactionInstanceSetmy @val = $obj->interactionInstanceSet; my $ary_val = $obj->interactionInstanceSet;
Returns the AssociationEnd interactionInstanceSet values of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet (UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet).
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.
set_interactionInstanceSet$obj->set_interactionInstanceSet(@val);
Sets the AssociationEnd interactionInstanceSet value.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet (UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet).
Returns $obj.
add_interactionInstanceSet$obj->add_interactionInstanceSet(@val);
Adds AssociationEnd interactionInstanceSet values.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet (UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet).
Returns $obj.
remove_interactionInstanceSet$obj->remove_interactionInstanceSet(@val);
Removes the AssociationEnd interactionInstanceSet values @val.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet (UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet).
Returns $obj.
clear_interactionInstanceSet$obj->clear_interactionInstanceSet;
Clears the AssociationEnd interactionInstanceSet links to UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet (UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet).
Returns $obj.
count_interactionInstanceSet$obj->count_interactionInstanceSet;
Returns the number of elements associated with interactionInstanceSet.
messagemy @val = $obj->message; my $ary_val = $obj->message;
Returns the AssociationEnd message values of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.
set_message$obj->set_message(@val);
Sets the AssociationEnd message value.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message.
Returns $obj.
add_message$obj->add_message(@val);
Adds AssociationEnd message values.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message.
Returns $obj.
remove_message$obj->remove_message(@val);
Removes the AssociationEnd message values @val.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message.
Returns $obj.
clear_message$obj->clear_message;
Clears the AssociationEnd message links to UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message.
Returns $obj.
count_message$obj->count_message;
Returns the number of elements associated with message.
END OF DOCUMENT
| UMMF documentation | Contained in the UMMF distribution. |
# -*- perl -*- # DO NOT EDIT - This file is generated by UMMF; http://ummf.sourceforge.net # From template: $Id: Perl.txt,v 1.77 2006/05/14 01:40:03 kstephens Exp $ package UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction; #use 5.6.1; use strict; use warnings; ################################################################# # Version # our $VERSION = do { my @r = (q{1.5} =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r }; ################################################################# # Documentation #
################################################################# # Dependencies # use Carp qw(croak confess); use Set::Object 1.05; use Class::Multimethods 1.70; use Data::Dumper; use Scalar::Util qw(weaken); use UMMF::UML_1_5::__ObjectBase qw(:__ummf_array); ################################################################# # Generalizations # use base qw( UMMF::UML_1_5::Foundation::Core::ModelElement ); ################################################################# # Exports # our @EXPORT_OK = qw( ); our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); ################################################################# # Validation #
sub __validate_type($$) { my ($self, $x) = @_; no warnings; UNIVERSAL::isa($x, 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction' . ": value '$x'") unless __validate_type($self, $x); }
sub isaInteraction { 1 }
sub isaBehavioral_Elements__Collaborations__Interaction { 1 } ################################################################# # Introspection #
sub __model_name { 'Behavioral_Elements::Collaborations::Interaction' }
sub __isAbstract { 0; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction' => { 'table' => 'Behavioral_Elements__Collaborations__Interaction', 'abstract' => 0, 'slots' => { # Attributes # Associations 'context' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration', 'col' => 'context', } , 'interactionInstanceSet' => { 'type_impl' => 'iset', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet', 'table' => 'Behavioral_Elements__Collaborations__Interaction__interactionInstanceSet', 'coll' => 'interaction', } , 'message' => { 'type_impl' => 'iset', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message', 'table' => 'Behavioral_Elements__Collaborations__Interaction__message', 'coll' => 'interaction', 'aggreg' => '1', } , }, 'bases' => [ 'UMMF::UML_1_5::Foundation::Core::ModelElement', ], 'sql' => { }, }, ], 'sql' => { # Note Tangram::Ref::get_exporter() has # "UPDATE $table SET $self->{col} = $refid WHERE id = $id", # The id_col is hard-coded, # Thus id_col will not work. #'id_col' => '__sid', #'class_col' => '__stype', }, # 'set_id' => sub { } # 'get_id' => sub { } }; } ################################################################# # Class Attributes # ################################################################# # Class Associations # ################################################################# # Initialization #
sub ___initialize { my ($self) = @_; # Attributes # Associations # AssociationEnd # interaction 0..* # <--> # context 1 UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration. if ( defined $self->{'context'} ) { my $x = $self->{'context'}; $self->{'context'} = undef; $self->set_context($x); } # AssociationEnd # interaction 0..1 # <--> # interactionInstanceSet 0..* UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet. if ( defined $self->{'interactionInstanceSet'} ) { my $x = $self->{'interactionInstanceSet'}; $self->{'interactionInstanceSet'} = Set::Object->new(); $self->set_interactionInstanceSet(@$x); } # AssociationEnd # interaction 1 # <--> # message 1..* UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message. if ( defined $self->{'message'} ) { my $x = $self->{'message'}; $self->{'message'} = Set::Object->new(); $self->set_message(@$x); } $self; } my $__initialize_use;
sub __initialize { my ($self) = @_; # $DB::single = 1; unless ( ! $__initialize_use ) { $__initialize_use = 1; $self->__use('UMMF::UML_1_5::Foundation::Core::Element'); $self->__use('UMMF::UML_1_5::Foundation::Core::ModelElement'); } $self->UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction::___initialize; $self->UMMF::UML_1_5::Foundation::Core::Element::___initialize; $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___initialize; $self; }
sub __create { my ($self, @args) = @_; # $DB::single = 1; $self->UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Element::___create(); $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create(); $self; } ################################################################# # Attributes # ################################################################# # Association #
################################################################# # AssociationEnd interaction <---> context # type = UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration # multiplicity = 1 # ordering =
sub context ($) { my ($self) = @_; $self->{'context'}; }
sub set_context ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'context'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.context") } # Recursion lock $self->{'context'} = $val ; # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } $self; }
sub add_context ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'context'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::Collaboration')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.context"); # confess("UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction::context: too many") # if defined $self->{'context'}; # Recursion lock $self->{'context'} = $val ; # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } $self; }
sub remove_context ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'context'}) eq $val ) { # Recursion lock $val = $self->{'context'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } }
sub clear_context ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'context'}) ) { # Recursion lock my $val = $self->{'context'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } $self; }
sub count_context ($) { my ($self) = @_; my $x = $self->{'context'}; defined $x ? 1 : 0; }
################################################################# # AssociationEnd interaction <---> interactionInstanceSet # type = UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet # multiplicity = 0..* # ordering =
sub interactionInstanceSet ($) { my ($self) = @_; my $x = $self->{'interactionInstanceSet'}; # confess("Container for interactionInstanceSet $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/; wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ]; }
sub set_interactionInstanceSet ($@) { my ($self, @val) = @_; $self->clear_interactionInstanceSet; $self->add_interactionInstanceSet(@val); }
sub add_interactionInstanceSet ($@) { my ($self, @val) = @_; my $x = $self->{'interactionInstanceSet'} ||= Set::Object->new(); my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if $x->includes($val); $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.interactionInstanceSet"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } $self; }
sub remove_interactionInstanceSet ($@) { my ($self, @val) = @_; my $x = $self->{'interactionInstanceSet'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::InteractionInstanceSet')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.interactionInstanceSet"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; ; } $self; }
sub clear_interactionInstanceSet ($) { my ($self) = @_; my $x = $self->{'interactionInstanceSet'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'interactionInstanceSet'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; ; } $self; }
sub count_interactionInstanceSet ($) { my ($self) = @_; my $x = $self->{'interactionInstanceSet'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd interaction <---> message # type = UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message # multiplicity = 1..* # ordering =
sub message ($) { my ($self) = @_; my $x = $self->{'message'}; # confess("Container for message $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/; wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ]; }
sub set_message ($@) { my ($self, @val) = @_; $self->clear_message; $self->add_message(@val); }
sub add_message ($@) { my ($self, @val) = @_; my $x = $self->{'message'} ||= Set::Object->new(); my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if $x->includes($val); $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.message"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; } $self; }
sub remove_message ($@) { my ($self, @val) = @_; my $x = $self->{'message'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::Collaborations::Interaction.message"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; ; } $self; }
sub clear_message ($) { my ($self) = @_; my $x = $self->{'message'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'message'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_interaction($self) if $old; $val->add_interaction($self) if $val; ; } $self; }
sub count_message ($) { my ($self) = @_; my $x = $self->{'message'}; defined $x ? $x->size : 0; } # End of Class Interaction
############################################################################ 1; # is true! ############################################################################ ### Keep these comments at end of file: kstephens@users.sourceforge.net 2003/04/06 ### ### Local Variables: ### ### mode:perl ### ### perl-indent-level:2 ### ### perl-continued-statement-offset:0 ### ### perl-brace-offset:0 ### ### perl-label-offset:0 ### ### End: ###