| UMMF documentation | Contained in the UMMF distribution. |
__validate_type__typecheckisaEventisaBehavioral_Elements__State_Machines__Event__model_name __isAbstract__tangram_schema___initialize__initialize__createparameterindex_parameterindex_of_parameterset_parameterset_index_parameteradd_parameteradd_index_parameterremove_parameterclear_parametercount_parameterstateset_stateadd_stateremove_stateclear_statecount_statetransitionset_transitionadd_transitionremove_transitionclear_transitioncount_transition
UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event --
1.5
NO ATTRIBUTES
event : THIS 0..1 <---> parameter : UMMF::UML_1_5::Foundation::Core::Parameter 0..*0..*changeableinstanceorderednonepublicARRAYdeferrableEvent : THIS 0..* <---> state : UMMF::UML_1_5::Behavioral_Elements::State_Machines::State 0..*0..*changeableinstancenoneprivateSet::Objecttrigger : THIS 0..1 <---> transition : UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition 00changeableinstanceaggregateprivateSet::Object__validate_typeUMMF::UML_1_5::Behavioral_Elements::State_Machines::Event->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.
__typecheckUMMF::UML_1_5::Behavioral_Elements::State_Machines::Event->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event-__validate_type($value)>> is false.
isaEventReturns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event. Other receivers will return false.
isaBehavioral_Elements__State_Machines__EventReturns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.
Other receivers will return false.
This is the fully qualified version of the isaEvent method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Behavioral_Elements::State_Machines::Event') for an object or package of
this Classifier.
__isAbstract$package->__isAbstract;
Returns 1.
__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.
parametermy @val = $obj->parameter; my $ary_val = $obj->parameter;
Returns the AssociationEnd parameter values of type UMMF::UML_1_5::Foundation::Core::Parameter.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.
index_parametermy $x = $obj->index_parameter($i); my @x = $obj->index_parameter($i, $count);
In scalar context, returns the value of AssociationEnd parameter at index $i.
In array context, returns the values between index $i and $i + $count - 1, inclusive.
index_of_parametermy $index = $obj->index_of_parameter($val);
Returns the index of $val in AssociationEnd parameter.
Return undef if $val is not in parameter.
set_parameter$obj->set_parameter(@val);
Sets the AssociationEnd parameter value.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Parameter.
Returns $obj.
set_index_parameter$obj->set_index_parameter($i, $val);
Sets the value of AssociationEnd parameter at index $i.
Returns self.
add_parameter$obj->add_parameter(@val);
Adds AssociationEnd parameter values.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Parameter.
Returns $obj.
add_index_parameter$obj->add_index_parameter($i, @val);
Adds AssociationEnd parameter values at index $i.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Parameter.
Returns $obj.
remove_parameter$obj->remove_parameter(@val);
Removes the AssociationEnd parameter values @val.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Parameter.
Returns $obj.
clear_parameter$obj->clear_parameter;
Clears the AssociationEnd parameter links to UMMF::UML_1_5::Foundation::Core::Parameter.
Returns $obj.
count_parameter$obj->count_parameter;
Returns the number of elements associated with parameter.
statemy @val = $obj->state; my $ary_val = $obj->state;
Returns the AssociationEnd state values of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
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_state$obj->set_state(@val);
Sets the AssociationEnd state value.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
Returns $obj.
add_state$obj->add_state(@val);
Adds AssociationEnd state values.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
Returns $obj.
remove_state$obj->remove_state(@val);
Removes the AssociationEnd state values @val.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
Returns $obj.
clear_state$obj->clear_state;
Clears the AssociationEnd state links to UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
Returns $obj.
count_state$obj->count_state;
Returns the number of elements associated with state.
transitionmy $val = $obj->transition;
Returns the AssociationEnd transition value of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
set_transition$obj->set_transition($val);
Sets the AssociationEnd transition value.
$val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
Returns $obj.
add_transition$obj->add_transition($val);
Adds the AssociationEnd transition value.
$val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
Throws exception if a value already exists.
Returns $obj.
remove_transition$obj->remove_transition($val);
Removes the AssociationEnd transition value $val.
Returns $obj.
clear_transition$obj->clear_transition;
Clears the AssociationEnd transition links to UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
Returns $obj.
count_transition$obj->count_transition;
Returns the number of elements of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition associated with transition.
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::State_Machines::Event; #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::State_Machines::Event') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event' . ": value '$x'") unless __validate_type($self, $x); }
sub isaEvent { 1 }
sub isaBehavioral_Elements__State_Machines__Event { 1 } ################################################################# # Introspection #
sub __model_name { 'Behavioral_Elements::State_Machines::Event' }
sub __isAbstract { 1; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event' => { 'table' => 'Behavioral_Elements__State_Machines__Event', 'abstract' => 1, 'slots' => { # Attributes # Associations 'parameter' => { 'type_impl' => 'iarray', 'class' => 'UMMF::UML_1_5::Foundation::Core::Parameter', 'table' => 'Behavioral_Elements__State_Machines__Event__parameter', 'coll' => 'event', 'slot' => 'event_i', 'aggreg' => '1', } , 'state' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::State', 'table' => 'Behavioral_Elements__State_Machines__State_DeferrableEvent', 'item' => 'state', 'coll' => 'deferrableEvent', } , 'transition' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition', 'null' => '1', 'col' => 'transition', } , }, '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 # event 0..1 # <--> # parameter 0..* UMMF::UML_1_5::Foundation::Core::Parameter. if ( defined $self->{'parameter'} ) { my $x = $self->{'parameter'}; $self->{'parameter'} = [ ]; $self->set_parameter(@$x); } # AssociationEnd # deferrableEvent 0..* # <--> # state 0..* UMMF::UML_1_5::Behavioral_Elements::State_Machines::State. if ( defined $self->{'state'} ) { my $x = $self->{'state'}; $self->{'state'} = Set::Object->new(); $self->set_state(@$x); } # AssociationEnd # trigger 0..1 # <--> # transition 0 UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. if ( defined $self->{'transition'} ) { my $x = $self->{'transition'}; $self->{'transition'} = undef; $self->set_transition($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::State_Machines::Event::___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::State_Machines::Event::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Element::___create(); $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create(); $self; } ################################################################# # Attributes # ################################################################# # Association #
################################################################# # AssociationEnd event <---> parameter # type = UMMF::UML_1_5::Foundation::Core::Parameter # multiplicity = 0..* # ordering = ordered
sub parameter ($) { my ($self) = @_; my $x = $self->{'parameter'} ||= [ ]; wantarray ? @{$x} : $x; }
sub index_parameter ($$@) { my ($self, $i, $count) = @_; ; my $val = $self->{'parameter'} ||= [ ]; ; wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)] : $val->[$i]; }
sub index_of_parameter ($$) { my ($self, $x) = @_; ; my $val = $self->{'parameter'} ||= [ ]; ; __ummf_array_index($val, $x); }
sub set_parameter ($@) { my ($self, @val) = @_; $self->clear_parameter; $self->add_parameter(@val); }
sub set_index_parameter ($$$) { my ($self, $i, $val) = @_; ; my $x = $self->{'parameter'} ||= [ ]; no warnings; my $old; if ( ($old = $x->[$i]) ne $val) { # Recursion lock $x->[$i] = $val ; # Remove and add associations with other ends. $old->remove_event($self) if $old; $val->add_event($self) if $val; ; } $self; }
sub add_parameter ($@) { my ($self, @val) = @_; my $x = $self->{'parameter'} ||= [ ]; my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if grep($_ eq $val, @$x); $self->__use('UMMF::UML_1_5::Foundation::Core::Parameter')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.parameter"); # Recursion lock push(@{$x}, $val); # Remove and add associations with other ends. $old->remove_event($self) if $old; $val->add_event($self) if $val; } $self; }
sub add_index_parameter ($$@) { my ($self, $i, @val) = @_; my $x = $self->{'parameter'} ||= [ ]; my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if grep($_ eq $val, @$x); $self->__use('UMMF::UML_1_5::Foundation::Core::Parameter')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.parameter"); # Recursion lock splice(@{$x}, $i, 0, $val); # Recursion lock ++ $i; # Remove and add associations with other ends. $old->remove_event($self) if $old; $val->add_event($self) if $val; } $self; }
sub remove_parameter ($@) { my ($self, @val) = @_; my $x = $self->{'parameter'} ||= [ ]; for my $old ( @val ) { # Recursion lock my $i; # index of $old in @$x. next unless defined($i = __ummf_array_index($x, $old)); my $val = $old; $self->__use('UMMF::UML_1_5::Foundation::Core::Parameter')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.parameter"); # Recursion lock splice(@$x, $i, 1); $val = undef; # Remove associations with other ends. $old->remove_event($self) if $old; $val->add_event($self) if $val; ; } $self; }
sub clear_parameter ($) { my ($self) = @_; my $x = $self->{'parameter'} ||= [ ]; my $val; # Place holder for other MACRO. $self->{'parameter'} = [ ]; # Recursion lock for my $old ( @$x ) { # Recursion lock # Remove associations with other ends. $old->remove_event($self) if $old; $val->add_event($self) if $val; ; } $self; }
sub count_parameter ($) { my ($self) = @_; my $x = $self->{'parameter'}; defined $x ? scalar @$x : 0; }
################################################################# # AssociationEnd deferrableEvent <---> state # type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::State # multiplicity = 0..* # ordering =
sub state ($) { my ($self) = @_; my $x = $self->{'state'}; # confess("Container for state $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_state ($@) { my ($self, @val) = @_; $self->clear_state; $self->add_state(@val); }
sub add_state ($@) { my ($self, @val) = @_; my $x = $self->{'state'} ||= 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::State_Machines::State')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.state"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_deferrableEvent($self) if $old; $val->add_deferrableEvent($self) if $val; } $self; }
sub remove_state ($@) { my ($self, @val) = @_; my $x = $self->{'state'} ||= 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::State_Machines::State')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.state"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_deferrableEvent($self) if $old; $val->add_deferrableEvent($self) if $val; ; } $self; }
sub clear_state ($) { my ($self) = @_; my $x = $self->{'state'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'state'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_deferrableEvent($self) if $old; $val->add_deferrableEvent($self) if $val; ; } $self; }
sub count_state ($) { my ($self) = @_; my $x = $self->{'state'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd trigger <---> transition # type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition # multiplicity = 0 # ordering =
sub transition ($) { my ($self) = @_; $self->{'transition'}; }
sub set_transition ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'transition'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.transition") } # Recursion lock $self->{'transition'} = $val ; # Remove and add associations with other ends. $old->remove_trigger($self) if $old; $val->add_trigger($self) if $val; } $self; }
sub add_transition ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'transition'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event.transition"); # confess("UMMF::UML_1_5::Behavioral_Elements::State_Machines::Event::transition: too many") # if defined $self->{'transition'}; # Recursion lock $self->{'transition'} = $val ; # Remove and add associations with other ends. $old->remove_trigger($self) if $old; $val->add_trigger($self) if $val; } $self; }
sub remove_transition ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'transition'}) eq $val ) { # Recursion lock $val = $self->{'transition'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_trigger($self) if $old; $val->add_trigger($self) if $val; } }
sub clear_transition ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'transition'}) ) { # Recursion lock my $val = $self->{'transition'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_trigger($self) if $old; $val->add_trigger($self) if $val; } $self; }
sub count_transition ($) { my ($self) = @_; my $x = $self->{'transition'}; defined $x ? 1 : 0; } # End of Class Event
############################################################################ 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: ###