Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Member Functions | Private Attributes
LRMSResult Class Reference

#include <info_types.h>

Collaboration diagram for LRMSResult:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LRMSResult (void)
 LRMSResult (const std::string &s)
 LRMSResult (int c)
 LRMSResult (const char *s)
void operator= (const std::string &s)
void operator= (const char *s)
int code (void) const
const std::string & description (void) const

Private Member Functions

bool set (const char *s)

Private Attributes

int code_
std::string description_

Detailed Description

Definition at line 115 of file info_types.h.


Constructor & Destructor Documentation

LRMSResult::LRMSResult ( void  ) [inline]

Definition at line 121 of file info_types.h.

:code_(-1),description_("") { };
LRMSResult::LRMSResult ( const std::string &  s) [inline]

Definition at line 122 of file info_types.h.

{ set(s.c_str()); };
LRMSResult::LRMSResult ( int  c) [inline]

Definition at line 123 of file info_types.h.

:code_(c),description_("") { };
LRMSResult::LRMSResult ( const char *  s) [inline]

Definition at line 124 of file info_types.h.

{ set(s); };

Member Function Documentation

int LRMSResult::code ( void  ) const [inline]

Definition at line 127 of file info_types.h.

{ return code_; }; 

Here is the caller graph for this function:

const std::string& LRMSResult::description ( void  ) const [inline]

Definition at line 128 of file info_types.h.

{ return description_; };

Here is the caller graph for this function:

void LRMSResult::operator= ( const std::string &  s) [inline]

Definition at line 125 of file info_types.h.

{ set(s.c_str()); };
void LRMSResult::operator= ( const char *  s) [inline]

Definition at line 126 of file info_types.h.

{ set(s); };
bool LRMSResult::set ( const char *  s) [private]

Definition at line 251 of file info_types.cpp.

                                  {
  // 1. Empty string = exit code 0
  if(s == NULL) s="";
  for(;*s;++s) { if(!isspace(*s)) break; };
  if(!*s) { code_=0; description_=""; };
  // Try to read first word as number
  char* e;
  code_=strtol(s,&e,0);
  if((!*e) || (isspace(*e))) {
    for(;*e;++e) { if(!isspace(*e)) break; };
    description_=e;
    return true;
  };
  // If there is no number that means some "uncoded" failure
  code_=-1;
  description_=s;
  return true;
}

Member Data Documentation

int LRMSResult::code_ [private]

Definition at line 117 of file info_types.h.

std::string LRMSResult::description_ [private]

Definition at line 118 of file info_types.h.


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