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


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

Accessors
Methods

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:
relation A pointer to a AtkRelation.
owns_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).

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:
targets A reference to a vector of Atk::Object* that lists the target objects.
relationship A RelationType with which to create the new Relation.
A Relation object is created with a reference count of 1 that the caller owns.

Xfc::Atk::Relation::Relation ( AtkRelation *  relation,
bool  owns_reference = true 
) [explicit, protected]

Construct a new Relation from an existing AtkRelation.

Parameters:
relation A pointer to a AtkRelation.
owns_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).

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:
targets A reference to a vector of Atk::Object* that lists the target objects.
relationship A 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

RelationType Xfc::Atk::Relation::get_relation_type (  )  const

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:
targets A reference to a vector of Atk::Object* to hold the target list.
Returns:
true if the vector is not empty.

void Xfc::Atk::Relation::add_target ( Atk::Object target  ) 

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

Parameters:
target An Atk::Object.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3