atkmm 2.28.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Atk::RelationSet Class Reference

A set of Atk::Relations, normally the set of AtkRelations which an Atk::Object has. More...

#include <atkmm/relationset.h>

Inheritance diagram for Atk::RelationSet:
Inheritance graph
[legend]

Public Member Functions

 RelationSet (RelationSet && src) noexcept
 
RelationSetoperator= (RelationSet && src) noexcept
 
 ~RelationSet () noexcept override
 
AtkRelationSet * gobj ()
 Provides access to the underlying C GObject. More...
 
const AtkRelationSet * gobj () const
 Provides access to the underlying C GObject. More...
 
AtkRelationSet * gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
bool set_contains (RelationType relationship)
 Determines whether the relation set contains a relation that matches the specified type. More...
 
void set_remove (const Glib::RefPtr< Relation > & relation)
 Removes a relation from the relation set. More...
 
void set_add (const Glib::RefPtr< Relation > & relation)
 Add a new relation to the current relation set if it is not already present. More...
 
int get_n_relations () const
 Determines the number of relations in a relation set. More...
 
Glib::RefPtr< Relationget_relation (gint i)
 Determines the relation at the specified position in the relation set. More...
 
Glib::RefPtr< Relationget_relation (RelationType relationship)
 Finds a relation that matches the specified type. More...
 
void add_relation_by_type (RelationType relationship, const Glib::RefPtr< Atk::Object > & target)
 Add a new relation of the specified type with the specified target to the current relation set if the relation set does not contain a relation of that type. More...
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 
static Glib::RefPtr< RelationSetcreate ()
 

Protected Member Functions

 RelationSet ()
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Atk::RelationSetwrap (AtkRelationSet * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

A set of Atk::Relations, normally the set of AtkRelations which an Atk::Object has.

Constructor & Destructor Documentation

◆ RelationSet() [1/2]

Atk::RelationSet::RelationSet ( RelationSet &&  src)
noexcept

◆ ~RelationSet()

Atk::RelationSet::~RelationSet ( )
overridenoexcept

◆ RelationSet() [2/2]

Atk::RelationSet::RelationSet ( )
protected

Member Function Documentation

◆ add_relation_by_type()

void Atk::RelationSet::add_relation_by_type ( RelationType  relationship,
const Glib::RefPtr< Atk::Object > &  target 
)

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

If it is does contain a relation of that typea the target is added to the relation.

Since atkmm 1.9:
Parameters
relationshipAn Atk::RelationType.
targetAn Atk::Object.

◆ create()

static Glib::RefPtr< RelationSet > Atk::RelationSet::create ( )
static

◆ get_n_relations()

int 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.

◆ get_relation() [1/2]

Glib::RefPtr< Relation > Atk::RelationSet::get_relation ( gint  i)

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

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

◆ get_relation() [2/2]

Glib::RefPtr< Relation > Atk::RelationSet::get_relation ( RelationType  relationship)

Finds a relation that matches the specified type.

Parameters
relationshipAn Atk::RelationType.
Returns
An Atk::Relation, which is a relation matching the specified type.

◆ get_type()

static GType Atk::RelationSet::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

AtkRelationSet * Atk::RelationSet::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const AtkRelationSet * Atk::RelationSet::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

AtkRelationSet * Atk::RelationSet::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator=()

RelationSet & Atk::RelationSet::operator= ( RelationSet &&  src)
noexcept

◆ set_add()

void Atk::RelationSet::set_add ( const Glib::RefPtr< Relation > &  relation)

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

This function ref's the AtkRelation so the caller of this function should unref it to ensure that it will be destroyed when the AtkRelationSet is destroyed.

Parameters
relationAn Atk::Relation.

◆ set_contains()

bool Atk::RelationSet::set_contains ( RelationType  relationship)

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

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

◆ set_remove()

void Atk::RelationSet::set_remove ( const Glib::RefPtr< Relation > &  relation)

Removes a relation from the relation set.

This function unref's the Atk::Relation so it will be deleted unless there is another reference to it.

Parameters
relationAn Atk::Relation.

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Atk::RelationSet > wrap ( AtkRelationSet *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.