| UMMF documentation | Contained in the UMMF distribution. |
UMMF::UML_1_5::OCL::Expressions::LoopExp --
1.5
NO ATTRIBUTES
loopExp : THIS 0..1 <---> body : UMMF::UML_1_5::OCL::Expressions::OclExpression 11changeableinstancenonepublicSet::ObjectloopExpr : THIS 0..1 <---> iterators : UMMF::UML_1_5::OCL::Expressions::VariableDeclaration 1..*1..*changeableinstancenonepublicSet::Object__validate_typeUMMF::UML_1_5::OCL::Expressions::LoopExp->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::OCL::Expressions::LoopExp.
__typecheckUMMF::UML_1_5::OCL::Expressions::LoopExp->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::OCL::Expressions::LoopExp-__validate_type($value)>> is false.
isaLoopExpReturns true if receiver is a UMMF::UML_1_5::OCL::Expressions::LoopExp. Other receivers will return false.
isaOCL__Expressions__LoopExpReturns true if receiver is a UMMF::UML_1_5::OCL::Expressions::LoopExp.
Other receivers will return false.
This is the fully qualified version of the isaLoopExp method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('OCL::Expressions::LoopExp') 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.
bodymy $val = $obj->body;
Returns the AssociationEnd body value of type UMMF::UML_1_5::OCL::Expressions::OclExpression.
set_body$obj->set_body($val);
Sets the AssociationEnd body value.
$val must of type UMMF::UML_1_5::OCL::Expressions::OclExpression.
Returns $obj.
add_body$obj->add_body($val);
Adds the AssociationEnd body value.
$val must of type UMMF::UML_1_5::OCL::Expressions::OclExpression.
Throws exception if a value already exists.
Returns $obj.
remove_body$obj->remove_body($val);
Removes the AssociationEnd body value $val.
Returns $obj.
clear_body$obj->clear_body;
Clears the AssociationEnd body links to UMMF::UML_1_5::OCL::Expressions::OclExpression.
Returns $obj.
count_body$obj->count_body;
Returns the number of elements of type UMMF::UML_1_5::OCL::Expressions::OclExpression associated with body.
iteratorsmy @val = $obj->iterators; my $ary_val = $obj->iterators;
Returns the AssociationEnd iterators values of type UMMF::UML_1_5::OCL::Expressions::VariableDeclaration.
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_iterators$obj->set_iterators(@val);
Sets the AssociationEnd iterators value.
Elements of @val must of type UMMF::UML_1_5::OCL::Expressions::VariableDeclaration.
Returns $obj.
add_iterators$obj->add_iterators(@val);
Adds AssociationEnd iterators values.
Elements of @val must of type UMMF::UML_1_5::OCL::Expressions::VariableDeclaration.
Returns $obj.
remove_iterators$obj->remove_iterators(@val);
Removes the AssociationEnd iterators values @val.
Elements of @val must of type UMMF::UML_1_5::OCL::Expressions::VariableDeclaration.
Returns $obj.
clear_iterators$obj->clear_iterators;
Clears the AssociationEnd iterators links to UMMF::UML_1_5::OCL::Expressions::VariableDeclaration.
Returns $obj.
count_iterators$obj->count_iterators;
Returns the number of elements associated with iterators.
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::OCL::Expressions::LoopExp; #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::OCL::Expressions::PropertyCallExp ); ################################################################# # 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::OCL::Expressions::LoopExp') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::OCL::Expressions::LoopExp' . ": value '$x'") unless __validate_type($self, $x); }
sub isaLoopExp { 1 }
sub isaOCL__Expressions__LoopExp { 1 } ################################################################# # Introspection #
sub __model_name { 'OCL::Expressions::LoopExp' }
sub __isAbstract { 1; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::OCL::Expressions::LoopExp' => { 'table' => 'OCL__Expressions__LoopExp', 'abstract' => 1, 'slots' => { # Attributes # Associations 'body' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::OCL::Expressions::OclExpression', 'col' => 'body', 'aggreg' => '1', } , 'iterators' => { 'type_impl' => 'iset', 'class' => 'UMMF::UML_1_5::OCL::Expressions::VariableDeclaration', 'table' => 'OCL__Expressions__LoopExp__iterators', 'coll' => 'loopExpr', 'aggreg' => '1', } , }, 'bases' => [ 'UMMF::UML_1_5::OCL::Expressions::PropertyCallExp', ], '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 # loopExp 0..1 # <--> # body 1 UMMF::UML_1_5::OCL::Expressions::OclExpression. if ( defined $self->{'body'} ) { my $x = $self->{'body'}; $self->{'body'} = undef; $self->set_body($x); } # AssociationEnd # loopExpr 0..1 # <--> # iterators 1..* UMMF::UML_1_5::OCL::Expressions::VariableDeclaration. if ( defined $self->{'iterators'} ) { my $x = $self->{'iterators'}; $self->{'iterators'} = Set::Object->new(); $self->set_iterators(@$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::OCL::Expressions::OclExpression'); $self->__use('UMMF::UML_1_5::OCL::Expressions::PropertyCallExp'); } $self->UMMF::UML_1_5::OCL::Expressions::LoopExp::___initialize; $self->UMMF::UML_1_5::Foundation::Core::Element::___initialize; $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___initialize; $self->UMMF::UML_1_5::OCL::Expressions::OclExpression::___initialize; $self->UMMF::UML_1_5::OCL::Expressions::PropertyCallExp::___initialize; $self; }
sub __create { my ($self, @args) = @_; # $DB::single = 1; $self->UMMF::UML_1_5::OCL::Expressions::LoopExp::___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::OCL::Expressions::OclExpression::___create(); $self->UMMF::UML_1_5::OCL::Expressions::PropertyCallExp::___create(); $self; } ################################################################# # Attributes # ################################################################# # Association #
################################################################# # AssociationEnd loopExp <---> body # type = UMMF::UML_1_5::OCL::Expressions::OclExpression # multiplicity = 1 # ordering =
sub body ($) { my ($self) = @_; $self->{'body'}; }
sub set_body ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'body'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::OCL::Expressions::OclExpression')->__typecheck($val, "UMMF::UML_1_5::OCL::Expressions::LoopExp.body") } # Recursion lock $self->{'body'} = $val ; # Remove and add associations with other ends. $old->remove_loopExp($self) if $old; $val->add_loopExp($self) if $val; } $self; }
sub add_body ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'body'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::OCL::Expressions::OclExpression')->__typecheck($val, "UMMF::UML_1_5::OCL::Expressions::LoopExp.body"); # confess("UMMF::UML_1_5::OCL::Expressions::LoopExp::body: too many") # if defined $self->{'body'}; # Recursion lock $self->{'body'} = $val ; # Remove and add associations with other ends. $old->remove_loopExp($self) if $old; $val->add_loopExp($self) if $val; } $self; }
sub remove_body ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'body'}) eq $val ) { # Recursion lock $val = $self->{'body'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_loopExp($self) if $old; $val->add_loopExp($self) if $val; } }
sub clear_body ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'body'}) ) { # Recursion lock my $val = $self->{'body'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_loopExp($self) if $old; $val->add_loopExp($self) if $val; } $self; }
sub count_body ($) { my ($self) = @_; my $x = $self->{'body'}; defined $x ? 1 : 0; }
################################################################# # AssociationEnd loopExpr <---> iterators # type = UMMF::UML_1_5::OCL::Expressions::VariableDeclaration # multiplicity = 1..* # ordering =
sub iterators ($) { my ($self) = @_; my $x = $self->{'iterators'}; # confess("Container for iterators $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_iterators ($@) { my ($self, @val) = @_; $self->clear_iterators; $self->add_iterators(@val); }
sub add_iterators ($@) { my ($self, @val) = @_; my $x = $self->{'iterators'} ||= 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::OCL::Expressions::VariableDeclaration')->__typecheck($val, "UMMF::UML_1_5::OCL::Expressions::LoopExp.iterators"); # Recursion lock $x->insert($val); # weaken? # Remove and add associations with other ends. $old->remove_loopExpr($self) if $old; $val->add_loopExpr($self) if $val; } $self; }
sub remove_iterators ($@) { my ($self, @val) = @_; my $x = $self->{'iterators'} ||= Set::Object->new(); for my $old ( @val ) { # Recursion lock next unless $x->includes($old); my $val = $old; $self->__use('UMMF::UML_1_5::OCL::Expressions::VariableDeclaration')->__typecheck($val, "UMMF::UML_1_5::OCL::Expressions::LoopExp.iterators"); # Recursion lock $x->remove($old); $val = undef; # Remove associations with other ends. $old->remove_loopExpr($self) if $old; $val->add_loopExpr($self) if $val; ; } $self; }
sub clear_iterators ($) { my ($self) = @_; my $x = $self->{'iterators'} ||= Set::Object->new(); my $val; # Place holder for other MACRO. $self->{'iterators'} = Set::Object->new(); # Recursion lock for my $old ( $x->members() ) { # Recursion lock # Remove associations with other ends. $old->remove_loopExpr($self) if $old; $val->add_loopExpr($self) if $val; ; } $self; }
sub count_iterators ($) { my ($self) = @_; my $x = $self->{'iterators'}; defined $x ? $x->size : 0; } # End of Class LoopExp
############################################################################ 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: ###