• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ readBool函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中readBool函数的典型用法代码示例。如果您正苦于以下问题:C++ readBool函数的具体用法?C++ readBool怎么用?C++ readBool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了readBool函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: readBool

IsoMediaFile::CodingConstraints WriterConfig::readCodingConstraints(const Json::Value& ccstValues) const
{
    IsoMediaFile::CodingConstraints ccst;

    ccst.allRefPicsIntra = readBool(ccstValues["all_ref_pics_intra"], true);
    ccst.intraPredUsed = readBool(ccstValues["intra_pred_used"], false);

    return ccst;
}
开发者ID:nokiatech,项目名称:heif,代码行数:9,代码来源:writercfg.cpp


示例2: getBool

bool TEIniFile::getBool(const QString & name, bool & value)
{
  if (SectionListDef[m_sCurSection].find(name)==SectionListDef[m_sCurSection].end())
  {
    value=readBool(name,false);
    return false;
  }
  value=readBool(name,SectionListDef[m_sCurSection][name].toInt()!=0);
  return true;
}
开发者ID:app,项目名称:tradeequip,代码行数:10,代码来源:teinifile.cpp


示例3: wxConfig

void Mega8Config::loadConfig(const wxString &profile)
{
    bool isNew;

    if (_config == NULL) {
        _config = new wxConfig(wxT("Mega8"), wxT("Ready4Next"));
        if (!readBool(wxT("FirstInit"))) {
            resetConfig();
            writeBool(wxT("FirstInit"), true);
            saveConfig(profile);
        }
    }
    _currentProfile = profile;
    isNew = loadKeyboard(profile);
    _LastFolder = readString(wxT("LastFolder"));

    _FullScreen = readBool(wxT("FullScreen"));
    _SpeedAuto = readBool(wxT("SpeedAuto"));
    _DisplayHUD = readBool(wxT("DisplayHUD"));
    _Filtered = readBool(wxT("Filtered"));
    _Sound = readBool(wxT("Sound"));
    _UseSleep = readBool(wxT("UseSleep"));
    _SyncClock = readBool(wxT("SyncClock"));
    _ColorTheme = (Chip8ColorTheme)readLong(wxT("ColorTheme"));
    _InverseColor = readBool(wxT("InverseColor"));
    for (int i = 0; i <= sizeof(Chip8Types); i++) {
        _FrequencyRatio[i] = (long)min((long)max((long)readLong(wxT("FrequencyRatio/") + getMachineTypeStr((Chip8Types) i)), (long)4), (long)9);

    }

    // Save this profile if new
    if (isNew) {
        saveConfig(profile);
    }
}
开发者ID:Ready4Next,项目名称:Mega8,代码行数:35,代码来源:Mega8Config.cpp


示例4: start

