xorp

CommitStatus Class Reference

A class for storing information regarding the current phase of commit operations. More...

#include <slave_conf_tree.hh>

List of all members.

Public Types

enum  Phase {
  COMMIT_PHASE_NONE = 0, COMMIT_PHASE_1, COMMIT_PHASE_2, COMMIT_PHASE_3,
  COMMIT_PHASE_4, COMMIT_PHASE_5, COMMIT_PHASE_DONE
}

Public Member Functions

 CommitStatus ()
 Default constructor.
void reset ()
 Reset the commit status.
bool success () const
 Test if the current phase has been successful.
const string & error_msg () const
 Get a string with the current error message.
void set_error (const string &error_msg)
 Set the commit status as being in error.
CommitStatus::Phase commit_phase () const
 Get the current commit phase.
void set_commit_phase (CommitStatus::Phase commit_phase)
 Set the current commit phase.

Private Attributes

bool _success
string _error_msg
Phase _commit_phase

Detailed Description

A class for storing information regarding the current phase of commit operations.


Member Function Documentation

CommitStatus::Phase CommitStatus::commit_phase ( ) const [inline]

Get the current commit phase.

Returns:
the current commit phase.
const string& CommitStatus::error_msg ( ) const [inline]

Get a string with the current error message.

Returns:
a string with the current error message.
void CommitStatus::set_commit_phase ( CommitStatus::Phase  commit_phase) [inline]

Set the current commit phase.

Parameters:
commit_phasethe new value of the current commit phase.
void CommitStatus::set_error ( const string &  error_msg) [inline]

Set the commit status as being in error.

Parameters:
error_msgthe message that describes the error.
bool CommitStatus::success ( ) const [inline]

Test if the current phase has been successful.

Returns:
true if the current phase has been successful, otherwise false.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations