Qt4 FSM:是否可以从 QState 获取转换?

发布于 2024-10-08 12:25:51 字数 227 浏览 0 评论 0原文

我缺少 QState API 中的转换列表。 :-(

可以从 QAbstractTransition 获取开始状态和目标状态,我想知道为什么不可能获取从一种状态到另一种状态的转换列表 - 无论如何,状态内部都知道它的转换。

获取转换列表from state 将提供逆向工程 Qt4 FSM 的可能性,例如使用 graphviz

子对象吗?

PS:它们是 QState 对象的

I am missing a list of transitions in QState API. :-(

It is possible to get start-state and target-state from QAbstractTransition, I wonder, why is there no possibility for obtaining the list of transitions leading from one state to another - the state internally knows its transitions anyway.

Obtaining transition list from state would give a possibility for reverse engineering Qt4 FSMs e.g. using graphviz.

P.S.: Are transitions children of QState object? Could they be safely obtained via children list?

Regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

星星的軌跡 2024-10-15 12:25:51

如果可能的话,您可以切换到 Qt 4.7。他们引入了一个 QState::transitions() 方法,http: //doc.troll.no/4.7/qstate.html#transitions

If it is possible for you, you could switch to Qt 4.7. They introduced a QState::transitions() method then, http://doc.troll.no/4.7/qstate.html#transitions

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文