本文整理汇总了C++中ReadDouble函数的典型用法代码示例。如果您正苦于以下问题:C++ ReadDouble函数的具体用法?C++ ReadDouble怎么用?C++ ReadDouble使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ReadDouble函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadObjectHeader
bool DPO_BasicSequenceFit::ReadFromFile()
{
ReadObjectHeader();
// base class
ReadFuncObjRef(simResultsObjRef);
fitCalcType = FitCalcType(ReadInt());
fitSigma = ReadDouble();
fitIsNormed = ReadBool();
if (currentObjReadMajorVersion > 0)
{
minCoverage = ReadDouble();
coveragePenalty = ReadDouble();
}
if (currentObjReadMajorVersion > 1)
{
removeFieldDuplicates = ReadBool();
removeSimDuplicates = ReadBool();
duplicateEps = ReadDouble();
}
// derived current
ReadFuncObjRef(xyInputObjRef);
ReadTimeLimits(timeLimits);
ReadInterpPoints(interpPoints);
CheckForInputFailure("Reading DPO_BasicSequenceFit");
return true;
}
示例2: ReadContourSpec
void ReadContourSpec(PSC_ContourSpec& contourSpec)
{
int scalarReadVer = ReadInt();
ReadFuncObjRef(contourSpec.dataObjRef);
ReadFuncObjRef(contourSpec.specMasterObjRef);
contourSpec.specIsMaster = ReadBool();
contourSpec.calcIncVal = ReadBool();
contourSpec.doLogInc = ReadBool();
contourSpec.startVal = ReadDouble();
contourSpec.endVal = ReadDouble();
contourSpec.incVal = ReadDouble();
contourSpec.nIncs = ReadInt();
contourSpec.contourLineSpec.linePen = ReadInt();
contourSpec.contourLineSpec.lineThickness= ReadInt();
contourSpec.contourLineSpec.lineType = PlotLineType(ReadInt());
if (scalarReadVer > 1)
contourSpec.contourLineSpec.mitreLines = ReadBool();
if (scalarReadVer > 0)
contourSpec.overrideMasterLineSpec = ReadBool();
ReadLegendOverride(contourSpec.legendGC);
}
示例3: ReadObjectHeader
bool PPO_SeriesLegend::ReadFromFile()
{
ReadObjectHeader();
PPO_AnnoBase::ReadFromFile();
ReadFuncObjRef(penSetObjRef);
int nRead = 6; // old max
if (currentObjReadMajorVersion > 0)
nRead = ReadInt();
for ( int i = 0; i < nRead; i++)
{
ReadFuncObjRef(legendData[i].seriesObjRef);
legendData[i].doSeries = ReadBool();
}
ulLocation.pX = ReadDouble();
ulLocation.pY = ReadDouble();
seriesSize = ReadDouble();
seriesNpts = ReadInt();
ReadText(legendTitle, PSC_AnnoSpec::legendTitleLen);
frameLegend = ReadBool();
frameThick = ReadInt();
opaqueBackground = ReadBool();
legendPen = ReadInt();
ReadFont(legendFont);
CheckForInputFailure("Reading PPO_SeriesLegend");
return true;
}
示例4: ReadObjectHeader
bool DPO_CurveInterp::ReadFromFile()
{
ReadObjectHeader();
ReadFuncObjRef(curveObjRef);
ReadFuncObjRef(xyInputObjRef);
if ( currentObjReadMajorVersion == 0)
{
bool isXYInput = ReadBool();
bool isLinear = ReadBool();
if (isXYInput)
{
interpData.interpPointsOp = DSC_InterpPoints::ipoAtInput;
}
else if (isLinear)
{
interpData.interpPointsOp = DSC_InterpPoints::ipoLinear;
}
else
{
interpData.interpPointsOp = DSC_InterpPoints::ipoLogRelative;
}
interpData.useDataLimits = ReadBool();
interpData.minUserLimit = ReadDouble();
interpData.maxUserLimit = ReadDouble();
interpData.numInterpPoints = ReadInt();
}
else
ReadInterpPoints(interpData);
CheckForInputFailure("Reading DPO_CurveInterp");
return true;
}
示例5: ReadVector
/// reads vector
Vector3d ReadVector()
{
double x = ReadDouble();
double y = ReadDouble();
double z = ReadDouble();
return Vector3d(x,y,z);
}
示例6: ReadThreshold
void ReadThreshold(DSC_Threshold& threshold)
{
int readVer = ReadInt();
threshold.minThreshold = DSC_Threshold::ThresholdOp(ReadInt());
threshold.maxThreshold = DSC_Threshold::ThresholdOp(ReadInt());
threshold.minVal = ReadDouble();
threshold.maxVal = ReadDouble();
}
示例7: ReadDouble
Pointf Painter::ReadPoint(CParser& p, Pointf current, bool rel)
{
Pointf t;
t.x = ReadDouble(p);
t.y = ReadDouble(p);
if(rel)
t += current;
return t;
}
示例8: LoadTIMER
void LoadTIMER(SAVESTATE_t* save, timerc* time) {
CHUNK_t* chunk = FindChunk(save,TIMER_tag);
chunk->pnt = 0;
time->tstates = ReadLong(chunk);
time->freq = (uint32_t) ReadLong(chunk);
time->elapsed = ReadDouble(chunk);
time->lasttime = ReadDouble(chunk); // this isn't used.
}
示例9: ReadPointArray
void ReadPointArray(SC_PointArray& pointArray)
{
int nPt = ReadInt();
pointArray.Alloc(nPt);
Point2D tmp;
for (int i = 0; i < nPt; i++)
{
tmp.pX = ReadDouble();
tmp.pY = ReadDouble();
pointArray += tmp;
// pointArray += Point2D(ReadDouble(), ReadDouble()); // MS bug -- reads Y first
}
}
示例10: _pm_checkPacketId
size_t PlayerPositionAndLook::deserialize(const Buffer& _src, size_t _offset)
{
_offset = _pm_checkPacketId(_src, _offset);
_offset = ReadDouble(_src, _offset, _pf_x);
_offset = ReadDouble(_src, _offset, _pf_stance);
_offset = ReadDouble(_src, _offset, _pf_y);
_offset = ReadDouble(_src, _offset, _pf_z);
_offset = ReadFloat(_src, _offset, _pf_yaw);
_offset = ReadFloat(_src, _offset, _pf_pitch);
_offset = ReadBool(_src, _offset, _pf_onGround);
_pf_initialized = true;
return _offset;
}
示例11: ReadObjectHeader
bool DPO_ExtractSASteps::ReadFromFile()
{
ReadObjectHeader();
ReadFuncObjRef(inputTableObjRef);
extractByIndexes = ReadBool();
minIndex = ReadInt();
maxIndex = ReadInt();
indexIncrement = ReadInt();
minValue = ReadDouble();
maxValue = ReadDouble();
CheckForInputFailure("Reading DPO_ExtractSASteps");
return true;
}
示例12: main
int main (void)
{
printf ("Hello World\n");
OpenIniFile ("Test.Ini");
#ifdef INIFILE_TEST_READ_AND_WRITE
WriteString ("Test", "Name", "Value");
WriteString ("Test", "Name", "OverWrittenValue");
WriteString ("Test", "Port", "COM1");
WriteString ("Test", "User", "James Brown jr.");
WriteString ("Configuration", "eDriver", "MBM2.VXD");
WriteString ("Configuration", "Wrap", "LPT.VXD");
WriteInt ("IO-Port", "Com", 2);
WriteBool ("IO-Port", "IsValid", 0);
WriteDouble ("TheMoney", "TheMoney", 67892.00241);
WriteInt ("Test" , "ToDelete", 1234);
WriteIniFile ("Test.Ini");
printf ("Key ToDelete created. Check ini file. Any key to continue");
while (!kbhit());
OpenIniFile ("Test.Ini");
DeleteKey ("Test" , "ToDelete");
WriteIniFile ("Test.Ini");
#endif
printf ("[Test] Name = %s\n", ReadString ("Test", "Name", "NotFound"));
printf ("[Test] Port = %s\n", ReadString ("Test", "Port", "NotFound"));
printf ("[Test] User = %s\n", ReadString ("Test", "User", "NotFound"));
printf ("[Configuration] eDriver = %s\n", ReadString ("Configuration", "eDriver", "NotFound"));
printf ("[Configuration] Wrap = %s\n", ReadString ("Configuration", "Wrap", "NotFound"));
printf ("[IO-Port] Com = %d\n", ReadInt ("IO-Port", "Com", 0));
printf ("[IO-Port] IsValid = %d\n", ReadBool ("IO-Port", "IsValid", 0));
printf ("[TheMoney] TheMoney = %1.10lf\n", ReadDouble ("TheMoney", "TheMoney", 111));
CloseIniFile ();
return 0;
}
示例13: main
int main(void)
{
// initialize to zeros
struct Product prod = { 0 };
printf("Enter item number: ");
ReadInt(&prod.id, &OnInvalidInputHandler);
printf("Enter unit price: ");
ReadDouble(&prod.price, &OnInvalidInputHandler);
printf("Enter purchase date (mm/dd/yyyy): ");
ReadDate(&prod.purchaseDate, &OnInvalidInputHandler);
printf("%s\t%s\t%s\n", "Item", "Unit Price", "Purchase Date");
printf("%d\t$%.2Lf\t\t%02d/%02d/%d\n",
prod.id,
prod.price,
prod.purchaseDate.tm_mon,
prod.purchaseDate.tm_mday,
prod.purchaseDate.tm_year);
getchar();
return EXIT_SUCCESS;
}
示例14: ReadObjectHeader
bool DPO_PATTRN::ReadFromFile()
{
ReadObjectHeader();
ReadFuncObjRef(indepVarObjRef);
ReadFuncObjRef(depVarObjRef);
ReadText(title, titleLen);
ReadText(obsStr, inpStrLen);
ReadText(mcRepStr, inpStrLen);
nreplicates = ReadInt();
randSeed = ReadInt();
nxintInp = ReadInt();
nyintInp = ReadInt();
nrandomPatterns = ReadInt();
logarithms = ReadBool();
alphaCutoff = ReadDouble();
mtest1 = ReadInt();
ReadRealFormat(coeffFormat);
verbose = ReadBool();
verboseMC = ReadBool();
verboseCV = ReadBool();
coefficients = ReadBool();
rankCoefficients = ReadBool();
for (int i = ptCC; i < ptLastTest; i++)
tests[i] = ReadBool();
CheckForInputFailure("Reading DPO_PATTRN");
return true;
}
示例15: ReadFont
void ReadFont(PSC_Font& font)
{
int readVer = ReadInt();
font.fontFamily = PSC_Font::FontFamily(ReadInt());
font.slantRegular = ReadBool();
font.weightMedium = ReadBool();
font.fontSize = double(ReadInt());
if (readVer > 0)
{
if (readVer < 3)
{
int strokeFontWeight = ReadInt();
font.weightMedium = (strokeFontWeight < 2);
}
if (readVer > 1)
font.fontRotation = PSC_Font::FontRotation(ReadInt());
if (readVer > 2)
font.fontThickness = ReadDouble();
}
}