diff --git a/include/fractal.hpp b/include/fractal.hpp index ff295af..dccee7e 100644 --- a/include/fractal.hpp +++ b/include/fractal.hpp @@ -101,7 +101,12 @@ public: * * @ret @c true if the number of tokens in the ruleset equals @c g_max_tokens, @c false otherwise */ - bool tokens_full() const; + bool tokens_full() const { + return m_tokens.full(); + } + bool valid_token(token_id_t tok) const { + return tok < m_tokens.size(); + } /** * @brief Add new token variable that can be used in this ruleset @@ -120,7 +125,9 @@ public: * * @ret @c true if the number of group characteristics in the ruleset equals @c g_max_cgroups, @c false otherwise */ - bool group_characteristics_full() const; + bool group_characteristics_full() const { + return m_group_characteristics.full(); + } /** * @brief Add new group characteristic diff --git a/src/fractal.cpp b/src/fractal.cpp index 8f21041..20c0731 100644 --- a/src/fractal.cpp +++ b/src/fractal.cpp @@ -8,10 +8,6 @@ namespace log = mtl::log; namespace fractal { -bool ruleset_t::tokens_full() const { - return m_tokens.full(); -} - token_id_t ruleset_t::add_token(token_type_e type, mtl::fixed value) { if (m_tokens.full()) { throw mtl::length_error();