UMMF::UML_1_5::Foundation::Core::Generalization - UMMF::UML_1_5::Foundation::Core::Generalization documentation


UMMF documentation Contained in the UMMF distribution.

Index


Code Index:

NAME

Top

UMMF::UML_1_5::Foundation::Core::Generalization --

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

ATTRIBUTES

Top

NO ATTRIBUTES

ASSOCIATIONS

Top

generalization : THIS 0..* <---> child : UMMF::UML_1_5::Foundation::Core::GeneralizableElement 1

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

specialization : THIS 0..* <---> parent : UMMF::UML_1_5::Foundation::Core::GeneralizableElement 1

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

powertypeRange : THIS 0..* <---> powertype : UMMF::UML_1_5::Foundation::Core::Classifier 0..1

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

METHODS

Top

__validate_type

  UMMF::UML_1_5::Foundation::Core::Generalization->__validate_type($value);

Returns true if $value is a valid representation of UMMF::UML_1_5::Foundation::Core::Generalization.

__typecheck

  UMMF::UML_1_5::Foundation::Core::Generalization->__typecheck($value, $msg);

Calls confess() with $msg if <UMMF::UML_1_5::Foundation::Core::Generalization-__validate_type($value)>> is false.

isaGeneralization

Returns true if receiver is a UMMF::UML_1_5::Foundation::Core::Generalization. Other receivers will return false.

isaFoundation__Core__Generalization

Returns true if receiver is a UMMF::UML_1_5::Foundation::Core::Generalization. Other receivers will return false. This is the fully qualified version of the isaGeneralization method.

__model_name

  my $name = $obj_or_package->__model_name;

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

__isAbstract

  $package->__isAbstract;

Returns 0.

__tangram_schema

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See UMMF::Export::Perl::Tangram

___initialize

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

See also: __initialize.

__initialize

Initialize all slots in this Classifier and all its Generalizations.

See also: ___initialize.

__create

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

See also: ___create.

child

  my $val = $obj->child;

Returns the AssociationEnd child value of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement.

set_child

  $obj->set_child($val);

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

add_child

  $obj->add_child($val);

Adds the AssociationEnd child value. $val must of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement. Throws exception if a value already exists. Returns $obj.

remove_child

  $obj->remove_child($val);

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

clear_child

  $obj->clear_child;

Clears the AssociationEnd child links to UMMF::UML_1_5::Foundation::Core::GeneralizableElement. Returns $obj.

count_child

  $obj->count_child;

Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement associated with child.

parent

  my $val = $obj->parent;

Returns the AssociationEnd parent value of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement.

set_parent

  $obj->set_parent($val);

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

add_parent

  $obj->add_parent($val);

Adds the AssociationEnd parent value. $val must of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement. Throws exception if a value already exists. Returns $obj.

remove_parent

  $obj->remove_parent($val);

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

clear_parent

  $obj->clear_parent;

Clears the AssociationEnd parent links to UMMF::UML_1_5::Foundation::Core::GeneralizableElement. Returns $obj.

count_parent

  $obj->count_parent;

Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::GeneralizableElement associated with parent.

powertype

  my $val = $obj->powertype;

Returns the AssociationEnd powertype value of type UMMF::UML_1_5::Foundation::Core::Classifier.

set_powertype

  $obj->set_powertype($val);

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

add_powertype

  $obj->add_powertype($val);

Adds the AssociationEnd powertype value. $val must of type UMMF::UML_1_5::Foundation::Core::Classifier. Throws exception if a value already exists. Returns $obj.

remove_powertype

  $obj->remove_powertype($val);

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

clear_powertype

  $obj->clear_powertype;

Clears the AssociationEnd powertype links to UMMF::UML_1_5::Foundation::Core::Classifier. Returns $obj.

count_powertype

  $obj->count_powertype;

Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::Classifier associated with powertype.

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::Foundation::Core::Generalization;

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



);


#################################################################
# 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::Foundation::Core::Generalization')  ;
}


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

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


sub isaGeneralization { 1 }


sub isaFoundation__Core__Generalization { 1 }


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

sub __model_name { 'Foundation::Core::Generalization' }



