Class: Atk::RelationSet
- Inherits:
-
Object
- Object
- Atk::RelationSet
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#add(relation) ⇒ nil
Add a new relation to the current relation set if it is not already present.
-
#add_relation_by_type(relationship, target) ⇒ nil
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.
-
#contains(relationship) ⇒ TrueClass
Determines whether the relation set contains a relation that matches the specified type.
-
#contains_target(relationship, target) ⇒ TrueClass
Determines whether the relation set contains a relation that matches the specified pair formed by type relationship and object target.
-
#get_relation(i) ⇒ Atk::Relation
Determines the relation at the specified position in the relation set.
-
#get_relation_by_type(relationship) ⇒ Atk::Relation
Finds a relation that matches the specified type.
-
#n_relations ⇒ Integer
Determines the number of relations in a relation set.
-
#new ⇒ Atk::RelationSet
Creates a new empty relation set.
-
#remove(relation) ⇒ nil
Removes a relation from the relation set.
Instance Method Details
#add(relation) ⇒ nil
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.
#add_relation_by_type(relationship, target) ⇒ nil
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.
#contains(relationship) ⇒ TrueClass
Determines whether the relation set contains a relation that matches the specified type. in set, false otherwise
#contains_target(relationship, target) ⇒ TrueClass
Determines whether the relation set contains a relation that matches the specified pair formed by type relationship and object target. type relationship with an object target, false otherwise
#get_relation(i) ⇒ Atk::Relation
Determines the relation at the specified position in the relation set. position i in the set.
#get_relation_by_type(relationship) ⇒ Atk::Relation
Finds a relation that matches the specified type. specified type.
#n_relations ⇒ Integer
Determines the number of relations in a relation set.
#new ⇒ Atk::RelationSet
Creates a new empty relation set.
#remove(relation) ⇒ nil
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.