Reference Manual

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

# Inti::Atk::Relation Class Reference

An AtkRelation C++ wrapper class. More...

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

Inheritance diagram for Inti::Atk::Relation:

List of all members.

## Public Member Functions

Constructors

- Relation (const std::vector< Atk::Object * > &targets, AtkRelationType relationship)
    Construct a new relation for the specified relationship and the specified list of targets.
- virtual ~Relation ()
    Destructor.

Accessors

- AtkRelation * atk_relation () const
    Get a pointer to the AtkRelation structure.
- AtkRelationClass * atk_relation_class () const
    Get a pointer to the AtkRelationClass structure.
- operator AtkRelation * () const
    Conversion operator; safely converts a Relation to an AtkRelation pointer.
- AtkRelationType get_relation_type () const
    Gets the type of the relation.
- bool get_target (std::vector< Atk::Object * > &targets) const
    Gets the target list of the relation.

## Protected Member Functions

Constructors

- Relation (AtkRelation *relation, bool reference=true)
    Construct a new Relation from an existing AtkRelation.

## Detailed Description

An AtkRelation C++ wrapper class.

A Relation describes a relation between an object and one or more other objects. The actual relations that an object has with other objects are defined as a RelationSet, which is a set of Relations.

## Constructor & Destructor Documentation

Inti::Atk::Relation::Relation | ( | AtkRelation * | relation,
|  | bool | reference = true
| ) | `[explicit, protected]`

Construct a new Relation from an existing AtkRelation.

Parameters:

  relation | A pointer to a AtkRelation.
  reference | Set false if the initial reference count is floating, set true if it's not.

The relation can be a newly created AtkRelation or an existing AtkRelation. (see G::Object::Object).

Inti::Atk::Relation::Relation | ( | const std::vector< Atk::Object * > & | targets,
|  | AtkRelationType | relationship
| ) |

Construct a new relation for the specified relationship and the specified list of targets.

Parameters:

  targets | A reference to a vector of Atk::Object* that lists the target objects.
  relationship | A RelationType with which to create the new Relation.

## Member Function Documentation

AtkRelationType Inti::Atk::Relation::get_relation_type | ( |  | ) | const

Gets the type of the relation.

Returns:
  The type of the relation.

bool Inti::Atk::Relation::get_target | ( | std::vector< Atk::Object * > & | targets | ) | const

Gets the target list of the relation.

Parameters:

  targets | A reference to a vector of Atk::Object* to hold the target list.

Returns:
  true if the vector is not empty.

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

- relation.h

Main Page - Footer