rvm  1.11
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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

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. More...
 

Private Member Functions

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

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 361 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 = false 
)

C'tor.

Definition at line 2624 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 2645 of file rconfig.cc.

References m_line, m_path, and TRY_nomem.

Referenced by parse().

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

Parse an "archive-path" command.

Definition at line 2824 of file rconfig.cc.

References TRY, and TRY_nomem.

Referenced by parse().

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

Parse an "exclude-from" command.

Definition at line 2890 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 2958 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 2964 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 2970 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_include_from ( const std::string &  a_value)
private

Parse an "include-from" command.

Definition at line 2924 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_jobname ( const std::string &  a_value)
private

Parse a "jobname" command.

Definition at line 3023 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 3029 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 3035 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 3055 of file rconfig.cc.

References job::connection_local, job::connection_remote, job::connection_server, job::connection_ssh_local, 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 3082 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 3117 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 3153 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 3168 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 3196 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_module ( const std::string &  a_value)
private

Parse an "rsync-remote-module" command.

Definition at line 3311 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 3290 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 3296 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_user ( const std::string &  a_value)
private

Parse a "remote-user" command.

Definition at line 3284 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 3317 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 3332 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 3347 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_ssh_options ( const std::string &  a_value)
private

Parse an "ssh-options" command.

Definition at line 3182 of file rconfig.cc.

References m_delimiter, and TRY_nomem.

Referenced by parse(), and parse_ssh_options_context().

void job_parser::parse_ssh_options_context ( const std::string &  a_value)
private

Parse an ssh-options context.

Definition at line 3240 of file rconfig.cc.

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

Referenced by parse().

Here is the call graph for this function:

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

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

Definition at line 2659 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:

Member Data Documentation

bool job_parser::m_default_context
private

Definition at line 379 of file rconfig.h.

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

const std::string* job_parser::m_delimiter
private

Definition at line 378 of file rconfig.h.

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

std::istream* job_parser::m_in
private
job* job_parser::m_job
private

Definition at line 374 of file rconfig.h.

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

uint16* job_parser::m_line
private

Definition at line 377 of file rconfig.h.

Referenced by job_parser(), and location().

const std::string* job_parser::m_path
private

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