mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Prep for Geomech range: Introduced VizLogic
Refactored to use the new RivVizLogic class, together with the partMgrCache Works.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#include "RivGeoMechPartMgrCache.h"
|
||||
#include "RivGeoMechPartMgr.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivGeoMechPartMgrCache::RivGeoMechPartMgrCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivGeoMechPartMgrCache::~RivGeoMechPartMgrCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivGeoMechPartMgrCache::needsRegeneration(const Key& key)
|
||||
{
|
||||
return m_partMgrs[key].needsRegen;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivGeoMechPartMgrCache::scheduleRegeneration(const Key& key)
|
||||
{
|
||||
m_partMgrs[key].needsRegen = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivGeoMechPartMgrCache::generationFinished(const Key& key)
|
||||
{
|
||||
m_partMgrs[key].needsRegen = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivGeoMechPartMgr* RivGeoMechPartMgrCache::partMgr(const Key& key)
|
||||
{
|
||||
CacheEntry& ce = m_partMgrs[key];
|
||||
if (ce.partMgr.isNull())
|
||||
{
|
||||
ce.partMgr = new RivGeoMechPartMgr;
|
||||
}
|
||||
|
||||
return ce.partMgr.p();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user