DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
BaseMenuItem Class Reference

Base class for all menu item types, and all menu item types must inherit from this. Every menu item has a name, which is what appears on screen for the user to select. Every menu item also needs an index to assist with selecting specific items. All menu items form a linked list associated with a menu. More...

#include <BaseMenuItem.h>

Inheritance diagram for BaseMenuItem:
Inheritance graph
[legend]
Collaboration diagram for BaseMenuItem:
Collaboration graph
[legend]

Public Member Functions

 BaseMenuItem (const char *name)
 Constructor for each MenuItem object.
 
const char * getName ()
 Get menu item name.
 
void setNext (BaseMenuItem *item)
 Set the next menu item.
 
BaseMenuItemgetNext ()
 Get the next menu item.
 
void setIndex (uint8_t index)
 Set the index of this menu item.
 
uint8_t getIndex ()
 Get the index of this item.
 

Private Attributes

const char * _name
 
uint8_t _index
 
BaseMenuItem_next
 

Detailed Description

Base class for all menu item types, and all menu item types must inherit from this. Every menu item has a name, which is what appears on screen for the user to select. Every menu item also needs an index to assist with selecting specific items. All menu items form a linked list associated with a menu.

Constructor & Destructor Documentation

◆ BaseMenuItem()

BaseMenuItem::BaseMenuItem ( const char *  name)

Constructor for each MenuItem object.

Parameters
namePointer to the text name char array to display in the menu

Member Function Documentation

◆ getIndex()

uint8_t BaseMenuItem::getIndex ( )

Get the index of this item.

Returns
Integer index of this menu item
Here is the caller graph for this function:

◆ getName()

const char * BaseMenuItem::getName ( )

Get menu item name.

Returns
Pointer to the char array containing the item name
Here is the caller graph for this function:

◆ getNext()

BaseMenuItem * BaseMenuItem::getNext ( )

Get the next menu item.

Returns
Pointer to the next menu item
Here is the caller graph for this function:

◆ setIndex()

void BaseMenuItem::setIndex ( uint8_t  index)

Set the index of this menu item.

Parameters
indexInteger index of this menu item
Here is the caller graph for this function:

◆ setNext()

void BaseMenuItem::setNext ( BaseMenuItem item)

Set the next menu item.

Parameters
itemPointer to the next menu item
Here is the caller graph for this function:

Member Data Documentation

◆ _index

uint8_t BaseMenuItem::_index
private

◆ _name

const char* BaseMenuItem::_name
private

◆ _next

BaseMenuItem* BaseMenuItem::_next
private

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