Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions
Xfc::Atk::RelationSet Class Reference

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

#include <xfc/atk/relation.hh>

Inheritance diagram for Xfc::Atk::RelationSet:
Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable

List of all members.

Public Member Functions

Constructors


Detailed Description

An AtkRelationSet C++ wrapper class.

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

Note: dynamically allocated objects must either be unreferenced or assigned to a smart pointer. Stack objects are automatically unreferenced when they go out of scope.


Constructor & Destructor Documentation

Xfc::Atk::RelationSet::RelationSet ( AtkRelationSet *  set,
bool  owns_reference = true 
) [explicit, protected]

Construct a new RelationSet from an existing AtkRelationSet.

Parameters:
setA pointer to a AtkRelationSet.
owns_referenceSet 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 Xfc::Atk::RelationSet::add ( Relation relation)

Add a new relation to the current relation set if it is not already present.

Parameters:
relationA Relation.

Add a new relation of the specified type with the specified target to the relation set if the relation set does not contain a relation of that type.

Parameters:
relationshipAn Atk::RelationType.
targetAn Atk::Object.

If the relation set does contain a relation of that type a the target is added to the relation.

bool Xfc::Atk::RelationSet::contains ( RelationType  relationship) const

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

Parameters:
relationshipA RelationType.
Returns:
true if relationship is the relationship type of a relation in the set, false otherwise.

Determines the number of relations in a relation set.

Returns:
An integer representing the number of relations in the set.

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

Parameters:
indexAn integer representing a position in the set, starting from 0.
Returns:
A Relation, which is the relation at position i in the set.

Finds a relation that matches the specified type.

Parameters:
relationshipA RelationType.
Returns:
A Relation, which is a relation matching the specified type.

Removes a relation from the relation set.

Parameters:
relationA 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:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC