Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
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 21 of file berryICommandCategoryListener.h.

Member Typedef Documentation

◆ ObjectType

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

Definition at line 48 of file berrySmartPointer.h.

◆ Self

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

Definition at line 49 of file berrySmartPointer.h.

◆ unspecified_bool_type

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

Definition at line 145 of file berrySmartPointer.h.

Constructor & Destructor Documentation

◆ SmartPointer() [1/5]

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

Constructor

Definition at line 52 of file berrySmartPointer.h.

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

◆ SmartPointer() [2/5]

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

Constructor to pointer p

Definition at line 62 of file berrySmartPointer.h.

◆ SmartPointer() [3/5]

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

Copy constructor

Definition at line 74 of file berrySmartPointer.h.

◆ SmartPointer() [4/5]

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

Definition at line 85 of file berrySmartPointer.h.

◆ SmartPointer() [5/5]

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

Definition at line 352 of file berrySmartPointer.h.

◆ ~SmartPointer()

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

Destructor

Definition at line 100 of file berrySmartPointer.h.

Member Function Documentation

◆ Cast()

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

Definition at line 111 of file berrySmartPointer.h.

Referenced by berry::CommandManager::AddExecutionListener(), QmitkFunctionality::AfterCreateQtPartControl(), berry::ObjectGeneric< bool >::Assign(), berry::ObjectGeneric< bool >::Assignable(), QmitkFunctionality::BlueBerrySelectionChanged(), QmitkSelectionServiceConnector::ChangeServiceSelection(), berry::ViewPart::CheckSite(), berry::EditorPart::CheckSite(), QmitkFunctionality::ClosePartProxy(), berry::XMLMemento::CopyChild(), QmitkDataManagerView::CreateQtPartControl(), 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(), QmitkFunctionality::GetActiveMultiWidget(), berry::HandlerUtil::GetActivePartChecked(), berry::HandlerUtil::GetActivePartId(), berry::HandlerUtil::GetActivePartIdChecked(), berry::HandlerUtil::GetActiveSiteChecked(), berry::HandlerUtil::GetActiveWorkbenchWindowChecked(), berry::CommandManager::GetAllCommands(), berry::XMLMemento::GetAttributeKeys(), 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(), AbstractDataNodeAction::GetSelectedNodes(), 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(), QmitkAbstractView::QmitkAbstractView(), 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(), berry::CommandContributionItem::UpdateCommandPropertiesInUI(), and QmitkAbstractView::~QmitkAbstractView().

◆ GetPointer()

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

Template comparison operators using operator==. Access function to pointer.

Definition at line 209 of file berrySmartPointer.h.

Referenced by berry::ContributionManager::Add(), berry::GuiTk::ISelectionListener::Events::AddListener(), berry::GuiTk::IControlListener::Events::AddListener(), QmitkMultiWidgetDecorationManager::DecorationPreferencesChanged(), QmitkExtActionBarAdvisor::FillToolBar(), berry::HandlerUtil::GetActivePart(), berry::HandlerUtil::GetActivePartChecked(), berry::HandlerUtil::GetActiveSite(), berry::HandlerUtil::GetActiveSiteChecked(), berry::HandlerUtil::GetActiveWorkbenchWindow(), berry::HandlerUtil::GetActiveWorkbenchWindowChecked(), mitk::WorkbenchUtil::GetRenderWindowPart(), berry::ContributionManager::Insert(), berry::ContributionManager::InsertAfter(), berry::ContributionManager::InsertBefore(), berry::ContributionManager::InternalSetItems(), mitk::WorkbenchUtil::LoadFiles(), QmitkMxNMultiWidgetEditor::OnInteractionSchemeChanged(), berry::WeakPointer< Self >::operator=(), berry::SmartPointer< berry::MenuManager >::operator=(), berry::SmartPointer< berry::MenuManager >::operator==(), berry::SmartPointer< berry::MenuManager >::operator>(), QmitkFunctionalityCoordinator::PartActivated(), QmitkFunctionalityCoordinator::PartClosed(), QmitkFunctionalityCoordinator::PartHidden(), QmitkFunctionalityCoordinator::PartOpened(), QmitkFunctionalityCoordinator::PartVisible(), QmitkExtActionBarAdvisor::QmitkExtActionBarAdvisor(), QmitkFileOpenAction::QmitkFileOpenAction(), QmitkFileSaveAction::QmitkFileSaveAction(), QmitkRedoAction::QmitkRedoAction(), QmitkUndoAction::QmitkUndoAction(), berry::GuiTk::ISelectionListener::Events::RemoveListener(), berry::GuiTk::IControlListener::Events::RemoveListener(), berry::SafeRunner::Run(), and QmitkStdMultiWidgetEditor::ShowLevelWindowWidget().

