class Roby::Tasks::TaskAggregator

Base functionality for the Sequence and Parallel aggregators

Attributes

tasks[R]

The array of tasks that are aggregated by this object

Public Class Methods

new(arguments = Hash.new) click to toggle source
Calls superclass method Roby::Task::new
# File lib/roby/tasks/aggregator.rb, line 4
def initialize(arguments = Hash.new)
    @tasks = Array.new
    @name = nil
    super
end

Public Instance Methods

delete() click to toggle source

Removes this aggregator from the plan

# File lib/roby/tasks/aggregator.rb, line 26
def delete
    @name  = self.name
    @tasks = nil
    if plan
        plan.remove_task(self)
    else
        clear_relations
        freeze 
    end
end
each_task() { |self| ... } click to toggle source

TODO: is this really necessary

# File lib/roby/tasks/aggregator.rb, line 17
def each_task(&iterator)
    yield(self)
    tasks.each(&iterator) 
end
empty?() click to toggle source

True if this aggregator has no tasks

# File lib/roby/tasks/aggregator.rb, line 23
def empty?; tasks.empty? end