Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Error Class Reference

Collaboration diagram for Error:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Error ()
 ~Error ()
void clear ()
void set (CmtError::code code, const cmt_string &text)
CmtError::code get_code () const
const cmt_stringget_text () const
const cmt_stringget_name (CmtError::code error) const

Static Public Member Functions

Errorinstance ()

Private Attributes

CmtError::code m_code
cmt_string m_text
cmt_vector< cmt_stringerror_names

Constructor & Destructor Documentation

Error::Error  )  [inline]
 

Definition at line 15 of file cmt_error.cxx.

References cmt_vector< cmt_string >::add(), and error_names.

00016   {
00017     error_names.add() = "ok";
00018     error_names.add() = "Warning";
00019     error_names.add() = "symbol not found";
00020     error_names.add() = "pattern not found";
00021     error_names.add() = "syntax error";
00022     error_names.add() = "command_not_implemented";
00023     error_names.add() = "package_not_found";
00024     error_names.add() = "path_not_found";
00025     error_names.add() = "version_conflict";
00026     error_names.add() = "file_access_error";
00027     error_names.add() = "execution_error";
00028     error_names.add() = "cannot_lock";
00029     error_names.add() = "cannot_write_lock";
00030     error_names.add() = "cannot_run_lock_command";
00031     error_names.add() = "cannot_unlock";
00032     error_names.add() = "cannot_run_unlock_command";
00033     error_names.add() = "cannot_remove_lock";
00034     error_names.add() = "conflicting_lock";
00035     error_names.add() = "unknown_command";
00036     error_names.add() = "project_release_conflict";
00037   }

Error::~Error  )  [inline]
 

Definition at line 39 of file cmt_error.cxx.

00040   {
00041   }


Member Function Documentation

void Error::clear  )  [inline]
 

Definition at line 43 of file cmt_error.cxx.

References m_code, and m_text.

Referenced by CmtError::clear().

00044   {
00045     m_code = CmtError::ok;
00046     m_text = "";
00047   }

CmtError::code Error::get_code  )  const [inline]
 

Definition at line 55 of file cmt_error.cxx.

References m_code.

Referenced by CmtError::get_last_error(), CmtError::get_last_error_code(), CmtError::has_pending_error(), and CmtError::print().

00056   {
00057     return (m_code);
00058   }

const cmt_string& Error::get_name CmtError::code  error  )  const [inline]
 

Definition at line 65 of file cmt_error.cxx.

References error_names.

Referenced by CmtError::get_error_name().

00066   {
00067     const cmt_string& s = error_names[error];
00068 
00069     return (s);
00070   }

const cmt_string& Error::get_text  )  const [inline]
 

Definition at line 60 of file cmt_error.cxx.

References m_text.

Referenced by CmtError::get_last_error(), and CmtError::print().

00061   {
00062     return (m_text);
00063   }

Error & Error::instance  )  [static]
 

Definition at line 79 of file cmt_error.cxx.

Referenced by CmtError::clear(), CmtError::get_error_name(), CmtError::get_last_error(), CmtError::get_last_error_code(), CmtError::has_pending_error(), CmtError::print(), and CmtError::set().

00080 {
00081   static Error e;
00082   
00083   return (e);
00084 }

void Error::set CmtError::code  code,
const cmt_string text
[inline]
 

Definition at line 49 of file cmt_error.cxx.

References m_code, and m_text.

Referenced by CmtError::set().

00050   {
00051     m_code = code;
00052     m_text = text;
00053   }


Member Data Documentation

cmt_vector<cmt_string> Error::error_names [private]
 

Definition at line 75 of file cmt_error.cxx.

Referenced by Error(), and get_name().

CmtError::code Error::m_code [private]
 

Definition at line 73 of file cmt_error.cxx.

Referenced by clear(), get_code(), and set().

cmt_string Error::m_text [private]
 

Definition at line 74 of file cmt_error.cxx.

Referenced by clear(), get_text(), and set().


The documentation for this class was generated from the following file:
Generated on Mon May 2 10:25:37 2005 for CMT by doxygen 1.3.5