◆ IsNotNull()

template<class TObjectType>
bool berry::SmartPointer< TObjectType >::IsNotNull ( ) const
inline

◆ IsNull()

template<class TObjectType>
bool berry::SmartPointer< TObjectType >::IsNull ( ) const
inline

Definition at line 140 of file berrySmartPointer.h.

Referenced by berry::GuiTk::ISelectionListener::Events::AddListener(), berry::GuiTk::IControlListener::Events::AddListener(), berry::AbstractHandlerWithState::AddState(), QmitkFunctionality::BlueBerrySelectionChanged(), QmitkSelectionServiceConnector::ChangeServiceSelection(), comparePerspectives(), compareViews(), QmitkFunctionality::DataNodeSelectionToVector(), berry::Command::ExecuteWithChecks(), berry::ExpressionConverter::ExpressionConverter(), QmitkViewNavigatorWidget::FillTreeList(), berry::AbstractHandler::FireHandlerChanged(), berry::ExpressionConverter::GetDebugPath(), AbstractDataNodeAction::GetSelectedNodes(), berry::EditorPart::GetTitleToolTip(), berry::HandlerUtil::GetVariableChecked(), mitk::GetVisibleDataStorageInspectors(), berry::ContributionManager::InsertAfter(), berry::ContributionManager::InsertBefore(), mitk::WorkbenchUtil::LoadFiles(), berry::HandlerUtil::MatchesRadioState(), mitk::WorkbenchUtil::OpenEditor(), berry::ExpressionConverter::Perform(), berry::ExtensionTracker::RegisterObject(), berry::ContributionManager::Remove(), berry::GuiTk::ISelectionListener::Events::RemoveListener(), berry::GuiTk::IControlListener::Events::RemoveListener(), berry::ContributorFactory::Resolve(), QmitkOpenXnatEditorAction::Run(), QmitkOpenDicomEditorAction::Run(), QmitkCloseProjectAction::Run(), QmitkFileSaveAction::Run(), QmitkOpenStdMultiWidgetEditorAction::Run(), QmitkOpenMxNMultiWidgetEditorAction::Run(), SafeHandleNavigatorView(), QmitkAbstractView::SetDataManagerSelection(), QmitkAbstractView::SynchronizeDataManagerSelection(), berry::HandlerUtil::ToggleCommandState(), berry::CommandContributionItem::UpdateCommandPropertiesInUI(), berry::HandlerUtil::UpdateRadioState(), and QmitkViewNavigatorWidget::UpdateTreeList().

◆ operator unspecified_bool_type()

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

Definition at line 147 of file berrySmartPointer.h.

◆ operator!=() [1/3]

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

Definition at line 175 of file berrySmartPointer.h.

◆ operator!=() [2/3]

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

Definition at line 181 of file berrySmartPointer.h.

◆ operator!=() [3/3]

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

Definition at line 186 of file berrySmartPointer.h.

◆ operator*()

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

Return pointer to object.

Definition at line 129 of file berrySmartPointer.h.

◆ operator->()

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

Overload operator ->

Definition at line 118 of file berrySmartPointer.h.

◆ operator<()

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 216 of file berrySmartPointer.h.

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

◆ 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 232 of file berrySmartPointer.h.

◆ operator=() [1/3]

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

Overload operator assignment.

Definition at line 245 of file berrySmartPointer.h.

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

◆ operator=() [2/3]

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

Overload operator assignment.

Definition at line 252 of file berrySmartPointer.h.

◆ operator=() [3/3]

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

Overload operator assignment.

Definition at line 258 of file berrySmartPointer.h.

◆ operator==() [1/3]

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

◆ operator==() [2/3]

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

Definition at line 160 of file berrySmartPointer.h.

◆ operator==() [3/3]

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

Definition at line 166 of file berrySmartPointer.h.

◆ operator>()

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 224 of file berrySmartPointer.h.

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

◆ 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 239 of file berrySmartPointer.h.

◆ Print()

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

Function to print object pointed to

Definition at line 371 of file berrySmartPointer.h.

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


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