job_parser Class Reference

A configuration manager support class: Used to parse a configuration file from the perspective of a job context. More...

#include <rconfig.h>

Collaboration diagram for job_parser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 job_parser (job *a_job, const std::string &a_path, uint16 &a_line, std::istream &a_in, const std::string &a_block_delimiter, const bool a_default_context)
 C'tor.

Private Member Functions

const std::string location (void)
 Construct a string with the current location of the parser in a configuration file.
void read_job (const std::string &a_path)
 Read a job configuration file, used by the "include" command.
void parse (void)
 Job context parser.
void parse_archive_path (const std::string &a_value)
 Parse an "archive-path" command.
void parse_clear (const std::string &a_value)
 Parse a "clear" command.
void parse_exclude_from (const std::string &a_value)
 Parse an "exclude-from" command.
void parse_include_from (const std::string &a_value)
 Parse an "include-from" command.
void parse_groupname (const std::string &a_value)
 Parse a "groupname" command.
void parse_hostname (const std::string &a_value)
 Parse a "hostname" command.
void parse_include (const std::string &a_value)
 Parse an "include" command.
void parse_jobname (const std::string &a_value)
 Parse a "jobname" command.
void parse_path (const std::string &a_value)
 Parse a "path" command.
void parse_rsync_behavior (const std::string &a_value)
 Parse an "rsync-behavior" command.
void parse_rsync_connection_type (const std::string &a_value)
 Parse an "rsync-connection-type" command.
void parse_rsync_hardlink (const std::string &a_value)
 Parse an "rsync-hardlink" command.
void parse_rsync_multi_hardlink (const std::string &a_value)
 Parse an "rsync-multi-hardlink" command.
void parse_rsync_multi_hardlink_max (const std::string &a_value)
 Parse an "rsync-multi-hardlink-max" command.
void parse_rsync_options (const std::string &a_value)
 Parse an "rsync-options" command.
void parse_rsync_options_context (const std::string &a_value)
 Parse an rsync-options context.
void parse_rsync_remote_user (const std::string &a_value)
 Parse a "remote-user" command.
void parse_rsync_remote_path (const std::string &a_value)
 Parse an "rsync-remote-path" command.
void parse_rsync_remote_port (const std::string &a_value)
 Parse an "rsync-remote-port" command.
void parse_rsync_remote_module (const std::string &a_value)
 Parse an "rsync-remote-module" command.
void parse_rsync_retry_count (const std::string &a_value)
 Parse an "rsync-retry-count" command.
void parse_rsync_retry_delay (const std::string &a_value)
 Parse an "rsync-retry-delay" command.
void parse_rsync_timeout (const std::string &a_value)
 Parse an "rsync-timeout" command.

Private Attributes

jobm_job
const std::string * m_path
std::istream * m_in
uint16 * m_line
const std::string * m_delimiter
bool m_default_context

Detailed Description

A configuration manager support class: Used to parse a configuration file from the perspective of a job context.

Definition at line 352 of file rconfig.h.


Constructor & Destructor Documentation

job_parser::job_parser ( job a_job,
const std::string &  a_path,
uint16 &  a_line,
std::istream &  a_in,
const std::string &  a_block_delimiter,
const bool  a_default_context 
)

C'tor.

Definition at line 2487 of file rconfig.cc.

References m_default_context, m_delimiter, m_in, m_job, m_line, m_path, and parse().

Referenced by read_job().

Here is the call graph for this function:


Member Function Documentation

const std::string job_parser::location ( void   )  [private]

Construct a string with the current location of the parser in a configuration file.

Definition at line 2508 of file rconfig.cc.

References m_line, m_path, and TRY_nomem.

Referenced by parse().

void job_parser::read_job ( const std::string &  a_path  )  [private]

Read a job configuration file, used by the "include" command.

Definition at line 2522 of file rconfig.cc.

References ERROR, job_parser(), m_default_context, m_job, and TRY_nomem.

Referenced by parse_include().

Here is the call graph for this function:

void job_parser::parse ( void   )  [private]

Job context parser.

Definition at line 2542 of file rconfig.cc.

References err_unknown, ERROR, ERROR_INSTANCE, location(), m_default_context, m_delimiter, m_in, parse_archive_path(), parse_clear(), parse_exclude_from(), parse_groupname(), parse_hostname(), parse_include(), parse_include_from(), parse_jobname(), parse_line(), parse_path(), parse_rsync_behavior(), parse_rsync_connection_type(), parse_rsync_hardlink(), parse_rsync_multi_hardlink(), parse_rsync_multi_hardlink_max(), parse_rsync_options(), parse_rsync_options_context(), parse_rsync_remote_module(), parse_rsync_remote_path(), parse_rsync_remote_port(), parse_rsync_remote_user(), parse_rsync_retry_count(), parse_rsync_retry_delay(), parse_rsync_timeout(), error::push_back(), and TRY_nomem.

Referenced by job_parser().

Here is the call graph for this function:

void job_parser::parse_archive_path ( const std::string &  a_value  )  [private]

Parse an "archive-path" command.

Definition at line 2681 of file rconfig.cc.

References TRY, and TRY_nomem.

Referenced by parse().

void job_parser::parse_clear ( const std::string &  a_value  )  [private]

Parse a "clear" command.

Definition at line 2690 of file rconfig.cc.

References job::archive_path, rsync_behavior::clear(), ERROR, job::excludes, job::groupname, job::hostname, job::includes, job::jobname, m_delimiter, m_job, job::paths, job::rsync_behavior, job::rsync_options, job::rsync_remote_module, job::rsync_remote_path, job::rsync_remote_port, job::rsync_remote_user, timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_exclude_from ( const std::string &  a_value  )  [private]

Parse an "exclude-from" command.

Definition at line 2744 of file rconfig.cc.

References ERROR, m_path, parse_dirname(), directory::path(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_include_from ( const std::string &  a_value  )  [private]

Parse an "include-from" command.

Definition at line 2778 of file rconfig.cc.

References ERROR, m_path, parse_dirname(), directory::path(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_groupname ( const std::string &  a_value  )  [private]

Parse a "groupname" command.

Definition at line 2812 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_hostname ( const std::string &  a_value  )  [private]

Parse a "hostname" command.

Definition at line 2818 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_include ( const std::string &  a_value  )  [private]

Parse an "include" command.

Definition at line 2824 of file rconfig.cc.

References err_unknown, ERROR, ERROR_INSTANCE, m_path, parse_dirname(), directory::path(), error::push_back(), read_job(), TRY_instead, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_jobname ( const std::string &  a_value  )  [private]

Parse a "jobname" command.

Definition at line 2877 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_path ( const std::string &  a_value  )  [private]

Parse a "path" command.

Definition at line 2883 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_rsync_behavior ( const std::string &  a_value  )  [private]

Parse an "rsync-behavior" command.

Definition at line 2889 of file rconfig.cc.

References timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_connection_type ( const std::string &  a_value  )  [private]

Parse an "rsync-connection-type" command.

Definition at line 2909 of file rconfig.cc.

References job::connection_local, job::connection_remote, job::connection_server, ERROR, timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_hardlink ( const std::string &  a_value  )  [private]

Parse an "rsync-hardlink" command.

Definition at line 2933 of file rconfig.cc.

References ERROR, timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_multi_hardlink ( const std::string &  a_value  )  [private]

Parse an "rsync-multi-hardlink" command.

Definition at line 2968 of file rconfig.cc.

References ERROR, timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_multi_hardlink_max ( const std::string &  a_value  )  [private]

Parse an "rsync-multi-hardlink-max" command.

Definition at line 3004 of file rconfig.cc.

References ERROR, TRY_instead, and TRY_nomem.

Referenced by parse().

void job_parser::parse_rsync_options ( const std::string &  a_value  )  [private]

Parse an "rsync-options" command.

Definition at line 3019 of file rconfig.cc.

References m_delimiter, and TRY_nomem.

Referenced by parse(), and parse_rsync_options_context().

void job_parser::parse_rsync_options_context ( const std::string &  a_value  )  [private]

Parse an rsync-options context.

Definition at line 3033 of file rconfig.cc.

References ERROR, m_in, parse_rsync_options(), and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_remote_user ( const std::string &  a_value  )  [private]

Parse a "remote-user" command.

Definition at line 3077 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_rsync_remote_path ( const std::string &  a_value  )  [private]

Parse an "rsync-remote-path" command.

Definition at line 3083 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_rsync_remote_port ( const std::string &  a_value  )  [private]

Parse an "rsync-remote-port" command.

Definition at line 3089 of file rconfig.cc.

References timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_remote_module ( const std::string &  a_value  )  [private]

Parse an "rsync-remote-module" command.

Definition at line 3104 of file rconfig.cc.

References TRY_nomem.

Referenced by parse().

void job_parser::parse_rsync_retry_count ( const std::string &  a_value  )  [private]

Parse an "rsync-retry-count" command.

Definition at line 3110 of file rconfig.cc.

References timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_retry_delay ( const std::string &  a_value  )  [private]

Parse an "rsync-retry-delay" command.

Definition at line 3125 of file rconfig.cc.

References timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:

void job_parser::parse_rsync_timeout ( const std::string &  a_value  )  [private]

Parse an "rsync-timeout" command.

Definition at line 3140 of file rconfig.cc.

References timestamp::str(), TRY, and TRY_nomem.

Referenced by parse().

Here is the call graph for this function:


Member Data Documentation

job* job_parser::m_job [private]

Definition at line 365 of file rconfig.h.

Referenced by job_parser(), parse_clear(), and read_job().

const std::string* job_parser::m_path [private]

Definition at line 366 of file rconfig.h.

Referenced by job_parser(), location(), parse_exclude_from(), parse_include(), and parse_include_from().

std::istream* job_parser::m_in [private]

Definition at line 367 of file rconfig.h.

Referenced by job_parser(), parse(), and parse_rsync_options_context().

uint16* job_parser::m_line [private]

Definition at line 368 of file rconfig.h.

Referenced by job_parser(), and location().

const std::string* job_parser::m_delimiter [private]

Definition at line 369 of file rconfig.h.

Referenced by job_parser(), parse(), parse_clear(), and parse_rsync_options().

bool job_parser::m_default_context [private]

Definition at line 370 of file rconfig.h.

Referenced by job_parser(), parse(), and read_job().


The documentation for this class was generated from the following files:
Generated on Tue Jul 1 12:11:50 2008 for rvm by  doxygen 1.5.1