# -*- perl -*-
# DO NOT EDIT - This file is generated by UMMF; http://ummf.sourceforge.net 
# From template: $Id: PerlTemplate.txt,v 1.74 2004/08/01 03:50:07 kstephens Exp $

package UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition;

#use 5.6.1;
use strict;
use warnings;

#################################################################
# Version
#

our $VERSION = do { my @r = (q{1.0} =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };


#################################################################
# Documentation
#

=head1 NAME

UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition -- 

=head1 VERSION

1.0

=head1 SYNOPSIS

=head1 DESCRIPTION 

=head1 USAGE

=head1 EXPORT

=head1 METATYPE

L<UMMF::UML::MetaModel::Foundation::Core::Class|UMMF::UML::MetaModel::Foundation::Core::Class>

=head1 SUPERCLASSES

L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<0..1> : C<transition> E<lt>---E<gt>  C<effect> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<1> : C<transition> E<lt>---E<gt>  C<guard> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<outgoing> E<lt>---E<gt>  C<source> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex C<1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<internalTransition> E<lt>---E<gt>  C<state> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<composite>

=item visibility = C<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<transitions> E<lt>---E<gt>  C<stateMachine> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<composite>

=item visibility = C<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<incoming> E<lt>---E<gt>  C<target> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex C<1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0> : C<transition> E<lt>---E<gt>  C<trigger> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event C<0..1>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back



=head1 METHODS

=cut



#################################################################
# 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::MetaModel::__ObjectBase qw(:__ummf_array);


#################################################################
# Generalizations
#

use base qw(
  UMMF::UML::MetaModel::Foundation::Core::ModelElement



);


#################################################################
# Exports
#

our @EXPORT_OK = qw(
);
our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );





#################################################################
# Validation
#


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition->__validate_type($value);

Returns true if C<$value> is a valid representation of L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>.

=cut
sub __validate_type($$)
{
  my ($self, $x) = @_;

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition->__validate_type($value)>> is false.

=cut
sub __typecheck
{
  my ($self, $x, $msg) = @_;

  confess("typecheck: $msg: type '" . 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition' . ": value '$x'")
    unless __validate_type($self, $x);
}


=head2 C<isaTransition>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>.
Other receivers will return false.

=cut
sub isaTransition { 1 }


=head2 C<isaBehavioral_Elements__State_Machines__Transition>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>.
Other receivers will return false.
This is the fully qualified version of the C<isaTransition> method.

=cut
sub isaBehavioral_Elements__State_Machines__Transition { 1 }


#################################################################
# Introspection
#

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Behavioral_Elements::State_Machines::Transition'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Behavioral_Elements::State_Machines::Transition' }



=head2 C<__isAbstract>

  $package->__isAbstract;

Returns C<0>.

=cut
sub __isAbstract { 0; }


my $__tangram_schema;
=head2 C<__tangram_schema>

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See L<UMMF::UML::Export::Perl::Tangram|UMMF::UML::Export::Perl::Tangram>

=cut
sub __tangram_schema
{
  my ($self) = @_;

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition' =>
     {
       'table' => 'Behavioral_Elements__State_Machines__Transition',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'effect'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure',

                  'null' => '1', 

                                    'col' => 'effect', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'guard'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard',

                  'null' => '1', 

                                    'col' => 'guard', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'source'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex',

                                             'col' => 'source', 

                                                                                                                   }
      ,
                  	 	       'state'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State',

                  'null' => '1', 

                                    'col' => 'state', 

                                                                                                                   }
      ,
                  	 	       'stateMachine'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine',

                  'null' => '1', 

                                    'col' => 'stateMachine', 

                                                                                                                   }
      ,
                  	 	       'target'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex',

                                             'col' => 'target', 

                                                                                                                   }
      ,
                  	 	       'trigger'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event',

                  'null' => '1', 

                                    'col' => 'trigger', 

                                                                                                                   }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::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
#


=head2 C<___initialize>

Initialize all Attributes and AssociationEnds in a instance of this Classifier.
Does B<not> initalize slots in its Generalizations.

See also: C<__initialize>.

