|
Rumba C++ SDK
|
#include <ConditionalEvalContext.h>
Public Member Functions | |
| bool | is_exact () const |
| Informs the callback if the current plug evaluation is done in exact mode (True) or interactive mode (False). More... | |
| std::optional< Value > | value (int dep) const |
| Return the trivial value of the plug's n-th dependency, if available. More... | |
This class provides a context to the PlugDescriptor evaluate callback.
|
inline |
Informs the callback if the current plug evaluation is done in exact mode (True) or interactive mode (False).
The callback can use that information to decide to not evaluate a dependency (like a temporal one) during the user interaction.
| std::optional<Value> maquina::ConditionalEvalContext::value | ( | int | dep | ) | const |
Return the trivial value of the plug's n-th dependency, if available.
The callback can use that method to decide to evaluate the plug regarding the (trivial) values of its dependences. A trivial value is available when the dependency or its input plugs have a constant, valid value in cache. If the value is not constant or if an evaluation is required during an invalidation to get the value, the value is not trivial and the method returns nothing.