| UMMF documentation | Contained in the UMMF distribution. |
availableFeature : THIS 0..* <---> classifierRole : UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole 0..*0..*changeableinstance1aggregateprivateSet::Object
feature : THIS 0..* <---> owner : UMMF::UML_1_5::Foundation::Core::Classifier 0..1__validate_type__typecheckisaFeatureisaFoundation__Core__Feature__model_name __isAbstract__tangram_schema___initialize__initialize__createownerScopeset_ownerScopecount_ownerScopevisibilityset_visibilitycount_visibilityclassifierRoleset_classifierRoleadd_classifierRoleremove_classifierRoleclear_classifierRolecount_classifierRoleownerset_owneradd_ownerremove_ownerclear_ownercount_owner
UMMF::UML_1_5::Foundation::Core::Feature --
1.5
ownerScope : UMMF::UML_1_5::Foundation::Data_Types::ScopeKind private1changeableinstanceunordered<"instance">Set::Objectvisibility : UMMF::UML_1_5::Foundation::Data_Types::VisibilityKind private1changeableinstanceunordered<"public">Set::ObjectavailableFeature : THIS 0..* <---> classifierRole : UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole 0..*0..*changeableinstanceaggregateprivateSet::Objectfeature : THIS 0..* <---> owner : UMMF::UML_1_5::Foundation::Core::Classifier 0..10..1changeableinstancecompositepublicSet::Object__validate_typeUMMF::UML_1_5::Foundation::Core::Feature->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Foundation::Core::Feature.
__typecheckUMMF::UML_1_5::Foundation::Core::Feature->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Foundation::Core::Feature-__validate_type($value)>> is false.
isaFeatureReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::Feature. Other receivers will return false.
isaFoundation__Core__FeatureReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::Feature.
Other receivers will return false.
This is the fully qualified version of the isaFeature method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Foundation::Core::Feature') for an object or package of
this Classifier.
__isAbstract$package->__isAbstract;
Returns 1.
__tangram_schemamy $tangram_schema $obj_or_package->__tangram_schema
Returns a HASH ref that describes this Classifier for Tangram.
___initializeInitialize all Attributes and AssociationEnds in a instance of this Classifier. Does not initalize slots in its Generalizations.
See also: __initialize.
__initializeInitialize all slots in this Classifier and all its Generalizations.
See also: ___initialize.
__createCalls all <<create>> Methods for this Classifier and all Generalizations.
See also: ___create.
ownerScopemy $val = $obj->ownerScope;
Returns the UMMF::UML_1_5::Foundation::Data_Types::ScopeKind value of Attribute ownerScope.
set_ownerScope$obj->set_ownerScope($val);
Sets the value of Attribute ownerScope.
$val must be of type UMMF::UML_1_5::Foundation::Data_Types::ScopeKind or undef.
Returns $obj.
count_ownerScope$obj->count_ownerScope;
Returns the number of elements (0 or 1) in ownerScope.
visibilitymy $val = $obj->visibility;
Returns the UMMF::UML_1_5::Foundation::Data_Types::VisibilityKind value of Attribute visibility.
set_visibility$obj->set_visibility($val);
Sets the value of Attribute visibility.
$val must be of type UMMF::UML_1_5::Foundation::Data_Types::VisibilityKind or undef.
Returns $obj.
count_visibility$obj->count_visibility;
Returns the number of elements (0 or 1) in visibility.
classifierRolemy @val = $obj->classifierRole; my $ary_val = $obj->classifierRole;
Returns the AssociationEnd classifierRole values of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole (UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole).
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.
set_classifierRole$obj->set_classifierRole(@val);
Sets the AssociationEnd classifierRole value.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole (UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole).
Returns $obj.
add_classifierRole$obj->add_classifierRole(@val);
Adds AssociationEnd classifierRole values.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole (UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole).
Returns $obj.
remove_classifierRole$obj->remove_classifierRole(@val);
Removes the AssociationEnd classifierRole values @val.
Elements of @val must of type UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole (UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole).
Returns $obj.
clear_classifierRole$obj->clear_classifierRole;
Clears the AssociationEnd classifierRole links to UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole (UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole).
Returns $obj.
count_classifierRole$obj->count_classifierRole;
Returns the number of elements associated with classifierRole.
ownermy $val = $obj->owner;
Returns the AssociationEnd owner value of type UMMF::UML_1_5::Foundation::Core::Classifier.
set_owner$obj->set_owner($val);
Sets the AssociationEnd owner value.
$val must of type UMMF::UML_1_5::Foundation::Core::Classifier.
Returns $obj.
add_owner$obj->add_owner($val);
Adds the AssociationEnd owner value.
$val must of type UMMF::UML_1_5::Foundation::Core::Classifier.
Throws exception if a value already exists.
Returns $obj.
remove_owner$obj->remove_owner($val);
Removes the AssociationEnd owner value $val.
Returns $obj.
clear_owner$obj->clear_owner;
Clears the AssociationEnd owner links to UMMF::UML_1_5::Foundation::Core::Classifier.
Returns $obj.
count_owner$obj->count_owner;
Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::Classifier associated with owner.
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::Feature; #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::ModelElement ); ################################################################# # 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::Feature') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Foundation::Core::Feature' . ": value '$x'") unless __validate_type($self, $x); }
sub isaFeature { 1 }
sub isaFoundation__Core__Feature { 1 } ################################################################# # Introspection #
sub __model_name { 'Foundation::Core::Feature' }
sub __isAbstract { 1; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Foundation::Core::Feature' => { 'table' => 'Foundation__Core__Feature', 'abstract' => 1, 'slots' => { # Attributes 'ownerScope' => { 'type_impl' => 'string', 'col' => 'ownerScope', } , 'visibility' => { 'type_impl' => 'string', 'col' => 'visibility', } , # Associations 'classifierRole' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole', 'table' => 'ClassifierRole_AvailableFeature', 'item' => 'classifierRole', 'coll' => 'availableFeature', } , 'owner' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Foundation::Core::Classifier', 'null' => '1', 'col' => 'owner', } , }, 'bases' => [ 'UMMF::UML_1_5::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 #
sub ___initialize { my ($self) = @_; # Attributes # Attribute ownerScope if ( exists $self->{'ownerScope'} ) { my $x = $self->{'ownerScope'}; $self->{'ownerScope'} = undef; $self->set_ownerScope($x); } else { $self->{'ownerScope'} = "instance"; } # Attribute visibility if ( exists $self->{'visibility'} ) { my $x = $self->{'visibility'}; $self->{'visibility'} = undef; $self->set_visibility($x); } else { $self->{'visibility'} = "public"; } # Associations # AssociationEnd # availableFeature 0..* # <--> # classifierRole 0..* UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole. if ( defined $self->{'classifierRole'} ) { my $x = $self->{'classifierRole'}; $self->{'classifierRole'} = Set::Object->new(); $self->set_classifierRole(@$x); } # AssociationEnd # feature 0..* # <--> # owner 0..1 UMMF::UML_1_5::Foundation::Core::Classifier. if ( defined $self->{'owner'} ) { my $x = $self->{'owner'}; $self->{'owner'} = undef; $self->set_owner($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->UMMF::UML_1_5::Foundation::Core::Feature::___initialize; $self->UMMF::UML_1_5::Foundation::Core::Element::___initialize; $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___initialize; $self; }
sub __create { my ($self, @args) = @_; # $DB::single = 1; $self->UMMF::UML_1_5::Foundation::Core::Feature::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Element::___create(); $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create(); $self; } ################################################################# # Attributes #
################################################################# # Attribute ownerScope # type = UMMF::UML_1_5::Foundation::Data_Types::ScopeKind # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue = "instance"
sub ownerScope ($) { my ($self) = @_; ; my $val = $self->{'ownerScope'}; ; $val; }
sub set_ownerScope ($$) { my ($self, $val) = @_; ; if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Data_Types::ScopeKind')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.ownerScope"); } $self->{'ownerScope'} = $val ; ; $self; }
sub count_ownerScope ($) { my ($self) = @_; ; my $val = $self->{'ownerScope'}; ; defined $val ? 1 : 0; }
################################################################# # Attribute visibility # type = UMMF::UML_1_5::Foundation::Data_Types::VisibilityKind # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue = "public"
sub visibility ($) { my ($self) = @_; ; my $val = $self->{'visibility'}; ; $val; }
sub set_visibility ($$) { my ($self, $val) = @_; ; if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Data_Types::VisibilityKind')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.visibility"); } $self->{'visibility'} = $val ; ; $self; }
sub count_visibility ($) { my ($self) = @_; ; my $val = $self->{'visibility'}; ; defined $val ? 1 : 0; } ################################################################# # Association #
################################################################# # AssociationEnd availableFeature <---> classifierRole # type = UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole # multiplicity = 0..* # ordering =
sub classifierRole ($) { my ($self) = @_; my $x = $self->{'classifierRole'}; # confess("Container for classifierRole $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() : () ]; }
sub set_classifierRole ($@) { my ($self, @val) = @_; $self->clear_classifierRole; $self->add_classifierRole(@val); }
sub add_classifierRole ($@) { my ($self, @val) = @_; my $x = $self->{'classifierRole'} ||= 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_1_5::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.classifierRole"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_availableFeature($self) if $old; $val->add_availableFeature($self) if $val; } $self; }
sub remove_classifierRole ($@) { my ($self, @val) = @_; my $x = $self->{'classifierRole'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.classifierRole"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_availableFeature($self) if $old; $val->add_availableFeature($self) if $val; ; } $self; }
sub clear_classifierRole ($) { my ($self) = @_; my $x = $self->{'classifierRole'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'classifierRole'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_availableFeature($self) if $old; $val->add_availableFeature($self) if $val; ; } $self; }
sub count_classifierRole ($) { my ($self) = @_; my $x = $self->{'classifierRole'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd feature <---> owner # type = UMMF::UML_1_5::Foundation::Core::Classifier # multiplicity = 0..1 # ordering =
sub owner ($) { my ($self) = @_; $self->{'owner'}; }
sub set_owner ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'owner'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.owner") } # Recursion lock $self->{'owner'} = $val ; # Remove and add associations with other ends. $old->remove_feature($self) if $old; $val->add_feature($self) if $val; } $self; }
sub add_owner ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'owner'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Feature.owner"); # confess("UMMF::UML_1_5::Foundation::Core::Feature::owner: too many") # if defined $self->{'owner'}; # Recursion lock $self->{'owner'} = $val ; # Remove and add associations with other ends. $old->remove_feature($self) if $old; $val->add_feature($self) if $val; } $self; }
sub remove_owner ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'owner'}) eq $val ) { # Recursion lock $val = $self->{'owner'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_feature($self) if $old; $val->add_feature($self) if $val; } }
sub clear_owner ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'owner'}) ) { # Recursion lock my $val = $self->{'owner'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_feature($self) if $old; $val->add_feature($self) if $val; } $self; }
sub count_owner ($) { my ($self) = @_; my $x = $self->{'owner'}; defined $x ? 1 : 0; } # End of Class Feature
############################################################################ 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: ###