# -*- 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::Actions::Action_Foundation::Procedure;

#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::Actions::Action_Foundation::Procedure -- 

=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::__ObjectBase|UMMF::UML::MetaModel::__ObjectBase>




=head1 ATTRIBUTES


=head2 C<language> : UMMF::UML::MetaModel::Foundation::Data_Types::Name 


=over 4

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

=item type = L<UMMF::UML::MetaModel::Foundation::Data_Types::Name|UMMF::UML::MetaModel::Foundation::Data_Types::Name>

=item visibility = C<private>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<unordered>

=item initialValue = I<UNSPECIFIED>

=item container_type = C<Set::Object>

=back


=head2 C<body> : UMMF::UML::MetaModel::Foundation::Data_Types::String 


=over 4

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

=item type = L<UMMF::UML::MetaModel::Foundation::Data_Types::String|UMMF::UML::MetaModel::Foundation::Data_Types::String>

=item visibility = C<private>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<unordered>

=item initialValue = I<UNSPECIFIED>

=item container_type = C<Set::Object>

=back


=head2 C<isList> : UMMF::UML::MetaModel::Foundation::Data_Types::Boolean 


=over 4

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

=item type = L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean>

=item visibility = C<private>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<unordered>

=item initialValue = I<UNSPECIFIED>

=item container_type = C<Set::Object>

=back



=head1 ASSOCIATIONS


=head2 C<0..1> : C<procedure_Action> E<lt>---E<gt>  C<action> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action 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::Actions::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action>

=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..1> : C<procedure> E<lt>---E<gt>  C<argument> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin C<0..*>



=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::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<ordered>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<ARRAY>

=back


=head2 C<1> : C<procedure> E<lt>----  C<> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Read_Write_Actions::Other_Actions::CallProcedureAction 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::Actions::Read_Write_Actions::Other_Actions::CallProcedureAction|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Read_Write_Actions::Other_Actions::CallProcedureAction>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<0>

=item aggregation = C<none>

=item visibility = C<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..1> : C<procedure> E<lt>---E<gt>  C<result> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin C<0..*>



=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::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<ordered>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<ARRAY>

=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::__ObjectBase

);


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

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





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


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure->__validate_type($value);

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

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

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure->__typecheck($value, $msg);

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

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

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


=head2 C<isaProcedure>


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

=cut
sub isaProcedure { 1 }


=head2 C<isaBehavioral_Elements__Actions__Action_Foundation__Procedure>


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

