Back to index

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

#include <job_desc.h>

List of all members.

Public Member Functions

 value_for_shell (const char *str_, bool quote_)
 value_for_shell (const std::string &str_, bool quote_)

Private Attributes

const char * str
bool quote


std::ostream & operator<< (std::ostream &, const value_for_shell &)

Detailed Description

Definition at line 35 of file job_desc.h.

Constructor & Destructor Documentation

value_for_shell::value_for_shell ( const char *  str_,
bool  quote_ 
) [inline]

Definition at line 41 of file job_desc.h.

:str(str_),quote(quote_) { };
value_for_shell::value_for_shell ( const std::string &  str_,
bool  quote_ 
) [inline]

Definition at line 42 of file job_desc.h.

:str(str_.c_str()),quote(quote_) { };

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const value_for_shell  
) [friend]

Definition at line 166 of file job_desc.cpp.

  if(s.str == NULL) return o;
  if(s.quote) o<<"'";
  const char* p = s.str;
  for(;;) {
    const char* pp = strchr(p,'\'');
    if(pp == NULL) { o<<p; if(s.quote) o<<"'"; break; };
    o.write(p,pp-p); o<<"'\\''"; p=pp+1;
  return o;

Member Data Documentation

bool value_for_shell::quote [private]

Definition at line 39 of file job_desc.h.

const char* value_for_shell::str [private]

Definition at line 38 of file job_desc.h.

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