ResInsight/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapViewCollection.cpp
Magne Sjaastad 0c90f67dcc
Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle
Return objects instead of passing in structures as parameters

* Add nodiscard to several functions
* Remove redundant this->
* Rename to ptrReferencedObjectsByType
2023-05-12 21:41:34 +02:00

41 lines
1.7 KiB
C++

#include "RimGeoMechContourMapViewCollection.h"
#include "RimCase.h"
#include "RimGeoMechContourMapView.h"
CAF_PDM_SOURCE_INIT( RimGeoMechContourMapViewCollection, "GeoMech2dViewCollection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGeoMechContourMapViewCollection::RimGeoMechContourMapViewCollection()
{
CAF_PDM_InitObject( "GeoMech Contour Maps", ":/2DMaps16x16.png" );
CAF_PDM_InitFieldNoDefault( &m_contourMapViews, "GeoMechViews", "Contour Maps", ":/CrossSection16x16.png" );
m_contourMapViews.uiCapability()->setUiTreeHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGeoMechContourMapViewCollection::~RimGeoMechContourMapViewCollection()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimGeoMechContourMapView*> RimGeoMechContourMapViewCollection::views()
{
return m_contourMapViews.childrenByType();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechContourMapViewCollection::push_back( RimGeoMechContourMapView* contourMap )
{
m_contourMapViews.push_back( contourMap );
}