| UMMF documentation | Contained in the UMMF distribution. |
UMMF::UML_1_5::Foundation::Core::EnumerationLiteral --
1.5
NO ATTRIBUTES
literal : THIS 1..* <---> enumeration : UMMF::UML_1_5::Foundation::Core::Enumeration 11changeableinstancenonepublicSet::ObjectreferredEnumLiteral : THIS 1 <---- : UMMF::UML_1_5::OCL::Expressions::EnumLiteralExp 11changeableinstancenoneprivateSet::Object__validate_typeUMMF::UML_1_5::Foundation::Core::EnumerationLiteral->__validate_type($value);
Returns true if $value is a valid representation of UMMF::UML_1_5::Foundation::Core::EnumerationLiteral.
__typecheckUMMF::UML_1_5::Foundation::Core::EnumerationLiteral->__typecheck($value, $msg);
Calls confess() with $msg if <UMMF::UML_1_5::Foundation::Core::EnumerationLiteral-__validate_type($value)>> is false.
isaEnumerationLiteralReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::EnumerationLiteral. Other receivers will return false.
isaFoundation__Core__EnumerationLiteralReturns true if receiver is a UMMF::UML_1_5::Foundation::Core::EnumerationLiteral.
Other receivers will return false.
This is the fully qualified version of the isaEnumerationLiteral method.
__model_name my $name = $obj_or_package->__model_name;
Returns the UML Model name ('Foundation::Core::EnumerationLiteral') 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.
enumerationmy $val = $obj->enumeration;
Returns the AssociationEnd enumeration value of type UMMF::UML_1_5::Foundation::Core::Enumeration.
set_enumeration$obj->set_enumeration($val);
Sets the AssociationEnd enumeration value.
$val must of type UMMF::UML_1_5::Foundation::Core::Enumeration.
Returns $obj.
add_enumeration$obj->add_enumeration($val);
Adds the AssociationEnd enumeration value.
$val must of type UMMF::UML_1_5::Foundation::Core::Enumeration.
Throws exception if a value already exists.
Returns $obj.
remove_enumeration$obj->remove_enumeration($val);
Removes the AssociationEnd enumeration value $val.
Returns $obj.
clear_enumeration$obj->clear_enumeration;
Clears the AssociationEnd enumeration links to UMMF::UML_1_5::Foundation::Core::Enumeration.
Returns $obj.
count_enumeration$obj->count_enumeration;
Returns the number of elements of type UMMF::UML_1_5::Foundation::Core::Enumeration associated with enumeration.
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::EnumerationLiteral; #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::EnumerationLiteral') ; }
sub __typecheck { my ($self, $x, $msg) = @_; confess("typecheck: $msg: type '" . 'UMMF::UML_1_5::Foundation::Core::EnumerationLiteral' . ": value '$x'") unless __validate_type($self, $x); }
sub isaEnumerationLiteral { 1 }
sub isaFoundation__Core__EnumerationLiteral { 1 } ################################################################# # Introspection #
sub __model_name { 'Foundation::Core::EnumerationLiteral' }
sub __isAbstract { 0; } my $__tangram_schema;
sub __tangram_schema { my ($self) = @_; $__tangram_schema ||= { 'classes' => [ 'UMMF::UML_1_5::Foundation::Core::EnumerationLiteral' => { 'table' => 'Foundation__Core__EnumerationLiteral', 'abstract' => 0, 'slots' => { # Attributes # Associations 'enumeration' => { 'type_impl' => 'ref', 'class' => 'UMMF::UML_1_5::Foundation::Core::Enumeration', 'col' => 'enumeration', } , }, '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 # Associations # AssociationEnd # literal 1..* # <--> # enumeration 1 UMMF::UML_1_5::Foundation::Core::Enumeration. if ( defined $self->{'enumeration'} ) { my $x = $self->{'enumeration'}; $self->{'enumeration'} = undef; $self->set_enumeration($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::EnumerationLiteral::___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::EnumerationLiteral::___create(@args); $self->UMMF::UML_1_5::Foundation::Core::Element::___create(); $self->UMMF::UML_1_5::Foundation::Core::ModelElement::___create(); $self; } ################################################################# # Attributes # ################################################################# # Association #
################################################################# # AssociationEnd literal <---> enumeration # type = UMMF::UML_1_5::Foundation::Core::Enumeration # multiplicity = 1 # ordering =
sub enumeration ($) { my ($self) = @_; $self->{'enumeration'}; }
sub set_enumeration ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'enumeration'}) ne $val ) { # Recursion lock if ( defined $val ) { $self->__use('UMMF::UML_1_5::Foundation::Core::Enumeration')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::EnumerationLiteral.enumeration") } # Recursion lock $self->{'enumeration'} = $val ; # Remove and add associations with other ends. $old->remove_literal($self) if $old; $val->add_literal($self) if $val; } $self; }
sub add_enumeration ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'enumeration'}) ne $val ) { # Recursion lock $self->__use('UMMF::UML_1_5::Foundation::Core::Enumeration')->__typecheck($val, "UMMF::UML_1_5::Foundation::Core::EnumerationLiteral.enumeration"); # confess("UMMF::UML_1_5::Foundation::Core::EnumerationLiteral::enumeration: too many") # if defined $self->{'enumeration'}; # Recursion lock $self->{'enumeration'} = $val ; # Remove and add associations with other ends. $old->remove_literal($self) if $old; $val->add_literal($self) if $val; } $self; }
sub remove_enumeration ($$) { my ($self, $val) = @_; no warnings; # Use of uninitialized value in string ne at ... my $old; if ( ($old = $self->{'enumeration'}) eq $val ) { # Recursion lock $val = $self->{'enumeration'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_literal($self) if $old; $val->add_literal($self) if $val; } }
sub clear_enumeration ($@) { my ($self) = @_; my $old; if ( defined ($old = $self->{'enumeration'}) ) { # Recursion lock my $val = $self->{'enumeration'} = undef; # Recursion lock # Remove and add associations with other ends. $old->remove_literal($self) if $old; $val->add_literal($self) if $val; } $self; }
sub count_enumeration ($) { my ($self) = @_; my $x = $self->{'enumeration'}; defined $x ? 1 : 0; } # End of Class EnumerationLiteral
############################################################################ 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: ###