Skip to contents

Condition object, to specify the condition in a dependency.

Currently implemented simple conditions

  • CondEqual$new(rhs)
    Parent must be equal to rhs.

  • CondAnyOf$new(rhs)
    Parent must be any value of rhs.

Public fields

type

(character(1))
Name / type of the condition.

rhs

(any)
Right-hand-side of the condition.

Methods


Method new()

Creates a new instance of this R6 class.

Usage

Condition$new(type, rhs)

Arguments

type

(character(1))
Name / type of the condition.

rhs

(any)
Right-hand-side of the condition.


Method test()

Checks if condition is satisfied. Called on a vector of parent param values.

Usage

Condition$test(x)

Arguments

x

(vector()).

Returns

logical(1).


Method as_string()

Conversion helper for print outputs.

Usage

Condition$as_string(lhs_chr = "x")

Arguments

lhs_chr

(character(1))


Method format()

Helper for print outputs.

Usage

Condition$format(...)

Arguments

...

(ignored).


Method print()

Printer.

Usage

Condition$print(...)

Arguments

...

(ignored).


Method clone()

The objects of this class are cloneable with this method.

Usage

Condition$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.