|
Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <berryStatus.h>


Classes | |
| struct | SourceLocation |
Public Member Functions | |
| Status (const Severity &severity, const QString &pluginId, int code, const QString &message, const SourceLocation &sl) | |
| Status (const Severity &severity, const QString &pluginId, int code, const QString &message, const ctkException &exc, const SourceLocation &sl) | |
| Status (const Severity &severity, const QString &pluginId, const QString &message, const SourceLocation &sl) | |
| Status (const Severity &severity, const QString &pluginId, const QString &message, const ctkException &exc, const SourceLocation &sl) | |
| QList< IStatus::Pointer > | GetChildren () const override |
| int | GetCode () const override |
| const ctkException * | GetException () const override |
| QString | GetMessage () const override |
| QString | GetPlugin () const override |
| Severity | GetSeverity () const override |
| bool | IsMultiStatus () const override |
| bool | IsOK () const override |
| bool | Matches (const Severities &severityMask) const override |
| QString | GetFileName () const override |
| QString | GetMethodName () const override |
| int | GetLineNumber () const override |
| QString | ToString () const override |
Public Member Functions inherited from berry::Object | |
| 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 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 IStatus::Pointer | OK_STATUS (const SourceLocation &sl) |
| static const IStatus::Pointer | CANCEL_STATUS (const SourceLocation &sl) |
Static Public Member Functions inherited from berry::IStatus | |
| static const char * | GetStaticClassName () |
Static Public Member Functions inherited from berry::Object | |
| static const char * | GetStaticClassName () |
| static Reflection::TypeInfo | GetStaticTypeInfo () |
| static QList< Reflection::TypeInfo > | GetStaticSuperclasses () |
Protected Member Functions | |
| virtual void | SetCode (int code) |
| virtual void | SetException (const ctkException &exception) |
| virtual void | SetMessage (const QString &message) |
| virtual void | SetPlugin (const QString &pluginId) |
| virtual void | SetSeverity (const Severity &severity) |
Protected Member Functions inherited from berry::Object | |
| 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 |
Additional Inherited Members | |
Public Types inherited from berry::IStatus | |
| enum | Severity { OK_TYPE, INFO_TYPE, WARNING_TYPE, ERROR_TYPE, CANCEL_TYPE } |
| typedef berry::IStatus | Self |
| typedef berry::SmartPointer< Self > | Pointer |
| typedef berry::SmartPointer< const Self > | ConstPointer |
| typedef berry::WeakPointer< Self > | WeakPtr |
| typedef berry::WeakPointer< const Self > | ConstWeakPtr |
Public Types inherited from berry::Object | |
| 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 |
Protected Attributes inherited from berry::Object | |
| QAtomicInt | m_ReferenceCount |
| QMutex | m_ReferenceCountLock |
A concrete status implementation, suitable either for instantiating or subclassing.
This class can be used without OSGi running.
Definition at line 30 of file berryStatus.h.
| berry::Status::Status | ( | const Severity & | severity, |
| const QString & | pluginId, | ||
| int | code, | ||
| const QString & | message, | ||
| const SourceLocation & | sl | ||
| ) |
Creates a new status object. The created status has no children.
| severity | the severity; one of OK, ERROR, INFO, WARNING, or CANCEL |
| pluginId | the unique identifier of the relevant plug-in |
| code | the plug-in-specific status code, or OK |
| message | a human-readable message, localized to the current locale |
Definition at line 38 of file berryStatus.cpp.
References SetCode(), SetMessage(), SetPlugin(), and SetSeverity().
Referenced by CANCEL_STATUS(), and OK_STATUS().
| berry::Status::Status | ( | const Severity & | severity, |
| const QString & | pluginId, | ||
| int | code, | ||
| const QString & | message, | ||
| const ctkException & | exc, | ||
| const SourceLocation & | sl | ||
| ) |
Creates a new status object. The created status has no children.
| severity | the severity; one of OK, ERROR, INFO, WARNING, or CANCEL |
| pluginId | the unique identifier of the relevant plug-in |
| code | the plug-in-specific status code, or OK |
| message | a human-readable message, localized to the current locale |
| exception | a low-level exception. |
Definition at line 48 of file berryStatus.cpp.
References SetCode(), SetException(), SetMessage(), SetPlugin(), and SetSeverity().
| berry::Status::Status | ( | const Severity & | severity, |
| const QString & | pluginId, | ||
| const QString & | message, | ||
| const SourceLocation & | sl | ||
| ) |
Simplified constructor of a new status object; assumes that code is OK. The created status has no children.
| severity | the severity; one of OK, ERROR, INFO, WARNING, or CANCEL |
| pluginId | the unique identifier of the relevant plug-in |
| message | a human-readable message, localized to the current locale |
Definition at line 60 of file berryStatus.cpp.
References SetCode(), SetMessage(), SetPlugin(), and SetSeverity().
| berry::Status::Status | ( | const Severity & | severity, |
| const QString & | pluginId, | ||
| const QString & | message, | ||
| const ctkException & | exc, | ||
| const SourceLocation & | sl | ||
| ) |
Simplified constructor of a new status object; assumes that code is OK. The created status has no children.
| severity | the severity; one of OK, ERROR, INFO, WARNING, or CANCEL |
| pluginId | the unique identifier of the relevant plug-in |
| message | a human-readable message, localized to the current locale |
| exception | a low-level exception. |
Definition at line 70 of file berryStatus.cpp.
References SetCode(), SetException(), SetMessage(), SetPlugin(), and SetSeverity().
|
static |
A standard CANCEL status with no message.
Definition at line 31 of file berryStatus.cpp.
References berry::IStatus::CANCEL_TYPE, and Status().
|
overridevirtual |
Returns a list of status object immediately contained in this multi-status, or an empty list if this is not a multi-status.
Implements berry::IStatus.
Definition at line 82 of file berryStatus.cpp.
|
overridevirtual |
Returns the plug-in-specific status code describing the outcome.
Implements berry::IStatus.
Definition at line 87 of file berryStatus.cpp.
|
overridevirtual |
Returns the relevant low-level exception, or null if none. For example, when an operation fails because of a network communications failure, this might return the java.io.IOException describing the exact nature of that failure.
null if none Implements berry::IStatus.
Definition at line 92 of file berryStatus.cpp.
|
overridevirtual |
Implements berry::IStatus.
Definition at line 130 of file berryStatus.cpp.
References berry::Status::SourceLocation::fileName.
|
overridevirtual |
Implements berry::IStatus.
Definition at line 140 of file berryStatus.cpp.
References berry::Status::SourceLocation::lineNumber.
|
overridevirtual |
Returns the message describing the outcome. The message is localized to the current locale.
Implements berry::IStatus.
Definition at line 100 of file berryStatus.cpp.
|
overridevirtual |
Implements berry::IStatus.
Definition at line 135 of file berryStatus.cpp.
References berry::Status::SourceLocation::methodName.
|
overridevirtual |
Returns the unique identifier of the plug-in associated with this status (this is the plug-in that defines the meaning of the status code).
Implements berry::IStatus.
Definition at line 105 of file berryStatus.cpp.
|
overridevirtual |
Returns the severity. The severities are as follows (in descending order):
CANCEL_TYPE - cancelation occurred ERROR_TYPE - a serious error (most severe) WARNING_TYPE - a warning (less severe) INFO_TYPE - an informational ("fyi") message (least severe) OK_TYPE - everything is just fine The severity of a multi-status is defined to be the maximum severity of any of its children, or OK if it has no children.
OK_TYPE, ERROR_TYPE, INFO_TYPE, WARNING_TYPE, or CANCEL_TYPE Implements berry::IStatus.
Definition at line 110 of file berryStatus.cpp.
Referenced by berry::MultiStatus::Add().
|
overridevirtual |
Returns whether this status is a multi-status. A multi-status describes the outcome of an operation involving multiple operands.
The severity of a multi-status is derived from the severities of its children; a multi-status with no children is OK_TYPE by definition. A multi-status carries a plug-in identifier, a status code, a message, and an optional exception. Clients may treat multi-status objects in a multi-status unaware way.
true for a multi-status, false otherwise Implements berry::IStatus.
Definition at line 115 of file berryStatus.cpp.
|
overridevirtual |
Returns whether this status indicates everything is okay (neither info, warning, nor error).
true if this status has severity OK, and false otherwise Implements berry::IStatus.
Definition at line 120 of file berryStatus.cpp.
References berry::IStatus::OK_TYPE.
|
overridevirtual |
Returns whether the severity of this status matches the given severity mask. Note that a status with severity OK_TYPE will never match; use isOK instead to detect a status with a severity of OK.
| severityMask | a mask formed by bitwise or'ing severity mask constants (ERROR_TYPE, WARNING_TYPE, INFO_TYPE, CANCEL_TYPE) |
true if there is at least one match, false if there are no matches Implements berry::IStatus.
Definition at line 125 of file berryStatus.cpp.
|
static |
A standard OK status with an "ok" message.
Definition at line 24 of file berryStatus.cpp.
References berry::IStatus::OK_TYPE, and Status().
|
protectedvirtual |
Sets the status code.
| code | the plug-in-specific status code, or OK |
Definition at line 145 of file berryStatus.cpp.
Referenced by Status().
|
protectedvirtual |
Sets the exception.
| exception | a low-level exception, or null if not applicable |
Definition at line 150 of file berryStatus.cpp.
Referenced by Status().
|
protectedvirtual |
Sets the message. If null is passed, message is set to an empty string.
| message | a human-readable message, localized to the current locale |
Definition at line 156 of file berryStatus.cpp.
Referenced by Status().
|
protectedvirtual |
Sets the plug-in id.
| pluginId | the unique identifier of the relevant plug-in |
Definition at line 161 of file berryStatus.cpp.
Referenced by Status().
|
protectedvirtual |
Sets the severity.
| severity | the severity; one of OK, ERROR, INFO, WARNING, or CANCEL |
Definition at line 167 of file berryStatus.cpp.
Referenced by berry::MultiStatus::Add(), berry::MultiStatus::MultiStatus(), and Status().
|
overridevirtual |
Returns a string representation of the status, suitable for debugging purposes only.
Reimplemented from berry::Object.
Definition at line 172 of file berryStatus.cpp.
References berry::IStatus::CANCEL_TYPE, berry::IStatus::ERROR_TYPE, berry::IStatus::INFO_TYPE, berry::IStatus::OK_TYPE, and berry::IStatus::WARNING_TYPE.
Referenced by berry::MultiStatus::ToString().