=cut
sub isaBehavioral_Elements__Actions__Action_Foundation__Procedure { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

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

=cut
sub __model_name { 'Behavioral_Elements::Actions::Action_Foundation::Procedure' }



=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::Actions::Action_Foundation::Procedure' =>
     {
       'table' => 'Behavioral_Elements__Actions__Action_Foundation__Procedure',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 	       'language'
       => {
	 'type_impl' => 'string',
                                             'col' => 'language', 

                                                                                                                   }
      ,
         	       'body'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Data_Types::String',

                                             'col' => 'body', 

                                                                                                                   }
      ,
         	       'isList'
       => {
	 'type_impl' => 'string',
                                             'col' => 'isList', 

                                                                                                                   }
      ,
         
	 # Associations
	 	 	       'action'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action',

                                             'col' => 'action', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'argument'
       => {
	 'type_impl' => 'iarray',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin',

                           'table' => 'Behavioral_Elements__Actions__Action_Foundation__Procedure__argument', 

                                                               'coll' => 'procedure',

                  'slot' => 'procedure_i', 

                                    'aggreg' => '1', 

                                           }
      ,
                  	 	                     	 	       'result'
       => {
	 'type_impl' => 'iarray',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin',

                           'table' => 'Behavioral_Elements__Actions__Action_Foundation__Procedure__result', 

                                                               'coll' => 'procedure',

                  'slot' => 'procedure_i', 

                                    'aggreg' => '1', 

                                           }
      ,
                         },
       'bases' => [  ],
       '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

    # Attribute language
  if ( exists $self->{'language'} ) {
    my $x = $self->{'language'};
    $self->{'language'} = undef;
    $self->set_language($x);
  } else {
      }
  
    # Attribute body
  if ( exists $self->{'body'} ) {
    my $x = $self->{'body'};
    $self->{'body'} = undef;
    $self->set_body($x);
  } else {
      }
  
    # Attribute isList
  if ( exists $self->{'isList'} ) {
    my $x = $self->{'isList'};
    $self->{'isList'} = undef;
    $self->set_isList($x);
  } else {
      }
  


  # Associations

  # AssociationEnd 
  #  procedure_Action 0..1
  #  <--> 
  #  action 1 UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action.
    if ( defined $self->{'action'} ) {
    my $x = $self->{'action'};
    $self->{'action'} = undef;
    $self->set_action($x);
  }
  
  # AssociationEnd 
  #  procedure 0..1
  #  <--> 
  #  argument 0..* UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin.
    if ( defined $self->{'argument'} ) {
    my $x = $self->{'argument'};
        $self->{'argument'} = [ ];
        $self->set_argument(@$x);
  }
  
  # AssociationEnd 
  #  procedure 0..1
  #  <--> 
  #  result 0..* UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin.
    if ( defined $self->{'result'} ) {
    my $x = $self->{'result'};
        $self->{'result'} = [ ];
        $self->set_result(@$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->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure::___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::Actions::Action_Foundation::Procedure::___create(@args);

  $self;
}




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



=for html <hr/>

=cut

#################################################################
# Attribute language
# type = UMMF::UML::MetaModel::Foundation::Data_Types::Name
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = 

=head2 C<language>

  my $val = $obj->language;

Returns the L<UMMF::UML::MetaModel::Foundation::Data_Types::Name|UMMF::UML::MetaModel::Foundation::Data_Types::Name> value of Attribute C<language>.

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

  ;

  my $val = $self->{'language'};

  ;

  $val;
}


=head2 C<set_language>

  $obj->set_language($val);

Sets the value of Attribute C<language>.
C<$val> must be of type L<UMMF::UML::MetaModel::Foundation::Data_Types::Name|UMMF::UML::MetaModel::Foundation::Data_Types::Name> or C<undef>.
Returns C<$obj>.

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

  ;

  if ( defined $val ) {
    ;
  }

    $self->{'language'} = $val
  ;

  ;

  $self;
}


=head2 C<count_language>

  $obj->count_language;

Returns the number of elements (0 or 1) in C<language>.

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

  ;

  my $val = $self->{'language'};

  ;

  defined $val ? 1 : 0;
}



=for html <hr/>

=cut

#################################################################
# Attribute body
# type = UMMF::UML::MetaModel::Foundation::Data_Types::String
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = 

=head2 C<body>

  my $val = $obj->body;

Returns the L<UMMF::UML::MetaModel::Foundation::Data_Types::String|UMMF::UML::MetaModel::Foundation::Data_Types::String> value of Attribute C<body>.

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

  ;

  my $val = $self->{'body'};

  ;

  $val;
}


=head2 C<set_body>

  $obj->set_body($val);

Sets the value of Attribute C<body>.
C<$val> must be of type L<UMMF::UML::MetaModel::Foundation::Data_Types::String|UMMF::UML::MetaModel::Foundation::Data_Types::String> or C<undef>.
Returns C<$obj>.

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

  ;

  if ( defined $val ) {
    ;
  }

    $self->{'body'} = $val
  ;

  ;

  $self;
}


=head2 C<count_body>

  $obj->count_body;

Returns the number of elements (0 or 1) in C<body>.

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

  ;

  my $val = $self->{'body'};

  ;

  defined $val ? 1 : 0;
}



=for html <hr/>

=cut

#################################################################
# Attribute isList
# type = UMMF::UML::MetaModel::Foundation::Data_Types::Boolean
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = 

=head2 C<isList>

  my $val = $obj->isList;

