Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Atk::RelationSet Class Reference

An AtkRelationSet C++ wrapper class. More...

`#include <inti/atk/relation.h>`

Inheritance diagram for Inti::Atk::RelationSet:

List of all members.

## Public Member Functions

Constructors

- RelationSet ()
    Construct an empty relation set.
- virtual ~RelationSet ()
    Destructor.

Accessors

- AtkRelationSet * atk_relation_set () const
    Get a pointer to the AtkRelationSet structure.
- AtkRelationSetClass * atk_relation_set_class () const
    Get a pointer to the AtkRelationSetClass structure.
- operator AtkRelationSet * () const
    Conversion operator; safely converts a RelationSet to an AtkRelationSet pointer.
- bool contains (RelationType relationship) const
    Determines whether the relation set contains a relation that matches the specified type.
- int get_n_relations () const
    Determines the number of relations in a relation set.
- Relation * get_relation (int index) const
    Determines the relation at the specified position in the relation set.
- Relation * get_relation (RelationType relationship) const
    Finds a relation that matches the specified type.

Methods

- void add (Relation &relation)
    Add a new relation to the current relation set if it is not already present.
- void remove (Relation &relation)
    Removes a relation from the relation set.

## Protected Member Functions

Constructors

- RelationSet (AtkRelationSet *set, bool reference=true)
    Construct a new RelationSet from an existing AtkRelationSet.

## Detailed Description

An AtkRelationSet C++ wrapper class.

RelationSet is a set of Relations, normally the set of Relations which an Atk::Object has.

## Constructor & Destructor Documentation

Inti::Atk::RelationSet::RelationSet | ( | AtkRelationSet * | set,
|  | bool | reference = true
| ) | `[explicit, protected]`

  | Construct a new RelationSet from an existing AtkRelationSet. Parameters:
  set | A pointer to a AtkRelationSet.
  reference | Set false if the initial reference count is floating, set true if it's not.
The set can be a newly created AtkRelationSet or an existing AtkRelationSet. (see G::Object::Object).

## Member Function Documentation

void Inti::Atk::RelationSet::add | ( | Relation & | relation | ) |

  | Add a new relation to the current relation set if it is not already present. Parameters:
  relation | A Relation.

bool Inti::Atk::RelationSet::contains | ( | RelationType | relationship | ) | const

  | Determines whether the relation set contains a relation that matches the specified type. Parameters:
  relationship | A RelationType.
Returns: true if relationship is the relationship type of a relation in the set, false otherwise.

int Inti::Atk::RelationSet::get_n_relations | ( |  | ) | const

| Determines the number of relations in a relation set. Returns: An integer representing the number of relations in the set.

Relation* Inti::Atk::RelationSet::get_relation | ( | RelationType | relationship | ) | const

  | Finds a relation that matches the specified type. Parameters:
  relationship | A RelationType.
Returns: A Relation, which is a relation matching the specified type.

Relation* Inti::Atk::RelationSet::get_relation | ( | int | index | ) | const

  | Determines the relation at the specified position in the relation set. Parameters:
  index | An integer representing a position in the set, starting from 0.
Returns: A Relation, which is the relation at position i in the set.

void Inti::Atk::RelationSet::remove | ( | Relation & | relation | ) |

  | Removes a relation from the relation set. Parameters:
  relation | A Relation.
This method unreferences the Relation so it will be deleted, unless there is another reference to it.

The documentation for this class was generated from the following file:

- relation.h

Main Page - Footer