Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
Light weight base class for most BlueBerry classes. More...
#include <berryObject.h>
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 |
|
protectedvirtual |
|
inline |
Definition at line 144 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.
|
virtual |
Referenced by berry::IServiceLocator::GetService().
|
inline |
Gets the reference count on this object.
Definition at line 135 of file berryObject.h.
|
static |
|
static |
|
static |
|
virtual |
|
virtual |
|
virtual |
Returns a hash code value for the object.
Reimplemented in berry::Saveable, berry::ParameterizedCommand, berry::Expression, berry::HandleObject, and berry::QActionContributionItem.
|
virtual |
Override this method to implement a specific "less than" operator for associative STL containers.
Reimplemented in berry::Saveable, berry::Command, berry::ParameterizedCommand, and berry::ParameterType.
|
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::ObjectString, berry::ObjectTypeInfo, berry::Expression, berry::HandleObject, berry::ParameterizedCommand, berry::QtItemSelection, berry::QModelIndexObject, berry::IEditorInput, berry::ObjectGeneric< T >, berry::ObjectGeneric< double >, berry::ObjectGeneric< float >, berry::ObjectGeneric< int >, berry::ObjectGeneric< bool >, berry::FileEditorInput, berry::QActionContributionItem, berry::ObjectList< T >, berry::IViewDescriptor, berry::EvaluationResult, mitk::MAPAlgorithmInfoSelection, mitk::DataNodeSelection, mitk::MAPAlgorithmInfoObject, mitk::DataNodeObject, mitk::IDataStorageReference, and mitk::DataStorageEditorInput.
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 overridden by subclasses.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
void berry::Object::Register | ( | ) | const |
Increase the reference count (mark as used by another object).
|
inline |
Definition at line 146 of file berryObject.h.
void berry::Object::SetReferenceCount | ( | int | ) |
Sets the reference count on this object. This is a dangerous method, use it with care.
|
virtual |
Returns a string representation of this object. The default implementation returns an empty string.
Reimplemented in berry::Command, berry::Status, berry::ParameterizedCommand, berry::EvaluationResult, 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.
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!)
Referenced by berry::QScopedPointerObjectDeleter::cleanup().
|
mutableprotected |
Number of uses of this object by other objects.
Definition at line 182 of file berryObject.h.
|
mutableprotected |
Mutex lock to protect modification to the reference count
Definition at line 185 of file berryObject.h.