# -*- 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::Foundation::Core::Parameter;

#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::Foundation::Core::Parameter -- 

=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


=head2 C<defaultValue> : UMMF::UML::MetaModel::Foundation::Data_Types::Expression 


=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::Expression|UMMF::UML::MetaModel::Foundation::Data_Types::Expression>

=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<kind> : UMMF::UML::MetaModel::Foundation::Data_Types::ParameterDirectionKind 


=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::ParameterDirectionKind|UMMF::UML::MetaModel::Foundation::Data_Types::ParameterDirectionKind>

=item visibility = C<private>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<unordered>

=item initialValue = C<<"inout">>

=item container_type = C<Set::Object>

=back



=head1 ASSOCIATIONS


=head2 C<0..*> : C<parameter> E<lt>---E<gt>  C<behavioralFeature> : UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature 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::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature>

=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<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<parameter> E<lt>---E<gt>  C<event> : 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<composite>

=item visibility = C<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<parameter> E<lt>---E<gt>  C<state> : UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState 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::Activity_Graphs::ObjectFlowState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState>

=item multiplicity = C<0..*>

=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<parameter> E<lt>---E<gt>  C<type> : UMMF::UML::MetaModel::Foundation::Core::Classifier 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::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>

=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



=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::Foundation::Core::Parameter->__validate_type($value);

Returns true if C<$value> is a valid representation of L<UMMF::UML::MetaModel::Foundation::Core::Parameter|UMMF::UML::MetaModel::Foundation::Core::Parameter>.

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

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Foundation::Core::Parameter')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Foundation::Core::Parameter->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<<UMMF::UML::MetaModel::Foundation::Core::Parameter->__validate_type($value)>> is false.

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

  confess("typecheck: $msg: type '" . 'UMMF::UML::MetaModel::Foundation::Core::Parameter' . ": value '$x'")
    unless __validate_type($self, $x);
}


=head2 C<isaParameter>


Returns true if receiver is a L<UMMF::UML::MetaModel::Foundation::Core::Parameter|UMMF::UML::MetaModel::Foundation::Core::Parameter>.
Other receivers will return false.

=cut
sub isaParameter { 1 }


=head2 C<isaFoundation__Core__Parameter>


Returns true if receiver is a L<UMMF::UML::MetaModel::Foundation::Core::Parameter|UMMF::UML::MetaModel::Foundation::Core::Parameter>.
Other receivers will return false.
This is the fully qualified version of the C<isaParameter> method.

=cut
sub isaFoundation__Core__Parameter { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Foundation::Core::Parameter'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Foundation::Core::Parameter' }



=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::Foundation::Core::Parameter' =>
     {
       'table' => 'Foundation__Core__Parameter',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 	       'defaultValue'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Data_Types::Expression',

                                             'col' => 'defaultValue', 

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

                                                                                                                   }
      ,
         
	 # Associations
	 	 	       'behavioralFeature'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature',

                  'null' => '1', 

                                    'col' => 'behavioralFeature', 

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

                  'null' => '1', 

                                    'col' => 'event', 

                                                                                                                   }
      ,
                  	 	       'state'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState',

                           'table' => 'State_Parameter', 

                                                      'item' => 'state', 

                  'coll' => 'parameter',

                                                                               }
      ,
                  	 	       'type'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::Classifier',

                                             'col' => 'type', 

                                                                                                                   }
      ,
                         },
       '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

    # Attribute defaultValue
  if ( exists $self->{'defaultValue'} ) {
    my $x = $self->{'defaultValue'};
    $self->{'defaultValue'} = undef;
    $self->set_defaultValue($x);
  } else {
      }
  
    # Attribute kind
  if ( exists $self->{'kind'} ) {
    my $x = $self->{'kind'};
    $self->{'kind'} = undef;
    $self->set_kind($x);
  } else {
        $self->{'kind'} = "inout";
      }
  


  # Associations

  # AssociationEnd 
  #  parameter 0..*
  #  <--> 
  #  behavioralFeature 0..1 UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature.
    if ( defined $self->{'behavioralFeature'} ) {
    my $x = $self->{'behavioralFeature'};
    $self->{'behavioralFeature'} = undef;
    $self->set_behavioralFeature($x);
  }
  
  # AssociationEnd 
  #  parameter 0..*
  #  <--> 
  #  event 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event.
    if ( defined $self->{'event'} ) {
    my $x = $self->{'event'};
    $self->{'event'} = undef;
    $self->set_event($x);
  }
  
  # AssociationEnd 
  #  parameter 0..*
  #  <--> 
  #  state 0..* UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState.
    if ( defined $self->{'state'} ) {
    my $x = $self->{'state'};
        $self->{'state'} = Set::Object->new();
        $self->set_state(@$x);
  }
  
  # AssociationEnd 
  #  parameter 0..*
  #  <--> 
  #  type 1 UMMF::UML::MetaModel::Foundation::Core::Classifier.
    if ( defined $self->{'type'} ) {
    my $x = $self->{'type'};
    $self->{'type'} = undef;
    $self->set_type($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::Foundation::Core::Parameter::___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::Foundation::Core::Parameter::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();

  $self;
}




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



=for html <hr/>

=cut

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

=head2 C<defaultValue>

  my $val = $obj->defaultValue;

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

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

  ;

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

  ;

  $val;
}


