UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine - UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine documentation


UMMF documentation Contained in the UMMF distribution.

Index


Code Index:

NAME

Top

UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine --

VERSION

Top

1.5

SYNOPSIS

Top

DESCRIPTION

Top

USAGE

Top

EXPORT

Top

METATYPE

Top

UMMF::UML_1_5::Foundation::Core::Class

SUPERCLASSES

Top

UMMF::UML_1_5::Foundation::Core::ModelElement

ATTRIBUTES

Top

NO ATTRIBUTES

ASSOCIATIONS

Top

behavior : THIS 0..* <---> context : UMMF::UML_1_5::Foundation::Core::ModelElement 0..1

metatype = UMMF::UML_1_5::Foundation::Core::AssociationEnd
type = UMMF::UML_1_5::Foundation::Core::ModelElement
multiplicity = 0..1
changeability = changeable
targetScope = instance
ordering =
isNavigable = 1
aggregation = aggregate
visibility = public
container_type = Set::Object

submachine : THIS 1 <---> submachineState : UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState 0..*

metatype = UMMF::UML_1_5::Foundation::Core::AssociationEnd
type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState)
multiplicity = 0..*
changeability = changeable
targetScope = instance
ordering =
isNavigable = 1
aggregation = none
visibility = private
container_type = Set::Object

stateMachine : THIS 0..1 <---> top : UMMF::UML_1_5::Behavioral_Elements::State_Machines::State 1

metatype = UMMF::UML_1_5::Foundation::Core::AssociationEnd
type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::State
multiplicity = 1
changeability = changeable
targetScope = instance
ordering =
isNavigable = 1
aggregation = none
visibility = public
container_type = Set::Object

stateMachine : THIS 0..1 <---> transitions : UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition 0..*

metatype = UMMF::UML_1_5::Foundation::Core::AssociationEnd
type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition
multiplicity = 0..*
changeability = changeable
targetScope = instance
ordering =
isNavigable = 1
aggregation = none
visibility = public
container_type = Set::Object

METHODS

Top

__validate_type

  UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine->__validate_type($value);

Returns true if $value is a valid representation of UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.

__typecheck

  UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine->__typecheck($value, $msg);

Calls confess() with $msg if <UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine-__validate_type($value)>> is false.

isaStateMachine

Returns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine. Other receivers will return false.

isaBehavioral_Elements__State_Machines__StateMachine

Returns true if receiver is a UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine. Other receivers will return false. This is the fully qualified version of the isaStateMachine method.

__model_name

  my $name = $obj_or_package->__model_name;

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

__isAbstract

  $package->__isAbstract;

Returns 0.

__tangram_schema

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See UMMF::Export::Perl::Tangram

___initialize

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

See also: __initialize.

__initialize

Initialize all slots in this Classifier and all its Generalizations.

See also: ___initialize.

__create

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

See also: ___create.

context

  my $val = $obj->context;

Returns the AssociationEnd context value of type UMMF::UML_1_5::Foundation::Core::ModelElement.

set_context

  $obj->set_context($val);

Sets the AssociationEnd context value. $val must of type UMMF::UML_1_5::Foundation::Core::ModelElement. Returns $obj.

add_context

  $obj->add_context($val);

Adds the AssociationEnd context value. $val must of type UMMF::UML_1_5::Foundation::Core::ModelElement. 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::Foundation::Core::ModelElement. Returns $obj.

count_context

  $obj->count_context;

Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::ModelElement associated with context.

submachineState

  my @val = $obj->submachineState;
  my $ary_val = $obj->submachineState;

Returns the AssociationEnd submachineState values of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState). 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_submachineState

  $obj->set_submachineState(@val);

Sets the AssociationEnd submachineState value. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState). Returns $obj.

add_submachineState

  $obj->add_submachineState(@val);

Adds AssociationEnd submachineState values. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState). Returns $obj.

remove_submachineState

  $obj->remove_submachineState(@val);

Removes the AssociationEnd submachineState values @val. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState). Returns $obj.

clear_submachineState

  $obj->clear_submachineState;

Clears the AssociationEnd submachineState links to UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState). Returns $obj.

count_submachineState

  $obj->count_submachineState;

Returns the number of elements associated with submachineState.

top

  my $val = $obj->top;

Returns the AssociationEnd top value of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.

set_top

  $obj->set_top($val);

Sets the AssociationEnd top value. $val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State. Returns $obj.

add_top

  $obj->add_top($val);

Adds the AssociationEnd top value. $val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State. Throws exception if a value already exists. Returns $obj.

remove_top

  $obj->remove_top($val);

Removes the AssociationEnd top value $val. Returns $obj.

clear_top

  $obj->clear_top;

Clears the AssociationEnd top links to UMMF::UML_1_5::Behavioral_Elements::State_Machines::State. Returns $obj.

count_top

  $obj->count_top;

Returns the number of elements of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::State associated with top.

transitions

  my @val = $obj->transitions;
  my $ary_val = $obj->transitions;

Returns the AssociationEnd transitions values of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. 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_transitions

  $obj->set_transitions(@val);

Sets the AssociationEnd transitions value. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. Returns $obj.

add_transitions

  $obj->add_transitions(@val);

Adds AssociationEnd transitions values. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. Returns $obj.

remove_transitions

  $obj->remove_transitions(@val);

Removes the AssociationEnd transitions values @val. Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. Returns $obj.

clear_transitions

  $obj->clear_transitions;

Clears the AssociationEnd transitions links to UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition. Returns $obj.

count_transitions

  $obj->count_transitions;

Returns the number of elements associated with transitions.

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::StateMachine;

#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::StateMachine')  ;
}


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

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


sub isaStateMachine { 1 }


sub isaBehavioral_Elements__State_Machines__StateMachine { 1 }


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

