本文整理汇总了C++中Transition::full_fire方法的典型用法代码示例。如果您正苦于以下问题:C++ Transition::full_fire方法的具体用法?C++ Transition::full_fire怎么用?C++ Transition::full_fire使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transition
的用法示例。
在下文中一共展示了Transition::full_fire方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run_scheduler
void Thread::run_scheduler()
{
process_messages();
bool in_idle = false;
while(!process->quit_flag) {
process_messages();
Net *n = process->get_net();
if (n == NULL) {
continue;
}
Transition *tr = n->pick_active_transition();
if (tr == NULL) {
if (!in_idle && tracelog) {
tracelog->event_idle();
}
in_idle = true;
continue;
}
in_idle = false;
CA_DLOG("Transition tried id=%i process=%i thread=%i\n",
tr->id, get_process_id(), id);
int res = tr->full_fire(this, n);
if (res == NOT_ENABLED) {
CA_DLOG("Transition is not enabled id=%i process=%i thread=%i\n",
tr->id, get_process_id(), id);
tr->set_active(false);
}
}
}
示例2: run_one_step
void Thread::run_one_step()
{
process_messages();
Net *net = process->get_net();
if (net == NULL) {
return;
}
Transition *tr = net->pick_active_transition();
if (tr == NULL) {
return;
}
tr->set_active(false);
tr->full_fire(this, net);
}