UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateVertex - UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateVertex documentation


UMMF documentation Contained in the UMMF distribution.

Index


Code Index:

NAME

Top

UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateVertex --

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

subvertex : THIS 0..* <---> container_compositeState : UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState 0..1

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

target : THIS 1 <---> incoming : 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

source : THIS 1 <---> outgoing : 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::StateVertex->__validate_type($value);

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

__typecheck

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

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

isaStateVertex

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

isaBehavioral_Elements__State_Machines__StateVertex

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

__model_name

  my $name = $obj_or_package->__model_name;

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

__isAbstract

  $package->__isAbstract;

Returns 1.

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

container_compositeState

  my $val = $obj->container_compositeState;

Returns the AssociationEnd container_compositeState value of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState).

set_container_compositeState

  $obj->set_container_compositeState($val);

Sets the AssociationEnd container_compositeState value. $val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState). Returns $obj.

add_container_compositeState

  $obj->add_container_compositeState($val);

Adds the AssociationEnd container_compositeState value. $val must of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState). Throws exception if a value already exists. Returns $obj.

remove_container_compositeState

  $obj->remove_container_compositeState($val);

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

clear_container_compositeState

  $obj->clear_container_compositeState;

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

count_container_compositeState

  $obj->count_container_compositeState;

Returns the number of elements of type UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState (UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState) associated with container_compositeState.

incoming

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

Returns the AssociationEnd incoming 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_incoming

  $obj->set_incoming(@val);

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

add_incoming

  $obj->add_incoming(@val);

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

remove_incoming

  $obj->remove_incoming(@val);

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

clear_incoming

  $obj->clear_incoming;

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

count_incoming

  $obj->count_incoming;

Returns the number of elements associated with incoming.

outgoing

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

Returns the AssociationEnd outgoing 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_outgoing

  $obj->set_outgoing(@val);

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

add_outgoing

  $obj->add_outgoing(@val);

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

remove_outgoing

  $obj->remove_outgoing(@val);

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

clear_outgoing

  $obj->clear_outgoing;

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

count_outgoing

  $obj->count_outgoing;

Returns the number of elements associated with outgoing.

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

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


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

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


sub isaStateVertex { 1 }


sub isaBehavioral_Elements__State_Machines__StateVertex { 1 }


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

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



sub __isAbstract { 1; }


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

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateVertex' =>
     {
       'table' => 'Behavioral_Elements__State_Machines__StateVertex',
       'abstract' => 1,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'container_compositeState'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState',

                  'null' => '1', 

                                    'col' => 'container_compositeState', 

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

                           'table' => 'Behavioral_Elements__State_Machines__StateVertex__incoming', 

                                                               'coll' => 'target',

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

                           'table' => 'Behavioral_Elements__State_Machines__StateVertex__outgoing', 

                                                               'coll' => 'source',

                                                                               }
      ,
                         },
       '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 
  #  subvertex 0..*
  #  <--> 
  #  container_compositeState 0..1 UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState.
    if ( defined $self->{'container_compositeState'} ) {
    my $x = $self->{'container_compositeState'};
    $self->{'container_compositeState'} = undef;
    $self->set_container_compositeState($x);
  }
  
  # AssociationEnd 
  #  target 1
  #  <--> 
  #  incoming 0..* UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
    if ( defined $self->{'incoming'} ) {
    my $x = $self->{'incoming'};
        $self->{'incoming'} = Set::Object->new();
        $self->set_incoming(@$x);
  }
  
  # AssociationEnd 
  #  source 1
  #  <--> 
  #  outgoing 0..* UMMF::UML_1_5::Behavioral_Elements::State_Machines::Transition.
    if ( defined $self->{'outgoing'} ) {
    my $x = $self->{'outgoing'};
        $self->{'outgoing'} = Set::Object->new();
        $self->set_outgoing(@$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::StateVertex::___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::StateVertex::___create(@args);
  $self->UMMF::UML_1_5::Foundation::Core::Element::___create();
  $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create();

  $self;
}




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




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


#################################################################
# AssociationEnd subvertex <---> container_compositeState
# type = UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState
# multiplicity = 0..1
# ordering = 

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


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

    if ( defined $val ) { $self->__use('UMMF::UML_1_5::Behavioral_Elements::State_Machines::CompositeState')->__typecheck($val, "UMMF::UML_1_5::Behavioral_Elements::State_Machines::StateVertex.container_compositeState") }

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

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

    }
		  
  $self;
}


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

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

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

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

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

  
  }

  $self;
}


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

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

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

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

  
  }
}


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

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

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

    }

  $self;
}


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

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

  defined $x ? 1 : 0;
}




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

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

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

  # confess("Container for incoming $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_incoming ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_incoming;
  $self->add_incoming(@val);
}


sub add_incoming ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'incoming'} ||= 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::StateVertex.incoming");

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

    }
  
  $self;
}


sub remove_incoming ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'incoming'} ||= 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::StateVertex.incoming");

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

    # Remove associations with other ends.

        
    $old->remove_target($self) if $old;
    $val->add_target($self)    if $val;

  ;

  }
  
  $self;
}


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

        
    $old->remove_target($self) if $old;
    $val->add_target($self)    if $val;

  ;

  }
  
  $self;
}


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

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

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




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

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

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

  # confess("Container for outgoing $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_outgoing ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_outgoing;
  $self->add_outgoing(@val);
}


sub add_outgoing ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'outgoing'} ||= 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::StateVertex.outgoing");

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

    }
  
  $self;
}


sub remove_outgoing ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'outgoing'} ||= 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::StateVertex.outgoing");

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

    # Remove associations with other ends.

        
    $old->remove_source($self) if $old;
    $val->add_source($self)    if $val;

  ;

  }
  
  $self;
}


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

        
    $old->remove_source($self) if $old;
    $val->add_source($self)    if $val;

  ;

  }
  
  $self;
}


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

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

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







# End of Class StateVertex


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

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