Include file:
#include "mcrl2/utilities/number_postfix_generator.h
mcrl2::utilities::
number_postfix_generator
¶Identifier generator that generates names consisting of a prefix followed by a number. For each prefix an index is maintained, that is incremented after each call to operator()(prefix).
mcrl2::utilities::number_postfix_generator::
m_hint
¶The default hint.
mcrl2::utilities::number_postfix_generator::
m_index
¶A map that maintains the highest index for each prefix.
add_identifier
(const std::string &id)¶Adds the strings in the range [first, last) to the context.
Parameters:
add_identifiers
(Iter first, Iter last)¶Adds the strings in the range [first, last) to the context.
Parameters:
clear
()Clear the context of the generator.
hint
()¶Returns the default hint.
hint
() const¶Returns the default hint.
number_postfix_generator
(Iter first, Iter last, std::string hint = "FRESH_VAR")¶Constructor.
Parameters:
number_postfix_generator
(std::string hint = "FRESH_VAR")¶Constructor.
operator()
() constGenerates a fresh identifier that doesn’t appear in the context.
Returns: A fresh identifier.
operator()
(std::string hint, bool add_to_context = true) const¶Generates a fresh identifier that doesn’t appear in the context.
Returns: A fresh identifier.