| UMMF documentation | Contained in the UMMF distribution. |
__validate_type__typecheckisaGeneralizableElementisaModel__GeneralizableElement__model_name __isAbstract__tangram_schema___initialize__initialize__createisRootset_isRootcount_isRootisLeafset_isLeafcount_isLeafisAbstractset_isAbstractcount_isAbstractvisibilityset_visibilitycount_visibilitysubtypeset_subtypeadd_subtyperemove_subtypeclear_subtypecount_subtypesupertypeindex_supertypeindex_of_supertypeset_supertypeset_index_supertypeadd_supertypeadd_index_supertyperemove_supertypeclear_supertypecount_supertype
UMMF::MOF_1_3::Model::GeneralizableElement --
1.3
isRoot : UMMF::MOF_1_3::Model::Boolean private1changeableinstanceunorderedSet::ObjectisLeaf : UMMF::MOF_1_3::Model::Boolean private1changeableinstanceunorderedSet::ObjectisAbstract : UMMF::MOF_1_3::Model::Boolean private1changeableinstanceunorderedSet::Objectvisibility : UMMF::MOF_1_3::Model::VisibilityKind private1changeableinstanceunorderedSet::Objectsupertype : THIS 0..* <---> subtype : UMMF::MOF_1_3::Model::GeneralizableElement 0..*0..*changeableinstancenonepublicSet::Objectsubtype : THIS 0..* <---> supertype : UMMF::MOF_1_3::Model::GeneralizableElement 0..*0..*changeableinstanceorderednonepublicARRAY__validate_typeUMMF::MOF_1_3::Model::GeneralizableElement->__validate_type($value);
Returns true if $value is a valid representation of UMMF::MOF_1_3::Model::GeneralizableElement.
__typecheckUMMF::MOF_1_3::Model::GeneralizableElement->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::MOF_1_3::Model::GeneralizableElement-__validate_type($value)>> is false.
isaGeneralizableElementReturns true if receiver is a UMMF::MOF_1_3::Model::GeneralizableElement. Other receivers will return false.
isaModel__GeneralizableElementReturns true if receiver is a UMMF::MOF_1_3::Model::GeneralizableElement.
Other receivers will return false.
This is the fully qualified version of the isaGeneralizableElement method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Model::GeneralizableElement') 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.
isRootmy $val = $obj->isRoot;
Returns the UMMF::MOF_1_3::Model::Boolean value of Attribute isRoot.
set_isRoot$obj->set_isRoot($val);
Sets the value of Attribute isRoot.
$val must be of type UMMF::MOF_1_3::Model::Boolean or undef.
Returns $obj.
count_isRoot$obj->count_isRoot;
Returns the number of elements (0 or 1) in isRoot.
isLeafmy $val = $obj->isLeaf;
Returns the UMMF::MOF_1_3::Model::Boolean value of Attribute isLeaf.
set_isLeaf$obj->set_isLeaf($val);
Sets the value of Attribute isLeaf.
$val must be of type UMMF::MOF_1_3::Model::Boolean or undef.
Returns $obj.
count_isLeaf$obj->count_isLeaf;
Returns the number of elements (0 or 1) in isLeaf.
isAbstractmy $val = $obj->isAbstract;
Returns the UMMF::MOF_1_3::Model::Boolean value of Attribute isAbstract.
set_isAbstract$obj->set_isAbstract($val);
Sets the value of Attribute isAbstract.
$val must be of type UMMF::MOF_1_3::Model::Boolean or undef.
Returns $obj.
count_isAbstract$obj->count_isAbstract;
Returns the number of elements (0 or 1) in isAbstract.
visibilitymy $val = $obj->visibility;
Returns the UMMF::MOF_1_3::Model::VisibilityKind value of Attribute visibility.
set_visibility$obj->set_visibility($val);
Sets the value of Attribute visibility.
$val must be of type UMMF::MOF_1_3::Model::VisibilityKind or undef.
Returns $obj.
count_visibility$obj->count_visibility;
Returns the number of elements (0 or 1) in visibility.
subtypemy @val = $obj->subtype; my $ary_val = $obj->subtype;
Returns the AssociationEnd subtype values of type UMMF::MOF_1_3::Model::GeneralizableElement.
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_subtype$obj->set_subtype(@val);
Sets the AssociationEnd subtype value.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
add_subtype$obj->add_subtype(@val);
Adds AssociationEnd subtype values.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
remove_subtype$obj->remove_subtype(@val);
Removes the AssociationEnd subtype values @val.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
clear_subtype$obj->clear_subtype;
Clears the AssociationEnd subtype links to UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
count_subtype$obj->count_subtype;
Returns the number of elements associated with subtype.
supertypemy @val = $obj->supertype; my $ary_val = $obj->supertype;
Returns the AssociationEnd supertype values of type UMMF::MOF_1_3::Model::GeneralizableElement.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.
index_supertypemy $x = $obj->index_supertype($i); my @x = $obj->index_supertype($i, $count);
In scalar context, returns the value of AssociationEnd supertype at index $i.
In array context, returns the values between index $i and $i + $count - 1, inclusive.
index_of_supertypemy $index = $obj->index_of_supertype($val);
Returns the index of $val in AssociationEnd supertype.
Return undef if $val is not in supertype.
set_supertype$obj->set_supertype(@val);
Sets the AssociationEnd supertype value.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
set_index_supertype$obj->set_index_supertype($i, $val);
Sets the value of AssociationEnd supertype at index $i.
Returns self.
add_supertype$obj->add_supertype(@val);
Adds AssociationEnd supertype values.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
add_index_supertype$obj->add_index_supertype($i, @val);
Adds AssociationEnd supertype values at index $i.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
remove_supertype$obj->remove_supertype(@val);
Removes the AssociationEnd supertype values @val.
Elements of @val must of type UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
clear_supertype$obj->clear_supertype;
Clears the AssociationEnd supertype links to UMMF::MOF_1_3::Model::GeneralizableElement.
Returns $obj.
count_supertype$obj->count_supertype;
Returns the number of elements associated with supertype.
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::MOF_1_3::Model::GeneralizableElement; #use 5.6.1; use strict; use warnings; ################################################################# # Version # our $VERSION = do { my @r = (q{1.3} =~ /\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::MOF_1_3::__ObjectBase qw(:__ummf_array); ################################################################# # Generalizations # use base qw( UMMF::MOF_1_3::Model::Namespace ); ################################################################# # Exports # our @EXPORT_OK = qw( ); our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); ################################################################# # Validation #
sub __validate_type($$) { my ($self, $x) = @_; no warnings; UNIVERSAL::isa($x, 'UMMF::MOF_1_3::Model::GeneralizableElement') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::MOF_1_3::Model::GeneralizableElement' . ": value '$x'") unless __validate_type($self, $x); }
sub isaGeneralizableElement { 1 }
sub isaModel__GeneralizableElement { 1 } ################################################################# # Introspection #
sub __model_name { 'Model::GeneralizableElement' }
sub __isAbstract { 1; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::MOF_1_3::Model::GeneralizableElement' => { 'table' => 'Model__GeneralizableElement', 'abstract' => 1, 'slots' => { # Attributes 'isRoot' => { 'type_impl' => 'string', 'col' => 'isRoot', } , 'isLeaf' => { 'type_impl' => 'string', 'col' => 'isLeaf', } , 'isAbstract' => { 'type_impl' => 'string', 'col' => 'isAbstract', } , 'visibility' => { 'type_impl' => 'string', 'col' => 'visibility', } , # Associations 'subtype' => { 'type_impl' => 'set', 'class' => 'UMMF::MOF_1_3::Model::GeneralizableElement', 'table' => 'Model__GeneralizableElement__Generalizes', 'item' => 'subtype', 'coll' => 'supertype', } , 'supertype' => { 'type_impl' => 'array', 'class' => 'UMMF::MOF_1_3::Model::GeneralizableElement', 'table' => 'Model__GeneralizableElement__Generalizes', 'item' => 'supertype', 'coll' => 'subtype', 'slot' => 'supertype_i', } , }, 'bases' => [ 'UMMF::MOF_1_3::Model::Namespace', ], '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 isRoot if ( exists $self->{'isRoot'} ) { my $x = $self->{'isRoot'}; $self->{'isRoot'} = undef; $self->set_isRoot($x); } else { } # Attribute isLeaf if ( exists $self->{'isLeaf'} ) { my $x = $self->{'isLeaf'}; $self->{'isLeaf'} = undef; $self->set_isLeaf($x); } else { } # Attribute isAbstract if ( exists $self->{'isAbstract'} ) { my $x = $self->{'isAbstract'}; $self->{'isAbstract'} = undef; $self->set_isAbstract($x); } else { } # Attribute visibility if ( exists $self->{'visibility'} ) { my $x = $self->{'visibility'}; $self->{'visibility'} = undef; $self->set_visibility($x); } else { } # Associations # AssociationEnd # supertype 0..* # <--> # subtype 0..* UMMF::MOF_1_3::Model::GeneralizableElement. if ( defined $self->{'subtype'} ) { my $x = $self->{'subtype'}; $self->{'subtype'} = Set::Object->new(); $self->set_subtype(@$x); } # AssociationEnd # subtype 0..* # <--> # supertype 0..* UMMF::MOF_1_3::Model::GeneralizableElement. if ( defined $self->{'supertype'} ) { my $x = $self->{'supertype'}; $self->{'supertype'} = [ ]; $self->set_supertype(@$x); } $self; } my $__initialize_use;
sub __initialize { my ($self) = @_; # $DB::single = 1; unless ( ! $__initialize_use ) { $__initialize_use = 1; $self->__use('UMMF::MOF_1_3::Model::ModelElement'); $self->__use('UMMF::MOF_1_3::Model::Namespace'); } $self->UMMF::MOF_1_3::Model::GeneralizableElement::___initialize; $self->UMMF::MOF_1_3::Model::ModelElement::___initialize; $self->UMMF::MOF_1_3::Model::Namespace::___initialize; $self; }
sub __create { my ($self, @args) = @_; # $DB::single = 1; $self->UMMF::MOF_1_3::Model::GeneralizableElement::___create(@args); $self->UMMF::MOF_1_3::Model::ModelElement::___create(); $self->UMMF::MOF_1_3::Model::Namespace::___create(); $self; } ################################################################# # Attributes #
################################################################# # Attribute isRoot # type = UMMF::MOF_1_3::Model::Boolean # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue =
sub isRoot ($) { my ($self) = @_; ; my $val = $self->{'isRoot'}; ; $val; }
sub set_isRoot ($$) { my ($self, $val) = @_; ; if ( defined $val ) { ; } $self->{'isRoot'} = $val ; ; $self; }
sub count_isRoot ($) { my ($self) = @_; ; my $val = $self->{'isRoot'}; ; defined $val ? 1 : 0; }
################################################################# # Attribute isLeaf # type = UMMF::MOF_1_3::Model::Boolean # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue =
sub isLeaf ($) { my ($self) = @_; ; my $val = $self->{'isLeaf'}; ; $val; }
sub set_isLeaf ($$) { my ($self, $val) = @_; ; if ( defined $val ) { ; } $self->{'isLeaf'} = $val ; ; $self; }
sub count_isLeaf ($) { my ($self) = @_; ; my $val = $self->{'isLeaf'}; ; defined $val ? 1 : 0; }
################################################################# # Attribute isAbstract # type = UMMF::MOF_1_3::Model::Boolean # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue =
sub isAbstract ($) { my ($self) = @_; ; my $val = $self->{'isAbstract'}; ; $val; }
sub set_isAbstract ($$) { my ($self, $val) = @_; ; if ( defined $val ) { ; } $self->{'isAbstract'} = $val ; ; $self; }
sub count_isAbstract ($) { my ($self) = @_; ; my $val = $self->{'isAbstract'}; ; defined $val ? 1 : 0; }
################################################################# # Attribute visibility # type = UMMF::MOF_1_3::Model::VisibilityKind # multiplicity = 1 # ordering = unordered # ownerScope = instance # initialValue =
sub visibility ($) { my ($self) = @_; ; my $val = $self->{'visibility'}; ; $val; }
sub set_visibility ($$) { my ($self, $val) = @_; ; if ( defined $val ) { $self->__use('UMMF::MOF_1_3::Model::VisibilityKind')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.visibility"); } $self->{'visibility'} = $val ; ; $self; }
sub count_visibility ($) { my ($self) = @_; ; my $val = $self->{'visibility'}; ; defined $val ? 1 : 0; } ################################################################# # Association #
################################################################# # AssociationEnd supertype <---> subtype # type = UMMF::MOF_1_3::Model::GeneralizableElement # multiplicity = 0..* # ordering =
sub subtype ($) { my ($self) = @_; my $x = $self->{'subtype'}; # confess("Container for subtype $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_subtype ($@) { my ($self, @val) = @_; $self->clear_subtype; $self->add_subtype(@val); }
sub add_subtype ($@) { my ($self, @val) = @_; my $x = $self->{'subtype'} ||= Set::Object->new(); my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if $x->includes($val); $self->__use('UMMF::MOF_1_3::Model::GeneralizableElement')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.subtype"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_supertype($self) if $old; $val->add_supertype($self) if $val; } $self; }
sub remove_subtype ($@) { my ($self, @val) = @_; my $x = $self->{'subtype'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::MOF_1_3::Model::GeneralizableElement')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.subtype"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_supertype($self) if $old; $val->add_supertype($self) if $val; ; } $self; }
sub clear_subtype ($) { my ($self) = @_; my $x = $self->{'subtype'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'subtype'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_supertype($self) if $old; $val->add_supertype($self) if $val; ; } $self; }
sub count_subtype ($) { my ($self) = @_; my $x = $self->{'subtype'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd subtype <---> supertype # type = UMMF::MOF_1_3::Model::GeneralizableElement # multiplicity = 0..* # ordering = ordered
sub supertype ($) { my ($self) = @_; my $x = $self->{'supertype'} ||= [ ]; wantarray ? @{$x} : $x; }
sub index_supertype ($$@) { my ($self, $i, $count) = @_; ; my $val = $self->{'supertype'} ||= [ ]; ; wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)] : $val->[$i]; }
sub index_of_supertype ($$) { my ($self, $x) = @_; ; my $val = $self->{'supertype'} ||= [ ]; ; __ummf_array_index($val, $x); }
sub set_supertype ($@) { my ($self, @val) = @_; $self->clear_supertype; $self->add_supertype(@val); }
sub set_index_supertype ($$$) { my ($self, $i, $val) = @_; ; my $x = $self->{'supertype'} ||= [ ]; no warnings; my $old; if ( ($old = $x->[$i]) ne $val) { # Recursion lock $x->[$i] = $val ; # Remove and add associations with other ends. $old->remove_subtype($self) if $old; $val->add_subtype($self) if $val; ; } $self; }
sub add_supertype ($@) { my ($self, @val) = @_; my $x = $self->{'supertype'} ||= [ ]; my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if grep($_ eq $val, @$x); $self->__use('UMMF::MOF_1_3::Model::GeneralizableElement')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.supertype"); # Recursion lock push(@{$x}, $val); # Remove and add associations with other ends. $old->remove_subtype($self) if $old; $val->add_subtype($self) if $val; } $self; }
sub add_index_supertype ($$@) { my ($self, $i, @val) = @_; my $x = $self->{'supertype'} ||= [ ]; my $old; # Place holder for other MACRO. for my $val ( @val ) { # Recursion lock next if grep($_ eq $val, @$x); $self->__use('UMMF::MOF_1_3::Model::GeneralizableElement')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.supertype"); # Recursion lock splice(@{$x}, $i, 0, $val); # Recursion lock ++ $i; # Remove and add associations with other ends. $old->remove_subtype($self) if $old; $val->add_subtype($self) if $val; } $self; }
sub remove_supertype ($@) { my ($self, @val) = @_; my $x = $self->{'supertype'} ||= [ ]; for my $old ( @val ) { # Recursion lock my $i; # index of $old in @$x. next unless defined($i = __ummf_array_index($x, $old)); my $val = $old; $self->__use('UMMF::MOF_1_3::Model::GeneralizableElement')->__typecheck($val, "UMMF::MOF_1_3::Model::GeneralizableElement.supertype"); # Recursion lock splice(@$x, $i, 1); $val = undef; # Remove associations with other ends. $old->remove_subtype($self) if $old; $val->add_subtype($self) if $val; ; } $self; }
sub clear_supertype ($) { my ($self) = @_; my $x = $self->{'supertype'} ||= [ ]; my $val; # Place holder for other MACRO. $self->{'supertype'} = [ ]; # Recursion lock for my $old ( @$x ) { # Recursion lock # Remove associations with other ends. $old->remove_subtype($self) if $old; $val->add_subtype($self) if $val; ; } $self; }
sub count_supertype ($) { my ($self) = @_; my $x = $self->{'supertype'}; defined $x ? scalar @$x : 0; } # End of Class GeneralizableElement
############################################################################ 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: ###