GridComputing
Job Management in Grid Computing
|
#include <menu.h>
Classes | |
class | Item |
A Menu can have many Items. More... | |
Public Member Functions | |
Menu (const std::string &label, Menu *parent=nullptr) | |
Constructor. | |
~Menu () | |
Destructor. | |
uint32 | Print () const override |
Prints the menu label and returns the Menu or Menu::Item chosen by the user of the menu. | |
IMenu * | AddMenu (char indexer, const std::string &label) |
Adds a submenu to this Menu. | |
IMenu * | AddMenuItem (char indexer, const std::string &label, uint32 val) |
Adds an Item to this Menu. | |
IMenu * | operator[] (char indexer) |
Indexer. | |
IMenu * | operator[] (char indexer) const |
Const indexer. | |
IMenu * | GetLastSubMenu () |
Ability to go to previous Menu. | |
Public Member Functions inherited from IMenu | |
IMenu (const std::string &label, Menu *parent=NULL) | |
Constructor. | |
virtual | ~IMenu () |
Virtual destructor. | |
const std::string & | GetLabel () const |
Returns the Menu's label. | |
Menu * | GetParent () const |
Returns the Menu's parent. Can be null. | |
void | SetParent (Menu *val) |
Updates the Menu's parent. | |
Static Public Member Functions | |
static Menu * | Load (ByteBuffer &bb) |
Loads the Menu from a ByteBuffer. | |
Private Attributes | |
std::vector< std::pair< char, IMenu * > > | _subMenus |
A vector of submenus. | |
Additional Inherited Members | |
Protected Attributes inherited from IMenu | |
Menu * | _parent |
Parent menu. | |
std::string | _label |
Menu. | |
Menu Class.
Represents a menu that can have multiple sub-menus and links to other Menus and Menu::Items
Menu::Menu | ( | const std::string & | label, |
Menu * | parent = nullptr |
||
) |
Constructor.
Menu::~Menu | ( | ) |
Destructor.
|
static |
Loads the Menu from a ByteBuffer.
IMenu * Menu::operator[] | ( | char | indexer | ) |
Indexer.
IMenu * Menu::operator[] | ( | char | indexer | ) | const |
Const indexer.
|
overridevirtual |
Prints the menu label and returns the Menu or Menu::Item chosen by the user of the menu.
Implements IMenu.
|
private |
A vector of submenus.