GlsMenu  1.5.4
GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t > Class Template Reference

#include <gls_mfd_menu.h>

Inheritance diagram for GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >:
GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t > GlsMenu GlsMenuDataGroup GlsMenuData

Public Types

typedef GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_tBaseClass
 
typedef GlsMenuDataGroup_T< Submenu_t > SubmenuGroup_t
 
typedef std::vector< Submenu_t * > SubmenuCont_t
 
typedef MenuItem_t Item_t
 
typedef GlsMFD::MenuItemId_t ItemId_t
 
typedef GlsMenuHandlerGroup_T< MenuItem_t > ItemGroup_t
 

Public Member Functions

 GlsMFDMenu_T (const std::string &name, GlsMenuDictionary &dataDict, GlsMenuAction::HandlerCont_t &actionHandlers)
 
virtual ~GlsMFDMenu_T ()
 
PageId_t Page () const
 
virtual std::istream & ReadValue (std::istream &instr)
 
const SubmenuCont_tSubmenus () const
 
ItemGroup_tItems () const
 
MenuItem_t * Item (const ItemId_t &itemId) const
 
void SelectItem (const ItemId_t &itemId)
 
virtual void Hide ()
 
virtual void Show ()
 
const GlsMenuDictionaryAttributes () const
 
virtual std::ostream & WriteValue (std::ostream &outstr)
 
virtual void Inc (long amount=1)
 

Protected Attributes

PageId_t _page
 
SubmenuCont_t _submenus
 
GlsMenuDictionary _attr
 The dictionary of attributes for the group attribute. More...
 

Detailed Description

template<class MenuItem_t, class Submenu_t, class PageId_t>
class GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >

The GlsMFDMenu class provides support for a single aircraft MFD menu. It provides everything from the GlsMenu class plus adds support for MFD pages being associated with MFD menus, grouping of menu items into submenus, and uses the GlsMFD menu item id type.

Definition at line 159 of file gls_mfd_menu.h.

Member Typedef Documentation

template<class MenuItem_t , class Submenu_t , class PageId_t >
typedef GlsMenu_T<MenuItem_t, GlsMFD::MenuItemId_t> GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::BaseClass

Definition at line 162 of file gls_mfd_menu.h.

typedef MenuItem_t GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::Item_t
inherited

Definition at line 129 of file gls_menu.h.

typedef GlsMenuHandlerGroup_T<MenuItem_t> GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::ItemGroup_t
inherited

Definition at line 131 of file gls_menu.h.

typedef GlsMFD::MenuItemId_t GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::ItemId_t
inherited

Definition at line 130 of file gls_menu.h.

template<class MenuItem_t , class Submenu_t , class PageId_t >
typedef std::vector<Submenu_t*> GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::SubmenuCont_t

Definition at line 164 of file gls_mfd_menu.h.

template<class MenuItem_t , class Submenu_t , class PageId_t >
typedef GlsMenuDataGroup_T<Submenu_t> GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::SubmenuGroup_t

Definition at line 163 of file gls_mfd_menu.h.

Constructor & Destructor Documentation

template<class MenuItem_t , class Submenu_t , class PageId_t >
GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::GlsMFDMenu_T ( const std::string &  name,
GlsMenuDictionary dataDict,
GlsMenuAction::HandlerCont_t actionHandlers 
)
inline

Class constructor.

Definition at line 171 of file gls_mfd_menu.h.

References GlsMenuDataGroup::_attr, and GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_page.

template<class MenuItem_t , class Submenu_t , class PageId_t >
virtual GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::~GlsMFDMenu_T ( )
inlinevirtual

Class destructor.

Definition at line 189 of file gls_mfd_menu.h.

Member Function Documentation

const GlsMenuDictionary& GlsMenuDataGroup::Attributes ( ) const
inlineinherited

Read attribute dictionary from an input stream.

Parameters
instrinput stream to read value from.

Definition at line 78 of file gls_menu_data_group.h.

References GlsMenuDataGroup::_attr.

Referenced by GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::ReadValue().

virtual void GlsMenu::Hide ( )
virtualinherited

Hide the menu. Perform necessary logic for when a menu is newly hidden for the first time after being shown. This should not be called on a cyclical basis, but when a "hide menu" event occurs.

virtual void GlsMenuData::Inc ( long  amount = 1)
virtualinherited

Increment the data item. Derived classes must override this as the default is a no-op.

Reimplemented in GlsMenuDiscrete_T< T >.

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

MenuItem_t* GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::Item ( const ItemId_t itemId) const
inlineinherited

Gain access to the specified menu item.

Parameters
itemIdid of the menu item.
Returns
a pointer to the specified menu item or 0 if the menu item does not exist within this menu.

Definition at line 179 of file gls_menu.h.

References GlsMenu_T< MenuItem_t, MenuItemId_t >::_menuItems, and GlsMenuHandlerGroup_T< T >::Item().

ItemGroup_t* GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::Items ( ) const
inlineinherited

Gain access to a container of all the menu items in the menu.

Returns
a container of all the menu items in the menu.

Definition at line 164 of file gls_menu.h.

References GlsMenu_T< MenuItem_t, MenuItemId_t >::_menuItems.

template<class MenuItem_t , class Submenu_t , class PageId_t >
PageId_t GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::Page ( ) const
inline

Return whic&>*, std::less<std::string>, std::allocator<std::pair<const std::string, GlsFuncth page is currently displayed.

Definition at line 196 of file gls_mfd_menu.h.

References GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_page.

template<class MenuItem_t , class Submenu_t , class PageId_t >
virtual std::istream& GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::ReadValue ( std::istream &  instr)
inlinevirtual

Reads the menu meta data attributes from a stream.

Reimplemented from GlsMenuDataGroup.

Definition at line 206 of file gls_mfd_menu.h.

References GlsMenuDataGroup::_attr, GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_submenus, GlsMenuDataGroup::Attributes(), and GlsMenuDataGroup::ReadValue().

void GlsMenu_T< MenuItem_t, GlsMFD::MenuItemId_t >::SelectItem ( const ItemId_t itemId)
inlineinherited

Handle selection of one of the menu items.

Parameters
itemIdid of the menu item.

Definition at line 195 of file gls_menu.h.

References GlsMenu_T< MenuItem_t, MenuItemId_t >::_menuItems, and GlsMenuHandlerGroup_T< T >::Item().

virtual void GlsMenu::Show ( )
virtualinherited

Show the menu. Perform necessary logic for when a menu is newly shown for the first time or after being hidden. This should not be called on a cyclical basis, but when a "show menu" event occurs.

template<class MenuItem_t , class Submenu_t , class PageId_t >
const SubmenuCont_t& GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::Submenus ( ) const
inline

Gain access to a container of all the submenus in the menu.

Returns
a container of all the menu items in the menu.

Definition at line 239 of file gls_mfd_menu.h.

References GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_submenus.

virtual std::ostream& GlsMenuDataGroup::WriteValue ( std::ostream &  outstr)
virtualinherited

Read attribute dictionary from an input stream.

Parameters
instrinput stream to read value from.

Field Documentation

template<class MenuItem_t , class Submenu_t , class PageId_t >
PageId_t GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_page
protected
template<class MenuItem_t , class Submenu_t , class PageId_t >
SubmenuCont_t GlsMFDMenu_T< MenuItem_t, Submenu_t, PageId_t >::_submenus
protected

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