Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Light weight base class for most BlueBerry classes. More...
#include <berryObject.h>
Inherited by berry::AbstractBitSetEvent [virtual]
, berry::AbstractContributionFactory, berry::ActionBarAdvisor, berry::CommandContributionItemParameter [virtual]
, berry::CommandManagerEvent, berry::ElementHandler, berry::EvaluationResult, berry::ExecutionEvent, berry::Expression, berry::GuiTk::Event, berry::GuiTk::IControlListener [virtual]
, berry::GuiTk::ISelectionListener [virtual]
, berry::HandleObject [virtual]
, berry::IActionBarConfigurer, berry::IActionBars, berry::IAdapterManager, berry::IConfigurationElement [virtual]
, berry::IContributionItem [virtual]
, berry::IContributionManager [virtual]
, berry::IContributionManagerOverrides [virtual]
, berry::IContributionRoot, berry::IContributor, berry::ICountable, berry::IDisposable [virtual]
, berry::IEditorInput [virtual]
, berry::IEditorMatchingStrategy, berry::IElementReference, berry::IElementUpdater [virtual]
, berry::IEvaluationContext, berry::IExtension [virtual]
, berry::IExtensionPoint [virtual]
, berry::IFileEditorMapping, berry::IHandler [virtual]
, berry::IIntroPart [virtual]
, berry::IIterable, berry::IJobChangeEvent, berry::IJobManager, berry::ILock, berry::IMemento, berry::INestable [virtual]
, berry::IntroContentDetector, berry::IObjectWithState [virtual]
, berry::IPageLayout, berry::IParameter [virtual]
, berry::IPerspectiveDescriptor [virtual]
, berry::IPerspectiveFactory, berry::IPlaceholderFolderLayout, berry::IPluginContribution [virtual]
, berry::IPreferencePage [virtual]
, berry::IPreferences [virtual]
, berry::IPresentablePart, berry::IProduct [virtual]
, berry::IProgressMonitor, berry::IPropertyTester, berry::ISafeRunnable, berry::ISafeRunnableRunner, berry::ISaveablePart [virtual]
, berry::ISaveablesLifecycleListener [virtual]
, berry::ISaveablesSource [virtual]
, berry::ISchedulingRule, berry::ISelection, berry::ISelectionProvider [virtual]
, berry::IServiceLocator [virtual]
, berry::IShellProvider [virtual]
, berry::IShowInSource [virtual]
, berry::IShowInTarget [virtual]
, berry::ISourceProvider [virtual]
, berry::ISourceProviderService [virtual]
, berry::IStackPresentationSite, berry::IStatus, berry::IStickyViewDescriptor, berry::ITypedParameter [virtual]
, berry::IViewCategory [virtual]
, berry::IViewLayout, berry::IWorkbenchConfigurer, berry::IWorkbenchPage, berry::IWorkbenchPart [virtual]
, berry::IWorkbenchPartDescriptor [virtual]
, berry::IWorkbenchPartReference, berry::IWorkbenchWindow [virtual]
, berry::IWorkbenchWindowConfigurer, berry::LockListener, berry::ObjectGeneric< T >, berry::ObjectList< T >, berry::ObjectString, berry::ObjectStringMap, berry::ObjectTypeInfo, berry::ParameterizedCommand, berry::PlatformObject [virtual]
, berry::ProgressProvider, berry::PropertyChangeEvent, berry::QModelIndexObject, berry::Saveable [virtual]
, berry::SaveablesLifecycleEvent, berry::SelectionChangedEvent, berry::Shell [virtual]
, berry::ShellEvent, berry::ShowInContext [virtual]
, berry::StackDropResult, berry::StackPresentation, berry::State, berry::UIElement, berry::UndefinedVariable, berry::Window::IExceptionHandler, IChangeText [virtual]
, mitk::DataNodeObject, mitk::IDataStorageReference, mitk::IInputDevice, mitk::IInputDeviceDescriptor, mitk::MAPAlgorithmInfoObject, berry::ObjectGeneric< bool >, berry::ObjectGeneric< double >, berry::ObjectGeneric< float >, and berry::ObjectGeneric< int >.
Public Types | |
typedef Object | Self |
typedef berry::SmartPointer< Self > | Pointer |
typedef berry::SmartPointer< const Self > | ConstPointer |
typedef berry::WeakPointer< Self > | WeakPtr |
typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Public Member Functions | |
virtual QString | GetClassName () const |
virtual Reflection::TypeInfo | GetTypeInfo () const |
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
virtual void | Delete () |
QDebug | Print (QDebug os, Indent Indent=0) const |
virtual QString | ToString () const |
virtual uint | HashCode () const |
virtual bool | operator< (const Object *) const |
void | Register () const |
void | UnRegister (bool del=true) const |
int | GetReferenceCount () const |
void | SetReferenceCount (int) |
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
virtual bool | operator== (const Object *) const |
Static Public Member Functions | |
static const char * | GetStaticClassName () |
static Reflection::TypeInfo | GetStaticTypeInfo () |
static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Member Functions | |
Object () | |
virtual | ~Object () |
virtual QDebug | PrintSelf (QDebug os, Indent indent) const |
virtual QDebug | PrintHeader (QDebug os, Indent indent) const |
virtual QDebug | PrintTrailer (QDebug os, Indent indent) const |
Protected Attributes | |
QAtomicInt | m_ReferenceCount |
QMutex | m_ReferenceCountLock |
Light weight base class for most BlueBerry classes.
Object is copied from itk::LightObject and is the highest level base class for most BlueBerry objects. It implements reference counting and the API for object printing.
Definition at line 72 of file berryObject.h.
typedef berry::SmartPointer<const Self> berry::Object::ConstPointer |
Definition at line 83 of file berryObject.h.
typedef berry::WeakPointer<const Self> berry::Object::ConstWeakPtr |
Definition at line 85 of file berryObject.h.
Definition at line 82 of file berryObject.h.
typedef Object berry::Object::Self |
Definition at line 81 of file berryObject.h.
typedef berry::WeakPointer<Self> berry::Object::WeakPtr |
Definition at line 84 of file berryObject.h.
|
protected |
Definition at line 163 of file berryObject.cpp.
References berry::DebugUtil::RegisterObject().
Referenced by berry::EvaluationResult::operator!=().
|
protectedvirtual |
warn user if reference counting is on and the object is being referenced by another object.
notifies the registered functions that the object is being destroyed
Definition at line 173 of file berryObject.cpp.
References BERRY_WARN, GetClassName(), m_ReferenceCount, berry::Message< A >::Send(), and berry::DebugUtil::UnregisterObject().
|
inline |
Definition at line 153 of file berryObject.h.
|
virtual |
Delete an BlueBerry object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.
Definition at line 31 of file berryObject.cpp.
References UnRegister().
|
virtual |
Definition at line 71 of file berryObject.cpp.
References berry::Reflection::DemangleName().
Referenced by berry::DebugBreakpointManager::BreakAtSmartpointer(), berry::IServiceLocator::GetService(), PrintHeader(), berry::DebugUtil::PrintObjectSummary(), berry::DebugUtil::RegisterSmartPointer(), berry::DebugUtil::StopTracing(), berry::ContributionItem::ToString(), berry::DebugUtil::UnregisterSmartPointer(), and ~Object().
|
inline |
Gets the reference count on this object.
Definition at line 144 of file berryObject.h.
|
static |
Definition at line 66 of file berryObject.cpp.
|
static |
Definition at line 86 of file berryObject.cpp.
Referenced by GetSuperclasses().
|
static |
Definition at line 76 of file berryObject.cpp.
Referenced by GetTypeInfo().
|
virtual |
Reimplemented in berry::ObjectTypeInfo.
Definition at line 91 of file berryObject.cpp.
References GetStaticSuperclasses().
|
virtual |
Reimplemented in berry::ObjectTypeInfo.
Definition at line 81 of file berryObject.cpp.
References GetStaticTypeInfo().
|
virtual |
Returns a hash code value for the object.
Reimplemented in berry::Saveable, berry::ParameterizedCommand, berry::Expression, berry::HandleObject, and berry::QActionContributionItem.
Definition at line 111 of file berryObject.cpp.
References qHash().
Referenced by qHash().
|
virtual |
Override this method to implement a specific "less than" operator for associative STL containers.
Reimplemented in berry::Command, berry::Saveable, berry::ParameterizedCommand, and berry::ParameterType.
Definition at line 116 of file berryObject.cpp.
|
virtual |
A generic comparison method. Override this method in subclasses and cast to your derived class to provide a more detailed comparison.
Reimplemented in berry::Expression, berry::EvaluationResult, berry::IEditorInput, berry::HandleObject, berry::IViewDescriptor, berry::ParameterizedCommand, mitk::MAPAlgorithmInfoSelection, mitk::DataNodeSelection, mitk::DataStorageEditorInput, berry::ObjectGeneric< T >, berry::ObjectGeneric< double >, berry::ObjectGeneric< float >, berry::ObjectGeneric< int >, berry::ObjectGeneric< bool >, berry::FileEditorInput, berry::QActionContributionItem, berry::QtItemSelection, mitk::MAPAlgorithmInfoObject, mitk::DataNodeObject, mitk::IDataStorageReference, berry::QModelIndexObject, berry::ObjectString, berry::ObjectList< T >, and berry::ObjectTypeInfo.
Definition at line 145 of file berryObject.cpp.
QDebug berry::Object::Print | ( | QDebug | os, |
Indent | Indent = 0 |
||
) | const |
Cause the object to print itself out. This is usually used to provide detailed information about the object's state. It just calls the header/self/trailer virtual print methods, which can be overriden by subclasses.
Definition at line 96 of file berryObject.cpp.
References berry::Indent::GetNextIndent(), PrintHeader(), PrintSelf(), and PrintTrailer().
Referenced by operator<<(), and ToString().
|
protectedvirtual |
Define a default print header for all objects.
Definition at line 212 of file berryObject.cpp.
References GetClassName().
Referenced by Print().
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Definition at line 201 of file berryObject.cpp.
References berry::Reflection::DemangleName(), and m_ReferenceCount.
Referenced by Print().
|
protectedvirtual |
Define a default print trailer for all objects.
Definition at line 221 of file berryObject.cpp.
Referenced by Print().
void berry::Object::Register | ( | ) | const |
Increase the reference count (mark as used by another object).
Definition at line 121 of file berryObject.cpp.
References m_ReferenceCount.
Referenced by QmitkExtActionBarAdvisor::MakeActions(), berry::SmartPointer< berry::MenuManager >::operator=(), QmitkAbstractView::~QmitkAbstractView(), and QmitkFunctionality::~QmitkFunctionality().
|
inline |
Definition at line 155 of file berryObject.h.
References mitk::operator==().
void berry::Object::SetReferenceCount | ( | int | ref | ) |
Sets the reference count on this object. This is a dangerous method, use it with care.
Definition at line 134 of file berryObject.cpp.
References m_ReferenceCount, and m_ReferenceCountLock.
|
virtual |
Returns a string representation of this object. The default implementation returns an empty string.
Reimplemented in berry::Command, berry::Status, berry::EvaluationResult, berry::ParameterizedCommand, berry::Expression, berry::ExecutionEvent, berry::ContributionItem, berry::ParameterType, berry::MultiStatus, berry::GuiTk::Event, berry::CommandCategory, berry::ObjectString, berry::ObjectDouble, berry::ObjectFloat, berry::ObjectInt, and berry::ObjectBool.
Definition at line 103 of file berryObject.cpp.
References Print().
Referenced by berry::ContributionManager::DumpStatistics(), and operator<<().
void berry::Object::UnRegister | ( | bool | del = true | ) | const |
Decrease the reference count (release by another object). Set del to false if you do not want the object to be deleted if the reference count is zero (use with care!)
Definition at line 126 of file berryObject.cpp.
References m_ReferenceCount.
Referenced by berry::QScopedPointerObjectDeleter::cleanup(), Delete(), berry::SmartPointer< berry::MenuManager >::operator=(), QmitkAbstractView::~QmitkAbstractView(), and QmitkFunctionality::~QmitkFunctionality().
|
mutableprotected |
Number of uses of this object by other objects.
Definition at line 191 of file berryObject.h.
Referenced by PrintSelf(), Register(), SetReferenceCount(), UnRegister(), and ~Object().
|
mutableprotected |
Mutex lock to protect modification to the reference count
Definition at line 194 of file berryObject.h.
Referenced by SetReferenceCount().