# -*- 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::DataFlow;

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

=head1 VERSION

1.0

=head1 SYNOPSIS

=head1 DESCRIPTION 

=head1 USAGE

=head1 EXPORT

=head1 METATYPE

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

=head1 SUPERCLASSES

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




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<1> : C<flow> E<lt>---E<gt>  C<destination> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin 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::InputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


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

=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::Behavioral_Elements::Actions::Action_Foundation::DataFlow->__validate_type($value);

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

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

  no warnings;

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


=head2 C<__typecheck>

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

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

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

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


=head2 C<isaDataFlow>


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

=cut
sub isaDataFlow { 1 }


=head2 C<isaBehavioral_Elements__Actions__Action_Foundation__DataFlow>


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

=cut
sub isaBehavioral_Elements__Actions__Action_Foundation__DataFlow { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

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

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



=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::DataFlow' =>
     {
       'table' => 'Behavioral_Elements__Actions__Action_Foundation__DataFlow',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'destination'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin',

                                             'col' => 'destination', 

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

                                             'col' => 'source', 

                                                                                                                   }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Foundation::Core::ModelElement',  ],
       'sql' => {

       },
     },
   ],

   'sql' =>
   {
    # Note Tangram::Ref::get_exporter() has
    # "UPDATE $table SET $self->{col} = $refid WHERE id = $id",
    # The id_col is hard-coded, 
    # Thus id_col will not work.
    #'id_col' => '__sid',
    #'class_col' => '__stype',
   },
     # 'set_id' => sub { }
     # 'get_id' => sub { }

      
  };
}


#################################################################
# Class Attributes
#


    

#################################################################
# Class Associations
#


    

#################################################################
# Initialization
#


=head2 C<___initialize>

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

See also: C<__initialize>.

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

  # Attributes



  # Associations

  # AssociationEnd 
  #  flow 1
  #  <--> 
  #  destination 1 UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin.
    if ( defined $self->{'destination'} ) {
    my $x = $self->{'destination'};
    $self->{'destination'} = undef;
    $self->set_destination($x);
  }
  
  # AssociationEnd 
  #  flow 0..*
  #  <--> 
  #  source 1 UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin.
    if ( defined $self->{'source'} ) {
    my $x = $self->{'source'};
    $self->{'source'} = undef;
    $self->set_source($x);
  }
  

  $self;
}


my $__initialize_use;

=head2 C<__initialize>

Initialize all slots in this Classifier and all its Generalizations.

See also: C<___initialize>.

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

  # $DB::single = 1;

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

  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::DataFlow::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;

  $self;
}
      

=head2 C<__create>

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

See also: C<___create>.

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

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

  $self;
}




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




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd flow <---> destination
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::InputPin
# multiplicity = 1
# ordering = 

=head2 C<destination>

  my $val = $obj->destination;

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

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


=head2 C<set_destination>

  $obj->set_destination($val);

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

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

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

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

    }
		  
  $self;
}


=head2 C<add_destination>

  $obj->add_destination($val);

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

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_destination>

  $obj->remove_destination($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_destination>

  $obj->clear_destination;

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

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

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

    }

  $self;
}


=head2 C<count_destination>

  $obj->count_destination;

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

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd flow <---> source
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin
# multiplicity = 1
# ordering = 

=head2 C<source>

  my $val = $obj->source;

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

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


=head2 C<set_source>

  $obj->set_source($val);

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

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

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

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

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

    }
		  
  $self;
}


=head2 C<add_source>

  $obj->add_source($val);

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

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_source>

  $obj->remove_source($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_source>

  $obj->clear_source;

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

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

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

    }

  $self;
}


=head2 C<count_source>

  $obj->count_source;

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

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

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

  defined $x ? 1 : 0;
}







# End of Class DataFlow


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

