本文整理汇总了C++中Host::PushEvalStep方法的典型用法代码示例。如果您正苦于以下问题:C++ Host::PushEvalStep方法的具体用法?C++ Host::PushEvalStep怎么用?C++ Host::PushEvalStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Host
的用法示例。
在下文中一共展示了Host::PushEvalStep方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
csp::WorkResult::Enum csp::Process::Evaluate( Host& host, int numArgs )
{
if( LuaThread().Status() != lua::Return::YIELD && LuaThread().Status() != lua::Return::OK )
return WorkResult::FINISH;
if( m_operation )
{
WorkResult::Enum result = m_operation->IsFinished()
? WorkResult::FINISH
: m_operation->Evaluate( host );
if( result == WorkResult::FINISH )
{
lua::LuaStack luaStack = m_luaThread.GetStack();
numArgs = m_operation->PushResults( luaStack );
DeleteOperation( host );
}
else
return WorkResult::YIELD;
}
WorkResult::Enum result = Resume( numArgs );
if ( result == WorkResult::YIELD && m_operation )
host.PushEvalStep( *this );
else if ( result == WorkResult::FINISH && m_parentProcess )
{
if( host.GetTopProcess() != m_parentProcess )
host.PushEvalStep( *m_parentProcess );
}
return result;
}
示例2: ThisProcess
void csp::OpAlt::SelectTimeProcessToTrigger( Host& host )
{
CORE_ASSERT( m_pCaseTriggered == NULL );
CspTime_t time = host.Time();
for( int i = 0; i < m_numCases; ++i )
{
AltCase& altCase = m_cases[ i ];
if( m_pNilCase == &altCase )
continue;
if( altCase.m_pChannel == NULL && altCase.m_time <= time )
{
if( m_pCaseTriggered )
{
if( altCase.m_time < m_pCaseTriggered->m_time )
m_pCaseTriggered = &altCase;
}
else
m_pCaseTriggered = &altCase;
}
}
if( m_pCaseTriggered )
{
m_argumentsMoved = true;
DetachChannels();
host.PushEvalStep( ThisProcess() );
}
}
示例3:
void csp::Process::Work( Host& host, CspTime_t dt )
{
if( m_operation == NULL )
return;
WorkResult::Enum result = m_operation->Work( host, dt );
if( result == WorkResult::FINISH )
{
m_operation->SetFinished( true );
CORE_ASSERT( m_luaThread.Status() == lua::Return::YIELD );
host.PushEvalStep( *this );
}
}