Back to index

nordugrid-arc-nox  1.1.0~rc6
Classes | Functions
info_types.h File Reference
#include <string>
#include <list>
#include <iostream>
#include <arc/DateTime.h>
#include <arc/client/JobDescription.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FileData
class  JobLocalDescription
class  LRMSResult

Functions

std::istream & operator>> (std::istream &i, FileData &fd)
std::ostream & operator<< (std::ostream &o, const FileData &fd)
std::istream & operator>> (std::istream &i, LRMSResult &r)
std::ostream & operator<< (std::ostream &i, const LRMSResult &r)
void output_escaped_string (std::ostream &o, const std::string &str)

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const FileData fd 
)

Definition at line 47 of file info_types.cpp.

                                                          {
  output_escaped_string(o,fd.pfn);
  o.put(' ');
  output_escaped_string(o,fd.lfn);
  return o;
}

Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  i,
const LRMSResult r 
)

Definition at line 277 of file info_types.cpp.

                                                          {
  o<<r.code()<<" "<<r.description();
  return o;
}

Here is the call graph for this function:

std::istream& operator>> ( std::istream &  i,
FileData fd 
)

Definition at line 54 of file info_types.cpp.

                                                    {
  char buf[1024];
  istream_readline(i,buf,sizeof(buf));
  fd.pfn.resize(0); fd.lfn.resize(0);
  int n=input_escaped_string(buf,fd.pfn);
  input_escaped_string(buf+n,fd.lfn);
  if((fd.pfn.length() == 0) && (fd.lfn.length() == 0)) return i; /* empty st */
  if(canonical_dir(fd.pfn) != 0) {
    logger.msg(Arc::ERROR,"Wrong directory in %s",buf);
    fd.pfn.resize(0); fd.lfn.resize(0);
  };
  return i;
}

Here is the call graph for this function:

std::istream& operator>> ( std::istream &  i,
LRMSResult r 
)

Definition at line 270 of file info_types.cpp.

                                                    {
  char buf[1025]; // description must have reasonable size
  if(i.eof()) { buf[0]=0; } else { istream_readline(i,buf,sizeof(buf)); };
  r=buf;
  return i;
}
void output_escaped_string ( std::ostream &  o,
const std::string &  str 
)

Definition at line 34 of file info_types.cpp.

                                                               {
  std::string::size_type n,nn;
  for(nn=0;;) {
//    if((n=str.find(' ',nn)) == std::string::npos) break;
    if((n=str.find_first_of(" \\",nn)) == std::string::npos) break;
    o.write(str.data()+nn,n-nn);
    o.put('\\');
    o.put(*(str.data()+n));
    nn=n+1;
  };
  o.write(str.data()+nn,str.length()-nn);
}

Here is the caller graph for this function: