Class: Roby::TaskAggregator
- Inherits:
-
Task
- Object
- BasicObject
- PlanObject
- Task
- Roby::TaskAggregator
- Defined in:
- lib/roby/task-operations.rb
Constant Summary
Constants included from Log::TaskHooks
Constants included from Log::BasicObjectHooks
Instance Attribute Summary collapse
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Attributes inherited from PlanObject
#executable, #plan, #removed_at
Attributes inherited from BasicObject
Instance Method Summary collapse
- #delete ⇒ Object
- #each_task {|_self| ... } ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(arguments = {}) ⇒ TaskAggregator
constructor
A new instance of TaskAggregator.
Methods inherited from Task
#_dump, _load, #droby_dump, improves, #improves?, improves?, match, needs, #needs?, needs?
Methods included from Roby::TaskStructure::ModelConflicts
#conflicts_with, #conflicts_with?
Methods included from Distributed::DRobyTaskModel::Dump
Methods included from Distributed::DRobyModel::Dump
Methods included from Distributed::TaskNotifications
Methods included from TaskOperations
Methods included from Log::TaskHooks
#added_child_object, #removed_child_object
Methods inherited from PlanObject
#add_child_object, #apply_relation_changes, child_plan_object, #each_plan_child, #executable?, #finalized?, #forget_peer, #read_write?, #remotely_useful?, #removing_child_object, #replace_by, #replace_subplan_by, #root_object, #root_object?, #subscribed?, #update_on?, #updated_by?
Methods included from Distributed::RelationModificationHooks
#added_child_object, #removed_child_object
Methods included from Roby::Transactions::PlanObjectUpdates
#adding_child_object, #removing_child_object
Methods included from DirectedRelationSupport
#add_child_object, #add_parent_object, #check_is_relation, #related_objects, #relations, #remove_child_object, #remove_children, #remove_parent_object, #remove_parents, #remove_relations
Methods inherited from BasicObject
#add_sibling_for, #distribute?, distribute?, #finalized?, #forget_peer, #has_sibling_on?, #initialize_copy, local_only, #read_write?, #remotely_useful?, #remove_sibling_for, #self_owned?, #sibling_of, #sibling_on, #subscribe, #subscribed?, #update_on?, #updated?, #updated_by?, #updated_peers
Methods included from Log::BasicObjectHooks
Constructor Details
#initialize(arguments = {}) ⇒ TaskAggregator
Returns a new instance of TaskAggregator.
36 |
# File 'lib/roby/task-operations.rb', line 36 def initialize(arguments = {}); @tasks = Array.new; super end |
Instance Attribute Details
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
35 36 37 |
# File 'lib/roby/task-operations.rb', line 35 def tasks @tasks end |
Instance Method Details
#delete ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/roby/task-operations.rb', line 43 def delete @name = self.name @tasks = nil if plan plan.remove_object(self) else clear_relations freeze end end |
#each_task {|_self| ... } ⇒ Object
37 38 39 40 |
# File 'lib/roby/task-operations.rb', line 37 def each_task(&iterator) yield(self) tasks.each(&iterator) end |
#empty? ⇒ Boolean
41 |
# File 'lib/roby/task-operations.rb', line 41 def empty?; tasks.empty? end |