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


C++ IdfExtensibleGroup::getString方法代码示例

本文整理汇总了C++中IdfExtensibleGroup::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ IdfExtensibleGroup::getString方法的具体用法?C++ IdfExtensibleGroup::getString怎么用?C++ IdfExtensibleGroup::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IdfExtensibleGroup的用法示例。


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

示例1: designDay

TEST_F(ModelFixture, ComponentWatcher_InComponent) {
  // create Component. ComponentWatcher should work here too (since Component is Model)
  Model model;
  DesignDay designDay(model);
  EXPECT_EQ(1u,model.numObjects());
  Component designDayComponent = designDay.createComponent();
  EXPECT_EQ(2u,designDayComponent.numObjects());
  ComponentData cd = designDayComponent.componentData();
  UUID versionUUID = cd.versionUUID();
  designDay = designDayComponent.primaryObject().cast<DesignDay>();

  // data changes ok--changes version
  EXPECT_TRUE(designDay.setName("My Design Day"));
  EXPECT_NE(versionUUID,cd.versionUUID());
  versionUUID = cd.versionUUID();

  // trying to assign contents results in refresh of contents
  IdfExtensibleGroup eg = cd.getExtensibleGroup(0);
  ASSERT_FALSE(eg.empty());
  std::string originalValue = eg.getString(0).get();
  EXPECT_FALSE(eg.setString(0,"Material"));
  EXPECT_TRUE(cd.initialized());
  EXPECT_EQ(2u,designDayComponent.numObjects());
  EXPECT_EQ(originalValue,eg.getString(0).get());
}
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:25,代码来源:Component_GTest.cpp

示例2: getExtensibleGroup

boost::optional<std::string> UtilityCost_Computation_Impl::computeStep(unsigned index) const {
  IdfExtensibleGroup eg = getExtensibleGroup(index);
  if (!eg.empty()) {
    return eg.getString(OS_UtilityCost_ComputationExtensibleFields::ComputeStep,true);
  }
  return boost::none;
}
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:7,代码来源:UtilityCost_Computation.cpp

示例3: getExtensibleGroup

boost::optional<std::string> UtilityCost_Charge_Block_Impl::blockCostPerUnitValueOrVariableName(unsigned index) const {
  IdfExtensibleGroup eg = getExtensibleGroup(index);
  if (!eg.empty()) {
    return eg.getString(OS_UtilityCost_Charge_BlockExtensibleFields::BlockCostperUnitValueorVariableName,true);
  }
  return boost::none;
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:7,代码来源:UtilityCost_Charge_Block.cpp

示例4: getExtensibleGroup

 boost::optional<std::string> PeopleDefinition_Impl::getThermalComfortModelType(int i) const {
   OptionalString result;
   if (i < numThermalComfortModelTypes()) {
     IdfExtensibleGroup eg = getExtensibleGroup(i);
     OS_ASSERT(!eg.empty());
     result = eg.getString(OS_People_DefinitionExtensibleFields::ThermalComfortModelType,true);
   }
   return result;
 }
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:9,代码来源:PeopleDefinition.cpp


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