Medical Imaging Interaction Toolkit  2024.06.99-e4ca64e0
Medical Imaging Interaction Toolkit
berry::MultiStatus Class Reference

#include <berryMultiStatus.h>

Inheritance diagram for berry::MultiStatus:
Collaboration diagram for berry::MultiStatus:

Public Member Functions

 MultiStatus (const QString &pluginId, int code, const QList< IStatus::Pointer > &newChildren, const QString &message, const SourceLocation &sl)
 
 MultiStatus (const QString &pluginId, int code, const QList< IStatus::Pointer > &newChildren, const QString &message, const ctkException &exception, const SourceLocation &sl)
 
 MultiStatus (const QString &pluginId, int code, const QString &message, const SourceLocation &sl)
 
 MultiStatus (const QString &pluginId, int code, const QString &message, const ctkException &exception, const SourceLocation &sl)
 
void Add (IStatus::Pointer status)
 
void AddAll (IStatus::Pointer status)
 
QList< IStatus::PointerGetChildren () const override
 
bool IsMultiStatus () const override
 
void Merge (const IStatus::Pointer &status)
 
QString ToString () const override
 
- Public Member Functions inherited from berry::Status
 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::PointerGetChildren () 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::TypeInfoGetSuperclasses () 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
 

Public Attributes

 berryObjectMacro1
 

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< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Status
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::TypeInfoGetStaticSuperclasses ()
 
- Protected Member Functions inherited from berry::Status
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
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

A concrete multi-status implementation, suitable either for instantiating or subclassing.

This class can be used without OSGi running.

Definition at line 30 of file berryMultiStatus.h.

Constructor & Destructor Documentation

◆ MultiStatus() [1/4]

berry::MultiStatus::MultiStatus ( const QString &  pluginId,
int  code,
const QList< IStatus::Pointer > &  newChildren,
const QString &  message,
const SourceLocation sl 
)

Creates and returns a new multi-status object with the given children.

Parameters
pluginIdthe unique identifier of the relevant plug-in
codethe plug-in-specific status code
newChildrenthe list of children status objects
messagea human-readable message, localized to the current locale
sl

◆ MultiStatus() [2/4]

berry::MultiStatus::MultiStatus ( const QString &  pluginId,
int  code,
const QList< IStatus::Pointer > &  newChildren,
const QString &  message,
const ctkException &  exception,
const SourceLocation sl 
)

Creates and returns a new multi-status object with the given children.

Parameters
pluginIdthe unique identifier of the relevant plug-in
codethe plug-in-specific status code
newChildrenthe list of children status objects
messagea human-readable message, localized to the current locale
exceptiona low-level exception.
sl

◆ MultiStatus() [3/4]

berry::MultiStatus::MultiStatus ( const QString &  pluginId,
int  code,
const QString &  message,
const SourceLocation sl 
)

Creates and returns a new multi-status object with no children.

Parameters
pluginIdthe unique identifier of the relevant plug-in
codethe plug-in-specific status code
messagea human-readable message, localized to the current locale
sl

◆ MultiStatus() [4/4]

berry::MultiStatus::MultiStatus ( const QString &  pluginId,
int  code,
const QString &  message,
const ctkException &  exception,
const SourceLocation sl 
)

Creates and returns a new multi-status object with no children.

Parameters
pluginIdthe unique identifier of the relevant plug-in
codethe plug-in-specific status code
messagea human-readable message, localized to the current locale
exceptiona low-level exception, or null if not applicable
sl

Member Function Documentation

◆ Add()

void berry::MultiStatus::Add ( IStatus::Pointer  status)

Adds the given status to this multi-status.

Parameters
statusthe new child status

◆ AddAll()

void berry::MultiStatus::AddAll ( IStatus::Pointer  status)

Adds all of the children of the given status to this multi-status. Does nothing if the given status has no children (which includes the case where it is not a multi-status).

Parameters
statusthe status whose children are to be added to this one

◆ GetChildren()

QList<IStatus::Pointer> berry::MultiStatus::GetChildren ( ) const
overridevirtual

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

Implements berry::IStatus.

◆ IsMultiStatus()

bool berry::MultiStatus::IsMultiStatus ( ) const
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.

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

Implements berry::IStatus.

◆ Merge()

void berry::MultiStatus::Merge ( const IStatus::Pointer status)

Merges the given status into this multi-status. Equivalent to Add(status) if the given status is not a multi-status. Equivalent to AddAll(status) if the given status is a multi-status.

Parameters
statusthe status to merge into this one

◆ ToString()

QString berry::MultiStatus::ToString ( ) const
overridevirtual

Returns a string representation of the status, suitable for debugging purposes only.

Reimplemented from berry::Object.

Member Data Documentation

◆ berryObjectMacro1

berry::MultiStatus::berryObjectMacro1

Definition at line 43 of file berryMultiStatus.h.


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