sub __model_name { 'Behavioral_Elements::State_Machines::StateMachine' }



sub __isAbstract { 0; }


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

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine' =>
     {
       'table' => 'Behavioral_Elements__State_Machines__StateMachine',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'context'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Core::ModelElement',

                  'null' => '1', 

                                    'col' => 'context', 

                                                                                                                   }
      ,
                  	 	       'submachineState'
       => {
	 'type_impl' => 'iset',
         'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState',

                           'table' => 'Behavioral_Elements__State_Machines__StateMachine__submachineState', 

                                                               'coll' => 'submachine',

                                                                               }
      ,
                  	 	       'top'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::State',

                                             'col' => 'top', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'transitions'
       => {
	 'type_impl' => 'iset',
         'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition',

                           'table' => 'Behavioral_Elements__State_Machines__StateMachine__transitions', 

                                                               'coll' => 'stateMachine',

                                             '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 
  #  behavior 0..*
  #  <--> 
  #  context 0..1 UMMF::UML_1_5::Foundation::Core::ModelElement.
    if ( defined $self->{'context'} ) {
    my $x = $self->{'context'};
    $self->{'context'} = undef;
    $self->set_context($x);
  }
  
  # AssociationEnd 
  #  submachine 1
  #  <--> 
  #  submachineState 0..* UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState.
    if ( defined $self->{'submachineState'} ) {
    my $x = $self->{'submachineState'};
        $self->{'submachineState'} = Set::Object->new();
        $self->set_submachineState(@$x);
  }
  
  # AssociationEnd 
  #  stateMachine 0..1
  #  <--> 
  #  top 1 UMMF::UML_1_5::Behavioral_Elements::State_Machines::State.
    if ( defined $self->{'top'} ) {
    my $x = $self->{'top'};
    $self->{'top'} = undef;
    $self->set_top($x);
  }
  
  # AssociationEnd 
  #  stateMachine 0..1
  #  <--> 
  #  transitions 0..* UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
    if ( defined $self->{'transitions'} ) {
    my $x = $self->{'transitions'};
        $self->{'transitions'} = Set::Object->new();
        $self->set_transitions(@$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::StateMachine::___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::StateMachine::___create(@args);
  $self->UMMF::UML_1_5::Foundation::Core::Element::___create();
  $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create();

  $self;
}




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




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


#################################################################
# AssociationEnd behavior <---> context
# type = UMMF::UML_1_5::Foundation::Core::ModelElement
# multiplicity = 0..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::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.context") }

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

    # Remove and add associations with other ends.
        
    $old->remove_behavior($self) if $old;
    $val->add_behavior($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::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.context");
      
    # confess("UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine::context: too many")
    # if defined $self->{'context'};

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

    # Remove and add associations with other ends.
        
    $old->remove_behavior($self) if $old;
    $val->add_behavior($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_behavior($self) if $old;
    $val->add_behavior($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_behavior($self) if $old;
    $val->add_behavior($self)    if $val;

    }

  $self;
}


sub count_context ($)
{
  my ($self) = @_;

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

  defined $x ? 1 : 0;
}




#################################################################
# AssociationEnd submachine <---> submachineState
# type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::SubmachineState
# multiplicity = 0..*
# ordering = 

sub submachineState ($)
{
  my ($self) = @_;

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

  # confess("Container for submachineState $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_submachineState ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_submachineState;
  $self->add_submachineState(@val);
}


sub add_submachineState ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'submachineState'} ||= 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::SubmachineState')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.submachineState");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_submachine($self) if $old;
    $val->add_submachine($self)    if $val;

    }
  
  $self;
}


sub remove_submachineState ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'submachineState'} ||= 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::SubmachineState')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.submachineState");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_submachine($self) if $old;
    $val->add_submachine($self)    if $val;

  ;

  }
  
  $self;
}


sub clear_submachineState ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'submachineState'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'submachineState'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_submachine($self) if $old;
    $val->add_submachine($self)    if $val;

  ;

  }
  
  $self;
}


sub count_submachineState ($)
{
  my ($self) = @_;

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

    defined $x ? $x->size : 0;
  }




#################################################################
# AssociationEnd stateMachine <---> top
# type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::State
# multiplicity = 1
# ordering = 

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


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

    if ( defined $val ) { $self->__use('UMMF::UML_1_5::Behavioral_Elements::State_Machines::State')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.top") }

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

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

    }
		  
  $self;
}


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

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

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

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

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

  
  }

  $self;
}


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

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

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

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

  
  }
}


sub clear_top ($@)
{
  my ($self) = @_;

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

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

    }

  $self;
}


sub count_top ($)
{
  my ($self) = @_;

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

  defined $x ? 1 : 0;
}




#################################################################
# AssociationEnd stateMachine <---> transitions
# type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition
# multiplicity = 0..*
# ordering = 

sub transitions ($)
{
  my ($self) = @_;

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

  # confess("Container for transitions $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_transitions ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_transitions;
  $self->add_transitions(@val);
}


sub add_transitions ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'transitions'} ||= 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::Transition')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.transitions");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_stateMachine($self) if $old;
    $val->add_stateMachine($self)    if $val;

    }
  
  $self;
}


sub remove_transitions ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'transitions'} ||= 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::Transition')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateMachine.transitions");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_stateMachine($self) if $old;
    $val->add_stateMachine($self)    if $val;

  ;

  }
  
  $self;
}


sub clear_transitions ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'transitions'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'transitions'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_stateMachine($self) if $old;
    $val->add_stateMachine($self)    if $val;

  ;

  }
  
  $self;
}


sub count_transitions ($)
{
  my ($self) = @_;

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

    defined $x ? $x->size : 0;
  }







# End of Class StateMachine


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

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