本文整理汇总了C++中TimeSamplingPtr::getTimeSamplingType方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSamplingPtr::getTimeSamplingType方法的具体用法?C++ TimeSamplingPtr::getTimeSamplingType怎么用?C++ TimeSamplingPtr::getTimeSamplingType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSamplingPtr
的用法示例。
在下文中一共展示了TimeSamplingPtr::getTimeSamplingType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSimpleProperties
//.........这里部分代码省略.........
break;
case kInt64POD:
std::cout << "long int" << std::endl;
break;
// Half/Float/Double
case kFloat16POD:
std::cout << "half" << std::endl;
break;
case kFloat32POD:
std::cout << "float" << std::endl;
break;
case kFloat64POD:
std::cout << "double" << std::endl;
break;
case kStringPOD:
std::cout << "string" << std::endl;
break;
case kUnknownPOD:
default:
std::cout << " Unknown! (this is bad)" << std::endl;
};
TimeSamplingPtr ts =
GetCompoundPropertyReaderPtr(props)->
getScalarProperty( propNames[jj] )->getTimeSampling();
int numSamples = ts->getNumStoredTimes();
std::cout << " ..and "
<< ts->getTimeSamplingType() << std::endl
<< " ..and " << numSamples << " samples at times: ";
if (numSamples > 0)
{
std::cout << " ( ";
for (int ss=0; ss<numSamples; ss++)
std::cout << ts->getSampleTime(ss) << " ";
std::cout << ")";
}
std::cout << std::endl;
std::cout << " ..and values: ";
if (numSamples > 0)
{
for (int ss=0; ss<numSamples; ss++)
{
ISampleSelector iss( (index_t) ss);
switch (dType.getPod())
{
// Boolean
case kBooleanPOD:
{
IBoolProperty prop( props, propNames[jj] );
printSampleValue( prop, iss );
break;
}
// Char/UChar
case kUint8POD:
{
IUcharProperty prop( props, propNames[jj] );
printSampleValue( prop, iss );