本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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;
}