本文整理汇总了C++中CEvent::NameText方法的典型用法代码示例。如果您正苦于以下问题:C++ CEvent::NameText方法的具体用法?C++ CEvent::NameText怎么用?C++ CEvent::NameText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEvent
的用法示例。
在下文中一共展示了CEvent::NameText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
CDestination::Stack(
CEvent &event,
const CEventTask &task,
CEventStack &stack,
long duration)
{
D_HOOK(("CDestination::Stack(%s, %ld)\n",
event.NameText(), duration));
event.stack.destination = this;
// this does not seem to work, disable for release
// event.stack.start -= (Latency() / 1000);
}
示例2: message
void
CPlaybackTaskGroup::_executeEvent(
CEvent &ev,
TimeState &tState)
{
D_INTERNAL(("CPlaybackTaskGroup::_executeEvent(%s)\n",
ev.NameText()));
switch (ev.Command())
{
case EvtType_TaskMarker:
{
if (ev.task.taskPtr->flags & CPlaybackTask::Task_Finished)
{
delete ev.task.taskPtr;
if (tasks.Empty())
{
BMessage message(Player_ChangeTransportState);
be_app->PostMessage(&message);
}
}
else
{
ev.task.taskPtr->Play();
}
return;
}
case EvtType_Interpolate:
{
// I was originally supposed to have executed at ev.Start() + timeStep,
// but I may be a bit later than that -- take the difference into account.
// Here's how much time has elapsed since I was dispatched...
int32 elapsed = tState.time - ev.Start()
+ ev.interpolate.timeStep;
// If we went past the end, then clip the time.
if ((unsigned long)elapsed > ev.interpolate.duration)
elapsed = ev.interpolate.duration;
CDestination *dest = ev.common.destination;
if (dest != NULL)
{
if (dest->ReadLock(500))
{
dest->Interpolate(ev, tState.stack, system_time(),
elapsed);
dest->ReadUnlock();
}
}
return;
}
}
CDestination *dest = ev.common.destination;
if (dest != NULL)
{
if (dest->ReadLock(500))
{
dest->Execute(ev, system_time());
dest->ReadUnlock();
}
}
}