void RefrigerationSystem_Impl::removeAllTemplate( boost::optional<ModelObjectList>& modelObjectList ) { if( modelObjectList ) { std::vector<ModelObject> modelObjects = modelObjectList->modelObjects(); for(const auto & elem : modelObjects) { boost::optional<T> modelObject = elem.optionalCast<T>(); if (modelObject) { modelObjectList->removeModelObject(elem); } } } }
void RefrigerationSystem_Impl::removeTemplate( const T & modelObject, boost::optional<ModelObjectList>& modelObjectList ) { if( modelObjectList ) { modelObjectList->removeModelObject(modelObject); } }