Open CASCADE Technology 7.8.0
|
#include <Message_ExecStatus.hxx>
Public Member Functions | |
Creation and simple operations with statuses | |
Message_ExecStatus () | |
Create empty execution status. | |
Message_ExecStatus (Message_Status theStatus) | |
Initialise the execution status. | |
void | Set (Message_Status theStatus) |
Sets a status flag. | |
Standard_Boolean | IsSet (Message_Status theStatus) const |
Check status for being set. | |
void | Clear (Message_Status theStatus) |
Clear one status. | |
Advanced: Group operations (useful for analysis) | |
Standard_Boolean | IsDone () const |
Check if at least one status of each type is set. | |
Standard_Boolean | IsFail () const |
Check if at least one status of each type is set. | |
Standard_Boolean | IsWarn () const |
Check if at least one status of each type is set. | |
Standard_Boolean | IsAlarm () const |
Check if at least one status of each type is set. | |
void | SetAllDone () |
Set all statuses of each type. | |
void | SetAllWarn () |
Check if at least one status of each type is set. | |
void | SetAllAlarm () |
Check if at least one status of each type is set. | |
void | SetAllFail () |
Check if at least one status of each type is set. | |
void | ClearAllDone () |
Clear all statuses of each type. | |
void | ClearAllWarn () |
Check if at least one status of each type is set. | |
void | ClearAllAlarm () |
Check if at least one status of each type is set. | |
void | ClearAllFail () |
Check if at least one status of each type is set. | |
void | Clear () |
Clear all statuses. | |
void | Add (const Message_ExecStatus &theOther) |
Add statuses to me from theOther execution status. | |
const Message_ExecStatus & | operator|= (const Message_ExecStatus &theOther) |
Check if at least one status of each type is set. | |
void | And (const Message_ExecStatus &theOther) |
Leave only the statuses common with theOther. | |
const Message_ExecStatus & | operator&= (const Message_ExecStatus &theOther) |
Check if at least one status of each type is set. | |
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 theStatus) |
Returns index of status in whole range [FirstStatus, LastStatus]. | |
static Standard_Integer | LocalStatusIndex (Message_Status theStatus) |
Returns index of status inside type of status (Done or Warn or, etc) in range [1, StatusesPerType]. | |
static Message_StatusType | TypeOfStatus (Message_Status theStatus) |
Returns status type (DONE, WARN, ALARM, or FAIL) | |
static Message_Status | StatusByIndex (const Standard_Integer theIndex) |
Returns status with index theIndex in whole range [FirstStatus, LastStatus]. | |
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:
|
inline |
Create empty execution status.
|
inline |
Initialise the execution status.
|
inline |
Add statuses to me from theOther execution status.
|
inline |
Leave only the statuses common with theOther.
|
inline |
Clear all statuses.
|
inline |
Clear one status.
|
inline |
Check if at least one status of each type is set.
|
inline |
Clear all statuses of each type.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check status for being set.
|
inline |
Check if at least one status of each type is set.
|
inlinestatic |
Returns index of status inside type of status (Done or Warn or, etc) in range [1, StatusesPerType].
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inline |
Sets a status flag.
|
inline |
Check if at least one status of each type is set.
|
inline |
Set all statuses of each type.
|
inline |
Check if at least one status of each type is set.
|
inline |
Check if at least one status of each type is set.
|
inlinestatic |
Returns status with index theIndex in whole range [FirstStatus, LastStatus].
|
inlinestatic |
Returns index of status in whole range [FirstStatus, LastStatus].
|
inlinestatic |
Returns status type (DONE, WARN, ALARM, or FAIL)