本文整理匯總了C++中Interval::getValue方法的典型用法代碼示例。如果您正苦於以下問題:C++ Interval::getValue方法的具體用法?C++ Interval::getValue怎麽用?C++ Interval::getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Interval
的用法示例。
在下文中一共展示了Interval::getValue方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: IntervalThread
KRecordList *IntervalCPU::calcNext( KRecordList *displayList, bool initCalc )
{
SemanticHighInfo highInfo;
if( displayList == NULL )
displayList = &myDisplayList;
if( !initCalc )
{
*begin = *end;
}
if( intervalCompose.empty() )
return displayList;
if( intervalCompose[ begin->getThread() - firstThreadOnCPU ] == NULL )
{
int i = begin->getThread() - firstThreadOnCPU;
intervalThread[ i ] = new IntervalThread( window, THREAD, begin->getThread() );
intervalThread[ i ]->setNotWindowInits( true );
intervalThread[ i ]->setSemanticFunction( functionThread );
intervalCompose[ i ] = new IntervalCompose( window, COMPOSETHREAD, begin->getThread() );
intervalCompose[ i ]->setNotWindowInits( true );
intervalCompose[ i ]->setCustomChild( intervalThread[ i ] );
intervalCompose[ i ]->setSemanticFunction( functionComposeThread );
intervalCompose[ i ]->init( currentInitialTime, NOCREATE, NULL );
}
Interval *currentThread = intervalCompose[ begin->getThread() - firstThreadOnCPU ];
highInfo.callingInterval = this;
if( begin->getType() == STATE + END )
highInfo.values.push_back( 0.0 );
else
{
while( currentThread->getEndTime() <= begin->getTime() &&
currentThread->getBeginTime() < window->getTrace()->getEndTime() )
currentThread->calcNext( NULL );
if( currentThread->getBegin()->getCPU() != order )
highInfo.values.push_back( 0.0 );
else
highInfo.values.push_back( currentThread->getValue() );
}
currentValue = function->execute( &highInfo );
end = getNextRecord( end, displayList );
return displayList;
}
示例2: getPrevRecord
KRecordList *IntervalCPU::calcPrev( KRecordList *displayList, bool initCalc )
{
SemanticHighInfo highInfo;
if( displayList == NULL )
displayList = &myDisplayList;
if( !initCalc )
{
*end = *begin;
}
if( intervalCompose.empty() )
return displayList;
begin = getPrevRecord( begin, displayList );
highInfo.callingInterval = this;
if( intervalCompose[ begin->getThread() - firstThreadOnCPU ] == NULL )
{
int i = begin->getThread() - firstThreadOnCPU;
intervalThread[ i ] = new IntervalThread( window, THREAD, begin->getThread() );
intervalThread[ i ]->setNotWindowInits( true );
intervalThread[ i ]->setSemanticFunction( functionThread );
intervalCompose[ i ] = new IntervalCompose( window, COMPOSETHREAD, begin->getThread() );
intervalCompose[ i ]->setNotWindowInits( true );
intervalCompose[ i ]->setCustomChild( intervalThread[ i ] );
intervalCompose[ i ]->setSemanticFunction( functionComposeThread );
intervalCompose[ i ]->init( currentInitialTime, NOCREATE, NULL );
}
Interval *currentThread = intervalCompose[ begin->getThread() - firstThreadOnCPU ];
while( currentThread->getBeginTime() >= begin->getTime() &&
currentThread->getEndTime() > 0.0 )
currentThread->calcPrev( NULL );
highInfo.values.push_back( currentThread->getValue() );
currentValue = function->execute( &highInfo );
if( initCalc )
{
*end = *begin;
}
return displayList;
}