当前位置: 首页>>代码示例>>C++>>正文


C++ ReadDouble函数代码示例

本文整理汇总了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;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:32,代码来源:DPO_BasicSequenceFit.cpp

示例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);
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:26,代码来源:genPPOConfigFile.cpp

示例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;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:34,代码来源:PPO_SeriesLegend.cpp

示例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;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:34,代码来源:DPO_CurveInterp.cpp

示例5: ReadVector

   /// reads vector
   Vector3d ReadVector()
   {
      double x = ReadDouble();
      double y = ReadDouble();
      double z = ReadDouble();

      return Vector3d(x,y,z);
   }
开发者ID:zengnotes,项目名称:MultiplayerOnlineGame,代码行数:9,代码来源:ByteStream.hpp

示例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();
 }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:8,代码来源:AppConfigFile.cpp

示例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;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:9,代码来源:PainterPath.cpp

示例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.
}
开发者ID:elfprince13,项目名称:cli-wabbitemu,代码行数:9,代码来源:savestate.cpp

示例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
            }
    }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:14,代码来源:AppConfigFile.cpp

示例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;
}
开发者ID:TRocket,项目名称:gnuCraft,代码行数:14,代码来源:msg_0x0d_playerpositionandlook_tw.cpp

示例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;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:15,代码来源:DPO_ExtractSASteps.cpp

示例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;
}
开发者ID:dulton,项目名称:FNF_Project1,代码行数:33,代码来源:inifile.c

示例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;
}
开发者ID:CptDemocracy,项目名称:The-C-Blues,代码行数:25,代码来源:Source.c

示例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;
}
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:32,代码来源:DPO_PATTRN.cpp

示例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();

            }

    }
开发者ID:jjayne,项目名称:nSIGHTS,代码行数:26,代码来源:AppConfigFile.cpp


注:本文中的ReadDouble函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。