本文整理汇总了C++中openstudio::model::ModelObject::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelObject::remove方法的具体用法?C++ ModelObject::remove怎么用?C++ ModelObject::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类openstudio::model::ModelObject
的用法示例。
在下文中一共展示了ModelObject::remove方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onRemoveObject
void DefaultConstructionSetsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
boost::optional<model::DefaultConstructionSet> dcs = modelObject.optionalCast<model::DefaultConstructionSet>();
if (dcs){
boost::optional<model::DefaultSurfaceConstructions> dsc = dcs->defaultExteriorSurfaceConstructions();
if (dsc && (dsc->directUseCount(true) == 1)){
dsc->remove();
}
dsc = dcs->defaultInteriorSurfaceConstructions();
if (dsc && (dsc->directUseCount(true) == 1)){
dsc->remove();
}
dsc = dcs->defaultGroundContactSurfaceConstructions();
if (dsc && (dsc->directUseCount(true) == 1)){
dsc->remove();
}
boost::optional<model::DefaultSubSurfaceConstructions> dssc = dcs->defaultExteriorSubSurfaceConstructions();
if (dssc && (dssc->directUseCount(true) == 1)){
dssc->remove();
}
dssc = dcs->defaultInteriorSubSurfaceConstructions();
if (dssc && (dssc->directUseCount(true) == 1)){
dssc->remove();
}
}
modelObject.remove();
}
示例2: onRemoveObject
void LoadsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
boost::optional<model::SpaceLoadDefinition> spaceLoadDefinition = modelObject.optionalCast<model::SpaceLoadDefinition>();
if (spaceLoadDefinition){
unsigned numInstances = spaceLoadDefinition->instances().size();
if (numInstances > 0){
QMessageBox msgBox(subTabView());
msgBox.setText("There are " + QString::number(numInstances) + " instances that reference this definition.");
msgBox.setInformativeText("Do you want to remove this definition and all of its instances?");
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
int ret = msgBox.exec();
if (ret == QMessageBox::No){
return;
}
}
modelObject.remove();
}
}
示例3: onRemoveObject
void MaterialsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
modelObject.remove();
}
示例4: onRemoveObject
void SpaceTypesController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
modelObject.remove();
}
示例5: onRemoveObject
void ThermalZonesController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
// DLM: should this check isRemovable?
modelObject.remove();
}
示例6: onRemoveObject
void ScheduleSetsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
modelObject.remove();
}
示例7: onRemoveObject
void ConstructionsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
modelObject.remove();
}
示例8: onRemoveObject
void UtilityBillsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
modelObject.remove();
}