mcrl2::data::xyz_identifier_generator

Include file:

#include "mcrl2/data/xyz_identifier_generator.h
class mcrl2::data::xyz_identifier_generator

Identifier generator that generates names from the range X, Y, Z, X0, Y0, Z0, X1, …

Protected attributes

char mcrl2::data::xyz_identifier_generator::m_char

The character of the last generated identifier.

int mcrl2::data::xyz_identifier_generator::m_index

The index of the last generated identifier.

Protected member functions

std::string next()

Returns the next name in the range X, Y, Z, X0, Y0, Z0, X1, …

Returns: The next name in the range X, Y, Z, X0, Y0, Z0, X1, …

Public member functions

core::identifier_string operator()(const std::string &hint, bool add_to_context = true)

Returns hint if it isn’t in the context yet. Else the next available identifier in the range X, Y, Z, X0, Y0, Z0, X1, … is returned.

Parameters:

  • hint A string
  • add_to_context If true, the generated identifier is added to the context, it is not added otherwise.

Returns: A fresh identifier.

xyz_identifier_generator()

Constructor.

xyz_identifier_generator(const std::set<core::identifier_string> &ids)

Constructor.

Parameters:

  • ids a set of identifiers to use as context