Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::SmartPointer< TObjectType > Class Template Reference

Implements transparent reference counting. More...

#include <berryICommandCategoryListener.h>

Inheritance diagram for berry::SmartPointer< TObjectType >:

Public Types

typedef TObjectType ObjectType
 
typedef SmartPointer Self
 
typedef ObjectType *Self::* unspecified_bool_type
 

Public Member Functions

 SmartPointer ()
 
 SmartPointer (ObjectType *p)
 
 SmartPointer (const SmartPointer< ObjectType > &p)
 
template<class Other >
 SmartPointer (const SmartPointer< Other > &ptr)
 
template<class Other >
 SmartPointer (const WeakPointer< Other > &wp)
 
 ~SmartPointer ()
 
template<class Other >
SmartPointer< Other > Cast () const
 
ObjectTypeoperator-> () const
 
ObjectTypeoperator* () const
 
bool IsNotNull () const
 
bool IsNull () const
 
 operator unspecified_bool_type () const
 
template<typename R >
bool operator== (const R *o) const
 
template<typename R >
bool operator== (const SmartPointer< R > &r) const
 
bool operator== (int r) const
 
template<typename R >
bool operator!= (const R *r) const
 
template<typename R >
bool operator!= (const SmartPointer< R > &r) const
 
bool operator!= (int r) const
 
ObjectTypeGetPointer () const
 
template<typename R >
bool operator< (const SmartPointer< R > &r) const
 
template<typename R >
bool operator> (const SmartPointer< R > &r) const
 
template<typename R >
bool operator<= (const SmartPointer< R > &r) const
 
template<typename R >
bool operator>= (const SmartPointer< R > &r) const
 
SmartPointeroperator= (const SmartPointer &r)
 
template<typename R >
SmartPointeroperator= (const SmartPointer< R > &r)
 
SmartPointeroperator= (ObjectType *r)
 
QDebug Print (QDebug os) const
 

Detailed Description

template<class TObjectType>
class berry::SmartPointer< TObjectType >

Implements transparent reference counting.

SmartPointer is a copy of itk::SmartPointer. It implements reference counting by overloading operator -> (and *) among others. This allows natural interface to the class referred to by the pointer without having to invoke special Register()/UnRegister() methods directly.

Definition at line 25 of file berryICommandCategoryListener.h.

Member Typedef Documentation

template<class TObjectType>
typedef TObjectType berry::SmartPointer< TObjectType >::ObjectType

Definition at line 52 of file berrySmartPointer.h.

template<class TObjectType>
typedef SmartPointer berry::SmartPointer< TObjectType >::Self

Definition at line 53 of file berrySmartPointer.h.

template<class TObjectType>
typedef ObjectType* Self::* berry::SmartPointer< TObjectType >::unspecified_bool_type

Definition at line 149 of file berrySmartPointer.h.

Constructor & Destructor Documentation

template<class TObjectType>
berry::SmartPointer< TObjectType >::SmartPointer ( )
inline

Constructor

Definition at line 56 of file berrySmartPointer.h.

template<class TObjectType>
berry::SmartPointer< TObjectType >::SmartPointer ( ObjectType p)
inlineexplicit

Constructor to pointer p

Definition at line 66 of file berrySmartPointer.h.

template<class TObjectType>
berry::SmartPointer< TObjectType >::SmartPointer ( const SmartPointer< ObjectType > &  p)
inline

Copy constructor

Definition at line 78 of file berrySmartPointer.h.

template<class TObjectType>
template<class Other >
berry::SmartPointer< TObjectType >::SmartPointer ( const SmartPointer< Other > &  ptr)
inline

Definition at line 89 of file berrySmartPointer.h.

template<class T >
template<class Other >
berry::SmartPointer< T >::SmartPointer ( const WeakPointer< Other > &  wp)
explicit

Definition at line 356 of file berrySmartPointer.h.

template<class TObjectType>
berry::SmartPointer< TObjectType >::~SmartPointer ( )
inline

Destructor

Definition at line 104 of file berrySmartPointer.h.

Member Function Documentation

template<class TObjectType>
template<class Other >
SmartPointer<Other> berry::SmartPointer< TObjectType >::Cast ( ) const
inline

Definition at line 115 of file berrySmartPointer.h.

