Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The State Machine implemented #92

Merged
merged 4 commits into from Aug 29, 2018

Conversation

AlexanderSuprunenko
Copy link
Contributor

No description provided.

State state(State state) { return m_state = state; }
St status(BaseTaskPtr bt) const { return bt->getLastStatus(); }

void process(BaseTaskPtr bt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need some logging here??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. On one hand the messages would accompany others logging messages. On the other, they would be useful if we forgot to log such others, and they should be of special categorie, which we have no yet, to not overwhelm the log.

@bitkis
Copy link
Contributor

bitkis commented Aug 23, 2018

please make this PR vs. development/v0.0.2

@AlexanderSuprunenko AlexanderSuprunenko changed the base branch from development/v.0.0.1 to development/v.0.0.2 August 23, 2018 01:23

for(auto& r : m_table)
{
if(m_state != std::get<0>(r)) continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid these magic numbers? I mean all these get.
Enum wouldn't be more clear?

};
}

const StateMachine::Guard StateMachine::hasnt(Router::Handler H3::* act)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be just
return !has(act);
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. A lambda is returned. ! for lambda has different meaning.

@AlexanderSuprunenko AlexanderSuprunenko merged commit 850312c into development/v.0.0.2 Aug 29, 2018
@AlexanderSuprunenko AlexanderSuprunenko deleted the feature/state-machine-x branch August 29, 2018 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants