class Roby::Queries::NotMatcher

Negate a given task-matching predicate

This matcher will match if the underlying predicate does not match.

Public Class Methods

new(op) click to toggle source

Create a new TaskMatcher which matches if and only if op does not

# File lib/roby/queries/not_matcher.rb, line 9
def initialize(op)
    @op = op
end

Public Instance Methods

===(task) click to toggle source

True if the task matches at least one of the underlying predicates

# File lib/roby/queries/not_matcher.rb, line 25
def ===(task)
    !(@op === task)
end
filter(initial_set, task_index) click to toggle source

Filters as much as non-matching tasks as possible out of task_set, based on the information in task_index

# File lib/roby/queries/not_matcher.rb, line 15
def filter(initial_set, task_index)
    # WARNING: the value returned by filter is a SUPERSET of the
    # possible values for the query. Therefore, the result of
    # NegateTaskMatcher#filter is NOT
    #
    #   initial_set - @op.filter(...)
    initial_set
end