Medical Imaging Interaction Toolkit  2023.12.99-ed252ae7
Medical Imaging Interaction Toolkit
berry::IStatus Struct Referenceabstract

#include <berryIStatus.h>

Inheritance diagram for berry::IStatus:
Collaboration diagram for berry::IStatus:

Public Types

enum  Severity {
  OK_TYPE, INFO_TYPE, WARNING_TYPE, ERROR_TYPE,
  CANCEL_TYPE
}
 
- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 

Public Member Functions

 berryObjectMacro (berry::IStatus)
 
virtual QList< IStatus::PointerGetChildren () const =0
 
virtual int GetCode () const =0
 
virtual const ctkException * GetException () const =0
 
virtual QString GetMessage () const =0
 
virtual QString GetPlugin () const =0
 
virtual Severity GetSeverity () const =0
 
virtual bool IsMultiStatus () const =0
 
virtual bool IsOK () const =0
 
virtual bool Matches (const Severities &severityMask) const =0
 
virtual QString GetFileName () const =0
 
virtual QString GetMethodName () const =0
 
virtual int GetLineNumber () const =0
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () 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
 

Additional Inherited Members

- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- 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
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A status object represents the outcome of an operation. All CoreExceptions carry a status object to indicate what went wrong. Status objects are also returned by methods needing to provide details of failures (e.g., validation methods).

A status carries the following information:

  • plug-in identifier (required)
  • severity (required)
  • status code (required)
  • message (required) - localized to current locale
  • exception (optional) - for problems stemming from a failure at a lower level

Some status objects, known as multi-statuses, have other status objects as children.

The class Status is the standard public implementation of status objects; the subclass MultiStatus is the implements multi-status objects.

This interface can be used without OSGi running.

See also
MultiStatus
Status

Definition at line 52 of file berryIStatus.h.

Member Enumeration Documentation

◆ Severity

Enumerator
OK_TYPE 

Status severity constant (value 0) indicating this status represents the nominal case. This constant is also used as the status code representing the nominal case.

INFO_TYPE 

Status type severity (bit mask, value 1) indicating this status is informational only.

WARNING_TYPE 

Status type severity (bit mask, value 2) indicating this status represents a warning.

ERROR_TYPE 

Status type severity (bit mask, value 4) indicating this status represents an error.

CANCEL_TYPE 

Status type severity (bit mask, value 8) indicating this status represents a cancellation.

Definition at line 56 of file berryIStatus.h.

Member Function Documentation

◆ berryObjectMacro()

berry::IStatus::berryObjectMacro ( berry::IStatus  )

◆ GetChildren()

virtual QList<IStatus::Pointer> berry::IStatus::GetChildren ( ) const
pure virtual

Returns a list of status object immediately contained in this multi-status, or an empty list if this is not a multi-status.

Returns
an array of status objects
See also
IsMultiStatus()

Implemented in berry::Status, and berry::MultiStatus.

◆ GetCode()

virtual int berry::IStatus::GetCode ( ) const
pure virtual

Returns the plug-in-specific status code describing the outcome.

Returns
plug-in-specific status code

Implemented in berry::Status.

◆ GetException()

virtual const ctkException* berry::IStatus::GetException ( ) const
pure virtual

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.

Returns
the relevant low-level exception, or null if none

Implemented in berry::Status.

◆ GetFileName()

virtual QString berry::IStatus::GetFileName ( ) const
pure virtual

Implemented in berry::Status.

◆ GetLineNumber()

virtual int berry::IStatus::GetLineNumber ( ) const
pure virtual

Implemented in berry::Status.

◆ GetMessage()

virtual QString berry::IStatus::GetMessage ( ) const
pure virtual

Returns the message describing the outcome. The message is localized to the current locale.

Returns
a localized message

Implemented in berry::Status.

◆ GetMethodName()

virtual QString berry::IStatus::GetMethodName ( ) const
pure virtual

Implemented in berry::Status.

◆ GetPlugin()

virtual QString berry::IStatus::GetPlugin ( ) const
pure virtual

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).

Returns
the unique identifier of the relevant plug-in

Implemented in berry::Status.

◆ GetSeverity()

virtual Severity berry::IStatus::GetSeverity ( ) const
pure virtual

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.

Returns
the severity: one of OK_TYPE, ERROR_TYPE, INFO_TYPE, WARNING_TYPE, or CANCEL_TYPE

Implemented in berry::Status.

◆ IsMultiStatus()

virtual bool berry::IStatus::IsMultiStatus ( ) const
pure virtual

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.

Returns
true for a multi-status, false otherwise
See also
GetChildren()

Implemented in berry::Status, and berry::MultiStatus.

◆ IsOK()

virtual bool berry::IStatus::IsOK ( ) const
pure virtual

Returns whether this status indicates everything is okay (neither info, warning, nor error).

Returns
true if this status has severity OK, and false otherwise

Implemented in berry::Status.

◆ Matches()

virtual bool berry::IStatus::Matches ( const Severities &  severityMask) const
pure virtual

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.

Parameters
severityMaska mask formed by bitwise or'ing severity mask constants (ERROR_TYPE, WARNING_TYPE, INFO_TYPE, CANCEL_TYPE)
Returns
true if there is at least one match, false if there are no matches
See also
GetSeverity()
CANCEL_TYPE
ERROR_TYPE
WARNING_TYPE
INFO_TYPE

Implemented in berry::Status.


The documentation for this struct was generated from the following file: