rvm  1.11
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
reportio Class Reference

Submit or parse a job path report. More...

#include <reporter.h>

Collaboration diagram for reportio:
Collaboration graph

Public Types

enum  source_type { rsync, report }
 

Public Member Functions

void write_rsync_out (const std::string &a_str)
 Write a report line for output from rsync to parent on child's std::cout. More...
 
void write_rsync_err (const std::string &a_str)
 Write a report line for output from rsync to parent on child's std::cerr. More...
 
void write_report (const std::string a_source, const timer &a_timer, const int a_exit_code, const int a_signal_num, const rsync_behavior::value_type &a_behavior, const std::string &a_error_msg)
 Generate and submit a report to the parent process on child's std::cout. More...
 
job_path_report parse (const std::string &a_str)
 Parse a received report from a child process and return a job_path_report. More...
 
bool is_report (const std::string &a_str)
 Return true if the given string looks like a valid report. More...
 

Static Public Attributes

static const char * tags []
 Report type tags. More...
 

Detailed Description

Submit or parse a job path report.

Definition at line 138 of file reporter.h.

Member Enumeration Documentation

Enumerator
rsync 
report 

Definition at line 141 of file reporter.h.

Member Function Documentation

bool reportio::is_report ( const std::string &  a_str)

Return true if the given string looks like a valid report.

Definition at line 658 of file reporter.cc.

References report, and tags.

job_path_report reportio::parse ( const std::string &  a_str)

Parse a received report from a child process and return a job_path_report.

Definition at line 571 of file reporter.cc.

References job_path_report::assign(), INTERNAL_ERROR, report, tags, and TRY_nomem.

Referenced by job_archiver::mf_process_report().

Here is the call graph for this function:

void reportio::write_report ( const std::string  a_source,
const timer a_timer,
const int  a_exit_code,
const int  a_signal_num,
const rsync_behavior::value_type a_behavior,
const std::string &  a_error_msg 
)

Generate and submit a report to the parent process on child's std::cout.

Definition at line 534 of file reporter.cc.

References report, timer::start_value(), timer::stop_value(), and tags.

Referenced by job_archiver::mf_do_chores().

Here is the call graph for this function:

void reportio::write_rsync_err ( const std::string &  a_str)

Write a report line for output from rsync to parent on child's std::cerr.

Definition at line 525 of file reporter.cc.

References rsync, and tags.

Referenced by job_archiver::mf_process_rsync_io().

void reportio::write_rsync_out ( const std::string &  a_str)

Write a report line for output from rsync to parent on child's std::cout.

Definition at line 516 of file reporter.cc.

References rsync, and tags.

Referenced by job_archiver::mf_process_rsync_io().

Member Data Documentation

const char * reportio::tags
static
Initial value:
= {
"[RSYNC]: ",
"[REPORT]: ",
0
}

Report type tags.

Definition at line 145 of file reporter.h.

Referenced by is_report(), parse(), write_report(), write_rsync_err(), and write_rsync_out().


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