UMMF::UML_1_5::Foundation::Core::StructuralFeature - UMMF::UML_1_5::Foundation::Core::StructuralFeature documentation


UMMF documentation Contained in the UMMF distribution.

Index


Code Index:

NAME

Top

UMMF::UML_1_5::Foundation::Core::StructuralFeature --

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

ATTRIBUTES

Top

multiplicity : UMMF::UML_1_5::Foundation::Data_Types::Multiplicity

metatype = UMMF::UML_1_5::Foundation::Core::Attribute
type = UMMF::UML_1_5::Foundation::Data_Types::Multiplicity
visibility = private
multiplicity = 1
changeability = changeable
targetScope = instance
ordering = unordered
initialValue = UNSPECIFIED
container_type = Set::Object

changeability : UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind

metatype = UMMF::UML_1_5::Foundation::Core::Attribute
type = UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind
visibility = private
multiplicity = 1
changeability = changeable
targetScope = instance
ordering = unordered
initialValue = <"changeable">
container_type = Set::Object

targetScope : UMMF::UML_1_5::Foundation::Data_Types::ScopeKind

metatype = UMMF::UML_1_5::Foundation::Core::Attribute
type = UMMF::UML_1_5::Foundation::Data_Types::ScopeKind
visibility = private
multiplicity = 1
changeability = changeable
targetScope = instance
ordering = unordered
initialValue = <"instance">
container_type = Set::Object

ordering : UMMF::UML_1_5::Foundation::Data_Types::OrderingKind

metatype = UMMF::UML_1_5::Foundation::Core::Attribute
type = UMMF::UML_1_5::Foundation::Data_Types::OrderingKind
visibility = private
multiplicity = 1
changeability = changeable
targetScope = instance
ordering = unordered
initialValue = <"unordered">
container_type = Set::Object

ASSOCIATIONS

Top

typedFeature : THIS 0..* <---> type : UMMF::UML_1_5::Foundation::Core::Classifier 1

metatype = UMMF::UML_1_5::Foundation::Core::AssociationEnd
type = UMMF::UML_1_5::Foundation::Core::Classifier
multiplicity = 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::StructuralFeature->__validate_type($value);

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

__typecheck

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

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

isaStructuralFeature

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

isaFoundation__Core__StructuralFeature

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

__model_name

  my $name = $obj_or_package->__model_name;

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

__isAbstract

  $package->__isAbstract;

Returns 1.

__tangram_schema

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See UMMF::Export::Perl::Tangram

___initialize

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

See also: __initialize.

__initialize

Initialize all slots in this Classifier and all its Generalizations.

See also: ___initialize.

__create

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

See also: ___create.

multiplicity

  my $val = $obj->multiplicity;

Returns the UMMF::UML_1_5::Foundation::Data_Types::Multiplicity value of Attribute multiplicity.

set_multiplicity

  $obj->set_multiplicity($val);

Sets the value of Attribute multiplicity. $val must be of type UMMF::UML_1_5::Foundation::Data_Types::Multiplicity or undef. Returns $obj.

count_multiplicity

  $obj->count_multiplicity;

Returns the number of elements (0 or 1) in multiplicity.

changeability

  my $val = $obj->changeability;

Returns the UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind value of Attribute changeability.

set_changeability

  $obj->set_changeability($val);

Sets the value of Attribute changeability. $val must be of type UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind or undef. Returns $obj.

count_changeability

  $obj->count_changeability;

Returns the number of elements (0 or 1) in changeability.

targetScope

  my $val = $obj->targetScope;

Returns the UMMF::UML_1_5::Foundation::Data_Types::ScopeKind value of Attribute targetScope.

set_targetScope

  $obj->set_targetScope($val);

Sets the value of Attribute targetScope. $val must be of type UMMF::UML_1_5::Foundation::Data_Types::ScopeKind or undef. Returns $obj.

count_targetScope

  $obj->count_targetScope;

Returns the number of elements (0 or 1) in targetScope.

ordering

  my $val = $obj->ordering;

Returns the UMMF::UML_1_5::Foundation::Data_Types::OrderingKind value of Attribute ordering.

set_ordering

  $obj->set_ordering($val);

Sets the value of Attribute ordering. $val must be of type UMMF::UML_1_5::Foundation::Data_Types::OrderingKind or undef. Returns $obj.

count_ordering

  $obj->count_ordering;

Returns the number of elements (0 or 1) in ordering.

type

  my $val = $obj->type;

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

set_type

  $obj->set_type($val);

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

add_type

  $obj->add_type($val);

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

remove_type

  $obj->remove_type($val);

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

clear_type

  $obj->clear_type;

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

count_type

  $obj->count_type;

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

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

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



);


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


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

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


sub isaStructuralFeature { 1 }


