Back to index

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

#include <GlobusErrorUtils.h>

List of all members.

Public Member Functions

 GlobusResult ()
 GlobusResult (const globus_result_t result)
GlobusResultoperator= (const globus_result_t result)
bool operator== (const GlobusResult &result) const
bool operator!= (const GlobusResult &result) const
 operator bool () const
bool operator! () const
 operator globus_result_t () const
std::string str () const

Private Attributes

globus_result_t r

Detailed Description

Definition at line 19 of file GlobusErrorUtils.h.


Constructor & Destructor Documentation

Definition at line 21 of file GlobusErrorUtils.h.

      : r(GLOBUS_SUCCESS) {}
Arc::GlobusResult::GlobusResult ( const globus_result_t  result) [inline]

Definition at line 23 of file GlobusErrorUtils.h.

      : r(result) {}

Member Function Documentation

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

Definition at line 35 of file GlobusErrorUtils.h.

                          {
      return (r == GLOBUS_SUCCESS);
    }
Arc::GlobusResult::operator globus_result_t ( ) const [inline]

Definition at line 41 of file GlobusErrorUtils.h.

                                     {
      return r;
    }
bool Arc::GlobusResult::operator! ( void  ) const [inline]

Definition at line 38 of file GlobusErrorUtils.h.

                           {
      return (r != GLOBUS_SUCCESS);
    }
bool Arc::GlobusResult::operator!= ( const GlobusResult result) const [inline]

Definition at line 32 of file GlobusErrorUtils.h.

                                                      {
      return (r != result.r);
    }
GlobusResult& Arc::GlobusResult::operator= ( const globus_result_t  result) [inline]

Definition at line 25 of file GlobusErrorUtils.h.

                                                          {
      r = result;
      return *this;
    }
bool Arc::GlobusResult::operator== ( const GlobusResult result) const [inline]

Definition at line 29 of file GlobusErrorUtils.h.

                                                      {
      return (r == result.r);
    }
std::string Arc::GlobusResult::str ( ) const

Definition at line 30 of file GlobusErrorUtils.cpp.

                                    {
    if (r == GLOBUS_SUCCESS)
      return "<success>";
    globus_object_t *err = globus_error_get(r);
    std::string s;
    for (globus_object_t *err_ = err; err_;
        err_ = globus_error_base_get_cause(err_)) {
      if (err_ != err)
       s += "/";
      char *tmp = globus_object_printable_to_string(err_);
      if (tmp) {
       s += tmp;
       free(tmp);
      }
      else
       s += "unknown error";
    }
    if (err)
      globus_object_free(err);
    return s;
  }

Here is the caller graph for this function:


Member Data Documentation

globus_result_t Arc::GlobusResult::r [private]

Definition at line 46 of file GlobusErrorUtils.h.


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