Class: Roby::TaskAggregator

Inherits:
Task show all
Defined in:
lib/roby/task-operations.rb

Direct Known Subclasses

Parallel, Sequence

Constant Summary

Constants included from Log::TaskHooks

Log::TaskHooks::HOOKS

Constants included from Log::BasicObjectHooks

Log::BasicObjectHooks::HOOKS

Instance Attribute Summary collapse

Attributes inherited from PlanObject

#executable, #plan, #removed_at

Attributes inherited from BasicObject

#distribute

Instance Method Summary collapse

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

#droby_dump

Methods included from Distributed::DRobyModel::Dump

#droby_dump

Methods included from Distributed::TaskNotifications

#updated_data

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

#added_owner, #removed_owner

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

#tasksObject (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

#deleteObject



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

Yields:

  • (_self)

Yield Parameters:



37
38
39
40
# File 'lib/roby/task-operations.rb', line 37

def each_task(&iterator)
    yield(self)
    tasks.each(&iterator) 
end

#empty?Boolean

Returns:

  • (Boolean)


41
# File 'lib/roby/task-operations.rb', line 41

def empty?; tasks.empty? end