#include "ActionsStack.hpp"
Public Member Functions | |
ActionsStack (int inSize) | |
unsigned char | Add (unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent, int inData = 0) |
Action * | operator[] (unsigned char idx) |
void | Clear () |
void | Delete (int inIndex) |
Action * | GetActionToExecute () |
int | GetNumber () const |
Static Public Attributes | |
static ActionsStack | Actions |
static bool | FillingStack |
This class is a small list of available actions. When the stack reach the size, new actions are lost...
Definition at line 31 of file ActionsStack.hpp.
ActionsStack::ActionsStack | ( | int | inSize | ) |
Default constructor.
Definition at line 19 of file ActionsStack.cpp.
unsigned char ActionsStack::Add | ( | unsigned long | inId, |
ACCESSORIES_EVENT_TYPE | inEvent, | ||
int | inData = 0 |
||
) |
Add a new action.
inId | Id of the accessory |
inEvent | Event type |
inData | Associated data for this event. Default is 0. |
Definition at line 31 of file ActionsStack.cpp.
void ActionsStack::Clear | ( | ) |
Clears the complete stack.
Definition at line 71 of file ActionsStack.cpp.
void ActionsStack::Delete | ( | int | inIndex | ) |
Remove the given index of the stack.
inIndex | index to clear. |
Definition at line 61 of file ActionsStack.cpp.
Action * ActionsStack::GetActionToExecute | ( | ) |
Get an action to execute.
Definition at line 45 of file ActionsStack.cpp.
int ActionsStack::GetNumber | ( | ) | const |
Get the number of available actions to execute.
Definition at line 78 of file ActionsStack.cpp.
Action * ActionsStack::operator[] | ( | unsigned char | idx | ) |
Array operator.
idx | index of the action to get. |
Definition at line 91 of file ActionsStack.cpp.
|
static |
Static list of actions.
Definition at line 69 of file ActionsStack.hpp.
|
static |
If this flag is false, the event are not added t the list.
Definition at line 71 of file ActionsStack.hpp.