Class: Roby::EventConstraints::UnboundTaskPredicate::Negate
Overview
Representation of predicates UnboundPredicateSupport#negate and UnboundTaskPredicate#negate
See documentation from UnboundTaskPredicate
Instance Attribute Summary collapse
Instance Method Summary
collapse
#and, #compile, #evaluate, #negate, #or, #pretty_print, #to_unbound_task_predicate
Constructor Details
#initialize(pred) ⇒ Negate
Returns a new instance of Negate.
454
455
456
457
|
# File 'lib/roby/event_constraints.rb', line 454
def initialize(pred)
@predicate = pred
super()
end
|
Instance Attribute Details
#predicate ⇒ Object
Returns the value of attribute predicate.
452
453
454
|
# File 'lib/roby/event_constraints.rb', line 452
def predicate
@predicate
end
|
Instance Method Details
#==(other) ⇒ Object
459
460
461
|
# File 'lib/roby/event_constraints.rb', line 459
def ==(other)
other.kind_of?(Negate) && other.predicate == predicate
end
|
479
480
481
|
# File 'lib/roby/event_constraints.rb', line 479
def code
"!(#{predicate.code})"
end
|
#explain_false(task) ⇒ Object
467
468
469
|
# File 'lib/roby/event_constraints.rb', line 467
def explain_false(task)
predicate.explain_true(task)
end
|
#explain_static(task) ⇒ Object
471
472
473
|
# File 'lib/roby/event_constraints.rb', line 471
def explain_static(task)
predicate.explain_static(task)
end
|
#explain_true(task) ⇒ Object
463
464
465
|
# File 'lib/roby/event_constraints.rb', line 463
def explain_true(task)
predicate.explain_false(task)
end
|
#required_events ⇒ Object
475
476
477
|
# File 'lib/roby/event_constraints.rb', line 475
def required_events
predicate.required_events
end
|
#static?(task) ⇒ Boolean
483
484
485
|
# File 'lib/roby/event_constraints.rb', line 483
def static?(task)
predicate.static?(task)
end
|
487
488
489
|
# File 'lib/roby/event_constraints.rb', line 487
def to_s
"!#{predicate}"
end
|