class Roby::DRoby::V5::Queries::PlanObjectMatcherDumper::DRoby

An intermediate representation of TaskMatcher objects suitable to be sent to our peers.

Attributes

children[R]
indexed_neg_predicates[R]
indexed_predicates[R]
model[R]

The exact match class that has been marshalled using this object

neg_predicates[R]
owners[R]
parents[R]
predicates[R]

Public Class Methods

new(model, predicates, neg_predicates, indexed_predicates, indexed_neg_predicates, owners, parents, children) click to toggle source
# File lib/roby/droby/v5/droby_dump.rb, line 918
def initialize(model, predicates, neg_predicates, indexed_predicates, indexed_neg_predicates, owners, parents, children)
    @model = model
    @predicates, @neg_predicates, @indexed_predicates, @indexed_neg_predicates =
        predicates, neg_predicates, indexed_predicates, indexed_neg_predicates
    @owners = owners
    @parents = parents
    @children = children
end

Public Instance Methods

proxy(peer, matcher: Roby::Queries::PlanObjectMatcher.new) click to toggle source

Common initialization of a TaskMatcher object from the given argument set. This is to be used by DRoby-dumped versions of subclasses of TaskMatcher.

# File lib/roby/droby/v5/droby_dump.rb, line 930
def proxy(peer, matcher: Roby::Queries::PlanObjectMatcher.new)
    model  = self.model.map { |m| peer.local_model(m) }
    owners = peer.local_object(self.owners)

    matcher.with_model(model)
    matcher.predicates.concat(predicates)
    matcher.neg_predicates.concat(neg_predicates)
    matcher.indexed_predicates.concat(indexed_predicates)
    matcher.indexed_neg_predicates.concat(indexed_neg_predicates)
    matcher.parents.merge!(peer.local_object(parents))
    matcher.children.merge!(peer.local_object(children))
    matcher.owners.concat(owners)
    matcher
end