| UMMF documentation | Contained in the UMMF distribution. |
Model::AggregationKindModel::AliasTypeModel::AssociationModel::AssociationEndModel::AttributeModel::BehavioralFeatureModel::BooleanModel::ClassModel::ClassifierModel::CollectionTypeModel::ConstantModel::ConstraintModel::DataTypeModel::DirectionKindModel::DoubleModel::EnumerationTypeModel::EvaluationKindModel::ExceptionModel::FeatureModel::FloatModel::GeneralizableElementModel::ImportModel::IntegerModel::LongModel::ModelElementModel::MultiplicityTypeModel::NamespaceModel::OperationModel::PackageModel::ParameterModel::PrimitiveTypeModel::ReferenceModel::ScopeKindModel::StringModel::StructuralFeatureModel::StructureFieldModel::StructureTypeModel::TagModel::TypedElementModel::VisibilityKindUMMF::MOF_1_4_1 - Model package for Model MOF 1.4.1 formal/05-05-05;
use UMMF::MOF_1_4_1; my $model = UMMF::MOF_1_4_1->model;
This package
None exported.
Kurt Stephens, kstephens@users.sourceforge.net 2003/04/15
The following is a list of all the Classifiers and their respective Perl modules defined in this Model.
Model::AggregationKindModel::AliasTypeModel::AssociationModel::AssociationEndModel::AttributeModel::BehavioralFeatureModel::BooleanModel::ClassModel::ClassifierModel::CollectionTypeModel::ConstantModel::ConstraintModel::DataTypeModel::DirectionKindModel::DoubleModel::EnumerationTypeModel::EvaluationKindModel::ExceptionModel::FeatureModel::FloatModel::GeneralizableElementModel::ImportModel::IntegerModel::LongModel::ModelElementModel::MultiplicityTypeModel::NamespaceModel::OperationModel::PackageModel::ParameterModel::PrimitiveTypeModel::ReferenceModel::ScopeKindModel::StringModel::StructuralFeatureModel::StructureFieldModel::StructureTypeModel::TagModel::TypedElementModel::VisibilityKind$Revision: 1.77 $
factory_mapReturns an array ref that maps all UML Model names to Perl package names for this package. Also includes short name to fully-qualified name mappings.
modelReturns the UML meta-model Model object for this Model.
__rebless_treeWork around for errors like:
Can't locate object method "parent" via package "UMMF::UML_1_5::Foundation::Core::Generalization" at /c/wct/ummf/1.0/bin/../lib/perl/UML/MetaMetaModel/Util.pm line 712.
factoryReturns a factory for this Model.
| 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_4_1; # use 5.6.1; use strict; use warnings; ################################################################# # Version # our $VERSION = do { my @r = (q$Revision: 1.77 $ =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };
################################################################# # Supers # ################################################################# # Dependencies # use Carp qw(croak confess); ################################################################# # Import them all!!! # [ % model_package_use % ]; # ################################################################# # Methods # my $factory_map = [ 'AggregationKind', 'UMMF::MOF_1_4_1::Model::AggregationKind', 'Model::AggregationKind', 'UMMF::MOF_1_4_1::Model::AggregationKind', 'AliasType', 'UMMF::MOF_1_4_1::Model::AliasType', 'Model::AliasType', 'UMMF::MOF_1_4_1::Model::AliasType', 'Association', 'UMMF::MOF_1_4_1::Model::Association', 'Model::Association', 'UMMF::MOF_1_4_1::Model::Association', 'AssociationEnd', 'UMMF::MOF_1_4_1::Model::AssociationEnd', 'Model::AssociationEnd', 'UMMF::MOF_1_4_1::Model::AssociationEnd', 'Attribute', 'UMMF::MOF_1_4_1::Model::Attribute', 'Model::Attribute', 'UMMF::MOF_1_4_1::Model::Attribute', 'BehavioralFeature', 'UMMF::MOF_1_4_1::Model::BehavioralFeature', 'Model::BehavioralFeature', 'UMMF::MOF_1_4_1::Model::BehavioralFeature', 'Boolean', 'UMMF::MOF_1_4_1::Model::Boolean', 'Model::Boolean', 'UMMF::MOF_1_4_1::Model::Boolean', 'Class', 'UMMF::MOF_1_4_1::Model::Class', 'Model::Class', 'UMMF::MOF_1_4_1::Model::Class', 'Classifier', 'UMMF::MOF_1_4_1::Model::Classifier', 'Model::Classifier', 'UMMF::MOF_1_4_1::Model::Classifier', 'CollectionType', 'UMMF::MOF_1_4_1::Model::CollectionType', 'Model::CollectionType', 'UMMF::MOF_1_4_1::Model::CollectionType', 'Constant', 'UMMF::MOF_1_4_1::Model::Constant', 'Model::Constant', 'UMMF::MOF_1_4_1::Model::Constant', 'Constraint', 'UMMF::MOF_1_4_1::Model::Constraint', 'Model::Constraint', 'UMMF::MOF_1_4_1::Model::Constraint', 'DataType', 'UMMF::MOF_1_4_1::Model::DataType', 'Model::DataType', 'UMMF::MOF_1_4_1::Model::DataType', 'DirectionKind', 'UMMF::MOF_1_4_1::Model::DirectionKind', 'Model::DirectionKind', 'UMMF::MOF_1_4_1::Model::DirectionKind', 'Double', 'UMMF::MOF_1_4_1::Model::Double', 'Model::Double', 'UMMF::MOF_1_4_1::Model::Double', 'EnumerationType', 'UMMF::MOF_1_4_1::Model::EnumerationType', 'Model::EnumerationType', 'UMMF::MOF_1_4_1::Model::EnumerationType', 'EvaluationKind', 'UMMF::MOF_1_4_1::Model::EvaluationKind', 'Model::EvaluationKind', 'UMMF::MOF_1_4_1::Model::EvaluationKind', 'Exception', 'UMMF::MOF_1_4_1::Model::Exception', 'Model::Exception', 'UMMF::MOF_1_4_1::Model::Exception', 'Feature', 'UMMF::MOF_1_4_1::Model::Feature', 'Model::Feature', 'UMMF::MOF_1_4_1::Model::Feature', 'Float', 'UMMF::MOF_1_4_1::Model::Float', 'Model::Float', 'UMMF::MOF_1_4_1::Model::Float', 'GeneralizableElement', 'UMMF::MOF_1_4_1::Model::GeneralizableElement', 'Model::GeneralizableElement', 'UMMF::MOF_1_4_1::Model::GeneralizableElement', 'Import', 'UMMF::MOF_1_4_1::Model::Import', 'Model::Import', 'UMMF::MOF_1_4_1::Model::Import', 'Integer', 'UMMF::MOF_1_4_1::Model::Integer', 'Model::Integer', 'UMMF::MOF_1_4_1::Model::Integer', 'Long', 'UMMF::MOF_1_4_1::Model::Long', 'Model::Long', 'UMMF::MOF_1_4_1::Model::Long', 'ModelElement', 'UMMF::MOF_1_4_1::Model::ModelElement', 'Model::ModelElement', 'UMMF::MOF_1_4_1::Model::ModelElement', 'MultiplicityType', 'UMMF::MOF_1_4_1::Model::MultiplicityType', 'Model::MultiplicityType', 'UMMF::MOF_1_4_1::Model::MultiplicityType', 'Namespace', 'UMMF::MOF_1_4_1::Model::Namespace', 'Model::Namespace', 'UMMF::MOF_1_4_1::Model::Namespace', 'Operation', 'UMMF::MOF_1_4_1::Model::Operation', 'Model::Operation', 'UMMF::MOF_1_4_1::Model::Operation', 'Package', 'UMMF::MOF_1_4_1::Model::Package', 'Model::Package', 'UMMF::MOF_1_4_1::Model::Package', 'Parameter', 'UMMF::MOF_1_4_1::Model::Parameter', 'Model::Parameter', 'UMMF::MOF_1_4_1::Model::Parameter', 'PrimitiveType', 'UMMF::MOF_1_4_1::Model::PrimitiveType', 'Model::PrimitiveType', 'UMMF::MOF_1_4_1::Model::PrimitiveType', 'Reference', 'UMMF::MOF_1_4_1::Model::Reference', 'Model::Reference', 'UMMF::MOF_1_4_1::Model::Reference', 'ScopeKind', 'UMMF::MOF_1_4_1::Model::ScopeKind', 'Model::ScopeKind', 'UMMF::MOF_1_4_1::Model::ScopeKind', 'String', 'UMMF::MOF_1_4_1::Model::String', 'Model::String', 'UMMF::MOF_1_4_1::Model::String', 'StructuralFeature', 'UMMF::MOF_1_4_1::Model::StructuralFeature', 'Model::StructuralFeature', 'UMMF::MOF_1_4_1::Model::StructuralFeature', 'StructureField', 'UMMF::MOF_1_4_1::Model::StructureField', 'Model::StructureField', 'UMMF::MOF_1_4_1::Model::StructureField', 'StructureType', 'UMMF::MOF_1_4_1::Model::StructureType', 'Model::StructureType', 'UMMF::MOF_1_4_1::Model::StructureType', 'Tag', 'UMMF::MOF_1_4_1::Model::Tag', 'Model::Tag', 'UMMF::MOF_1_4_1::Model::Tag', 'TypedElement', 'UMMF::MOF_1_4_1::Model::TypedElement', 'Model::TypedElement', 'UMMF::MOF_1_4_1::Model::TypedElement', 'VisibilityKind', 'UMMF::MOF_1_4_1::Model::VisibilityKind', 'Model::VisibilityKind', 'UMMF::MOF_1_4_1::Model::VisibilityKind', ];
sub factory_map { $factory_map; } my $model;
sub model { unless ( $model ) { my $module = __PACKAGE__; $module =~ s@::@/@sg; my $file = $INC{$module . '.pm'}; $file .= '.Model.xmi'; if ( -s $file ) { print STDERR "UMMF: Reading UML Model: from $file\n"; eval { use UMMF::Import::XMI; my $importer = UMMF::Import::XMI->new(); my $results = $importer->import_input_file($file); ($model) = grep($_->isaModel, @$results); }; if ( my $exc = $@ ) { use UMMF; print STDERR "UMMF: Reading UML Model: from $file: FAILED\n"; UMMF->bootstrapping ? warn($exc) : die($exc); } } if ( UMMF->bootstrapping && ! $model ) { print STDERR "UMMF: Reading UML Model: from UMMF::Boot::MetaModel\n"; use UMMF::Boot::MetaModel; $model = UMMF::Boot::MetaModel->model('pure' => 1); } print STDERR "UMMF: Reading UML Model: DONE\n"; } $model; }
# 'emacs my %__rebless_tree_primitive = map(($_ => 1), 'HASH', 'ARRAY', 'SCALAR', 'CODE', 'GLOB', ); sub __rebless_tree { no warnings; my ($x, $visited, $used) = @_; if ( my $ref = ref($x) ) { return if $visited->{$x} ++; # print STDERR "x = $x\n"; # Rebless object. unless ( __rebless_tree_primitive{$ref} ) { # Does Storable::retrieve do this? unless ( $used->{$ref} ) { $used->{$ref} = 1; print STDERR " use $ref\n"; eval qq{ package main; use $ref; }; die $@ if $@; } # print STDERR "rebless $x, $ref\n"; # REBLESS!!! bless($x, $ref); } # Traverse primitive if ( $ref eq 'Set::Object') { for my $y ( $x->members ) { __rebless_tree($y, $visited, $used); } } elsif ( $x =~ /HASH\(/ ) { for my $y ( values %$x ) { __rebless_tree($y, $visited, $used); } } elsif ( $x =~ /ARRAY\(/ ) { for my $y ( @$x ) { __rebless_tree($y, $visited, $used); } } elsif ( $x =~ /SCALAR\(/ ) { __rebless_tree($$x, $visited, $used); } } } my $factory;
sub factory { # $DB::single = 1; my $self = shift; unless ( $factory ) { eval q{use UMMF::Core::Factory;}; die $@ if $@; $factory = UMMF::Core::Factory->new('classMap' => $self->factory_map); } $factory; } ############################################################################ 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: ###