Referenced by berry::CommandManager::AddExecutionListener(), QmitkFunctionality::AfterCreateQtPartControl(), berry::ObjectGeneric< bool >::Assign(), berry::ObjectGeneric< bool >::Assignable(), QmitkFunctionality::BlueBerrySelectionChanged(), berry::ViewPart::CheckSite(), berry::EditorPart::CheckSite(), QmitkFunctionality::ClosePartProxy(), berry::XMLMemento::CopyChild(), berry::MenuManager::FindMenuUsingPath(), berry::MenuManager::FindUsingPath(), berry::HandlerUtil::GetActiveContexts(), berry::HandlerUtil::GetActiveContextsChecked(), berry::HandlerUtil::GetActiveEditorId(), berry::HandlerUtil::GetActiveEditorIdChecked(), berry::HandlerUtil::GetActiveMenuEditorInput(), berry::HandlerUtil::GetActiveMenuEditorInputChecked(), berry::HandlerUtil::GetActiveMenus(), berry::HandlerUtil::GetActiveMenusChecked(), berry::HandlerUtil::GetActiveMenuSelection(), berry::HandlerUtil::GetActiveMenuSelectionChecked(), berry::HandlerUtil::GetActivePartChecked(), berry::HandlerUtil::GetActivePartId(), berry::HandlerUtil::GetActivePartIdChecked(), berry::HandlerUtil::GetActiveSiteChecked(), QmitkFunctionality::GetActiveStdMultiWidget(), berry::HandlerUtil::GetActiveWorkbenchWindowChecked(), berry::CommandManager::GetAllCommands(), QmitkAbstractView::GetCurrentSelection(), QmitkFunctionality::GetCurrentSelection(), berry::HandlerUtil::GetCurrentSelection(), berry::HandlerUtil::GetCurrentSelectionChecked(), QmitkAbstractView::GetDataManagerSelection(), QmitkFunctionality::GetDataManagerSelection(), QmitkAbstractRenderEditor::GetDataStorageReference(), berry::ExpressionConverter::GetDebugPath(), berry::CommandManager::GetDefinedCommands(), berry::Command::GetParameterType(), mitk::MAPAlgorithmInfoSelection::GetSelectedAlgorithmInfo(), mitk::DataNodeSelection::GetSelectedDataNodes(), berry::HandlerUtil::GetShowInSelection(), berry::HandlerUtil::GetShowInSelectionChecked(), berry::HandlerUtil::GetVariable(), QmitkAbstractRenderEditor::Init(), berry::HandlerUtil::MatchesRadioState(), berry::WorkbenchWindowAdvisor::OpenIntro(), QmitkFunctionalityCoordinator::PartClosed(), QmitkFunctionalityCoordinator::PartHidden(), QmitkFunctionalityCoordinator::PartOpened(), QmitkFunctionalityCoordinator::PartVisible(), berry::IPropertyChangeListener::PropertyChange(), berry::XMLMemento::PutMemento(), berry::ContributorFactory::Resolve(), berry::ToggleState::Save(), berry::RadioState::Save(), QmitkAbstractView::SetDataManagerSelection(), berry::Command::SetHandler(), berry::RegistryToggleState::SetInitializationData(), berry::RadioState::SetInitializationData(), berry::ExtensionFactory::SetInitializationData(), berry::QtSelectionProvider::SetSelection(), QmitkDataNodeSelectionProvider::SetSelection(), berry::ToggleState::SetValue(), berry::RadioState::SetValue(), berry::HandlerUtil::ToggleCommandState(), berry::MenuManager::Update(), and QmitkAbstractView::~QmitkAbstractView().

template<class TObjectType>
ObjectType* berry::SmartPointer< TObjectType >::GetPointer ( ) const
inline
template<class TObjectType>
berry::SmartPointer< TObjectType >::operator unspecified_bool_type ( ) const
inline

Definition at line 151 of file berrySmartPointer.h.

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator!= ( const R *  r) const
inline

Definition at line 179 of file berrySmartPointer.h.

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator!= ( const SmartPointer< R > &  r) const
inline

Definition at line 185 of file berrySmartPointer.h.

template<class TObjectType>
bool berry::SmartPointer< TObjectType >::operator!= ( int  r) const
inline

Definition at line 190 of file berrySmartPointer.h.

template<class TObjectType>
ObjectType& berry::SmartPointer< TObjectType >::operator* ( ) const
inline

Return pointer to object.

Definition at line 133 of file berrySmartPointer.h.

template<class TObjectType>
ObjectType* berry::SmartPointer< TObjectType >::operator-> ( ) const
inline

Overload operator ->

Definition at line 122 of file berrySmartPointer.h.

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator< ( const SmartPointer< R > &  r) const
inline

Comparison of pointers. Less than comparison.

Definition at line 220 of file berrySmartPointer.h.

Referenced by berry::SmartPointer< berry::MenuManager >::operator<=().

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator<= ( const SmartPointer< R > &  r) const
inline

Comparison of pointers. Less than or equal to comparison.

Definition at line 236 of file berrySmartPointer.h.

template<class TObjectType>
SmartPointer& berry::SmartPointer< TObjectType >::operator= ( const SmartPointer< TObjectType > &  r)
inline

Overload operator assignment.

Definition at line 249 of file berrySmartPointer.h.

Referenced by berry::SmartPointer< berry::MenuManager >::operator=().

template<class TObjectType>
template<typename R >
SmartPointer& berry::SmartPointer< TObjectType >::operator= ( const SmartPointer< R > &  r)
inline

Overload operator assignment.

Definition at line 256 of file berrySmartPointer.h.

template<class TObjectType>
SmartPointer& berry::SmartPointer< TObjectType >::operator= ( ObjectType r)
inline

Overload operator assignment.

Definition at line 262 of file berrySmartPointer.h.

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator== ( const R *  o) const
inline
template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator== ( const SmartPointer< R > &  r) const
inline

Definition at line 164 of file berrySmartPointer.h.

template<class TObjectType>
bool berry::SmartPointer< TObjectType >::operator== ( int  r) const
inline

Definition at line 170 of file berrySmartPointer.h.

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator> ( const SmartPointer< R > &  r) const
inline

Comparison of pointers. Greater than comparison.

Definition at line 228 of file berrySmartPointer.h.

Referenced by berry::SmartPointer< berry::MenuManager >::operator>=().

template<class TObjectType>
template<typename R >
bool berry::SmartPointer< TObjectType >::operator>= ( const SmartPointer< R > &  r) const
inline

Comparison of pointers. Greater than or equal to comparison.

Definition at line 243 of file berrySmartPointer.h.

template<class T >
QDebug berry::SmartPointer< T >::Print ( QDebug  os) const

Function to print object pointed to

Definition at line 375 of file berrySmartPointer.h.


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