bool recalcPhiFunctionObject::start()
{
    UName_=word(dict_.lookup("UName"));
    phiName_=word(dict_.lookup("phiName"));
    pName_=word(dict_.lookup("pName"));
    rhoName_=dict_.lookupOrDefault<word>("rhoName","none");
    writeOldFields_=readBool(dict_.lookup("writeOldFields"));
    writeFields_=readBool(dict_.lookup("writeFields"));

    return updateSimpleFunctionObject::start();
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-swak4Foam-dev,代码行数:11,代码来源:recalcPhiFunctionObject.C


示例5: while

void DocxReader::readRunProperties(Style& style, bool allowstyles)
{
	while (m_xml.readNextStartElement()) {
		QStringRef value = m_xml.attributes().value("w:val");
		if ((m_xml.qualifiedName() == "w:b") || (m_xml.qualifiedName() == "w:bCs")) {
			style.char_format.setFontWeight(readBool(value) ? QFont::Bold : QFont::Normal);
		} else if ((m_xml.qualifiedName() == "w:i") || (m_xml.qualifiedName() == "w:iCs")) {
			style.char_format.setFontItalic(readBool(value));
		} else if (m_xml.qualifiedName() == "w:u") {
			if (value == "single") {
				style.char_format.setFontUnderline(true);
			} else if (value == "none") {
				style.char_format.setFontUnderline(false);
			} else if ((value == "dash")
					|| (value == "dashDotDotHeavy")
					|| (value == "dashDotHeavy")
					|| (value == "dashedHeavy")
					|| (value == "dashLong")
					|| (value == "dashLongHeavy")
					|| (value == "dotDash")
					|| (value == "dotDotDash")
					|| (value == "dotted")
					|| (value == "dottedHeavy")
					|| (value == "double")
					|| (value == "thick")
					|| (value == "wave")
					|| (value == "wavyDouble")
					|| (value == "wavyHeavy")
					|| (value == "words")) {
				style.char_format.setFontUnderline(true);
			}
		} else if (m_xml.qualifiedName() == "w:strike") {
			style.char_format.setFontStrikeOut(readBool(value));
		} else if (m_xml.qualifiedName() == "w:vertAlign") {
			if (value == "superscript") {
				style.char_format.setVerticalAlignment(QTextCharFormat::AlignSuperScript);
			} else if (value == "subscript") {
				style.char_format.setVerticalAlignment(QTextCharFormat::AlignSubScript);
			} else if (value == "baseline") {
				style.char_format.setVerticalAlignment(QTextCharFormat::AlignNormal);
			}
		} else if ((m_xml.qualifiedName() == "w:rStyle") && allowstyles) {
			Style rstyle = m_styles.value(value.toString());
			rstyle.merge(style);
			style = rstyle;
		}

		m_xml.skipCurrentElement();
	}
}
开发者ID:barak,项目名称:focuswriter,代码行数:50,代码来源:docx_reader.cpp


示例6: runTime_

  // Construct from components
  IncompressibleCloud::IncompressibleCloud(
					   const volPointInterpolation& vpi,
					   const volVectorField& U
					   )
    :
    Cloud<HardBallParticle>(U.mesh()),
    runTime_(U.time()),
    time0_(runTime_.value()),
    mesh_(U.mesh()),
    volPointInterpolation_(vpi),
    U_(U),
    smoment_(mesh_.nCells(), vector::zero),
    random(666),
    cloudProperties_
    (
     IOobject
     (
      "cloudProperties",
      U.time().constant(),
      U.db(),
      IOobject::MUST_READ,
      IOobject::NO_WRITE
      )
     ),
    interpolationSchemes_(cloudProperties_.subDict("interpolationSchemes"))
  {
    g_=cloudProperties_.lookup("g");
    HardBallParticle::density=readScalar(cloudProperties_.lookup("density"));
    dragCoefficient_=readScalar(cloudProperties_.lookup("drag"));
    subCycles_=readScalar(cloudProperties_.lookup("subCycles"));
    useSourceMoment=readBool(cloudProperties_.lookup("useMomentumSource"));

    dictionary injection(cloudProperties_.subDict("injection"));
    thres=readScalar(injection.lookup("thres"));
    center=injection.lookup("center");
    r0=readScalar(injection.lookup("r0"));
    vel0=readScalar(injection.lookup("vel0"));
    vel1=injection.lookup("vel1");
    d0=readScalar(injection.lookup("d0"));
    d1=readScalar(injection.lookup("d1"));
    tStart=readScalar(injection.lookup("tStart"));
    tEnd=readScalar(injection.lookup("tEnd"));

    dictionary wall(cloudProperties_.subDict("wall"));
    wallReflect_=readBool(wall.lookup("reflect"));
    if(wallReflect_) {
      wallElasticity_=readScalar(wall.lookup("elasticity"));
    }
  }
开发者ID:martinep,项目名称:foam-extend-svn,代码行数:50,代码来源:IncompressibleCloud.C


示例7: readNulls

void secforced::loadSection(std::stringstream& file)
{
    readNulls(&file, 1);

    int namelength = readInt(&file);
    sName = QString(readString(&file, namelength).c_str());

    bSpeed = true;
    iTime = readInt(&file);
    bOrientation = readBool(&file);
    bArgument = readBool(&file);
    rollFunc->loadFunction(file);
    normForce->loadFunction(file);
    latForce->loadFunction(file);
}
开发者ID:filami,项目名称:openFVD,代码行数:15,代码来源:secforced.cpp


示例8: functionObjectListProxy

dynamicFunctionObjectListProxy::dynamicFunctionObjectListProxy
(
    const word& name,
    const Time& t,
    const dictionary& dict,
    const char *providerNameStr
)
:
    functionObjectListProxy(
        name,
        t,
        dict,
        false
    )
{
    word providerName(providerNameStr);
    if(providerName.size()==0) {
        providerName=word(dict.lookup("dictionaryProvider"));
    }
    provider_=dynamicDictionaryProvider::New(
        providerName,
        dict,
        (*this)
    );

    if(
        readBool(dict.lookup("readDuringConstruction"))
    ) {
        if(writeDebug()) {
            Info << this->name() << " list initialized during construction" << endl;
        }
        read(dict);
    }
}
开发者ID:petebachant,项目名称:openfoam-extend-swak4Foam-dev,代码行数:34,代码来源:dynamicFunctionObjectListProxy.C


示例9: setOrderLines

void setOrderLines(Order *orders, int pos, Product *products, int *pCount) {
    bool val = true;
    do {
        setOrderProductId(orders, pos, products, pCount);
        readBool(&val, O_MSG_ADDMORE_LINES);
    } while(val == true);
}
开发者ID:vsctiago,项目名称:LP_EpR,代码行数:7,代码来源:Order.c


示例10: mapper_

mappedPatchFieldBase<Type>::mappedPatchFieldBase
(
    const mappedPatchBase& mapper,
    const fvPatchField<Type>& patchField,
    const dictionary& dict
)
:
    mapper_(mapper),
    patchField_(patchField),
    fieldName_
    (
        dict.template lookupOrDefault<word>
        (
            "fieldName",
            patchField_.dimensionedInternalField().name()
        )
    ),
    setAverage_(readBool(dict.lookup("setAverage"))),
    average_(pTraits<Type>(dict.lookup("average"))),
    interpolationScheme_(interpolationCell<Type>::typeName)
{
    if (mapper_.mode() == mappedPatchBase::NEARESTCELL)
    {
        dict.lookup("interpolationScheme") >> interpolationScheme_;
    }
开发者ID:spthaolt,项目名称:RapidCFD-dev,代码行数:25,代码来源:mappedPatchFieldBase.C


示例11: fieldTableName_

Foam::
timeVaryingMappedFixedValuePointPatchField<Type>::
timeVaryingMappedFixedValuePointPatchField
(
    const pointPatch& p,
    const DimensionedField<Type, pointMesh>& iF,
    const dictionary& dict
)
:
    fixedValuePointPatchField<Type>(p, iF),
    fieldTableName_(iF.name()),
    setAverage_(readBool(dict.lookup("setAverage"))),
    perturb_(dict.lookupOrDefault("perturb", 1E-5)),
    mapperPtr_(NULL),
    sampleTimes_(0),
    startSampleTime_(-1),
    startSampledValues_(0),
    startAverage_(pTraits<Type>::zero),
    endSampleTime_(-1),
    endSampledValues_(0),
    endAverage_(pTraits<Type>::zero)
{
    dict.readIfPresent("fieldTableName", fieldTableName_);
    updateCoeffs();
}
开发者ID:000861,项目名称:OpenFOAM-2.1.x,代码行数:25,代码来源:timeVaryingMappedFixedValuePointPatchField.C


示例12: nHeaderLine_

Foam::Function1Types::CSV<Type>::CSV
(
    const word& entryName,
    const dictionary& dict
)
:
    TableBase<Type>(entryName, dict),
    nHeaderLine_(readLabel(dict.lookup("nHeaderLine"))),
    refColumn_(readLabel(dict.lookup("refColumn"))),
    componentColumns_(dict.lookup("componentColumns")),
    separator_(dict.lookupOrDefault<string>("separator", string(","))[0]),
    mergeSeparators_(readBool(dict.lookup("mergeSeparators"))),
    fName_(dict.lookup("file"))
{
    if (componentColumns_.size() != pTraits<Type>::nComponents)
    {
        FatalErrorInFunction
            << componentColumns_ << " does not have the expected length of "
            << pTraits<Type>::nComponents << endl
            << exit(FatalError);
    }

    read();

    TableBase<Type>::check();
}
开发者ID:jheylmun,项目名称:OpenFOAM-dev,代码行数:26,代码来源:CSV.C


示例13: readBool

bool workflowControls::restartRequested() const
{
    const dictionary& meshDict =
        mesh_.returnTime().lookupObject<dictionary>("meshDict");

    if
    (
        meshDict.found("workflowControls") &&
        meshDict.isDict("workflowControls")
    )
    {
        const dictionary& workflowControls =
            meshDict.subDict("workflowControls");

        if( workflowControls.found("restartFromLatestStep") )
        {
            const bool restart =
                readBool(workflowControls.lookup("restartFromLatestStep"));

            return restart;
        }
    }

    return false;
}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:25,代码来源:workflowControls.C


示例14: fieldTableName_

timeVaryingMappedFixedValueFvPatchField<Type>::
timeVaryingMappedFixedValueFvPatchField
(
    const fvPatch& p,
    const DimensionedField<Type, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchField<Type>(p, iF),
    fieldTableName_(iF.name()),
    setAverage_(readBool(dict.lookup("setAverage"))),
    referenceCS_(NULL),
    nearestVertex_(0),
    nearestVertexWeight_(0),
    sampleTimes_(0),
    startSampleTime_(-1),
    startSampledValues_(0),
    startAverage_(pTraits<Type>::zero),
    endSampleTime_(-1),
    endSampledValues_(0),
    endAverage_(pTraits<Type>::zero)
{
    if (debug)
    {
        Pout<< "timeVaryingMappedFixedValue : construct from dictionary"
            << endl;
    }

    if (dict.found("fieldTableName"))
    {
        dict.lookup("fieldTableName") >> fieldTableName_;
    }
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:32,代码来源:timeVaryingMappedFixedValueFvPatchField.C


示例15: start

bool panicDumpFunctionObject::start()
{
    simpleFunctionObject::start();

    fieldName_=word(dict_.lookup("fieldName"));
    minimum_=readScalar(dict_.lookup("minimum"));
    maximum_=readScalar(dict_.lookup("maximum"));

    Info << "Checking for field " << fieldName_ << " in range [ " << minimum_
        << " , " << maximum_ << " ] " << endl;

    if(dict_.found("storeAndWritePreviousState")) {
        storeAndWritePreviousState_=readBool(
            dict_.lookup("storeAndWritePreviousState")
        );
        if(storeAndWritePreviousState_) {
            Info << name() << " stores the previous time-steps" << endl;
            lastTimes_.set(
                new TimeCloneList(
                    dict_
                )
            );
        }
    } else {
        WarningIn("panicDumpFunctionObject::start()")
            << "storeAndWritePreviousState not set in" << dict_.name() << endl
                << "Assuming 'false'"
                << endl;

    }

    return true;
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-swak4Foam-dev,代码行数:33,代码来源:panicDumpFunctionObject.C


示例16: fieldTableName_

timeVaryingMappedFixedValueFvPatchField<Type>::
timeVaryingMappedFixedValueFvPatchField
(
    const fvPatch& p,
    const DimensionedField<Type, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchField<Type>(p, iF),
    fieldTableName_(iF.name()),
    setAverage_(readBool(dict.lookup("setAverage"))),
    perturb_(dict.lookupOrDefault("perturb", 1E-5)),
    referenceCS_(NULL),
    nearestVertex_(0),
    nearestVertexWeight_(0),
    sampleTimes_(0),
    startSampleTime_(-1),
    startSampledValues_(0),
    startAverage_(pTraits<Type>::zero),
    endSampleTime_(-1),
    endSampledValues_(0),
    endAverage_(pTraits<Type>::zero)
{
    dict.readIfPresent("fieldTableName", fieldTableName_);

    if (dict.found("value"))
    {
        fvPatchField<Type>::operator==(Field<Type>("value", dict, p.size()));
    }
    else
    {
        updateCoeffs();
    }
}
开发者ID:Mat-moran,项目名称:OpenFOAM-2.0.x,代码行数:34,代码来源:timeVaryingMappedFixedValueFvPatchField.C


示例17: coeffs_

Foam::CSV<Type>::CSV
(
    const word& entryName,
    const dictionary& dict,
    const word& ext
)
:
    DataEntry<Type>(entryName),
    TableBase<Type>(entryName, dict.subDict(type() + ext)),
    coeffs_(dict.subDict(type() + ext)),
    nHeaderLine_(readLabel(coeffs_.lookup("nHeaderLine"))),
    refColumn_(readLabel(coeffs_.lookup("refColumn"))),
    componentColumns_(coeffs_.lookup("componentColumns")),
    separator_(coeffs_.lookupOrDefault<string>("separator", string(","))[0]),
    mergeSeparators_(readBool(coeffs_.lookup("mergeSeparators"))),
    fName_(coeffs_.lookup("fileName"))
{
    if (componentColumns_.size() != pTraits<Type>::nComponents)
    {
        FatalErrorIn("Foam::CSV<Type>::CSV(const word&, Istream&)")
            << componentColumns_ << " does not have the expected length of "
            << pTraits<Type>::nComponents << endl
            << exit(FatalError);
    }

    read();

    TableBase<Type>::check();
}
开发者ID:Al-th,项目名称:OpenFOAM-2.2.x,代码行数:29,代码来源:CSV.C


示例18: toSlave

void Foam::multiSolver::synchronizeParallel() const
{
    if (Pstream::master())
    {
        // Give go signal
        for
        (
            int slave=Pstream::firstSlave();
            slave<=Pstream::lastSlave();
            slave++
        )
        {
            OPstream toSlave(Pstream::blocking, slave);
            toSlave << true;
        }
    }
    else
    {
        // Recieve go signal
        {
            IPstream fromMaster(Pstream::blocking, Pstream::masterNo());
            readBool(fromMaster);
        }
    }
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-foam-extend-3.0,代码行数:25,代码来源:multiSolver.C


示例19: readBool

IsoMediaFile::Property WriterConfig::readProperty(const Json::Value& propertyValues) const
{
    IsoMediaFile::Property newProperty;

    for (const auto& irot : propertyValues["irot"])
    {
        IsoMediaFile::Irot newIrot;
        newIrot.essential = readBool(irot["essential"], true);
        newIrot.angle =  readUint32(irot, "angle");
        newIrot.uniq_bsid = readOptionalUint(irot["uniq_bsid"]);
        newIrot.refs_list = parseRefsList(irot["refs_list"]);
        newIrot.idxs_list = parseIndexList(irot["idxs_list"]);
        newProperty.irots.push_back(newIrot);
    }

    for (const auto& rloc : propertyValues["rloc"])
    {
        IsoMediaFile::Rloc newRloc;
        newRloc.essential = readBool(rloc["essential"], true);
        newRloc.horizontal_offset =  readUint32(rloc, "horizontal_offset");
        newRloc.vertical_offset =  readUint32(rloc, "vertical_offset");
        newRloc.uniq_bsid = readOptionalUint(rloc["uniq_bsid"]);
        newRloc.refs_list = parseRefsList(rloc["refs_list"]);
        newRloc.idxs_list = parseIndexList(rloc["idxs_list"]);
        newProperty.rlocs.push_back(newRloc);
    }

    for (const auto& clap : propertyValues["clap"])
    {
        IsoMediaFile::Clap newClap;
        newClap.essential = readBool(clap["essential"], true);
        newClap.clapWidthN = readUint32(clap, "clapWidthN");
        newClap.clapWidthD = readUint32(clap, "clapWidthD");
        newClap.clapHeightN = readUint32(clap, "clapHeightN");
        newClap.clapHeightD = readUint32( clap, "clapHeightD");
        newClap.horizOffN = readUint32(clap, "horizOffN");
        newClap.horizOffD = readUint32(clap, "horizOffD");
        newClap.vertOffN = readUint32(clap, "vertOffN");
        newClap.vertOffD = readUint32(clap, "vertOffD");
        newClap.uniq_bsid = readOptionalUint(clap["uniq_bsid"]);
        newClap.refs_list = parseRefsList(clap["refs_list"]);
        newClap.idxs_list = parseIndexList(clap["idxs_list"]);
        newProperty.claps.push_back(newClap);
    }

    return newProperty;
}
开发者ID:pstanczyk,项目名称:heif,代码行数:47,代码来源:writercfg.cpp


示例20: fieldTableName_

Foam::timeVaryingMappedFixedValueFvPatchField<Type>::
timeVaryingMappedFixedValueFvPatchField
(
    const fvPatch& p,
    const DimensionedField<Type, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchField<Type>(p, iF),
    fieldTableName_(iF.name()),
    setAverage_(readBool(dict.lookup("setAverage"))),
    perturb_(dict.lookupOrDefault("perturb", 1e-5)),
    mapMethod_
    (
        dict.lookupOrDefault<word>
        (
            "mapMethod",
            "planarInterpolation"
        )
    ),
    mapperPtr_(NULL),
    sampleTimes_(0),
    startSampleTime_(-1),
    startSampledValues_(0),
    startAverage_(Zero),
    endSampleTime_(-1),
    endSampledValues_(0),
    endAverage_(Zero),
    offset_(Function1<Type>::New("offset", dict))
{
    if
    (
        mapMethod_ != "planarInterpolation"
     && mapMethod_ != "nearest"
    )
    {
        FatalIOErrorInFunction
        (
            dict
        )   << "mapMethod should be one of 'planarInterpolation'"
            << ", 'nearest'" << exit(FatalIOError);
    }


    dict.readIfPresent("fieldTableName", fieldTableName_);

    if (dict.found("value"))
    {
        fvPatchField<Type>::operator==(Field<Type>("value", dict, p.size()));
    }
    else
    {
        // Note: we use evaluate() here to trigger updateCoeffs followed
        //       by re-setting of fvatchfield::updated_ flag. This is
        //       so if first use is in the next time step it retriggers
        //       a new update.
        this->evaluate(Pstream::blocking);
    }
}
开发者ID:iYohey,项目名称:OpenFOAM-dev,代码行数:59,代码来源:timeVaryingMappedFixedValueFvPatchField.C



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ readBuffer函数代码示例发布时间:2022-05-30
下一篇:
C++ readArray函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap