Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::CoreServicePointer< S > Class Template Reference

A RAII helper class for core service objects. More...

#include <mitkCoreServices.h>

Public Member Functions

 CoreServicePointer (S *service)
 
 ~CoreServicePointer ()
 
S * operator-> () const
 

Detailed Description

template<class S>
class mitk::CoreServicePointer< S >

A RAII helper class for core service objects.

This is class is intended for usage in local scopes; it calls CoreServices::Unget(S*) in its destructor. You should not construct multiple CoreServicePointer instances using the same service pointer, unless it is retrieved by a new call to a CoreServices getter method.

See also
CoreServices

Definition at line 143 of file mitkCoreServices.h.

Constructor & Destructor Documentation

template<class S>
mitk::CoreServicePointer< S >::CoreServicePointer ( S *  service)
inlineexplicit

Definition at line 146 of file mitkCoreServices.h.

template<class S>
mitk::CoreServicePointer< S >::~CoreServicePointer ( )
inline

Definition at line 147 of file mitkCoreServices.h.

References MITK_ERROR, and mitk::CoreServices::Unget().

Member Function Documentation

template<class S>
S* mitk::CoreServicePointer< S >::operator-> ( ) const
inline

Definition at line 163 of file mitkCoreServices.h.


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