UMMF::MOF_1_4_1::__ObjectBase - base class package for Model MOF 1.4.1 formal/05-05-05;
use base qw(UMMF::MOF_1_4_1::__ObjectBase);
This package provides a base class for Perl modules generated by UMMF.
use UMMF::MOF_1_4_1::__ObjectBase qw(:__ummf_array); __ummf_array_index __ummf_array_delete __ummf_array_delete_once __ummf_array_delete_each __ummf_array_delete_each_once
Kurt Stephens, kstephens@users.sourceforge.net 2003/04/15
UMMF::Core::MetaModel
$Revision: 1.77 $
__use
my $pkg = $self->__use('Some::Package'); my $new_obj = $pkg->new(...);
Dynamically "use" a package.
__factory
Returns the factory object for this Classifier's Model.
__metamodel
Returns the Model for this Classifier.
__classifier
my $classifier = $obj_or_package->__classifier;
Returns the UML meta-model Classifier for an object or package.
__isAbstract
$package->__isAbstract;
Returns true if <$package> is an abstract Classifer.
<$package
Abstract Classifiers are not instantiable via new.
new
__validate_type
Some::Package->__validate_type($value);
Returns true if $value is a valid representation of this Classifier.
$value
__typecheck
$value = Some::Package->__typecheck($value, $msg);
Generates an exception with $msg if $value is not a valid representaion of this Classifier.
$msg
Returns $value.
__initialize
Initialize all slots in an instance with initial values.
Called by new and new_.
new_
___initialize
Initialize all slots of a particular Classifier's Attributes and AssociationEnds.
Called by __initialize.
__create
Calls all Generalizations' __create methods.
Called by new.
___create
Placeholder for user-specified <<create>> methods.
Called by __create.
____create
Hand-coded subclasses can override this method, but they must return $self.
$self
$_id
Variable incremented for each new instance created by __new_instance. The new ID is stored in the object's <$self-{_id}>> slot.
__new_instance
<$self-
$__new_instance_event
Defines a subroutine that is called with each new instance created by __new_instance. Deprecated: See add___extent.
add___extent
my $extent = UMMF::Object::Extent->new(); UMMF::MOF_1_4_1::__ObjectBase->add___extent($extent);
Register a new Extent observer object to this base class.
See also: UMMF::Object::Extent.
remove___extent
my $extent = ...; UMMF::MOF_1_4_1::__ObjectBase->remove__extent($extent);
Deregister an Extent observer object from this base class.
__extent_add_object
$obj = $package->__extent_add_object($obj, @args)
Cause all registered Extent objects to be messaged as <$extent-add_object($obj, @args)>>.
<$extent-
Extent observer implementors should note that $obj may not be a fully initialized instance.
$obj
Called by __new_instance and __clone.
__clone
Overides of __new_instance or __clone should call <self-__extent_add_object($obj, ...)>>.
<self-
Returns $obj.
my $obj = $package->__new_instance(%attrs);
Returns a new instance, without initializing.
New instances get a unique id stored in <$obj-{'_id'}>>.
<$obj-
my $obj = $package->new(%attrs);
Returns a new, initialized instance using keyword values.
Throws exception if <$package-__isAbstract>>.
<$package-
Calls <$package-__new_instance(%attrs)>> to create instance, then calls <$obj-__initialize()->__create()>> to complete initialization.
my $obj = $package->new_(@opts);
Returns a new, initialized instance using a matching <<create>> Method.
Calls <$package-__new_instance()>> to create instance without any initialization keyword values then calls <$obj-__initialize()->__create(@opts)>> to complete initialization.
my $clone = $obj->__clone();
Returns a new cloned instance.
Clones get a unique id stored in <$clone-{'_id'}>>.
<$clone-
__clone_deepen
Further deepens any composed objects in a instance. Subclasses may override and call SUPER.
__ummf_disassemble
$obj->__ummf_disassemble();
Dissassembles an object graph, recursively, by traversing any Attributes or AssoicationEnds.
Only objects that respond to __ummf_disassemble are affected.
my $i = __ummf_array_index(\@a, $elem);
Returns the first index of $elem in @a or undef.
$elem
@a
__ummf_array_delete(\@a, $elem);
Deletes all $elem in @a.
__ummf_array_delete_once(\@a, $elem);
Deletes the first $elem in @a.
__ummf_array_delete_each(\@a, \@elem);
Deletes each element in @elem in @a.
@elem
Deletes each first element in @elem in @a.
AUTOLOAD
Autoloader to simplify isa<Classifier>() handling of disjoint types. This also prints a verbose stack trace for an unimplemented method.
To install UMMF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UMMF
CPAN shell
perl -MCPAN -e shell install UMMF
For more information on module installation, please visit the detailed CPAN module installation guide.