sub __isAbstract { 0; }


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

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML_1_5::Foundation::Core::Generalization' =>
     {
       'table' => 'Foundation__Core__Generalization',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'child'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Core::GeneralizableElement',

                                             'col' => 'child', 

                                                                                                                   }
      ,
                  	 	       'parent'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Core::GeneralizableElement',

                                             'col' => 'parent', 

                                                                                                                   }
      ,
                  	 	       'powertype'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Core::Classifier',

                  'null' => '1', 

                                    'col' => 'powertype', 

                                                                                                                   }
      ,
                         },
       'bases' => [  'UMMF::UML_1_5::Foundation::Core::Relationship',  ],
       '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 
  #  generalization 0..*
  #  <--> 
  #  child 1 UMMF::UML_1_5::Foundation::Core::GeneralizableElement.
    if ( defined $self->{'child'} ) {
    my $x = $self->{'child'};
    $self->{'child'} = undef;
    $self->set_child($x);
  }
  
  # AssociationEnd 
  #  specialization 0..*
  #  <--> 
  #  parent 1 UMMF::UML_1_5::Foundation::Core::GeneralizableElement.
    if ( defined $self->{'parent'} ) {
    my $x = $self->{'parent'};
    $self->{'parent'} = undef;
    $self->set_parent($x);
  }
  
  # AssociationEnd 
  #  powertypeRange 0..*
  #  <--> 
  #  powertype 0..1 UMMF::UML_1_5::Foundation::Core::Classifier.
    if ( defined $self->{'powertype'} ) {
    my $x = $self->{'powertype'};
    $self->{'powertype'} = undef;
    $self->set_powertype($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->__use('UMMF::UML_1_5::Foundation::Core::Relationship');
  }

  $self->UMMF::UML_1_5::Foundation::Core::Generalization::___initialize;
  $self->UMMF::UML_1_5::Foundation::Core::Element::___initialize;
  $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___initialize;
  $self->UMMF::UML_1_5::Foundation::Core::Relationship::___initialize;

  $self;
}
      

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

  # $DB::single = 1;
  $self->UMMF::UML_1_5::Foundation::Core::Generalization::___create(@args);
  $self->UMMF::UML_1_5::Foundation::Core::Element::___create();
  $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create();
  $self->UMMF::UML_1_5::Foundation::Core::Relationship::___create();

  $self;
}




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




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


#################################################################
# AssociationEnd generalization <---> child
# type = UMMF::UML_1_5::Foundation::Core::GeneralizableElement
# multiplicity = 1
# ordering = 

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


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

    if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::GeneralizableElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Generalization.child") }

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

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

    }
		  
  $self;
}


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

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

  my $old;
  if ( ($old = $self->{'child'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML_1_5::Foundation::Core::GeneralizableElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Generalization.child");
      
    # confess("UMMF::UML_1_5::Foundation::Core::Generalization::child: too many")
    # if defined $self->{'child'};

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

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

  
  }

  $self;
}


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

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

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

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

  
  }
}


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

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

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

    }

  $self;
}


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

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

  defined $x ? 1 : 0;
}




#################################################################
# AssociationEnd specialization <---> parent
# type = UMMF::UML_1_5::Foundation::Core::GeneralizableElement
# multiplicity = 1
# ordering = 

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


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

    if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::GeneralizableElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Generalization.parent") }

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

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

    }
		  
  $self;
}


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

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

  my $old;
  if ( ($old = $self->{'parent'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML_1_5::Foundation::Core::GeneralizableElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Generalization.parent");
      
    # confess("UMMF::UML_1_5::Foundation::Core::Generalization::parent: too many")
    # if defined $self->{'parent'};

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

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

  
  }

  $self;
}


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

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

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

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

  
  }
}


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

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

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

    }

  $self;
}


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

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

  defined $x ? 1 : 0;
}




#################################################################
# AssociationEnd powertypeRange <---> powertype
# type = UMMF::UML_1_5::Foundation::Core::Classifier
# multiplicity = 0..1
# ordering = 

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


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

    if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Generalization.powertype") }

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

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

    }
		  
  $self;
}


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

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

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

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

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

  
  }

  $self;
}


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

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

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

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

  
  }
}


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

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

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

    }

  $self;
}


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

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

  defined $x ? 1 : 0;
}







# End of Class Generalization


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

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