Move *_full to fractal.hpp and add valid token check
This commit is contained in:
parent
0f3e857586
commit
8e6413e9ec
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user