=cut
sub ___initialize
{
  my ($self) = @_;

  # Attributes



  # Associations

  # AssociationEnd 
  #  transition 0..1
  #  <--> 
  #  effect 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure.
    if ( defined $self->{'effect'} ) {
    my $x = $self->{'effect'};
    $self->{'effect'} = undef;
    $self->set_effect($x);
  }
  
  # AssociationEnd 
  #  transition 1
  #  <--> 
  #  guard 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard.
    if ( defined $self->{'guard'} ) {
    my $x = $self->{'guard'};
    $self->{'guard'} = undef;
    $self->set_guard($x);
  }
  
  # AssociationEnd 
  #  outgoing 0..*
  #  <--> 
  #  source 1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex.
    if ( defined $self->{'source'} ) {
    my $x = $self->{'source'};
    $self->{'source'} = undef;
    $self->set_source($x);
  }
  
  # AssociationEnd 
  #  internalTransition 0..*
  #  <--> 
  #  state 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.
    if ( defined $self->{'state'} ) {
    my $x = $self->{'state'};
    $self->{'state'} = undef;
    $self->set_state($x);
  }
  
  # AssociationEnd 
  #  transitions 0..*
  #  <--> 
  #  stateMachine 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine.
    if ( defined $self->{'stateMachine'} ) {
    my $x = $self->{'stateMachine'};
    $self->{'stateMachine'} = undef;
    $self->set_stateMachine($x);
  }
  
  # AssociationEnd 
  #  incoming 0..*
  #  <--> 
  #  target 1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex.
    if ( defined $self->{'target'} ) {
    my $x = $self->{'target'};
    $self->{'target'} = undef;
    $self->set_target($x);
  }
  
  # AssociationEnd 
  #  transition 0
  #  <--> 
  #  trigger 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event.
    if ( defined $self->{'trigger'} ) {
    my $x = $self->{'trigger'};
    $self->{'trigger'} = undef;
    $self->set_trigger($x);
  }
  

  $self;
}


my $__initialize_use;

=head2 C<__initialize>

Initialize all slots in this Classifier and all its Generalizations.

See also: C<___initialize>.

=cut
sub __initialize
{
  my ($self) = @_;

  # $DB::single = 1;

  unless ( ! $__initialize_use ) {
    $__initialize_use = 1;
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Element');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement');
  }

  $self->UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;

  $self;
}
      

=head2 C<__create>

Calls all <<create>> Methods for this Classifier and all Generalizations.

See also: C<___create>.

=cut
sub __create
{
  my ($self, @args) = @_;

  # $DB::single = 1;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();

  $self;
}




#################################################################
# Attributes
#




#################################################################
# Association
#


=for html <hr/>

=cut

#################################################################
# AssociationEnd transition <---> effect
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure
# multiplicity = 0..1
# ordering = 

=head2 C<effect>

  my $val = $obj->effect;

Returns the AssociationEnd C<effect> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.

=cut
sub effect ($)
{
  my ($self) = @_;
		  
  $self->{'effect'};
}


=head2 C<set_effect>

  $obj->set_effect($val);

Sets the AssociationEnd C<effect> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Returns C<$obj>.

=cut
sub set_effect ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'effect'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.effect") }

    # Recursion lock
        $self->{'effect'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_effect>

  $obj->add_effect($val);

Adds the AssociationEnd C<effect> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_effect ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'effect'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.effect");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::effect: too many")
    # if defined $self->{'effect'};

    # Recursion lock
        $self->{'effect'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_effect>

  $obj->remove_effect($val);

Removes the AssociationEnd C<effect> value C<$val>.
Returns C<$obj>.

=cut
sub remove_effect ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'effect'}) eq $val ) { # Recursion lock
    $val = $self->{'effect'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }
}


=head2 C<clear_effect>

  $obj->clear_effect;

Clears the AssociationEnd C<effect> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Returns C<$obj>.

=cut
sub clear_effect ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'effect'}) ) { # Recursion lock
    my $val = $self->{'effect'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }

  $self;
}


=head2 C<count_effect>

  $obj->count_effect;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure> associated with C<effect>.

=cut
sub count_effect ($)
{
  my ($self) = @_;

  my $x = $self->{'effect'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd transition <---> guard
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard
# multiplicity = 0..1
# ordering = 

=head2 C<guard>

  my $val = $obj->guard;

Returns the AssociationEnd C<guard> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard>.

=cut
sub guard ($)
{
  my ($self) = @_;
		  
  $self->{'guard'};
}


=head2 C<set_guard>

  $obj->set_guard($val);

Sets the AssociationEnd C<guard> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard>.
Returns C<$obj>.

=cut
sub set_guard ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'guard'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.guard") }

    # Recursion lock
        $self->{'guard'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_guard>

  $obj->add_guard($val);

Adds the AssociationEnd C<guard> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_guard ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'guard'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.guard");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::guard: too many")
    # if defined $self->{'guard'};

    # Recursion lock
        $self->{'guard'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_guard>

  $obj->remove_guard($val);

Removes the AssociationEnd C<guard> value C<$val>.
Returns C<$obj>.

=cut
sub remove_guard ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'guard'}) eq $val ) { # Recursion lock
    $val = $self->{'guard'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }
}


=head2 C<clear_guard>

  $obj->clear_guard;

Clears the AssociationEnd C<guard> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard>.
Returns C<$obj>.

