本文整理汇总了C++中readBool函数的典型用法代码示例。如果您正苦于以下问题:C++ readBool函数的具体用法?C++ readBool怎么用?C++ readBool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了readBool函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
}
示例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();
}
}
示例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"));
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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_;
}
示例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();
}
示例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();
}
示例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;
}
示例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_;
}
示例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