Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
mitk::LocalStorageHandler< L > Class Template Reference

Templated class for management of LocalStorage implementations in Mappers. More...

#include <mitkLocalStorageHandler.h>

Inheritance diagram for mitk::LocalStorageHandler< L >:
Collaboration diagram for mitk::LocalStorageHandler< L >:

Public Member Functions

void ClearLocalStorage (mitk::BaseRenderer *renderer, bool unregisterFromBaseRenderer=true) override
 deallocates a local storage for a specifc BaseRenderer (if the BaseRenderer is itself deallocating it in its destructor, it has to set unregisterFromBaseRenderer=false) More...
 
std::vector< mitk::BaseRenderer * > GetRegisteredBaseRenderer ()
 
L * GetLocalStorage (mitk::BaseRenderer *forRenderer)
 Retrieves a LocalStorage for a specific BaseRenderer. More...
 
 ~LocalStorageHandler () override
 
- Public Member Functions inherited from mitk::BaseLocalStorageHandler
virtual ~BaseLocalStorageHandler ()
 

Protected Attributes

std::map< mitk::BaseRenderer *, L * > m_BaseRenderer2LS
 

Detailed Description

template<class L>
class mitk::LocalStorageHandler< L >

Templated class for management of LocalStorage implementations in Mappers.

The LocalStorageHandler is responsible for providing a LocalStorage to a concrete mitk::Mapper subclass. Each RenderWindow / mitk::BaseRenderer is assigned its own LocalStorage instance so that all contained ressources (actors, shaders, textures, ...) are provided individually per window.

Definition at line 51 of file mitkLocalStorageHandler.h.

Constructor & Destructor Documentation

◆ ~LocalStorageHandler()

template<class L>
mitk::LocalStorageHandler< L >::~LocalStorageHandler ( )
inlineoverride

Definition at line 99 of file mitkLocalStorageHandler.h.

Member Function Documentation

◆ ClearLocalStorage()

template<class L>
void mitk::LocalStorageHandler< L >::ClearLocalStorage ( mitk::BaseRenderer renderer,
bool  unregisterFromBaseRenderer = true 
)
inlineoverridevirtual

deallocates a local storage for a specifc BaseRenderer (if the BaseRenderer is itself deallocating it in its destructor, it has to set unregisterFromBaseRenderer=false)

Implements mitk::BaseLocalStorageHandler.

Definition at line 61 of file mitkLocalStorageHandler.h.

◆ GetLocalStorage()

template<class L>
L* mitk::LocalStorageHandler< L >::GetLocalStorage ( mitk::BaseRenderer forRenderer)
inline

Retrieves a LocalStorage for a specific BaseRenderer.

Should be used by mappers in GenerateDataForRenderer()

Definition at line 86 of file mitkLocalStorageHandler.h.

Referenced by mitk::GizmoMapper2D::GetVtkProp().

◆ GetRegisteredBaseRenderer()

template<class L>
std::vector<mitk::BaseRenderer *> mitk::LocalStorageHandler< L >::GetRegisteredBaseRenderer ( )
inline

Definition at line 71 of file mitkLocalStorageHandler.h.

Member Data Documentation

◆ m_BaseRenderer2LS

template<class L>
std::map<mitk::BaseRenderer *, L *> mitk::LocalStorageHandler< L >::m_BaseRenderer2LS
protected

Definition at line 54 of file mitkLocalStorageHandler.h.


The documentation for this class was generated from the following file: