# rmp::Condition

> A question the framework asks later with arguments of types A...: a StateMachine's transition, an Animator's rule, whether a Draggable may be dropped.

Source: https://omardev29.github.io/rmp-docs/reference/classes/rmp-Condition.html

class `#include <rmp/object.h>` [include/rmp/object.h:274](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/object.h#L274-L311)

template <class... A> class Condition

A question the framework asks later with arguments of types A...: a StateMachine's transition, an Animator's rule, whether a Draggable may be dropped. A Callback that answers: a lambda returning something that converts to bool converts to it, and an empty one answers false. It moves and does not copy, for the reasons Callback gives.

### `Condition`

template <class F> requires(!std::is_same_v<std::decay_t<F>, Condition>) Condition(F &&fn)

function [include/rmp/object.h:284](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/object.h#L284-L298)

So that a lambda can be written straight into a designated initialiser.

### `operator bool`

explicit operator bool() const

function [include/rmp/object.h:301](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/object.h#L301)

Whether a function is stored.

### `operator()`

bool operator()(A... args) const

function [include/rmp/object.h:303](https://github.com/omardev29/raylib_multiplatform/blob/982bf2a1e307c49776bff84211260703b8de6895/include/rmp/object.h#L303-L307)

The stored function's answer; an empty Condition answers false.
