GlsMenu
|
#include <gls_mfd_menu_set.h>
Public Types | |
typedef GlsMenuSet_T< MenuType_t, DataFactory_t > | BaseClass |
typedef MenuType_t | Menu_t |
Public Member Functions | |
GlsMFDMenuSet_T (GlsMFD::Side_t side, GlsMenuDictionary &dataDict) | |
virtual | ~GlsMFDMenuSet_T () |
virtual void | Read (std::istream &instr) |
Menu_t * | Current () const |
void | RegisterAction (const std::string &name, GlsMenuAction::ActionHandler_t *handler) |
void | SelectItem (const typename Menu_t::ItemId_t &itemId) |
virtual void | Show (const std::string &menuName="") |
void | Read (const std::string &filename) |
void | ReadMenuFiles (const std::string &directory, const std::string &ext="menu") |
void | Write (std::ostream &outstr) |
void | Write (const std::string &filename) |
Protected Attributes | |
GlsMFD::Side_t | _MFDSide |
Which MFD this menu set is for (left or right) More... | |
GlsMenuAction::HandlerCont_t | _actionHandlers |
Handlers for menu actions local to an instance of a menu set. Each menu set can have its own set of action handlers. More... | |
GlsMenuDictionary | _menuStructure |
Menu structure attribute dictionary contains structure of menu. More... | |
GlsMenuDictionary & | _menuData |
Menu meta-data attribute dictionary contains variables and values. More... | |
std::string | _showMenuName |
Menu_t * | _currentMenu |
Currently displayed menu page. More... | |
GlsMenuHandlerGroup_T< Menu_t > * | _menus |
Set of all menus. More... | |
Private Member Functions | |
GlsMFDMenuSet_T (const GlsMFDMenuSet_T &) | |
GlsMFDMenuSet_T & | operator= (const GlsMFDMenuSet_T &) |
The GlsMFDMenuSet class provides support for a two-MFD subsystem containing a left and right MFD. The same menu files can be read in by both MFD menu sets. A preprocessing step occurs which replaces all occurrences of the string with the name of the appropriate MFD. In this manner, MFD data specific to a particular MFD can be constructed using one menu file version.
Definition at line 67 of file gls_mfd_menu_set.h.
typedef GlsMenuSet_T<MenuType_t, DataFactory_t> GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::BaseClass |
Definition at line 71 of file gls_mfd_menu_set.h.
|
inherited |
Definition at line 72 of file gls_menu_set.h.
|
inline |
Class constructor.
Definition at line 78 of file gls_mfd_menu_set.h.
|
inlinevirtual |
Class destructor.
Definition at line 89 of file gls_mfd_menu_set.h.
|
private |
|
inlineinherited |
Return the current menu of the set.
Definition at line 153 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_currentMenu.
|
private |
|
inlinevirtual |
Read in the menu structure and behavior from a stream.
instr | input stream to read from. |
Reimplemented from GlsMenuSet_T< MenuType_t, DataFactory_t >.
Definition at line 102 of file gls_mfd_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_menuStructure, GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::_MFDSide, and GlsMFD::Name().
|
inlineinherited |
Read in the menu structure from a file.
filename | to read from. |
Definition at line 248 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::Read().
|
inlineinherited |
Read in the menu structure and data attributes from all files within a particular directory.
directory | to read files from. |
ext | extension of menu files. |
Definition at line 273 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::Read().
|
inlineinherited |
Register a handler for a specific action local to this menu set. If a handler for an action is not found in the local handlers, a handler will be searched for in the global handler list. Local action names should be unique or else the handler will be replaced by each subsequent call.
name | action name |
handler | handler for the action |
Definition at line 167 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_actionHandlers.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::GlsMenuSet_T().
|
inlineinherited |
Handle selection of one of the menu items on the current menu.
itemId | id of the menu item. |
Definition at line 181 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_currentMenu.
|
inlinevirtualinherited |
Change the currently displayed menu.
menuName | name of the desired menu to show. |
Definition at line 194 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_currentMenu, GlsMenuSet_T< MenuType_t, DataFactory_t >::_menus, GlsMenuSet_T< MenuType_t, DataFactory_t >::_showMenuName, and GlsMenuHandlerGroup_T< T >::Item().
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::ShowMenu().
|
inlineinherited |
Write out the menu structure and behavior to a stream.
outstr | output stream to write to. |
Definition at line 321 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::_menuStructure.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::Write().
|
inlineinherited |
Write out the menu structure and behavior to file.
outstr | output stream to write to. |
Definition at line 333 of file gls_menu_set.h.
References GlsMenuSet_T< MenuType_t, DataFactory_t >::Write().
|
protectedinherited |
Handlers for menu actions local to an instance of a menu set. Each menu set can have its own set of action handlers.
Definition at line 357 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::RegisterAction(), and GlsMenuSet_T< MenuType_t, DataFactory_t >::~GlsMenuSet_T().
|
protectedinherited |
Currently displayed menu page.
Definition at line 368 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::Current(), GlsMenuSet_T< MenuType_t, DataFactory_t >::SelectItem(), and GlsMenuSet_T< MenuType_t, DataFactory_t >::Show().
|
protectedinherited |
Menu meta-data attribute dictionary contains variables and values.
Definition at line 363 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::GlsMenuSet_T().
|
protectedinherited |
Set of all menus.
Definition at line 371 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::GlsMenuSet_T(), and GlsMenuSet_T< MenuType_t, DataFactory_t >::Show().
|
protectedinherited |
Menu structure attribute dictionary contains structure of menu.
Definition at line 360 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::GlsMenuSet_T(), GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::Read(), GlsMenuSet_T< MenuType_t, DataFactory_t >::Read(), and GlsMenuSet_T< MenuType_t, DataFactory_t >::Write().
|
protected |
Which MFD this menu set is for (left or right)
Definition at line 123 of file gls_mfd_menu_set.h.
Referenced by GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::Read().
|
protectedinherited |
Definition at line 365 of file gls_menu_set.h.
Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::Show().