Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::MultiStatus Class Reference

#include <berryMultiStatus.h>

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

Public Types

typedef berry::MultiStatus Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- 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< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- 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

 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::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
 

Static Public Member Functions

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

Additional Inherited Members

- 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 34 of file berryMultiStatus.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 37 of file berryMultiStatus.cpp.

References berry::Status::SetSeverity().

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.

Definition at line 45 of file berryMultiStatus.cpp.

References berry::Status::SetSeverity().

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

Definition at line 54 of file berryMultiStatus.cpp.

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

Definition at line 60 of file berryMultiStatus.cpp.

Member Function Documentation

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

Adds the given status to this multi-status.

Parameters
statusthe new child status

Definition at line 67 of file berryMultiStatus.cpp.

References berry::Status::GetSeverity(), and berry::Status::SetSeverity().

Referenced by AddAll(), and Merge().

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

Definition at line 78 of file berryMultiStatus.cpp.

References Add().

Referenced by Merge().

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.

Definition at line 88 of file berryMultiStatus.cpp.

static const char* berry::MultiStatus::GetStaticClassName ( )
inlinestatic

Definition at line 47 of file berryMultiStatus.h.

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.

Definition at line 93 of file berryMultiStatus.cpp.

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
See also
#add(IStatus)
#addAll(IStatus)

Definition at line 98 of file berryMultiStatus.cpp.

References Add(), and AddAll().

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

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

Reimplemented from berry::Object.

Definition at line 111 of file berryMultiStatus.cpp.

References berry::Status::ToString().


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