sub isaFoundation__Core__StructuralFeature { 1 }


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

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



sub __isAbstract { 1; }


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

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML_1_5::Foundation::Core::StructuralFeature' =>
     {
       'table' => 'Foundation__Core__StructuralFeature',
       'abstract' => 1,
       'slots' => 
       { 
	 # Attributes
	 	       'multiplicity'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Data_Types::Multiplicity',

                                             'col' => 'multiplicity', 

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

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

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

                                                                                                                   }
      ,
         
	 # Associations
	 	 	       'type'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML_1_5::Foundation::Core::Classifier',

                                             'col' => 'type', 

                                                                                                                   }
      ,
                         },
       'bases' => [  'UMMF::UML_1_5::Foundation::Core::Feature',  ],
       '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

    # Attribute multiplicity
  if ( exists $self->{'multiplicity'} ) {
    my $x = $self->{'multiplicity'};
    $self->{'multiplicity'} = undef;
        $self->set_multiplicity($x);
      } else {
      }
  
    # Attribute changeability
  if ( exists $self->{'changeability'} ) {
    my $x = $self->{'changeability'};
    $self->{'changeability'} = undef;
        $self->set_changeability($x);
      } else {
        $self->{'changeability'} = "changeable";
      }
  
    # Attribute targetScope
  if ( exists $self->{'targetScope'} ) {
    my $x = $self->{'targetScope'};
    $self->{'targetScope'} = undef;
        $self->set_targetScope($x);
      } else {
        $self->{'targetScope'} = "instance";
      }
  
    # Attribute ordering
  if ( exists $self->{'ordering'} ) {
    my $x = $self->{'ordering'};
    $self->{'ordering'} = undef;
        $self->set_ordering($x);
      } else {
        $self->{'ordering'} = "unordered";
      }
  


  # Associations

  # AssociationEnd 
  #  typedFeature 0..*
  #  <--> 
  #  type 1 UMMF::UML_1_5::Foundation::Core::Classifier.
    if ( defined $self->{'type'} ) {
    my $x = $self->{'type'};
    $self->{'type'} = undef;
    $self->set_type($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::Feature');
  }

  $self->UMMF::UML_1_5::Foundation::Core::StructuralFeature::___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::Feature::___initialize;

  $self;
}
      

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

  # $DB::single = 1;
  $self->UMMF::UML_1_5::Foundation::Core::StructuralFeature::___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::Feature::___create();

  $self;
}




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



#################################################################
# Attribute multiplicity
# type = UMMF::UML_1_5::Foundation::Data_Types::Multiplicity
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = 

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

  ;

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

  ;

  $val;
}


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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML_1_5::Foundation::Data_Types::Multiplicity')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.multiplicity");
  }

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

  ;

  $self;
}


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

  ;

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

  ;

  defined $val ? 1 : 0;
}



#################################################################
# Attribute changeability
# type = UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = "changeable"

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

  ;

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

  ;

  $val;
}


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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML_1_5::Foundation::Data_Types::ChangeableKind')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.changeability");
  }

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

  ;

  $self;
}


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

  ;

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

  ;

  defined $val ? 1 : 0;
}



#################################################################
# Attribute targetScope
# type = UMMF::UML_1_5::Foundation::Data_Types::ScopeKind
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = "instance"

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

  ;

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

  ;

  $val;
}


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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML_1_5::Foundation::Data_Types::ScopeKind')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.targetScope");
  }

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

  ;

  $self;
}


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

  ;

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

  ;

  defined $val ? 1 : 0;
}



#################################################################
# Attribute ordering
# type = UMMF::UML_1_5::Foundation::Data_Types::OrderingKind
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = "unordered"

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

  ;

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

  ;

  $val;
}


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

  ;

  if ( defined $val ) {
    $self->__use('UMMF::UML_1_5::Foundation::Data_Types::OrderingKind')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.ordering");
  }

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

  ;

  $self;
}


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

  ;

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

  ;

  defined $val ? 1 : 0;
}




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


#################################################################
# AssociationEnd typedFeature <---> type
# type = UMMF::UML_1_5::Foundation::Core::Classifier
# multiplicity = 1
# ordering = 

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


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_1_5::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.type") }

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

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

    }
		  
  $self;
}


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_1_5::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::StructuralFeature.type");
      
    # confess("UMMF::UML_1_5::Foundation::Core::StructuralFeature::type: too many")
    # if defined $self->{'type'};

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

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

  
  }

  $self;
}


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_typedFeature($self) if $old;
    $val->add_typedFeature($self)    if $val;

  
  }
}


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_typedFeature($self) if $old;
    $val->add_typedFeature($self)    if $val;

    }

  $self;
}


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

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

  defined $x ? 1 : 0;
}







# End of Class StructuralFeature


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

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