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


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

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

#include <xfc/atk/relation.hh>

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

List of all members.

Public Member Functions

Constructors


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.

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::Relation::Relation ( AtkRelation *  relation,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Relation from an existing AtkRelation.

Parameters:
relationA pointer to a AtkRelation.
owns_referenceSet 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).

Xfc::Atk::Relation::Relation ( const std::vector< Atk::Object * > &  targets,
RelationType  relationship 
)

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

Parameters:
targetsA reference to a vector of Atk::Object* that lists the target objects.
relationshipA RelationType with which to create the new Relation.

A Relation object is created with a reference count of 1 that the caller owns.


Member Function Documentation

Adds the specified Atk::Object to the target for the relation, if it is not already present.

Parameters:
targetAn Atk::Object.

Gets the type of the relation.

Returns:
The type of the relation.
bool Xfc::Atk::Relation::get_target ( std::vector< Atk::Object * > &  targets) const

Gets the target list of the relation.

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