SNode.C
|
#include <TowerCalculator.h>
Public Member Functions | |
void * | operator new (std::size_t size)=delete |
TowerCalculator () | |
void | calculate (long startValue) |
![]() | |
EventReceiver (const std::string &name) | |
EventReceiver (EventReceiver &)=delete | |
EventReceiver (EventReceiver &&)=delete | |
EventReceiver & | operator= (EventReceiver &)=delete |
EventReceiver & | operator= (EventReceiver &&)=delete |
virtual void | destruct () |
void | span () |
void | relax () |
const std::string & | getName () const |
Protected Types | |
enum class | State { NEXT , MULTIPLY , DIVIDE } |
Protected Member Functions | |
void | calculate () |
void | onEvent (const utils::Timeval ¤tTime) override |
![]() | |
virtual | ~EventReceiver ()=default |
Protected Attributes | |
long | currentValue |
std::deque< long > | values |
int | multiplicator = 1 |
int | divisor = 2 |
State | state |
Additional Inherited Members | |
![]() | |
static void | atNextTick (const std::function< void(void)> &callBack) |
Definition at line 34 of file TowerCalculator.h.
|
strongprotected |
Enumerator | |
---|---|
NEXT | |
MULTIPLY | |
DIVIDE |
Definition at line 43 of file TowerCalculator.h.
apps::towercalculator::TowerCalculator::TowerCalculator | ( | ) |
Definition at line 31 of file TowerCalculator.cpp.
References currentValue, NEXT, state, and TowerCalculator().
Referenced by TowerCalculator().
|
protected |
Definition at line 43 of file TowerCalculator.cpp.
References currentValue, divisor, multiplicator, MULTIPLY, core::EventReceiver::span(), and state.
Referenced by calculate(), and onEvent().
void apps::towercalculator::TowerCalculator::calculate | ( | long | startValue | ) |
Definition at line 37 of file TowerCalculator.cpp.
References calculate().
Referenced by main().
|
overrideprotectedvirtual |
Implements core::EventReceiver.
Definition at line 58 of file TowerCalculator.cpp.
References calculate(), currentValue, DIVIDE, divisor, multiplicator, MULTIPLY, NEXT, core::EventReceiver::span(), and state.
|
delete |
|
protected |
Definition at line 49 of file TowerCalculator.h.
Referenced by calculate(), onEvent(), and TowerCalculator().
|
protected |
Definition at line 54 of file TowerCalculator.h.
Referenced by calculate(), and onEvent().
|
protected |
Definition at line 53 of file TowerCalculator.h.
Referenced by calculate(), and onEvent().
|
protected |
Definition at line 56 of file TowerCalculator.h.
Referenced by calculate(), onEvent(), and TowerCalculator().
|
protected |
Definition at line 51 of file TowerCalculator.h.