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


C++ ConfigurationFileSection::storeString方法代码示例

本文整理汇总了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);
	}
开发者ID:jrevote,项目名称:3DA-3DVisualizer,代码行数:16,代码来源:VectorEvaluationLocator.cpp

示例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);
    }
}
开发者ID:jaccen,项目名称:3DVisualizer,代码行数:17,代码来源:ExtractorLocator.cpp

示例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);
		}
	}
开发者ID:KeckCAVES,项目名称:Vrui,代码行数:38,代码来源:VideoDevice.cpp

示例4: storeState

void CuttingPlaneLocator::storeState(Misc::ConfigurationFileSection& configFileSection) const
	{
	/* Write the algorithm name: */
	configFileSection.storeString("./algorithm","Cutting Plane");
	}
开发者ID:jrevote,项目名称:3DA-3DVisualizer,代码行数:5,代码来源:CuttingPlaneLocator.cpp


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