GgitObjectFactory: libgit2-glib Reference Manual

## GgitObjectFactory GgitObjectFactory |

## Functions

GgitObjectFactory * | ggit_object_factory_get_default ()
void | ggit_object_factory_register ()
void | ggit_object_factory_unregister ()
GObject * | ggit_object_factory_construct ()

## Types and Values

| GgitObjectFactory
struct | GgitObjectFactoryClass

## Object Hierarchy

        GObject
        ╰── GgitObjectFactory

## Description

## Functions

### ggit_object_factory_get_default ()

    GgitObjectFactory *
    ggit_object_factory_get_default (void);

Get the default type factory instance.

#### Returns

a GgitObjectFactory.

[transfer none]

### ggit_object_factory_register ()

    void
    ggit_object_factory_register (GgitObjectFactory *factory,
                                  GType basetype,
                                  GType subtype);

Register `subtype` as the instantiation class for `basetype` . Each time an object of type `basetype` is going to be created, an instance of `subtype` is created instead. `basetype` must be subclassed from GgitObjectFactoryBase.

#### Parameters

factory | a GgitObjectFactory. |
basetype | a GType. |
subtype | a GType. |

### ggit_object_factory_unregister ()

    void
    ggit_object_factory_unregister (GgitObjectFactory *factory,
                                    GType basetype,
                                    GType subtype);

Unregister a subtype from the factory.

#### Parameters

factory | a GgitObjectFactory. |
basetype | a GType. |
subtype | a GType. |

### ggit_object_factory_construct ()

    GObject *
    ggit_object_factory_construct (GgitObjectFactory *factory,
                                   GObjectClass *parent_class,
                                   GType basetype,
                                   guint n_construct_properties,
                                   GObjectConstructParam *construct_properties);

Construct a new object.

#### Parameters

factory | a GgitObjectFactory. |
parent_class | a GObjectClass. |
basetype | a GType. |
n_construct_properties | number of construct properties. |
construct_properties | a list of GObjectConstructParam. | [array length=n_construct_properties]

#### Returns

a GObject.

[transfer full]

## Types and Values

### GgitObjectFactory

    typedef struct _GgitObjectFactory GgitObjectFactory;

Represents an object factory.

### struct GgitObjectFactoryClass

    struct GgitObjectFactoryClass {
    };

The class structure for GgitObjectFactoryClass.

#### Members