void DefaultConstructionSetsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  switch(iddObjectType.value()){
    case IddObjectType::OS_DefaultConstructionSet:
      openstudio::model::DefaultConstructionSet(this->model());
      break;
    default:
      LOG_FREE_AND_THROW("DefaultConstructionSetsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}
void MaterialsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  model::Model model = this->model();
  boost::optional<model::Material> mat;

  switch(iddObjectType.value()){
    case IddObjectType::OS_Material:
      mat = openstudio::model::StandardOpaqueMaterial(model);
      break;
    case IddObjectType::OS_Material_NoMass:
      mat = openstudio::model::MasslessOpaqueMaterial(model);
      break;
    case IddObjectType::OS_Material_AirGap:
      mat = openstudio::model::AirGap(model);
      break;
    case IddObjectType::OS_Material_AirWall:
      mat = openstudio::model::AirWallMaterial(model);
      break;
    case IddObjectType::OS_Material_InfraredTransparent:
      mat = openstudio::model::InfraredTransparentMaterial(model);
      break;
    case IddObjectType::OS_Material_RoofVegetation:
      mat = openstudio::model::RoofVegetation(model);
      break;
    case IddObjectType::OS_WindowMaterial_SimpleGlazingSystem:
      mat = openstudio::model::SimpleGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_Glazing:
      mat = openstudio::model::StandardGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_Gas:
      mat = openstudio::model::Gas(model);
      break;
    case IddObjectType::OS_WindowMaterial_GasMixture:
      mat = openstudio::model::GasMixture(model);
      break;
    case IddObjectType::OS_WindowMaterial_Blind:
      mat = openstudio::model::Blind(model);
      break;
    case IddObjectType::OS_WindowMaterial_Screen:
      mat = openstudio::model::Screen(model);
      break;
    case IddObjectType::OS_WindowMaterial_Shade:
      mat = openstudio::model::Shade(model);
      break;
    case IddObjectType::OS_WindowMaterial_Glazing_RefractionExtinctionMethod:
      mat = openstudio::model::RefractionExtinctionGlazing(model);
      break;
    case IddObjectType::OS_WindowMaterial_GlazingGroup_Thermochromic:
      mat = openstudio::model::ThermochromicGlazing(model);
      break;
    default:
      LOG_FREE_AND_THROW("MaterialsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}
void ConstructionsController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  switch(iddObjectType.value()){
    case IddObjectType::OS_Construction:
      openstudio::model::Construction(this->model());
      break;
    case IddObjectType::OS_Construction_InternalSource:
      openstudio::model::ConstructionWithInternalSource(this->model());
      break;
    case IddObjectType::OS_Construction_CfactorUndergroundWall:
      openstudio::model::CFactorUndergroundWallConstruction(this->model());
      break;
    case IddObjectType::OS_Construction_FfactorGroundFloor:
      openstudio::model::FFactorGroundFloorConstruction(this->model());
      break;
    case IddObjectType::OS_Construction_WindowDataFile:
      openstudio::model::WindowDataFile(this->model());
      break;
    default:
      LOG_FREE_AND_THROW("ConstructionsController", "Unknown IddObjectType '" << iddObjectType.valueName() << "'");
  }
}
void SpaceTypesController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  OS_ASSERT(IddObjectType::OS_SpaceType == iddObjectType.value());
  openstudio::model::SpaceType(this->model());
}
void ThermalZonesController::onAddObject(const openstudio::IddObjectType& iddObjectType)
{
  OS_ASSERT(IddObjectType::OS_ThermalZone == iddObjectType.value());
  openstudio::model::ThermalZone(this->model());
}