# ***********************************************
# 
# !!!! DO NOT EDIT !!!!
# 
# This file was auto-generated by Build.PL.
# 
# ***********************************************
# 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

=encoding utf8

=head1 NAME

Clownfish::Class - Class.

=head1 SYNOPSIS

    my $class = Clownfish::Class->fetch_class('Foo::Bar');
    my $subclass = Clownfish::Class->singleton('Foo::Bar::Jr', $class);

=head1 DESCRIPTION

Classes are first-class objects in Clownfish.  Class objects are instances
of Clownfish::Class.

=head1 CONSTRUCTORS

=head2 fetch_class

    my $class = Clownfish::Class->fetch_class($class_name);

Find a registered class.  May return undef if the class is not
registered.

=head2 singleton

    my $class = Clownfish::Class->singleton(
        class_name => $class_name,  # required
        parent     => $parent,      # required
    );

Return a singleton.  If a Class can be found in the registry based on
the supplied class name, it will be returned.  Otherwise, a new Class
will be created using C<parent> as a base.

If C<parent> is undef, an attempt will be made to find it.  If the
attempt fails, an error will result.

=head1 METHODS

=head2 make_obj

    my $obj = $class->make_obj();

Create an empty object of the type defined by the Class: allocate,
assign its class and give it an initial refcount of 1.  The caller is
responsible for initialization.

=head2 get_name

    my $string = $class->get_name();

Return the name of the class.

=head2 get_parent

    my $result = $class->get_parent();

Return the parent class, or undef for a root of the class
hierarchy.

=head2 get_obj_alloc_size

    my $int = $class->get_obj_alloc_size();

Return the number of bytes needed to hold an instance of the class.

=head1 INHERITANCE

Clownfish::Class isa L<Clownfish::Obj>.

=cut