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


C++ ModelObject::remove方法代码示例

本文整理汇总了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();
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:32,代码来源:DefaultConstructionSetsController.cpp

示例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();
  }
}
开发者ID:ORNL-BTRIC,项目名称:OpenStudio,代码行数:20,代码来源:LoadsController.cpp

示例3: onRemoveObject

void MaterialsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  modelObject.remove();
}
开发者ID:CUEBoxer,项目名称:OpenStudio,代码行数:4,代码来源:MaterialsController.cpp

示例4: onRemoveObject

void SpaceTypesController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  modelObject.remove();
}
开发者ID:CraigCasey,项目名称:OpenStudio,代码行数:4,代码来源:SpaceTypesController.cpp

示例5: onRemoveObject

void ThermalZonesController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  // DLM: should this check isRemovable?
  modelObject.remove();
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:5,代码来源:ThermalZonesController.cpp

示例6: onRemoveObject

void ScheduleSetsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  modelObject.remove();
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:4,代码来源:ScheduleSetsController.cpp

示例7: onRemoveObject

void ConstructionsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  modelObject.remove();
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:4,代码来源:ConstructionsController.cpp

示例8: onRemoveObject

void UtilityBillsController::onRemoveObject(openstudio::model::ModelObject modelObject)
{
  modelObject.remove();
}
开发者ID:Anto-F,项目名称:OpenStudio,代码行数:4,代码来源:UtilityBillsController.cpp


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