本文整理汇总了C++中setString函数的典型用法代码示例。如果您正苦于以下问题:C++ setString函数的具体用法?C++ setString怎么用?C++ setString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setString函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setString
void EvaporativeFluidCoolerSingleSpeed_Impl::resetPerformanceInputMethod() {
bool result = setString(OS_EvaporativeFluidCooler_SingleSpeedFields::PerformanceInputMethod, "");
BOOST_ASSERT(result);
}
开发者ID:ORNL-BTRIC,项目名称:OpenStudio,代码行数:4,代码来源:EvaporativeFluidCoolerSingleSpeed.cpp
示例2: addChild
void ShopBuyLayer::initInterface()
{
_widgetLayer = CSLoader::createNode( Ccs_ShopLayer_FilePath );
if ( !_widgetLayer )
{
return;
}
addChild( _widgetLayer );
do
{
//返回
auto ButtonBack = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, "ButtonBack" );
setEventForNode( ButtonBack, Tag_Back );
//金币
auto ButtonGold = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, "ButtonGold" );
setEventForNode( ButtonGold, Tag_LabelGold );
//宝石
auto ButtonGem = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, "ButtonGem" );
setEventForNode( ButtonGem, Tag_LabelGem );
//翅膀
auto ButtonWing = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, "ButtonWing" );
setEventForNode( ButtonWing, Tag_LabelWing );
auto PageViewBuy = (PageView*)GameMainLayer::seekNodeByName(_widgetLayer, "PageViewBuy" );
PageViewBuy->addEventListener( CC_CALLBACK_2(ShopBuyLayer::callFuncViewPage, this) );
for ( int i = 1, j = 1, m = 1, n = 1; i<=CSV_MGR()->GetCsvShopList()->GetAll()->size(); i++ )
{
auto item = NewDataMgr::getInstance()->getShopListWithID(i);
switch ( item->BuyType )
{
case GoodsType_Gold:
{
auto ButtonGoldItem = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ButtonGoldItem%d", j)->getCString() );
if ( ButtonGoldItem )
{
ButtonGoldItem->setTag( i );
ButtonGoldItem->addTouchEventListener(CC_CALLBACK_2(ShopBuyLayer::callFuncBuyGoods, this));
auto ALNumGoldItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALNumGoldItem%d", j)->getCString() );
auto ALGemNumGoldItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALGemNumGoldItem%d", j)->getCString() );
ALNumGoldItem->setString( __String::createWithFormat("%d", item->BuyNumber)->getCString() );
ALGemNumGoldItem->setString( __String::createWithFormat("%d", item->BuyPrice)->getCString() );
j++;
}
}
break;
case GoodsType_Gem:
{
auto ButtonGemItem = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ButtonGemItem%d", m)->getCString() );
if ( ButtonGemItem )
{
ButtonGemItem->setTag( i );
ButtonGemItem->addTouchEventListener(CC_CALLBACK_2(ShopBuyLayer::callFuncBuyGoods, this));
auto ALNumGemItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALNumGemItem%d", m)->getCString() );
auto ALMonNumGoldItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALMonNumGoldItem%d", m)->getCString() );
ALNumGemItem->setString( __String::createWithFormat("%d", item->BuyNumber)->getCString() );
ALMonNumGoldItem->setString( __String::createWithFormat("%d", item->BuyPrice)->getCString() );
m++;
}
}
break;
case GoodsType_Life:
{
auto ButtonLifeItem = (Button*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ButtonLifeItem%d", n)->getCString() );
if ( ButtonLifeItem )
{
ButtonLifeItem->setTag( i );
ButtonLifeItem->addTouchEventListener(CC_CALLBACK_2(ShopBuyLayer::callFuncBuyGoods, this));
auto ALNumLifeItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALNumLifeItem%d", n)->getCString() );
auto ALGemNumLifeItem = (TextAtlas*)GameMainLayer::seekNodeByName(_widgetLayer, __String::createWithFormat("ALGemNumLifeItem%d", n)->getCString() );
ALNumLifeItem->setString( __String::createWithFormat("%d", item->BuyNumber)->getCString() );
ALGemNumLifeItem->setString( __String::createWithFormat("%d", item->BuyPrice)->getCString() );
n++;
}
}
break;
default:
break;
}
}
runAction( CCSequence::create( DelayTime::create(0.1f), CallFunc::create(this, callfunc_selector(ShopBuyLayer::delayOptionLabel) ), nullptr));
//optionLabel( (ButtonTag)getoptionLabel() );
} while (0);
//.........这里部分代码省略.........
开发者ID:Chonger8888,项目名称:project,代码行数:101,代码来源:CommonWidget.cpp
示例3: setString
void UtilityCost_Ratchet_Impl::setTariffName(const std::string& str)
{
setString(OS_UtilityCost_RatchetFields::TariffName,str);
}
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:4,代码来源:UtilityCost_Ratchet.cpp
示例4: setString
void cConfig::setDefaultServerList()
{
setString( "LoginServer", "Shard 1", "Your Shard Name=127.0.0.1,2592" );
flush(); // save.
}
开发者ID:Mutilador,项目名称:Wolfpack,代码行数:5,代码来源:serverconfig.cpp
示例5: setString
void CoilCoolingDXVariableRefrigerantFlow_Impl::autosizeRatedAirFlowRate() {
bool result = setString(OS_Coil_Cooling_DX_VariableRefrigerantFlowFields::RatedAirFlowRate, "autosize");
OS_ASSERT(result);
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:4,代码来源:CoilCoolingDXVariableRefrigerantFlow.cpp
示例6: setString
void SolarCollectorIntegralCollectorStorage_Impl::resetSurface() {
bool result = setString(OS_SolarCollector_IntegralCollectorStorageFields::SurfaceName, "");
OS_ASSERT(result);
}
开发者ID:BIMDataHub,项目名称:OpenStudio-IFC-Importer,代码行数:4,代码来源:SolarCollectorIntegralCollectorStorage.cpp
示例7: setString
void DoubleLabel::setPrecision(int v)
{
_precision = v;
setString(val);
}
开发者ID:faesong,项目名称:oom,代码行数:5,代码来源:doublelabel.cpp
示例8: createRegisterAndNameIdfObject
boost::optional<IdfObject> ForwardTranslator::translateCoilCoolingDXMultiSpeed( CoilCoolingDXMultiSpeed & modelObject )
{
boost::optional<std::string> s;
boost::optional<double> value;
// Name
IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::Coil_Cooling_DX_MultiSpeed, modelObject);
// AvailabilityScheduleName
if( auto schedule = modelObject.availabilitySchedule() ) {
if( auto _schedule = translateAndMapModelObject(schedule.get()) ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::AvailabilityScheduleName,_schedule->name().get());
}
}
// AirInletNodeName
if( auto node = modelObject.inletModelObject() ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::AirInletNodeName,node->name().get());
}
// AirOutletNodeName
if( auto node = modelObject.outletModelObject() ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::AirOutletNodeName,node->name().get());
}
// CondenserAirInletNodeName
// CondenserType
if( (s = modelObject.condenserType()) ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::CondenserType,s.get());
}
// SupplyWaterStorageTankName
// CondensateCollectionWaterStorageTankName
// ApplyPartLoadFractiontoSpeedsGreaterthan1
if( modelObject.applyPartLoadFractiontoSpeedsGreaterthan1() ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::ApplyPartLoadFractiontoSpeedsGreaterthan1,"Yes");
} else {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::ApplyPartLoadFractiontoSpeedsGreaterthan1,"No");
}
// ApplyLatentDegradationtoSpeedsGreaterthan1
if( modelObject.applyLatentDegradationtoSpeedsGreaterthan1() ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1,"Yes");
} else {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1,"No");
}
// CrankcaseHeaterCapacity
if( (value = modelObject.crankcaseHeaterCapacity()) ) {
idfObject.setDouble(Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacity,value.get());
}
// MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation
if( (value = modelObject.maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation()) ) {
idfObject.setDouble(Coil_Cooling_DX_MultiSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation,value.get());
}
// BasinHeaterCapacity
if( (value = modelObject.basinHeaterCapacity()) ) {
idfObject.setDouble(Coil_Cooling_DX_MultiSpeedFields::BasinHeaterCapacity,value.get());
}
// BasinHeaterSetpointTemperature
if( (value = modelObject.basinHeaterSetpointTemperature()) ) {
idfObject.setDouble(Coil_Cooling_DX_MultiSpeedFields::BasinHeaterSetpointTemperature,value.get());
}
// BasinHeaterOperatingScheduleName
if( auto schedule = modelObject.basinHeaterOperatingSchedule() ) {
if( auto _schedule = translateAndMapModelObject(schedule.get()) ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::BasinHeaterOperatingScheduleName,_schedule->name().get());
}
}
// FuelType
if( (s = modelObject.fuelType()) ) {
idfObject.setString(Coil_Cooling_DX_MultiSpeedFields::FuelType,s.get());
}
// NumberofSpeeds
if( auto num = modelObject.stages().size() ) {
idfObject.setInt(Coil_Cooling_DX_MultiSpeedFields::NumberofSpeeds,num);
}
for( auto stage: modelObject.stages() ) {
auto eg = idfObject.pushExtensibleGroup();
// SpeedGrossRatedTotalCoolingCapacity
if( stage.isGrossRatedTotalCoolingCapacityAutosized() ) {
eg.setString(Coil_Cooling_DX_MultiSpeedExtensibleFields::SpeedGrossRatedTotalCoolingCapacity,"AutoSize");
} else if( (value = stage.grossRatedTotalCoolingCapacity()) ) {
eg.setDouble(Coil_Cooling_DX_MultiSpeedExtensibleFields::SpeedGrossRatedTotalCoolingCapacity,value.get());
}
// SpeedGrossRatedSensibleHeatRatio
if( stage.isGrossRatedSensibleHeatRatioAutosized() ) {
//.........这里部分代码省略.........
开发者ID:CheyenneBerlin,项目名称:OpenStudio,代码行数:101,代码来源:ForwardTranslateCoilCoolingDXMultiSpeed.cpp
示例9: setString
TString TString::operator= (TString inp)
{
setString(inp.Str);
return Str;
}
开发者ID:Fruitseller,项目名称:selfmade-string-class,代码行数:5,代码来源:TString.cpp
示例10: setString
void SiteWaterMainsTemperature_Impl::resetMaximumDifferenceInMonthlyAverageOutdoorAirTemperatures() {
bool result = setString(OS_Site_WaterMainsTemperatureFields::MaximumDifferenceInMonthlyAverageOutdoorAirTemperatures, "");
OS_ASSERT(result);
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:4,代码来源:SiteWaterMainsTemperature.cpp
注:本文中的setString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论