=cut
sub clear_guard ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'guard'}) ) { # Recursion lock
    my $val = $self->{'guard'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }

  $self;
}


=head2 C<count_guard>

  $obj->count_guard;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Guard> associated with C<guard>.

=cut
sub count_guard ($)
{
  my ($self) = @_;

  my $x = $self->{'guard'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd outgoing <---> source
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex
# multiplicity = 1
# ordering = 

=head2 C<source>

  my $val = $obj->source;

Returns the AssociationEnd C<source> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.

=cut
sub source ($)
{
  my ($self) = @_;
		  
  $self->{'source'};
}


=head2 C<set_source>

  $obj->set_source($val);

Sets the AssociationEnd C<source> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Returns C<$obj>.

=cut
sub set_source ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'source'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.source") }

    # Recursion lock
        $self->{'source'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_outgoing($self) if $old;
    $val->add_outgoing($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_source>

  $obj->add_source($val);

Adds the AssociationEnd C<source> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_source ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'source'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.source");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::source: too many")
    # if defined $self->{'source'};

    # Recursion lock
        $self->{'source'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_outgoing($self) if $old;
    $val->add_outgoing($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_source>

  $obj->remove_source($val);

Removes the AssociationEnd C<source> value C<$val>.
Returns C<$obj>.

=cut
sub remove_source ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'source'}) eq $val ) { # Recursion lock
    $val = $self->{'source'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_outgoing($self) if $old;
    $val->add_outgoing($self)    if $val;

  
  }
}


=head2 C<clear_source>

  $obj->clear_source;

Clears the AssociationEnd C<source> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Returns C<$obj>.

=cut
sub clear_source ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'source'}) ) { # Recursion lock
    my $val = $self->{'source'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_outgoing($self) if $old;
    $val->add_outgoing($self)    if $val;

    }

  $self;
}


=head2 C<count_source>

  $obj->count_source;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex> associated with C<source>.

=cut
sub count_source ($)
{
  my ($self) = @_;

  my $x = $self->{'source'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd internalTransition <---> state
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State
# multiplicity = 0..1
# ordering = 

=head2 C<state>

  my $val = $obj->state;

Returns the AssociationEnd C<state> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State>.

=cut
sub state ($)
{
  my ($self) = @_;
		  
  $self->{'state'};
}


=head2 C<set_state>

  $obj->set_state($val);

Sets the AssociationEnd C<state> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State>.
Returns C<$obj>.

=cut
sub set_state ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'state'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.state") }

    # Recursion lock
        $self->{'state'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_internalTransition($self) if $old;
    $val->add_internalTransition($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_state>

  $obj->add_state($val);

Adds the AssociationEnd C<state> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_state ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'state'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.state");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::state: too many")
    # if defined $self->{'state'};

    # Recursion lock
        $self->{'state'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_internalTransition($self) if $old;
    $val->add_internalTransition($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_state>

  $obj->remove_state($val);

Removes the AssociationEnd C<state> value C<$val>.
Returns C<$obj>.

=cut
sub remove_state ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'state'}) eq $val ) { # Recursion lock
    $val = $self->{'state'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_internalTransition($self) if $old;
    $val->add_internalTransition($self)    if $val;

  
  }
}


=head2 C<clear_state>

  $obj->clear_state;

Clears the AssociationEnd C<state> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State>.
Returns C<$obj>.

=cut
sub clear_state ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'state'}) ) { # Recursion lock
    my $val = $self->{'state'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_internalTransition($self) if $old;
    $val->add_internalTransition($self)    if $val;

    }

  $self;
}


=head2 C<count_state>

  $obj->count_state;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State> associated with C<state>.

=cut
sub count_state ($)
{
  my ($self) = @_;

  my $x = $self->{'state'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd transitions <---> stateMachine
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine
# multiplicity = 0..1
# ordering = 

=head2 C<stateMachine>

  my $val = $obj->stateMachine;

Returns the AssociationEnd C<stateMachine> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.

=cut
sub stateMachine ($)
{
  my ($self) = @_;
		  
  $self->{'stateMachine'};
}


=head2 C<set_stateMachine>

  $obj->set_stateMachine($val);

Sets the AssociationEnd C<stateMachine> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.
Returns C<$obj>.

=cut
sub set_stateMachine ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'stateMachine'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.stateMachine") }

    # Recursion lock
        $self->{'stateMachine'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transitions($self) if $old;
    $val->add_transitions($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_stateMachine>

  $obj->add_stateMachine($val);

Adds the AssociationEnd C<stateMachine> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_stateMachine ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'stateMachine'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.stateMachine");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::stateMachine: too many")
    # if defined $self->{'stateMachine'};

    # Recursion lock
        $self->{'stateMachine'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transitions($self) if $old;
    $val->add_transitions($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_stateMachine>

  $obj->remove_stateMachine($val);

Removes the AssociationEnd C<stateMachine> value C<$val>.
Returns C<$obj>.

=cut
sub remove_stateMachine ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'stateMachine'}) eq $val ) { # Recursion lock
    $val = $self->{'stateMachine'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transitions($self) if $old;
    $val->add_transitions($self)    if $val;

  
  }
}


=head2 C<clear_stateMachine>

  $obj->clear_stateMachine;

Clears the AssociationEnd C<stateMachine> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.
Returns C<$obj>.

=cut
sub clear_stateMachine ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'stateMachine'}) ) { # Recursion lock
    my $val = $self->{'stateMachine'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transitions($self) if $old;
    $val->add_transitions($self)    if $val;

    }

  $self;
}


