
=head1 NAME

OODoc::Object - base class for all OODoc classes.


=head1 INHERITANCE

 OODoc::Object is extended by
   OODoc
   OODoc::Format
   OODoc::Manifest
   OODoc::Manual
   OODoc::Parser
   OODoc::Text


=head1 SYNOPSIS

 # Never instantiated directly.


=head1 DESCRIPTION




=head1 METHODS


=head2 Initiation


OODoc::Object-E<gt>B<new>(OPTIONS)

=over 4

See L<OODoc::Text::Diagnostic/"METHODS">

=back

=head2 Inheritance


$obj-E<gt>B<extends>([OBJECT])

=over 4

Close to all elements used within OODoc can have an inheritance relation.
The returned object is extended by the current object.  Multiple inheritance
is not supported here.

=back

=head2 Commonly used functions


$obj-E<gt>B<filenameToPackage>(FILENAME)

OODoc::Object-E<gt>B<filenameToPackage>(FILENAME)

=over 4

I<Example:> 

 print $self->filenameToPackage('Mail/Box.pm'); # prints Mail::Box

=back

$obj-E<gt>B<mergeObjects>(OPTIONS)

=over 4

Merge two lists of objects: "this" list and "super" list.  The "this"
objects are defined on this level of inheritance, where the "super"
objects are from an inheritence level higher (super class).  The
combined list is returned.

Merging is a complicated task, because the order of both lists should be
kept as well as possible.

 Option  Defined in       Default                 
 equal                    sub {"$_[0]" eq "$_[1]"}
 merge                    sub {$_[0]}             
 super                    []                      
 this                     []                      

. equal CODE

=over 4

Define how can be determined that two objects are the same.  By default,
the stringification of both objects are compared.

=back

. merge CODE

=over 4

What to call if both lists contain the same object.  These two objects
will be passed as argument to the code reference.

=back

. super ARRAY

. this ARRAY

=back

$obj-E<gt>B<mkdirhier>(DIRECTORY)

OODoc::Object-E<gt>B<mkdirhier>(DIRECTORY)

=over 4

Creates this DIRECTORY and all its non-existing parents.

=back

$obj-E<gt>B<unique>

=over 4

See L<OODoc::Text/"METHODS">

=back

=head2 Manual database

All manuals can be reached everywhere in the program: it is a global
collection.

$obj-E<gt>B<addManual>(MANUAL)

=over 4

The MANUAL will be added to the list of known manuals.  The same package
name can appear in more than one manual.  This OBJECT shall be of type
L<OODoc::Manual|OODoc::Manual>.

=back

$obj-E<gt>B<mainManual>(NAME)

=over 4

Returns the manual of the named package which contains the primar
documentation for the code of the package NAME.

=back

$obj-E<gt>B<manuals>

=over 4

All manuals are returned.

=back

$obj-E<gt>B<manualsForPackage>(NAME)

=over 4

Returns a list package objects which are related to the specified NAME.
One NAME can appear in more than one file, and therefore a list is
returned.

=back

$obj-E<gt>B<packageNames>

=over 4

Returns the names of all defined packages.

=back



=head1 DIAGNOSTICS

I<Error:> manual definition requires manual object

A call to L<addManual()|"Manual database"> expects a new manual object (a L<OODoc::Manual|OODoc::Manual>),
however an incompatible thing was passed.  Usually, intended was a call
to L<manualsForPackage()|"Manual database"> or L<mainManual()|"Manual database">.

I<Warning:> order conflict "$take" before "$insert" in $file line $number

The order of the objects in a sub-class shall be the same as that of
the super class, otherwise the result of merging of the information
received from both classes is undertermined.






=head1 REFERENCES

See the OODoc website at L<$website> for more details.

=head1 COPYRIGHTS

Module version $version.
Written by Mark Overmeer (mark@overmeer.net).  See the ChangeLog for
other contributors.

Copyright (c) 2001-2002 by the authors. All rights reserved.  This program
is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.


