2#include <ossia/detail/config.hpp>
8namespace ossia::expressions
15 virtual void update() = 0;
16 [[nodiscard]]
virtual bool evaluate()
const = 0;
17 virtual void on_first_callback_added(expression_generic&) = 0;
18 virtual void on_removing_last_callback(expression_generic&) = 0;
21class OSSIA_EXPORT expression_generic final :
public expression_callback_container
24 expression_generic(std::unique_ptr<expression_generic_base> ptr)
25 : expr{std::move(ptr)}
28 expression_generic(expression_generic_base* ptr)
32 ~expression_generic()
override;
33 std::unique_ptr<expression_generic_base> expr;
35 void update()
const { expr->update(); }
36 bool evaluate()
const {
return expr->evaluate(); }
38 void reset()
const { }
41 void on_first_callback_added()
override { expr->on_first_callback_added(*
this); }
42 void on_removing_last_callback()
override { expr->on_removing_last_callback(*
this); }
Definition expression_generic.hpp:13