=head2 C<set_defaultValue>

  $obj->set_defaultValue($val);

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

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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML::MetaModel::Foundation::Data_Types::Expression')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.defaultValue");
  }

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

  ;

  $self;
}


=head2 C<count_defaultValue>

  $obj->count_defaultValue;

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

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

  ;

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

  ;

  defined $val ? 1 : 0;
}



=for html <hr/>

=cut

#################################################################
# Attribute kind
# type = UMMF::UML::MetaModel::Foundation::Data_Types::ParameterDirectionKind
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = "inout"

=head2 C<kind>

  my $val = $obj->kind;

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

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

  ;

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

  ;

  $val;
}


=head2 C<set_kind>

  $obj->set_kind($val);

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

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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML::MetaModel::Foundation::Data_Types::ParameterDirectionKind')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.kind");
  }

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

  ;

  $self;
}


=head2 C<count_kind>

  $obj->count_kind;

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

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

  ;

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

  ;

  defined $val ? 1 : 0;
}




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd parameter <---> behavioralFeature
# type = UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature
# multiplicity = 0..1
# ordering = 

=head2 C<behavioralFeature>

  my $val = $obj->behavioralFeature;

Returns the AssociationEnd C<behavioralFeature> value of type L<UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature>.

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


=head2 C<set_behavioralFeature>

  $obj->set_behavioralFeature($val);

Sets the AssociationEnd C<behavioralFeature> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.behavioralFeature") }

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

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

    }
		  
  $self;
}


=head2 C<add_behavioralFeature>

  $obj->add_behavioralFeature($val);

Adds the AssociationEnd C<behavioralFeature> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature>.
Throws exception if a value already exists.
Returns C<$obj>.

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

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

  my $old;
  if ( ($old = $self->{'behavioralFeature'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.behavioralFeature");
      
    # confess("UMMF::UML::MetaModel::Foundation::Core::Parameter::behavioralFeature: too many")
    # if defined $self->{'behavioralFeature'};

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

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

  
  }

  $self;
}


=head2 C<remove_behavioralFeature>

  $obj->remove_behavioralFeature($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_behavioralFeature>

  $obj->clear_behavioralFeature;

Clears the AssociationEnd C<behavioralFeature> links to L<UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_behavioralFeature>

  $obj->count_behavioralFeature;

Returns the number of elements of type L<UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature|UMMF::UML::MetaModel::Foundation::Core::BehavioralFeature> associated with C<behavioralFeature>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

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

=head2 C<event>

  my $val = $obj->event;

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

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


=head2 C<set_event>

  $obj->set_event($val);

Sets the AssociationEnd C<event> 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_event ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'event'}) ne $val ) { # Recursion lock

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

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

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

    }
		  
  $self;
}


=head2 C<add_event>

  $obj->add_event($val);

Adds the AssociationEnd C<event> 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_event ($$)
{
  my ($self, $val) = @_;

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_event>

  $obj->remove_event($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_event>

  $obj->clear_event;

Clears the AssociationEnd C<event> 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_event ($@)
{
  my ($self) = @_;

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

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

    }

  $self;
}


=head2 C<count_event>

  $obj->count_event;

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

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd parameter <---> state
# type = UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState
# multiplicity = 0..*
# ordering = 

=head2 C<state>

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

Returns the AssociationEnd C<state> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState>.
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 state ($)
{
  my ($self) = @_;

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

  # confess("Container for state $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_state>

  $obj->set_state(@val);

Sets the AssociationEnd C<state> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState>.
Returns C<$obj>.

=cut
sub set_state ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_state;
  $self->add_state(@val);
}


=head2 C<add_state>

  $obj->add_state(@val);

Adds AssociationEnd C<state> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState>.
Returns C<$obj>.

=cut
sub add_state ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'state'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.state");

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

    }
  
  $self;
}


=head2 C<remove_state>

  $obj->remove_state(@val);

Removes the AssociationEnd C<state> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState>.
Returns C<$obj>.

=cut
sub remove_state ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'state'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ObjectFlowState')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.state");

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

    # Remove associations with other ends.

        
    $old->remove_parameter($self) if $old;
    $val->add_parameter($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_state>

  $obj->clear_state;

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

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

        
    $old->remove_parameter($self) if $old;
    $val->add_parameter($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_state>

  $obj->count_state;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd parameter <---> type
# type = UMMF::UML::MetaModel::Foundation::Core::Classifier
# multiplicity = 1
# ordering = 

=head2 C<type>

  my $val = $obj->type;

Returns the AssociationEnd C<type> value of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.

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


=head2 C<set_type>

  $obj->set_type($val);

Sets the AssociationEnd C<type> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.type") }

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

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

    }
		  
  $self;
}


=head2 C<add_type>

  $obj->add_type($val);

Adds the AssociationEnd C<type> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Throws exception if a value already exists.
Returns C<$obj>.

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

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

  my $old;
  if ( ($old = $self->{'type'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML::MetaModel::Foundation::Core::Parameter.type");
      
    # confess("UMMF::UML::MetaModel::Foundation::Core::Parameter::type: too many")
    # if defined $self->{'type'};

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

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

  
  }

  $self;
}


=head2 C<remove_type>

  $obj->remove_type($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_type>

  $obj->clear_type;

Clears the AssociationEnd C<type> links to L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_type>

  $obj->count_type;

Returns the number of elements of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier> associated with C<type>.

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

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

  defined $x ? 1 : 0;
}







# End of Class Parameter


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