Returns the L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean> value of Attribute C<isList>.

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

  ;

  my $val = $self->{'isList'};

  ;

  $val;
}


=head2 C<set_isList>

  $obj->set_isList($val);

Sets the value of Attribute C<isList>.
C<$val> must be of type L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean> or C<undef>.
Returns C<$obj>.

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

  ;

  if ( defined $val ) {
    ;
  }

    $self->{'isList'} = $val
  ;

  ;

  $self;
}


=head2 C<count_isList>

  $obj->count_isList;

Returns the number of elements (0 or 1) in C<isList>.

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

  ;

  my $val = $self->{'isList'};

  ;

  defined $val ? 1 : 0;
}




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd procedure_Action <---> action
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action
# multiplicity = 1
# ordering = 

=head2 C<action>

  my $val = $obj->action;

Returns the AssociationEnd C<action> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action>.

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


=head2 C<set_action>

  $obj->set_action($val);

Sets the AssociationEnd C<action> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.action") }

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

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

    }
		  
  $self;
}


=head2 C<add_action>

  $obj->add_action($val);

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

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_action>

  $obj->remove_action($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_action>

  $obj->clear_action;

Clears the AssociationEnd C<action> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_action>

  $obj->count_action;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action> associated with C<action>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd procedure <---> argument
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin
# multiplicity = 0..*
# ordering = ordered

=head2 C<argument>

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

Returns the AssociationEnd C<argument> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

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

    my $x = $self->{'argument'} ||= [ ];

  wantarray ? @{$x} : $x;
  
}


=head2 C<index_argument>

  my $x = $obj->index_argument($i);
  my @x = $obj->index_argument($i, $count);

In scalar context, returns the value of AssociationEnd C<argument> at index C<$i>.
In array context, returns the values between index C<$i> and C<$i + $count - 1>, inclusive.

=cut
sub index_argument ($$@)
{
  my ($self, $i, $count) = @_;

  ;

  my $val = $self->{'argument'} ||= [ ];

  ;

  wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)]
            : $val->[$i];
}


=head2 C<index_of_argument>

  my $index = $obj->index_of_argument($val);

Returns the index of C<$val> in AssociationEnd C<argument>.
Return C<undef> if C<$val> is not in C<argument>.

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

  ;

  my $val = $self->{'argument'} ||= [ ];

  ;

  __ummf_array_index($val, $x);
}


=head2 C<set_argument>

  $obj->set_argument(@val);

Sets the AssociationEnd C<argument> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub set_argument ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_argument;
  $self->add_argument(@val);
}


=head2 C<set_index_argument>

  $obj->set_index_argument($i, $val);

Sets the value of AssociationEnd C<argument> at index C<$i>.
Returns self.

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

  ;

  my $x = $self->{'argument'} ||= [ ];

  no warnings;
  my $old;
  if ( ($old = $x->[$i]) ne $val) {
    # Recursion lock
        $x->[$i] = $val
    ;

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

  
    ;
  }

  $self;
}


=head2 C<add_argument>

  $obj->add_argument(@val);

Adds AssociationEnd C<argument> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_argument ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'argument'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.argument");

    # Recursion lock
        push(@{$x}, $val);
        
    # Remove and add associations with other ends.
        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

    }
  
  $self;
}


=head2 C<add_index_argument>

  $obj->add_index_argument($i, @val);

Adds AssociationEnd C<argument> values at index C<$i>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

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

  
    my $x = $self->{'argument'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.argument");

    # Recursion lock
        splice(@{$x}, $i, 0, $val); # Recursion lock
        ++ $i;
    
    # Remove and add associations with other ends.
        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

    }
  
  
  $self;
}


=head2 C<remove_argument>

  $obj->remove_argument(@val);

