本文整理汇总了C++中misc::ConfigurationFileSection::storeString方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigurationFileSection::storeString方法的具体用法?C++ ConfigurationFileSection::storeString怎么用?C++ ConfigurationFileSection::storeString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc::ConfigurationFileSection
的用法示例。
在下文中一共展示了ConfigurationFileSection::storeString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: storeState
void VectorEvaluationLocator::storeState(Misc::ConfigurationFileSection& configFileSection) const
{
Visualization::Abstract::VariableManager* vm=application->variableManager;
/* Write the algorithm type: */
configFileSection.storeString("./algorithm","Evaluate Vectors");
/* Write the vector variable name: */
configFileSection.storeValue<std::string>("./vectorVariableName",vm->getVectorVariableName(vm->getVectorVariable(vectorExtractor)));
/* Write the scalar variable name: */
configFileSection.storeValue<std::string>("./scalarVariableName",vm->getScalarVariableName(vm->getScalarVariable(scalarExtractor)));
/* Write the evaluation dialog's position: */
GLMotif::writeTopLevelPosition(evaluationDialogPopup,configFileSection);
}
示例2: storeState
void ExtractorLocator::storeState(Misc::ConfigurationFileSection& configFileSection) const
{
/* Write the algorithm type: */
configFileSection.storeString("./algorithm",extractor->getName());
/* Write the algorithm's current parameters: */
Visualization::Abstract::ConfigurationFileParametersSink sink(application->variableManager,configFileSection);
Visualization::Abstract::Parameters* parameters=extractor->cloneParameters();
parameters->write(sink);
delete parameters;
if(settingsDialog!=0)
{
/* Write the settings dialog's current position and size: */
GLMotif::writeTopLevelPosition(settingsDialog,configFileSection);
}
}
示例3: saveConfiguration
void VideoDevice::saveConfiguration(Misc::ConfigurationFileSection& cfg) const
{
/* Get the device's current video format: */
VideoDataFormat currentFormat=getVideoFormat();
/* Save the current frame size: */
cfg.storeValueWC("./frameSize",currentFormat.size,Misc::CFixedArrayValueCoder<unsigned int,2>());
/* Save the current frame rate: */
cfg.storeValue("./frameRate",double(currentFormat.frameIntervalDenominator)/double(currentFormat.frameIntervalCounter));
/* Check if the current pixel format is a valid FourCC code: */
char fourCCBuffer[5];
currentFormat.getFourCC(fourCCBuffer);
bool valid=true;
for(int i=0;i<4&&valid;++i)
valid=fourCCBuffer[i]>=32&&fourCCBuffer[i]<127&&fourCCBuffer[i]!='"';
if(valid)
{
/* Save the current pixel format as a FourCC code: */
cfg.storeValue<std::string>("./pixelFormat",fourCCBuffer);
}
else
{
/* Save the current pixel format as a hexadecimal number: */
char hexBuffer[9];
unsigned int pixelFormat=currentFormat.pixelFormat;
for(int i=0;i<8;++i,pixelFormat>>=4)
{
if((pixelFormat&0x0fU)>=10U)
hexBuffer[7-i]=(pixelFormat&0x0fU)+'a';
else
hexBuffer[7-i]=(pixelFormat&0x0fU)+'0';
}
hexBuffer[8]='\0';
cfg.storeString("./pixelFormatHex",hexBuffer);
}
}
示例4: storeState
void CuttingPlaneLocator::storeState(Misc::ConfigurationFileSection& configFileSection) const
{
/* Write the algorithm name: */
configFileSection.storeString("./algorithm","Cutting Plane");
}