31 #ifndef _GranOO_Math_FunctionT_hpp_
32 #define _GranOO_Math_FunctionT_hpp_
34 #include <type_traits>
51 FunctionT(
unsigned int varNumber,
const std::string& symbol,
const std::string
desc =
"");
73 "T must be a descendant of Function<T>");
83 "T must be a descendant of Function<T>");
95 AssertMsg(ok ==
true,
"Can't deregister this function");
96 AssertMsg(_recorded_function.count(_symbol)==1,
"Can't find this symbol in map");
97 _recorded_function.erase(_symbol);
104 AssertMsg(_recorded_function.count(symbol) == 0,
"This symbol is already used");
105 AssertMsg(_recorded ==
false,
"This function was already registered");
107 AssertMsg(symbol !=
"",
"The symbol can not be empty");
110 AssertMsg(ok ==
true,
"Can't register this function");
111 _recorded_function[symbol] =
this;
#define AssertMsg(condition, message)
Definition: Macro.hpp:67
static bool add(const std::string §ion, const std::string &subsection, const std::string &file_name, const std::string &description)
Definition: Doc.cpp:60
Definition: Function.hpp:42
Definition: FunctionT.hpp:48
void record(const std::string &)
Definition: FunctionT.hpp:103
virtual ~FunctionT()
Definition: FunctionT.hpp:92
FunctionT & operator=(const FunctionT &)=delete
bool _recorded
Definition: FunctionT.hpp:63
FunctionT(unsigned int varNumber)
Definition: FunctionT.hpp:68
std::string _symbol
Definition: FunctionT.hpp:62
FunctionT(unsigned int varNumber, const std::string &symbol, const std::string desc="")
Definition: FunctionT.hpp:78
FunctionT(const FunctionT &)=delete
static exprtk::symbol_table< double > & Table()
Definition: Symbol.cpp:41
bool add_function(const std::string &function_name, function_t &function)
Definition: Exprtk.hpp:20132
bool remove_function(const std::string &function_name)
Definition: Exprtk.hpp:20340
static const char * desc
Definition: Between2SetOf.cpp:37
Definition: Common.hpp:198
T value(details::expression_node< T > *n)
Definition: Exprtk.hpp:15070