| UMMF documentation | Contained in the UMMF distribution. |
__validate_type__typecheckisaComponentisaFoundation__Core__Component__model_name __isAbstract__tangram_schema___initialize__initialize__createdeploymentLocationset_deploymentLocationadd_deploymentLocationremove_deploymentLocationclear_deploymentLocationcount_deploymentLocationimplementationset_implementationadd_implementationremove_implementationclear_implementationcount_implementationresidentset_residentadd_residentremove_residentclear_residentcount_resident
UMMF::UML_1_5::Foundation::Core::Component --
1.5
NO ATTRIBUTES
deployedComponent : THIS 0..* <---> deploymentLocation : UMMF::UML_1_5::Foundation::Core::Node 0..*0..*changeableinstancenonepublicSet::ObjectimplementationLocation : THIS 0..* <---> implementation : UMMF::UML_1_5::Foundation::Core::Artifact 0..*0..*changeableinstancenonepublicSet::Objectcontainer : THIS 0..* <---> resident : UMMF::UML_1_5::Foundation::Core::ModelElement 0..*0..*changeableinstancenonepublicSet::Object__validate_typeUMMF::UML_1_5::Foundation::Core::Component->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Foundation::Core::Component.
__typecheckUMMF::UML_1_5::Foundation::Core::Component->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Foundation::Core::Component-__validate_type($value)>> is false.
isaComponentReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::Component. Other receivers will return false.
isaFoundation__Core__ComponentReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::Component.
Other receivers will return false.
This is the fully qualified version of the isaComponent method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Foundation::Core::Component') for an object or package of
this Classifier.
__isAbstract$package->__isAbstract;
Returns 0.
__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.
deploymentLocationmy @val = $obj->deploymentLocation; my $ary_val = $obj->deploymentLocation;
Returns the AssociationEnd deploymentLocation values of type UMMF::UML_1_5::Foundation::Core::Node.
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_deploymentLocation$obj->set_deploymentLocation(@val);
Sets the AssociationEnd deploymentLocation value.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Node.
Returns $obj.
add_deploymentLocation$obj->add_deploymentLocation(@val);
Adds AssociationEnd deploymentLocation values.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Node.
Returns $obj.
remove_deploymentLocation$obj->remove_deploymentLocation(@val);
Removes the AssociationEnd deploymentLocation values @val.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Node.
Returns $obj.
clear_deploymentLocation$obj->clear_deploymentLocation;
Clears the AssociationEnd deploymentLocation links to UMMF::UML_1_5::Foundation::Core::Node.
Returns $obj.
count_deploymentLocation$obj->count_deploymentLocation;
Returns the number of elements associated with deploymentLocation.
implementationmy @val = $obj->implementation; my $ary_val = $obj->implementation;
Returns the AssociationEnd implementation values of type UMMF::UML_1_5::Foundation::Core::Artifact.
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_implementation$obj->set_implementation(@val);
Sets the AssociationEnd implementation value.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Artifact.
Returns $obj.
add_implementation$obj->add_implementation(@val);
Adds AssociationEnd implementation values.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Artifact.
Returns $obj.
remove_implementation$obj->remove_implementation(@val);
Removes the AssociationEnd implementation values @val.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::Artifact.
Returns $obj.
clear_implementation$obj->clear_implementation;
Clears the AssociationEnd implementation links to UMMF::UML_1_5::Foundation::Core::Artifact.
Returns $obj.
count_implementation$obj->count_implementation;
Returns the number of elements associated with implementation.
residentmy @val = $obj->resident; my $ary_val = $obj->resident;
Returns the AssociationEnd resident values of type UMMF::UML_1_5::Foundation::Core::ModelElement.
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_resident$obj->set_resident(@val);
Sets the AssociationEnd resident value.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
add_resident$obj->add_resident(@val);
Adds AssociationEnd resident values.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
remove_resident$obj->remove_resident(@val);
Removes the AssociationEnd resident values @val.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
clear_resident$obj->clear_resident;
Clears the AssociationEnd resident links to UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
count_resident$obj->count_resident;
Returns the number of elements associated with resident.
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::Component; #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::Classifier ); ################################################################# # 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::Component') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Foundation::Core::Component' . ": value '$x'") unless __validate_type($self, $x); }
sub isaComponent { 1 }
sub isaFoundation__Core__Component { 1 } ################################################################# # Introspection #
sub __model_name { 'Foundation::Core::Component' }
sub __isAbstract { 0; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Foundation::Core::Component' => { 'table' => 'Foundation__Core__Component', 'abstract' => 0, 'slots' => { # Attributes # Associations 'deploymentLocation' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Foundation::Core::Node', 'table' => 'Foundation__Core__DeploymentLocation_DeployedComponent', 'item' => 'deploymentLocation', 'coll' => 'deployedComponent', } , 'implementation' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Foundation::Core::Artifact', 'table' => 'Foundation__Core__ImplementationLocation_Implementation', 'item' => 'implementation', 'coll' => 'implementationLocation', } , 'resident' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Foundation::Core::ModelElement', 'table' => 'Foundation__Core__Container_Resident', 'item' => 'resident', 'coll' => 'container', } , }, 'bases' => [ 'UMMF::UML_1_5::Foundation::Core::Classifier', ], '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 # deployedComponent 0..* # <--> # deploymentLocation 0..* UMMF::UML_1_5::Foundation::Core::Node. if ( defined $self->{'deploymentLocation'} ) { my $x = $self->{'deploymentLocation'}; $self->{'deploymentLocation'} = Set::Object->new(); $self->set_deploymentLocation(@$x); } # AssociationEnd # implementationLocation 0..* # <--> # implementation 0..* UMMF::UML_1_5::Foundation::Core::Artifact. if ( defined $self->{'implementation'} ) { my $x = $self->{'implementation'}; $self->{'implementation'} = Set::Object->new(); $self->set_implementation(@$x); } # AssociationEnd # container 0..* # <--> # resident 0..* UMMF::UML_1_5::Foundation::Core::ModelElement. if ( defined $self->{'resident'} ) { my $x = $self->{'resident'}; $self->{'resident'} = Set::Object->new(); $self->set_resident(@$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::Namespace'); $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::GeneralizableElement'); $self->__use('UMMF::UML_1_5::Foundation::Core::Classifier'); } $self->UMMF::UML_1_5::Foundation::Core::Component::___initialize; $self->UMMF::UML_1_5::Foundation::Core::Namespace::___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::GeneralizableElement::___initialize; $self->UMMF::UML_1_5::Foundation::Core::Classifier::___initialize; $self; }
sub __create { my ($self, @args) = @_; # $DB::single = 1; $self->UMMF::UML_1_5::Foundation::Core::Component::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Namespace::___create(); $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::GeneralizableElement::___create(); $self->UMMF::UML_1_5::Foundation::Core::Classifier::___create(); $self; } ################################################################# # Attributes # ################################################################# # Association #
################################################################# # AssociationEnd deployedComponent <---> deploymentLocation # type = UMMF::UML_1_5::Foundation::Core::Node # multiplicity = 0..* # ordering =
sub deploymentLocation ($) { my ($self) = @_; my $x = $self->{'deploymentLocation'}; # confess("Container for deploymentLocation $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_deploymentLocation ($@) { my ($self, @val) = @_; $self->clear_deploymentLocation; $self->add_deploymentLocation(@val); }
sub add_deploymentLocation ($@) { my ($self, @val) = @_; my $x = $self->{'deploymentLocation'} ||= 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::Foundation::Core::Node')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.deploymentLocation"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_deployedComponent($self) if $old; $val->add_deployedComponent($self) if $val; } $self; }
sub remove_deploymentLocation ($@) { my ($self, @val) = @_; my $x = $self->{'deploymentLocation'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Foundation::Core::Node')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.deploymentLocation"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_deployedComponent($self) if $old; $val->add_deployedComponent($self) if $val; ; } $self; }
sub clear_deploymentLocation ($) { my ($self) = @_; my $x = $self->{'deploymentLocation'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'deploymentLocation'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_deployedComponent($self) if $old; $val->add_deployedComponent($self) if $val; ; } $self; }
sub count_deploymentLocation ($) { my ($self) = @_; my $x = $self->{'deploymentLocation'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd implementationLocation <---> implementation # type = UMMF::UML_1_5::Foundation::Core::Artifact # multiplicity = 0..* # ordering =
sub implementation ($) { my ($self) = @_; my $x = $self->{'implementation'}; # confess("Container for implementation $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_implementation ($@) { my ($self, @val) = @_; $self->clear_implementation; $self->add_implementation(@val); }
sub add_implementation ($@) { my ($self, @val) = @_; my $x = $self->{'implementation'} ||= 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::Foundation::Core::Artifact')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.implementation"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_implementationLocation($self) if $old; $val->add_implementationLocation($self) if $val; } $self; }
sub remove_implementation ($@) { my ($self, @val) = @_; my $x = $self->{'implementation'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Foundation::Core::Artifact')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.implementation"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_implementationLocation($self) if $old; $val->add_implementationLocation($self) if $val; ; } $self; }
sub clear_implementation ($) { my ($self) = @_; my $x = $self->{'implementation'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'implementation'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_implementationLocation($self) if $old; $val->add_implementationLocation($self) if $val; ; } $self; }
sub count_implementation ($) { my ($self) = @_; my $x = $self->{'implementation'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd container <---> resident # type = UMMF::UML_1_5::Foundation::Core::ModelElement # multiplicity = 0..* # ordering =
sub resident ($) { my ($self) = @_; my $x = $self->{'resident'}; # confess("Container for resident $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_resident ($@) { my ($self, @val) = @_; $self->clear_resident; $self->add_resident(@val); }
sub add_resident ($@) { my ($self, @val) = @_; my $x = $self->{'resident'} ||= 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::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.resident"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_container($self) if $old; $val->add_container($self) if $val; } $self; }
sub remove_resident ($@) { my ($self, @val) = @_; my $x = $self->{'resident'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::Component.resident"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_container($self) if $old; $val->add_container($self) if $val; ; } $self; }
sub clear_resident ($) { my ($self) = @_; my $x = $self->{'resident'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'resident'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_container($self) if $old; $val->add_container($self) if $val; ; } $self; }
sub count_resident ($) { my ($self) = @_; my $x = $self->{'resident'}; defined $x ? $x->size : 0; } # End of Class Component
############################################################################ 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: ###