Open CASCADE Technology  7.0.0
Message_ExecStatus Class Reference

#include <Message_ExecStatus.hxx>

Public Member Functions

Creation and simple operations with statuses
 Message_ExecStatus ()
 Create empty execution status. More...
 
 Message_ExecStatus (Message_Status status)
 Initialise the execution status. More...
 
void Set (Message_Status status)
 Sets a status flag. More...
 
Standard_Boolean IsSet (Message_Status status) const
 Check status for being set. More...
 
void Clear (Message_Status status)
 Clear one status. More...
 
Advanced: Group operations (useful for analysis)
Standard_Boolean IsDone () const
 Check if at least one status of each type is set. More...
 
Standard_Boolean IsFail () const
 Check if at least one status of each type is set. More...
 
Standard_Boolean IsWarn () const
 Check if at least one status of each type is set. More...
 
Standard_Boolean IsAlarm () const
 Check if at least one status of each type is set. More...
 
void SetAllDone ()
 Set all statuses of each type. More...
 
void SetAllWarn ()
 Check if at least one status of each type is set. More...
 
void SetAllAlarm ()
 Check if at least one status of each type is set. More...
 
void SetAllFail ()
 Check if at least one status of each type is set. More...
 
void ClearAllDone ()
 Clear all statuses of each type. More...
 
void ClearAllWarn ()
 Check if at least one status of each type is set. More...
 
void ClearAllAlarm ()
 Check if at least one status of each type is set. More...
 
void ClearAllFail ()
 Check if at least one status of each type is set. More...
 
void Clear ()
 Clear all statuses. More...
 
void Add (const Message_ExecStatus &theOther)
 Add statuses to me from theOther execution status. More...
 
const Message_ExecStatusoperator|= (const Message_ExecStatus &theOther)
 Check if at least one status of each type is set. More...
 
void And (const Message_ExecStatus &theOther)
 Leave only the statuses common with theOther. More...
 
const Message_ExecStatusoperator&= (const Message_ExecStatus &theOther)
 Check if at least one status of each type is set. More...
 

Advanced: Iteration and analysis of status flags

enum  StatusRange { FirstStatus = 1, StatusesPerType = 32, NbStatuses = 128, LastStatus = 129 }
 Definitions of range of available statuses. More...
 
static Standard_Integer StatusIndex (Message_Status status)
 Returns index of status in whole range [FirstStatus, LastStatus]. More...
 
static Standard_Integer LocalStatusIndex (Message_Status status)
 Returns index of status inside type of status (Done or Warn or, etc) in range [1, StatusesPerType]. More...
 
static Message_StatusType TypeOfStatus (Message_Status status)
 Returns status type (DONE, WARN, ALARM, or FAIL) More...
 
static Message_Status StatusByIndex (const Standard_Integer theIndex)
 Returns status with index theIndex in whole range [FirstStatus, LastStatus]. More...
 

Detailed Description

Tiny class for extended handling of error / execution status of algorithm in universal way.

It is in fact a set of integers represented as a collection of bit flags for each of four types of status; each status flag has its own symbolic name and can be set/tested individually.

The flags are grouped in semantic groups:

Member Enumeration Documentation

Definitions of range of available statuses.

Enumerator
FirstStatus 
StatusesPerType 
NbStatuses 
LastStatus 

Constructor & Destructor Documentation

Message_ExecStatus::Message_ExecStatus ( )
inline

Create empty execution status.

Message_ExecStatus::Message_ExecStatus ( Message_Status  status)
inline

Initialise the execution status.

Member Function Documentation

void Message_ExecStatus::Add ( const Message_ExecStatus theOther)
inline

Add statuses to me from theOther execution status.

void Message_ExecStatus::And ( const Message_ExecStatus theOther)
inline

Leave only the statuses common with theOther.

void Message_ExecStatus::Clear ( Message_Status  status)
inline

Clear one status.

void Message_ExecStatus::Clear ( )
inline

Clear all statuses.

void Message_ExecStatus::ClearAllAlarm ( )
inline

Check if at least one status of each type is set.

void Message_ExecStatus::ClearAllDone ( )
inline

Clear all statuses of each type.

void Message_ExecStatus::ClearAllFail ( )
inline

Check if at least one status of each type is set.

void Message_ExecStatus::ClearAllWarn ( )
inline

Check if at least one status of each type is set.

Standard_Boolean Message_ExecStatus::IsAlarm ( ) const
inline

Check if at least one status of each type is set.

Standard_Boolean Message_ExecStatus::IsDone ( ) const
inline

Check if at least one status of each type is set.

Standard_Boolean Message_ExecStatus::IsFail ( ) const
inline

Check if at least one status of each type is set.

Standard_Boolean Message_ExecStatus::IsSet ( Message_Status  status) const
inline

Check status for being set.

Standard_Boolean Message_ExecStatus::IsWarn ( ) const
inline

Check if at least one status of each type is set.

static Standard_Integer Message_ExecStatus::LocalStatusIndex ( Message_Status  status)
inlinestatic

Returns index of status inside type of status (Done or Warn or, etc) in range [1, StatusesPerType].

const Message_ExecStatus& Message_ExecStatus::operator&= ( const Message_ExecStatus theOther)
inline

Check if at least one status of each type is set.

const Message_ExecStatus& Message_ExecStatus::operator|= ( const Message_ExecStatus theOther)
inline

Check if at least one status of each type is set.

void Message_ExecStatus::Set ( Message_Status  status)
inline

Sets a status flag.

void Message_ExecStatus::SetAllAlarm ( )
inline

Check if at least one status of each type is set.

void Message_ExecStatus::SetAllDone ( )
inline

Set all statuses of each type.

void Message_ExecStatus::SetAllFail ( )
inline

Check if at least one status of each type is set.

void Message_ExecStatus::SetAllWarn ( )
inline

Check if at least one status of each type is set.

static Message_Status Message_ExecStatus::StatusByIndex ( const Standard_Integer  theIndex)
inlinestatic

Returns status with index theIndex in whole range [FirstStatus, LastStatus].

static Standard_Integer Message_ExecStatus::StatusIndex ( Message_Status  status)
inlinestatic

Returns index of status in whole range [FirstStatus, LastStatus].

static Message_StatusType Message_ExecStatus::TypeOfStatus ( Message_Status  status)
inlinestatic

Returns status type (DONE, WARN, ALARM, or FAIL)


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