Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
Arc::MCC_Status Class Reference

A class for communication of MCC processing results. More...

#include <MCC_Status.h>

Collaboration diagram for Arc::MCC_Status:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MCC_Status (StatusKind kind=STATUS_UNDEFINED, const std::string &origin="???", const std::string &explanation="No explanation.")
 The constructor.
bool isOk () const
 Is the status kind ok?
StatusKind getKind () const
 Returns the status kind.
const std::string & getOrigin () const
 Returns the origin.
const std::string & getExplanation () const
 Returns an explanation.
 operator std::string () const
 Conversion to string.
 operator bool (void) const
 Is the status kind ok?
bool operator! (void) const
 not operator

Private Attributes

StatusKind kind
 The kind (type) of status.
std::string origin
 A string describing the origin MCC of this object.
std::string explanation
 An explanation of this object.

Detailed Description

A class for communication of MCC processing results.

This class is used to communicate result status between MCCs. It contains a status kind, a string specifying the origin (MCC) of the status object and an explanation.

Definition at line 37 of file MCC_Status.h.


Constructor & Destructor Documentation

Arc::MCC_Status::MCC_Status ( StatusKind  kind = STATUS_UNDEFINED,
const std::string &  origin = "???",
const std::string &  explanation = "No explanation." 
)

The constructor.

Creates a MCC_Status object.

Parameters:
kindThe StatusKind (default: STATUS_UNDEFINED)
originThe origin MCC (default: "???")
explanationAn explanation (default: "No explanation.")

Definition at line 30 of file MCC_Status.cpp.


Member Function Documentation

const std::string & Arc::MCC_Status::getExplanation ( ) const

Returns an explanation.

This method returns an explanation of this object.

Returns:
An explanation of this object.

Definition at line 51 of file MCC_Status.cpp.

                                                   {
    return explanation;
  }

Here is the caller graph for this function:

Returns the status kind.

Returns the status kind of this object.

Returns:
The status kind of this object.

Definition at line 43 of file MCC_Status.cpp.

                                      {
    return kind;
  }
const std::string & Arc::MCC_Status::getOrigin ( ) const

Returns the origin.

This method returns a string specifying the origin MCC of this object.

Returns:
A string specifying the origin MCC of this object.

Definition at line 47 of file MCC_Status.cpp.

                                              {
    return origin;
  }

Here is the caller graph for this function:

bool Arc::MCC_Status::isOk ( ) const

Is the status kind ok?

This method returns true if the status kind of this object is STATUS_OK

Returns:
true if kind==STATUS_OK

Definition at line 39 of file MCC_Status.cpp.

                             {
    return kind==STATUS_OK;
  }

Here is the caller graph for this function:

Arc::MCC_Status::operator bool ( void  ) const [inline]

Is the status kind ok?

This method returns true if the status kind of this object is STATUS_OK

Returns:
true if kind==STATUS_OK

Definition at line 86 of file MCC_Status.h.

{ return isOk(); };

Here is the call graph for this function:

Arc::MCC_Status::operator std::string ( ) const

Conversion to string.

This operator converts a MCC_Status object to a string.

Definition at line 55 of file MCC_Status.cpp.

                                      {
    return origin + ": " + string(kind) + " (" + explanation + ")";
  }

Here is the call graph for this function:

bool Arc::MCC_Status::operator! ( void  ) const [inline]

not operator

Returns true if the status kind is not OK

Returns:
true if kind!=STATUS_OK

Definition at line 92 of file MCC_Status.h.

{ return !isOk(); };

Here is the call graph for this function:


Member Data Documentation

std::string Arc::MCC_Status::explanation [private]

An explanation of this object.

Definition at line 103 of file MCC_Status.h.

The kind (type) of status.

Definition at line 92 of file MCC_Status.h.

std::string Arc::MCC_Status::origin [private]

A string describing the origin MCC of this object.

Definition at line 100 of file MCC_Status.h.


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