=head2 C<count_stateMachine>

  $obj->count_stateMachine;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine> associated with C<stateMachine>.

=cut
sub count_stateMachine ($)
{
  my ($self) = @_;

  my $x = $self->{'stateMachine'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd incoming <---> target
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex
# multiplicity = 1
# ordering = 

=head2 C<target>

  my $val = $obj->target;

Returns the AssociationEnd C<target> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.

=cut
sub target ($)
{
  my ($self) = @_;
		  
  $self->{'target'};
}


=head2 C<set_target>

  $obj->set_target($val);

Sets the AssociationEnd C<target> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Returns C<$obj>.

=cut
sub set_target ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'target'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.target") }

    # Recursion lock
        $self->{'target'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_incoming($self) if $old;
    $val->add_incoming($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_target>

  $obj->add_target($val);

Adds the AssociationEnd C<target> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_target ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'target'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.target");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::target: too many")
    # if defined $self->{'target'};

    # Recursion lock
        $self->{'target'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_incoming($self) if $old;
    $val->add_incoming($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_target>

  $obj->remove_target($val);

Removes the AssociationEnd C<target> value C<$val>.
Returns C<$obj>.

=cut
sub remove_target ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'target'}) eq $val ) { # Recursion lock
    $val = $self->{'target'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_incoming($self) if $old;
    $val->add_incoming($self)    if $val;

  
  }
}


=head2 C<clear_target>

  $obj->clear_target;

Clears the AssociationEnd C<target> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>.
Returns C<$obj>.

=cut
sub clear_target ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'target'}) ) { # Recursion lock
    my $val = $self->{'target'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_incoming($self) if $old;
    $val->add_incoming($self)    if $val;

    }

  $self;
}


=head2 C<count_target>

  $obj->count_target;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex> associated with C<target>.

=cut
sub count_target ($)
{
  my ($self) = @_;

  my $x = $self->{'target'};

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd transition <---> trigger
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event
# multiplicity = 0..1
# ordering = 

=head2 C<trigger>

  my $val = $obj->trigger;

Returns the AssociationEnd C<trigger> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.

=cut
sub trigger ($)
{
  my ($self) = @_;
		  
  $self->{'trigger'};
}


=head2 C<set_trigger>

  $obj->set_trigger($val);

Sets the AssociationEnd C<trigger> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.
Returns C<$obj>.

=cut
sub set_trigger ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'trigger'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.trigger") }

    # Recursion lock
        $self->{'trigger'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_trigger>

  $obj->add_trigger($val);

Adds the AssociationEnd C<trigger> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.
Throws exception if a value already exists.
Returns C<$obj>.

=cut
sub add_trigger ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'trigger'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.trigger");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition::trigger: too many")
    # if defined $self->{'trigger'};

    # Recursion lock
        $self->{'trigger'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_trigger>

  $obj->remove_trigger($val);

Removes the AssociationEnd C<trigger> value C<$val>.
Returns C<$obj>.

=cut
sub remove_trigger ($$)
{
  my ($self, $val) = @_;

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'trigger'}) eq $val ) { # Recursion lock
    $val = $self->{'trigger'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

  
  }
}


=head2 C<clear_trigger>

  $obj->clear_trigger;

Clears the AssociationEnd C<trigger> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.
Returns C<$obj>.

=cut
sub clear_trigger ($@)
{
  my ($self) = @_;

  my $old;
  if ( defined ($old = $self->{'trigger'}) ) { # Recursion lock
    my $val = $self->{'trigger'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_transition($self) if $old;
    $val->add_transition($self)    if $val;

    }

  $self;
}


=head2 C<count_trigger>

  $obj->count_trigger;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event> associated with C<trigger>.

=cut
sub count_trigger ($)
{
  my ($self) = @_;

  my $x = $self->{'trigger'};

  defined $x ? 1 : 0;
}







# End of Class Transition


=pod

=for html <hr/>

I<END OF DOCUMENT>

=cut

############################################################################

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: ###

