GlsMenu
GlsMFDMenuSet_T< MenuType_t, DataFactory_t > Class Template Reference

#include <gls_mfd_menu_set.h>

Inheritance diagram for GlsMFDMenuSet_T< MenuType_t, DataFactory_t >:
GlsMenuSet_T< MenuType_t, DataFactory_t >

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_tCurrent () 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_Toperator= (const GlsMFDMenuSet_T &)
 

Detailed Description

template<class MenuType_t, class DataFactory_t>
class GlsMFDMenuSet_T< MenuType_t, DataFactory_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.

Member Typedef Documentation

template<class MenuType_t , class DataFactory_t >
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.

template<class MenuType_t , class DataFactory_t >
typedef MenuType_t GlsMenuSet_T< MenuType_t, DataFactory_t >::Menu_t
inherited

Definition at line 72 of file gls_menu_set.h.

Constructor & Destructor Documentation

template<class MenuType_t , class DataFactory_t >
GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::GlsMFDMenuSet_T ( GlsMFD::Side_t  side,
GlsMenuDictionary dataDict 
)
inline

Class constructor.

Definition at line 78 of file gls_mfd_menu_set.h.

template<class MenuType_t , class DataFactory_t >
virtual GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::~GlsMFDMenuSet_T ( )
inlinevirtual

Class destructor.

Definition at line 89 of file gls_mfd_menu_set.h.

template<class MenuType_t , class DataFactory_t >
GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::GlsMFDMenuSet_T ( const GlsMFDMenuSet_T< MenuType_t, DataFactory_t > &  )
private

Member Function Documentation

template<class MenuType_t , class DataFactory_t >
Menu_t* GlsMenuSet_T< MenuType_t, DataFactory_t >::Current ( ) const
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.

template<class MenuType_t , class DataFactory_t >
GlsMFDMenuSet_T& GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::operator= ( const GlsMFDMenuSet_T< MenuType_t, DataFactory_t > &  )
private
template<class MenuType_t , class DataFactory_t >
virtual void GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::Read ( std::istream &  instr)
inlinevirtual

Read in the menu structure and behavior from a stream.

Parameters
instrinput 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().

template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::Read ( const std::string &  filename)
inlineinherited

Read in the menu structure from a file.

Parameters
filenameto read from.

Definition at line 248 of file gls_menu_set.h.

References GlsMenuSet_T< MenuType_t, DataFactory_t >::Read().

template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::ReadMenuFiles ( const std::string &  directory,
const std::string &  ext = "menu" 
)
inlineinherited

Read in the menu structure and data attributes from all files within a particular directory.

Parameters
directoryto read files from.
extextension of menu files.

Definition at line 273 of file gls_menu_set.h.

References GlsMenuSet_T< MenuType_t, DataFactory_t >::Read().

template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::RegisterAction ( const std::string &  name,
GlsMenuAction::ActionHandler_t handler 
)
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.

Parameters
nameaction name
handlerhandler 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().

template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::SelectItem ( const typename Menu_t::ItemId_t &  itemId)
inlineinherited

Handle selection of one of the menu items on the current menu.

Parameters
itemIdid of the menu item.

Definition at line 181 of file gls_menu_set.h.

References GlsMenuSet_T< MenuType_t, DataFactory_t >::_currentMenu.

template<class MenuType_t , class DataFactory_t >
virtual void GlsMenuSet_T< MenuType_t, DataFactory_t >::Show ( const std::string &  menuName = "")
inlinevirtualinherited
template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::Write ( std::ostream &  outstr)
inlineinherited

Write out the menu structure and behavior to a stream.

Parameters
outstroutput 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().

template<class MenuType_t , class DataFactory_t >
void GlsMenuSet_T< MenuType_t, DataFactory_t >::Write ( const std::string &  filename)
inlineinherited

Write out the menu structure and behavior to file.

Parameters
outstroutput stream to write to.

Definition at line 333 of file gls_menu_set.h.

References GlsMenuSet_T< MenuType_t, DataFactory_t >::Write().

Field Documentation

template<class MenuType_t , class DataFactory_t >
GlsMenuAction::HandlerCont_t GlsMenuSet_T< MenuType_t, DataFactory_t >::_actionHandlers
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().

template<class MenuType_t , class DataFactory_t >
Menu_t* GlsMenuSet_T< MenuType_t, DataFactory_t >::_currentMenu
protectedinherited
template<class MenuType_t , class DataFactory_t >
GlsMenuDictionary& GlsMenuSet_T< MenuType_t, DataFactory_t >::_menuData
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().

template<class MenuType_t , class DataFactory_t >
GlsMenuHandlerGroup_T<Menu_t>* GlsMenuSet_T< MenuType_t, DataFactory_t >::_menus
protectedinherited
template<class MenuType_t , class DataFactory_t >
GlsMenuDictionary GlsMenuSet_T< MenuType_t, DataFactory_t >::_menuStructure
protectedinherited
template<class MenuType_t , class DataFactory_t >
GlsMFD::Side_t GlsMFDMenuSet_T< MenuType_t, DataFactory_t >::_MFDSide
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().

template<class MenuType_t , class DataFactory_t >
std::string GlsMenuSet_T< MenuType_t, DataFactory_t >::_showMenuName
protectedinherited

Definition at line 365 of file gls_menu_set.h.

Referenced by GlsMenuSet_T< MenuType_t, DataFactory_t >::Show().


The documentation for this class was generated from the following file: