Accessories
Arduino for motors and lights library.
ActionsStack.hpp
1 //-------------------------------------------------------------------
2 #ifndef __actionsStack_H__
3 #define __actionsStack_H__
4 //-------------------------------------------------------------------
5 
6 #include "Accessories.h"
7 
11 class Action
12 {
13  public:
15  unsigned long Id;
17  ACCESSORIES_EVENT_TYPE Event;
19  int Data;
20 
26  Action(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent, int inData = 0);
27 };
28 
32 {
33  private:
34  unsigned char size;
35  Action* *pList;
36 
37  public:
39  ActionsStack(int inSize);
40 
48  unsigned char Add(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent, int inData = 0);
52  inline Action *operator[](unsigned char index) { return this->pList[index]; }
54  void Clear();
58  void Delete(int inIndex);
62  unsigned char GetActionToExecute();
66  int GetNumber() const;
67 
71  static bool FillingStack;
72 };
73 
74 #endif
static bool FillingStack
int GetNumber() const
unsigned char GetActionToExecute()
static ActionsStack Actions
void Delete(int inIndex)
Action * operator[](unsigned char index)
unsigned char Add(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent, int inData = 0)
ActionsStack(int inSize)
Action(unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent, int inData = 0)
Definition: ActionsStack.cpp:9
ACCESSORIES_EVENT_TYPE Event
unsigned long Id