package UML::MetaModel;

use 5.6.1;
use strict;
use warnings;

our $AUTHOR = q{ ks.perl@kurtstephens.com 2004/04/06 };
our $VERSION = do { my @r = (q$Revision: 1.8 $ =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };

=head1 NAME

UML::MetaModel - An implementation of UML 1.5 Meta-model (M1).

=head1 SYNOPSIS

  use UML::MetaModel;
  use UML::Export::XMI;
  use UML::Export::Perl;
  my $f = UML::MetaModel->factory;
  my $model = $f->create('Model');
  my $cls = $f->create('Class', 
                       'name' => 'AClass',
                       'namespace' => $root,
		       );
  my $attr = $f->create('Attribute',
	 	        'type' => $cls,
		        'name' => 'foobar',
		        'visibility' => 'public',
		        'owner' => $cls,
		        );

  # Generate XMI for the model.
  UML::Export::XMI->new()->export_Model($model);
  # Generate Perl code of the model.
  UML::Export::Perl->new('packagePrefix' => 'My::Package')->export_Model($model);


  # Generate XMI for the UML meta-model itself!!!
  my $metamodel = UML::MetaModel->model;
  UML::Export::XMI->new()->export_Model($metamodel);


=head1 DESCRIPTION

This package allow UML models to be represented and queried from within perl.
It implements both the UML meta-meta-model and meta-model.

=head1 USAGE

=head1 PATTERNS

=head1 EXPORT

None exported.

=head1 AUTHOR

Kurt Stephens, ks.perl@kurtstephens.com 2003/04/06

=head1 SEE ALSO

L<UML::MetaMetaModel|UML::MetaMetaModel>

=head1 VERSION

$Revision: 1.8 $

=head1 METHODS

=cut

####################################################################################

use UML::MetaMetaModel::Util qw(:all);

####################################################################################

use UML::MetaModel1;

####################################################################################

my $model;
sub model
{
  my ($self, $desc) = @_;

  unless ( $model ) {
    $model = UML::MetaModel1->model;
  }

  $model;
}


sub factory_map
{
  UML::MetaModel1->factory_map;
}


sub factory
{
  UML::MetaModel1->factory;
}


####################################################################################


1;

####################################################################################


### Keep these comments at end of file: ks.perl@kurtstephens.com 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: ###

