## AtkRelationSet

AtkRelationSet — A set of AtkRelations, normally the set of AtkRelations which an AtkObject has.

##

# Synopsis

    struct      AtkRelationSet;
    AtkRelationSet* atk_relation_set_new        (void);
    gboolean    atk_relation_set_contains       (AtkRelationSet *set,
                                                 AtkRelationType relationship);
    void        atk_relation_set_remove         (AtkRelationSet *set,
                                                 AtkRelation *relation);
    void        atk_relation_set_add            (AtkRelationSet *set,
                                                 AtkRelation *relation);
    gint        atk_relation_set_get_n_relations
                                                (AtkRelationSet *set);
    AtkRelation* atk_relation_set_get_relation  (AtkRelationSet *set,
                                                 gint i);
    AtkRelation* atk_relation_set_get_relation_by_type
                                                (AtkRelationSet *set,
                                                 AtkRelationType relationship);

## Object Hierarchy

      GObject
       +----AtkRelationSet

## Description

## Details

### struct AtkRelationSet

    struct AtkRelationSet;

The AtkRelationSet structure should not be accessed directly.

### atk_relation_set_new ()

    AtkRelationSet* atk_relation_set_new        (void);

Creates a new empty relation set.

Returns : | a new AtkRelationSet

### atk_relation_set_contains ()

    gboolean    atk_relation_set_contains       (AtkRelationSet *set,
                                                 AtkRelationType relationship);

Determines whether the relation set contains a relation that matches the specified type.

`set` : | an AtkRelationSet
`relationship` : | an AtkRelationType
Returns : | `TRUE` if `relationship` is the relationship type of a relation in `set`, `FALSE` otherwise

### atk_relation_set_remove ()

    void        atk_relation_set_remove         (AtkRelationSet *set,
                                                 AtkRelation *relation);

Removes a relation from the relation set. This function unref's the AtkRelation so it will be deleted unless there is another reference to it.

`set` : | an AtkRelationSet
`relation` : | an AtkRelation

### atk_relation_set_add ()

    void        atk_relation_set_add            (AtkRelationSet *set,
                                                 AtkRelation *relation);

Add a new relation to the current relation set if it is not already present. This function ref's the AtkRelation so the caller of this function should unref it to ensure that it will be destroyed when the AtkRelationSet is destroyed.

`set` : | an AtkRelationSet
`relation` : | an AtkRelation

### atk_relation_set_get_n_relations ()

    gint        atk_relation_set_get_n_relations
                                                (AtkRelationSet *set);

Determines the number of relations in a relation set.

`set` : | an AtkRelationSet
Returns : | an integer representing the number of relations in the set.

### atk_relation_set_get_relation ()

    AtkRelation* atk_relation_set_get_relation  (AtkRelationSet *set,
                                                 gint i);

Determines the relation at the specified position in the relation set.

`set` : | an AtkRelationSet
`i` : | a gint representing a position in the set, starting from 0.
Returns : | a AtkRelation, which is the relation at position i in the set.

### atk_relation_set_get_relation_by_type ()

    AtkRelation* atk_relation_set_get_relation_by_type
                                                (AtkRelationSet *set,
                                                 AtkRelationType relationship);

Finds a relation that matches the specified type.

`set` : | an AtkRelationSet
`relationship` : | an AtkRelationType
Returns : | an AtkRelation, which is a relation matching the specified type.