polsih bracket

This commit is contained in:
2023-10-05 11:46:23 +02:00
parent 6bfe6ee059
commit 25f77289d7
3 changed files with 18 additions and 35 deletions

View File

@ -10,26 +10,21 @@
*/
StateMachine01::StateMachine01(int repeatInterval, string text)
: repeatInterval_(repeatInterval),
text_(text)
{
text_(text) {
currentState_ = STATE_INITIAL;
}
StateMachine01::~StateMachine01()
{
StateMachine01::~StateMachine01() {
}
XFEventStatus StateMachine01::processEvent()
{
XFEventStatus StateMachine01::processEvent() {
eEventStatus eventStatus = XFEventStatus::Unknown;
switch (currentState_)
{
switch (currentState_) {
case STATE_INITIAL:
{
if (getCurrentEvent()->getEventType() == XFEvent::Initial)
{
if (getCurrentEvent()->getEventType() == XFEvent::Initial) {
GEN(XFDefaultTransition());
currentState_ = STATE_SAY_HELLO;

View File

@ -2,31 +2,26 @@
#include "trace/trace.h"
#include "testfactory01.h"
void Factory_initialize()
{
void Factory_initialize() {
TestFactory01::initialize();
}
void Factory_build()
{
void Factory_build() {
TestFactory01::build();
}
StateMachine01 TestFactory01::task01_(1000, "Say Hello");
StateMachine01 TestFactory01::task02_(500, "Echo");
TestFactory01::TestFactory01()
{
TestFactory01::TestFactory01() {
}
// static
void TestFactory01::initialize()
{
void TestFactory01::initialize() {
}
// static
void TestFactory01::build()
{
void TestFactory01::build() {
Trace::out("Starting test1...");
Trace::out("---------------------");