0
我是C++的新手,並試圖理解一些代碼(NS2中的數據包調度)。 在某些時候,數據包經過下面的代碼:在C++中處理程序類的打印名稱
void
Scheduler::dispatch(Event* p, double t)
{
if ((t < clock_) && (p->uid_ != 0)) {
fprintf(stderr, "ns: scheduler going backwards in time from %f to %f.\n", clock_, t);
dumpq();
}
if (p->uid_ != 0) {
clock_ = t;
p->uid_ = -p->uid_; // being dispatched
p->handler_->handle(p); // dispatch
} else {
fprintf(stderr, "Warning: discarding Event without an a valid id\n");
}
}
我的問題:有沒有一種簡單的方法,我發現在這裏的類handler_
是什麼,我應該找handle(p)
?