本文整理汇总了C++中ConvertPtr::fromUByte方法的典型用法代码示例。如果您正苦于以下问题:C++ ConvertPtr::fromUByte方法的具体用法?C++ ConvertPtr::fromUByte怎么用?C++ ConvertPtr::fromUByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConvertPtr
的用法示例。
在下文中一共展示了ConvertPtr::fromUByte方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testConvertScalar
//.........这里部分代码省略.........
builder.clear(); pvShortPtr->toString(&builder);
if(debug) fprintf(fd,"short %s\n",builder.c_str());
convert->fromLong(pvUShortPtr, lval);
builder.clear(); pvUShortPtr->toString(&builder);
if(debug) fprintf(fd,"ushort %s\n",builder.c_str());
convert->fromLong(pvIntPtr, lval);
builder.clear(); pvIntPtr->toString(&builder);
if(debug) fprintf(fd,"int %s\n",builder.c_str());
convert->fromLong(pvUIntPtr, lval);
builder.clear(); pvUIntPtr->toString(&builder);
if(debug) fprintf(fd,"uint %s\n",builder.c_str());
convert->fromLong(pvLongPtr, lval);
builder.clear(); pvLongPtr->toString(&builder);
if(debug) fprintf(fd,"long %s\n",builder.c_str());
convert->fromLong(pvULongPtr, lval);
builder.clear(); pvULongPtr->toString(&builder);
if(debug) fprintf(fd,"ulong %s\n",builder.c_str());
convert->fromLong(pvFloatPtr, lval);
builder.clear(); pvFloatPtr->toString(&builder);
if(debug) fprintf(fd,"float %s\n",builder.c_str());
convert->fromLong(pvDoublePtr, lval);
builder.clear(); pvDoublePtr->toString(&builder);
if(debug) fprintf(fd,"double %s\n",builder.c_str());
convert->copyScalar(pvULongPtr, pvFloatPtr);
builder.clear(); pvFloatPtr->toString(&builder);
if(debug) fprintf(fd,"float from unsigned %s\n",builder.c_str());
convert->copyScalar(pvULongPtr, pvDoublePtr);
builder.clear(); pvDoublePtr->toString(&builder);
if(debug) fprintf(fd,"double from unsigned %s\n",builder.c_str());
lval++;
}
fprintf(fd,"fromLong PASSED\n");
if(debug) fprintf(fd,"\nfromUByte\n");
uint8 ubval = 127;
for(int i=0; i<3; i++) {
convert->fromUByte(pvBytePtr, ubval);
builder.clear(); pvBytePtr->toString(&builder);
if(debug) fprintf(fd,"byte %s\n",builder.c_str());
convert->fromUByte(pvUBytePtr, ubval);
builder.clear(); pvUBytePtr->toString(&builder);
if(debug) fprintf(fd,"ubyte %s\n",builder.c_str());
convert->fromUByte(pvShortPtr, ubval);
builder.clear(); pvShortPtr->toString(&builder);
if(debug) fprintf(fd,"short %s\n",builder.c_str());
convert->fromUByte(pvUShortPtr, ubval);
builder.clear(); pvUShortPtr->toString(&builder);
if(debug) fprintf(fd,"ushort %s\n",builder.c_str());
convert->fromUByte(pvIntPtr, ubval);
builder.clear(); pvIntPtr->toString(&builder);
if(debug) fprintf(fd,"int %s\n",builder.c_str());
convert->fromUByte(pvUIntPtr, ubval);
builder.clear(); pvUIntPtr->toString(&builder);
if(debug) fprintf(fd,"uint %s\n",builder.c_str());
convert->fromUByte(pvLongPtr, ubval);
builder.clear(); pvLongPtr->toString(&builder);
if(debug) fprintf(fd,"long %s\n",builder.c_str());
convert->fromUByte(pvULongPtr, ubval);
builder.clear(); pvULongPtr->toString(&builder);
if(debug) fprintf(fd,"ulong %s\n",builder.c_str());
convert->fromUByte(pvFloatPtr, ubval);
builder.clear(); pvFloatPtr->toString(&builder);
if(debug) fprintf(fd,"float %s\n",builder.c_str());
convert->fromUByte(pvDoublePtr, ubval);
builder.clear(); pvDoublePtr->toString(&builder);
if(debug) fprintf(fd,"double %s\n",builder.c_str());