#include "grid_elements.hpp" #include "grid_local_view.hpp" #include "grid_local_connector.hpp" namespace xios { shared_ptr CGridLocalElements::getView(CElementView::type type) { if (views_[type]==nullptr) views_[type] = make_shared(shared_from_this(), type) ; return views_[type] ; } shared_ptr CGridLocalElements::getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask) { auto newPair = pair(srcType,dstType); auto it = connectors_.find(newPair) ; if (it==connectors_.end()) { auto insertPair=pair, shared_ptr>(newPair, make_shared(shared_from_this(), srcType, dstType, withMask)) ; it=connectors_.insert(insertPair).first ; } return it->second ; } }