| UMMF documentation | Contained in the UMMF distribution. |
__validate_type__typecheckisaTaggedValueisaFoundation__Extension_Mechanisms__TaggedValue__model_name __isAbstract__tangram_schema___initialize__initialize__createdataValueset_dataValueadd_dataValueremove_dataValueclear_dataValuecount_dataValuemodelElementset_modelElementadd_modelElementremove_modelElementclear_modelElementcount_modelElementreferenceValueset_referenceValueadd_referenceValueremove_referenceValueclear_referenceValuecount_referenceValuetypeset_typeadd_typeremove_typeclear_typecount_type
UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue --
1.5
dataValue : UMMF::UML_1_5::Foundation::Data_Types::String [0..*]private0..*changeableinstanceunorderedSet::ObjecttaggedValue : THIS 0..* <---> modelElement : UMMF::UML_1_5::Foundation::Core::ModelElement 11changeableinstancenoneprivateSet::ObjectreferenceTag : THIS 0..* <---> referenceValue : UMMF::UML_1_5::Foundation::Core::ModelElement 0..*0..*changeableinstancenonepublicSet::ObjecttypedValue : THIS 0..* <---> type : UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition 11changeableinstancenonepublicSet::Object__validate_typeUMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.
__typecheckUMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue-__validate_type($value)>> is false.
isaTaggedValueReturns true if receiver is a UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue. Other receivers will return false.
isaFoundation__Extension_Mechanisms__TaggedValueReturns true if receiver is a UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.
Other receivers will return false.
This is the fully qualified version of the isaTaggedValue method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Foundation::Extension_Mechanisms::TaggedValue') 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.
dataValuemy $array_ref = $obj->dataValue; my @val = $obj->dataValue;
Returns the UMMF::UML_1_5::Foundation::Data_Types::String values of Attribute dataValue.
In list context it returns the list of values.
In scalar context it returns a reference to the list of values.
set_dataValue$obj->set_dataValue(@val);
Sets the values of Attribute dataValue.
The elements of @val must be of type UMMF::UML_1_5::Foundation::Data_Types::String.
Returns $obj.
add_dataValue$obj->add_dataValue(@val);
Adds the values of Attribute dataValue.
The elements of @val must be of type UMMF::UML_1_5::Foundation::Data_Types::String.
Returns $obj.
remove_dataValue$obj->remove_dataValue(@val);
Removes values from Attribute dataValue.
The elements of @val must be of type UMMF::UML_1_5::Foundation::Data_Types::String.
Returns $obj.
clear_dataValue$obj->clear_dataValue;
Removes all values from Attribute dataValue.
Returns $obj.
count_dataValue$obj->count_dataValue;
Returns the number of elements in dataValue.
modelElementmy $val = $obj->modelElement;
Returns the AssociationEnd modelElement value of type UMMF::UML_1_5::Foundation::Core::ModelElement.
set_modelElement$obj->set_modelElement($val);
Sets the AssociationEnd modelElement value.
$val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
add_modelElement$obj->add_modelElement($val);
Adds the AssociationEnd modelElement value.
$val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Throws exception if a value already exists.
Returns $obj.
remove_modelElement$obj->remove_modelElement($val);
Removes the AssociationEnd modelElement value $val.
Returns $obj.
clear_modelElement$obj->clear_modelElement;
Clears the AssociationEnd modelElement links to UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
count_modelElement$obj->count_modelElement;
Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::ModelElement associated with modelElement.
referenceValuemy @val = $obj->referenceValue; my $ary_val = $obj->referenceValue;
Returns the AssociationEnd referenceValue 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_referenceValue$obj->set_referenceValue(@val);
Sets the AssociationEnd referenceValue value.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
add_referenceValue$obj->add_referenceValue(@val);
Adds AssociationEnd referenceValue values.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
remove_referenceValue$obj->remove_referenceValue(@val);
Removes the AssociationEnd referenceValue values @val.
Elements of @val must of type UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
clear_referenceValue$obj->clear_referenceValue;
Clears the AssociationEnd referenceValue links to UMMF::UML_1_5::Foundation::Core::ModelElement.
Returns $obj.
count_referenceValue$obj->count_referenceValue;
Returns the number of elements associated with referenceValue.
typemy $val = $obj->type;
Returns the AssociationEnd type value of type UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition.
set_type$obj->set_type($val);
Sets the AssociationEnd type value.
$val must of type UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition.
Returns $obj.
add_type$obj->add_type($val);
Adds the AssociationEnd type value.
$val must of type UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition.
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::Extension_Mechanisms::TagDefinition.
Returns $obj.
count_type$obj->count_type;
Returns the number of elements of type UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition 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::Extension_Mechanisms::TaggedValue; #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::Extension_Mechanisms::TaggedValue') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue' . ": value '$x'") unless __validate_type($self, $x); }
sub isaTaggedValue { 1 }
sub isaFoundation__Extension_Mechanisms__TaggedValue { 1 } ################################################################# # Introspection #
sub __model_name { 'Foundation::Extension_Mechanisms::TaggedValue' }
sub __isAbstract { 0; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue' => { 'table' => 'Foundation__Extension_Mechanisms__TaggedValue', 'abstract' => 0, 'slots' => { # Attributes 'dataValue' => { 'type_impl' => 'iset', 'class' => 'UMMF::UML_1_5::Foundation::Data_Types::String', 'table' => 'Foundation__Extension_Mechanisms__TaggedValue__dataValue', 'coll' => 'type', } , # Associations 'modelElement' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Foundation::Core::ModelElement', 'col' => 'modelElement', } , 'referenceValue' => { 'type_impl' => 'set', 'class' => 'UMMF::UML_1_5::Foundation::Core::ModelElement', 'table' => 'Foundation__ReferenceTag_ReferenceValue', 'item' => 'referenceValue', 'coll' => 'referenceTag', } , 'type' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition', 'col' => 'type', } , }, '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 dataValue if ( exists $self->{'dataValue'} ) { my $x = $self->{'dataValue'}; $self->{'dataValue'} = undef; $self->set_dataValue(ref($x) ? @$x : $x); } else { } # Associations # AssociationEnd # taggedValue 0..* # <--> # modelElement 1 UMMF::UML_1_5::Foundation::Core::ModelElement. if ( defined $self->{'modelElement'} ) { my $x = $self->{'modelElement'}; $self->{'modelElement'} = undef; $self->set_modelElement($x); } # AssociationEnd # referenceTag 0..* # <--> # referenceValue 0..* UMMF::UML_1_5::Foundation::Core::ModelElement. if ( defined $self->{'referenceValue'} ) { my $x = $self->{'referenceValue'}; $self->{'referenceValue'} = Set::Object->new(); $self->set_referenceValue(@$x); } # AssociationEnd # typedValue 0..* # <--> # type 1 UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition. 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->UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue::___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::Extension_Mechanisms::TaggedValue::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Element::___create(); $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create(); $self; } ################################################################# # Attributes #
################################################################# # Attribute dataValue # type = UMMF::UML_1_5::Foundation::Data_Types::String # multiplicity = 0..* # ordering = unordered # ownerScope = instance # initialValue =
sub dataValue ($) { my ($self) = @_; ; my $val = $self->{'dataValue'} ||= [ ]; ; wantarray ? @$val : $val; }
sub set_dataValue ($@) { my ($self, @val) = @_; ; for my $val ( @val ) { ; } $self->{'dataValue'} = \@val; ; $self; }
sub add_dataValue ($@) { my ($self, @val) = @_; ; for my $val ( @val ) { ; } my $x = $self->{'dataValue'} ||= [ ]; push(@$x, @val); ; $self; }
sub remove_dataValue ($@) { my ($self, @val) = @_; ; for my $val ( @val ) { ; } my $x = $self->{'dataValue'} ||= [ ]; __ummf_array_delete_each($x, \@val); ; $self; }
sub clear_dataValue ($) { my ($self) = @_; ; $self->{'dataValue'} = [ ]; ; $self; }
sub count_dataValue ($) { my ($self) = @_; ; my $val = $self->{'dataValue'}; ; $val ? scalar @$val : 0; } ################################################################# # Association #
################################################################# # AssociationEnd taggedValue <---> modelElement # type = UMMF::UML_1_5::Foundation::Core::ModelElement # multiplicity = 1 # ordering =
sub modelElement ($) { my ($self) = @_; $self->{'modelElement'}; }
sub set_modelElement ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'modelElement'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.modelElement") } # Recursion lock $self->{'modelElement'} = $val ; # Remove and add associations with other ends. $old->remove_taggedValue($self) if $old; $val->add_taggedValue($self) if $val; } $self; }
sub add_modelElement ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'modelElement'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.modelElement"); # confess("UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue::modelElement: too many") # if defined $self->{'modelElement'}; # Recursion lock $self->{'modelElement'} = $val ; # Remove and add associations with other ends. $old->remove_taggedValue($self) if $old; $val->add_taggedValue($self) if $val; } $self; }
sub remove_modelElement ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'modelElement'}) eq $val ) { # Recursion lock $val = $self->{'modelElement'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_taggedValue($self) if $old; $val->add_taggedValue($self) if $val; } }
sub clear_modelElement ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'modelElement'}) ) { # Recursion lock my $val = $self->{'modelElement'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_taggedValue($self) if $old; $val->add_taggedValue($self) if $val; } $self; }
sub count_modelElement ($) { my ($self) = @_; my $x = $self->{'modelElement'}; defined $x ? 1 : 0; }
################################################################# # AssociationEnd referenceTag <---> referenceValue # type = UMMF::UML_1_5::Foundation::Core::ModelElement # multiplicity = 0..* # ordering =
sub referenceValue ($) { my ($self) = @_; my $x = $self->{'referenceValue'}; # confess("Container for referenceValue $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_referenceValue ($@) { my ($self, @val) = @_; $self->clear_referenceValue; $self->add_referenceValue(@val); }
sub add_referenceValue ($@) { my ($self, @val) = @_; my $x = $self->{'referenceValue'} ||= 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::Extension_Mechanisms::TaggedValue.referenceValue"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_referenceTag($self) if $old; $val->add_referenceTag($self) if $val; } $self; }
sub remove_referenceValue ($@) { my ($self, @val) = @_; my $x = $self->{'referenceValue'} ||= 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::Extension_Mechanisms::TaggedValue.referenceValue"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_referenceTag($self) if $old; $val->add_referenceTag($self) if $val; ; } $self; }
sub clear_referenceValue ($) { my ($self) = @_; my $x = $self->{'referenceValue'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'referenceValue'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_referenceTag($self) if $old; $val->add_referenceTag($self) if $val; ; } $self; }
sub count_referenceValue ($) { my ($self) = @_; my $x = $self->{'referenceValue'}; defined $x ? $x->size : 0; }
################################################################# # AssociationEnd typedValue <---> type # type = UMMF::UML_1_5::Foundation::Extension_Mechanisms::TagDefinition # 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::Extension_Mechanisms::TagDefinition')->__typecheck($val, "UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.type") } # Recursion lock $self->{'type'} = $val ; # Remove and add associations with other ends. $old->remove_typedValue($self) if $old; $val->add_typedValue($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::Extension_Mechanisms::TagDefinition')->__typecheck($val, "UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue.type"); # confess("UMMF::UML_1_5::Foundation::Extension_Mechanisms::TaggedValue::type: too many") # if defined $self->{'type'}; # Recursion lock $self->{'type'} = $val ; # Remove and add associations with other ends. $old->remove_typedValue($self) if $old; $val->add_typedValue($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_typedValue($self) if $old; $val->add_typedValue($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_typedValue($self) if $old; $val->add_typedValue($self) if $val; } $self; }
sub count_type ($) { my ($self) = @_; my $x = $self->{'type'}; defined $x ? 1 : 0; } # End of Class TaggedValue
############################################################################ 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: ###