OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
math_expression.hpp
1#pragma once
2#include <ossia/detail/config.hpp>
3
4#include <ossia/network/value/value.hpp>
5
6#include <string>
7#include <vector>
8
9namespace ossia
10{
11class OSSIA_EXPORT math_expression
12{
13public:
14 math_expression();
15 ~math_expression();
16
17 void seed_random(uint64_t seed1, uint64_t seed2);
18 void add_variable(const std::string& var, double& value);
19 void add_constant(const std::string& var, double& value);
20 void add_vector(const std::string& var, std::vector<double>& value);
21 void rebase_vector(const std::string& var, std::vector<double>& value);
22 void add_constants();
23 void register_symbol_table();
24
25 bool set_expression(const std::string& expr);
26 bool recompile();
27
29 bool valid() const noexcept;
30
33 bool has_variable(std::string_view var) const noexcept;
34
36 std::string error() const;
37
38 double value();
39
40 ossia::value result();
41
42private:
43 math_expression(const math_expression&) = delete;
44 math_expression(math_expression&&) = delete;
45 math_expression& operator=(const math_expression&) = delete;
46 math_expression& operator=(math_expression&&) = delete;
47
48 struct impl;
49 impl* impl{};
50};
51}
Definition git_info.h:7