Removes the AssociationEnd C<argument> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub remove_argument ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'argument'} ||= [ ];
  
  for my $old ( @val ) {
    # Recursion lock
        my $i; # index of $old in @$x.
    next unless defined($i = __ummf_array_index($x, $old));
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.argument");

    # Recursion lock
        splice(@$x, $i, 1);     
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_argument>

  $obj->clear_argument;

Clears the AssociationEnd C<argument> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub clear_argument ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'argument'} ||= [ ];
  
  my $val; # Place holder for other MACRO.
  
    $self->{'argument'} = [ ];  # Recursion lock
  for my $old ( @$x ) { # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_argument>

  $obj->count_argument;

Returns the number of elements associated with C<argument>.

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

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

    defined $x ? scalar @$x : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd procedure <---> result
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin
# multiplicity = 0..*
# ordering = ordered

=head2 C<result>

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

Returns the AssociationEnd C<result> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

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

    my $x = $self->{'result'} ||= [ ];

  wantarray ? @{$x} : $x;
  
}


=head2 C<index_result>

  my $x = $obj->index_result($i);
  my @x = $obj->index_result($i, $count);

In scalar context, returns the value of AssociationEnd C<result> at index C<$i>.
In array context, returns the values between index C<$i> and C<$i + $count - 1>, inclusive.

=cut
sub index_result ($$@)
{
  my ($self, $i, $count) = @_;

  ;

  my $val = $self->{'result'} ||= [ ];

  ;

  wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)]
            : $val->[$i];
}


=head2 C<index_of_result>

  my $index = $obj->index_of_result($val);

Returns the index of C<$val> in AssociationEnd C<result>.
Return C<undef> if C<$val> is not in C<result>.

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

  ;

  my $val = $self->{'result'} ||= [ ];

  ;

  __ummf_array_index($val, $x);
}


=head2 C<set_result>

  $obj->set_result(@val);

Sets the AssociationEnd C<result> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
Returns C<$obj>.

=cut
sub set_result ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_result;
  $self->add_result(@val);
}


=head2 C<set_index_result>

  $obj->set_index_result($i, $val);

Sets the value of AssociationEnd C<result> at index C<$i>.
Returns self.

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

  ;

  my $x = $self->{'result'} ||= [ ];

  no warnings;
  my $old;
  if ( ($old = $x->[$i]) ne $val) {
    # Recursion lock
        $x->[$i] = $val
    ;

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

  
    ;
  }

  $self;
}


=head2 C<add_result>

  $obj->add_result(@val);

Adds AssociationEnd C<result> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
Returns C<$obj>.

=cut
sub add_result ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'result'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.result");

    # Recursion lock
        push(@{$x}, $val);
        
    # Remove and add associations with other ends.
        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

    }
  
  $self;
}


=head2 C<add_index_result>

  $obj->add_index_result($i, @val);

Adds AssociationEnd C<result> values at index C<$i>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
Returns C<$obj>.

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

  
    my $x = $self->{'result'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.result");

    # Recursion lock
        splice(@{$x}, $i, 0, $val); # Recursion lock
        ++ $i;
    
    # Remove and add associations with other ends.
        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

    }
  
  
  $self;
}


=head2 C<remove_result>

  $obj->remove_result(@val);

Removes the AssociationEnd C<result> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
Returns C<$obj>.

=cut
sub remove_result ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'result'} ||= [ ];
  
  for my $old ( @val ) {
    # Recursion lock
        my $i; # index of $old in @$x.
    next unless defined($i = __ummf_array_index($x, $old));
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Procedure.result");

    # Recursion lock
        splice(@$x, $i, 1);     
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_result>

  $obj->clear_result;

Clears the AssociationEnd C<result> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>.
Returns C<$obj>.

=cut
sub clear_result ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'result'} ||= [ ];
  
  my $val; # Place holder for other MACRO.
  
    $self->{'result'} = [ ];  # Recursion lock
  for my $old ( @$x ) { # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_procedure($self) if $old;
    $val->add_procedure($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_result>

  $obj->count_result;

Returns the number of elements associated with C<result>.

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

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

    defined $x ? scalar @$x : 0;
  }







# End of Class Procedure


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

