rsync_behavior Class Reference

A configuration manager support class: Used to map rsync exit codes to actions for rvm to take. More...

#include <rconfig.h>

List of all members.

Public Types

enum  behavior_type {
  quit, fail, retry, retry_without_hardlinks,
  ok
}
typedef behavior_type value_type
typedef std::map< uint16,
value_type
map_type

Public Member Functions

void clear (void)
 Clear all values and set the default to "retry".
void reset (void)
 Clear all values and set some sane default actions.
 rsync_behavior ()
 C'tor.
 rsync_behavior (const rsync_behavior &a_class)
 C'tor.
void assign (const uint16 a_code, const value_type a_action)
 Assign an action to be taken for a specific exit code.
void assign (const rsync_behavior &a_class)
 Assign actions to be taken from another rsync_behavior instance.
void assign (const std::string &a_str)
 Assign actions to be taken from a string (parse a string in the form of exit-code '=' action).
const value_type operator[] (const uint16 a_code) const
 Return the action to be taken for a given exit code.
value_typeoperator[] (const uint16 a_code)
 Return the action to be taken for a given exit code.
rsync_behavioroperator= (const rsync_behavior &a_class)
 Assignment.
rsync_behavioroperator= (const value_type a_enum)
 Assignment.
rsync_behavioroperator= (const std::string &a_str)
 Assignment.
const value_type default_value (void) const
 Return the default action.
const map_typemap_value (void) const
 Return an std::map of exit codes to actions.

Static Public Attributes

static const uint16 default_behavior = ((uint16)-1)
 Default behavior.

Private Attributes

map_type m_map
value_type m_default

Detailed Description

A configuration manager support class: Used to map rsync exit codes to actions for rvm to take.

Definition at line 95 of file rconfig.h.


Member Typedef Documentation

Definition at line 106 of file rconfig.h.

Definition at line 105 of file rconfig.h.


Member Enumeration Documentation

Enumerator:
quit 
fail 
retry 
retry_without_hardlinks 
ok 

Definition at line 98 of file rconfig.h.


Constructor & Destructor Documentation

rsync_behavior::rsync_behavior (  ) 

C'tor.

Definition at line 403 of file rconfig.cc.

References reset().

Here is the call graph for this function:

rsync_behavior::rsync_behavior ( const rsync_behavior a_class  ) 

C'tor.

Definition at line 409 of file rconfig.cc.

References assign().

Here is the call graph for this function:


Member Function Documentation

void rsync_behavior::assign ( const std::string &  a_str  ) 

Assign actions to be taken from a string (parse a string in the form of exit-code '=' action).

Definition at line 439 of file rconfig.cc.

References assign(), default_behavior, ERROR, fail, ok, quit, retry, retry_without_hardlinks, and TRY_nomem.

Here is the call graph for this function:

void rsync_behavior::assign ( const rsync_behavior a_class  ) 

Assign actions to be taken from another rsync_behavior instance.

Definition at line 425 of file rconfig.cc.

References clear(), default_value(), m_default, m_map, map_value(), and TRY_nomem.

Here is the call graph for this function:

void rsync_behavior::assign ( const uint16  a_code,
const value_type  a_action 
)

Assign an action to be taken for a specific exit code.

Definition at line 415 of file rconfig.cc.

References default_behavior, m_default, m_map, and TRY_nomem.

Referenced by assign(), operator=(), and rsync_behavior().

void rsync_behavior::clear ( void   ) 

Clear all values and set the default to "retry".

Definition at line 378 of file rconfig.cc.

References m_default, m_map, and retry.

Referenced by assign(), job_parser::parse_clear(), and reset().

const rsync_behavior::behavior_type rsync_behavior::default_value ( void   )  const

Return the default action.

Definition at line 543 of file rconfig.cc.

References m_default.

Referenced by assign(), and test().

const rsync_behavior::map_type & rsync_behavior::map_value ( void   )  const

Return an std::map of exit codes to actions.

Definition at line 549 of file rconfig.cc.

References m_map.

Referenced by assign(), and test().

rsync_behavior & rsync_behavior::operator= ( const std::string &  a_str  ) 

Assignment.

Definition at line 535 of file rconfig.cc.

References assign().

Here is the call graph for this function:

rsync_behavior & rsync_behavior::operator= ( const value_type  a_enum  ) 

Assignment.

Definition at line 527 of file rconfig.cc.

References assign(), and default_behavior.

Here is the call graph for this function:

rsync_behavior & rsync_behavior::operator= ( const rsync_behavior a_class  ) 

Assignment.

Definition at line 518 of file rconfig.cc.

References assign().

Here is the call graph for this function:

rsync_behavior::value_type & rsync_behavior::operator[] ( const uint16  a_code  ) 

Return the action to be taken for a given exit code.

Definition at line 509 of file rconfig.cc.

References default_behavior, m_default, and m_map.

const rsync_behavior::value_type rsync_behavior::operator[] ( const uint16  a_code  )  const

Return the action to be taken for a given exit code.

Definition at line 496 of file rconfig.cc.

References default_behavior, m_default, and m_map.

void rsync_behavior::reset ( void   ) 

Clear all values and set some sane default actions.

Definition at line 385 of file rconfig.cc.

References clear(), fail, m_default, m_map, ok, retry, retry_without_hardlinks, and TRY_nomem.

Referenced by rsync_behavior().

Here is the call graph for this function:


Member Data Documentation

Default behavior.

Definition at line 107 of file rconfig.h.

Referenced by assign(), operator=(), and operator[]().

Definition at line 130 of file rconfig.h.

Referenced by assign(), clear(), default_value(), operator[](), and reset().

Definition at line 129 of file rconfig.h.

Referenced by assign(), clear(), map_value(), operator[](), and reset().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Thu Sep 30 14:09:50 2010 for rvm by  doxygen 1.6.1