ButtonRegistry

class ButtonRegistry

The ButtonRegistry class maintains all the assigned ButtonHandles in a given system. There should be only one ButtonRegistry class during the lifetime of the application.

Inheritance diagram

Inheritance diagram of ButtonRegistry

ButtonRegistry(ButtonRegistry const&) = default
ButtonHandle find_ascii_button(char ascii_equivalent) const

Finds a ButtonHandle in the registry matching the indicated ASCII equivalent character. If there is no such ButtonHandle, returns ButtonHandle::none().

ButtonHandle find_button(std::string const &name)

Finds a ButtonHandle in the registry matching the indicated name. If there is no such ButtonHandle, returns ButtonHandle::none().

ButtonHandle get_button(std::string const &name)

Finds a ButtonHandle in the registry matching the indicated name. If there is no such ButtonHandle, registers a new one and returns it.

ButtonRegistry *ptr(void)

ptr() returns the pointer to the global ButtonRegistry object.

Returns the pointer to the global ButtonRegistry object.

void write(std::ostream &out) const