Medical Imaging Interaction Toolkit
2024.06.99-e4ca64e0
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::IStatus | |
berryObjectMacro (berry::IStatus) | |
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::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 } |
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 |
sl |
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 |
exc | a low-level exception. |
sl |
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 |
sl |
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 |
exc | a low-level exception. |
sl |
|
static |
A standard CANCEL status with no message.
|
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.
|
overridevirtual |
Returns the plug-in-specific status code describing the outcome.
Implements berry::IStatus.
|
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.
|
overridevirtual |
Implements berry::IStatus.
|
overridevirtual |
Implements berry::IStatus.
|
overridevirtual |
Returns the message describing the outcome. The message is localized to the current locale.
Implements berry::IStatus.
|
overridevirtual |
Implements berry::IStatus.
|
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.
|
overridevirtual |
Returns the severity. The severities are as follows (in descending order):
CANCEL_TYPE
- cancellation 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.
|
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.
|
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.
|
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.
|
static |
A standard OK status with an "ok" message.
|
protectedvirtual |
Sets the status code.
code | the plug-in-specific status code, or OK |
|
protectedvirtual |
Sets the exception.
exception | a low-level exception, or null if not applicable |
|
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 |
|
protectedvirtual |
Sets the plug-in id.
pluginId | the unique identifier of the relevant plug-in |
|
protectedvirtual |
Sets the severity.
severity | the severity; one of OK , ERROR , INFO , WARNING , or CANCEL |
|
overridevirtual |
Returns a string representation of the status, suitable for debugging purposes only.
Reimplemented from berry::Object.