Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

Error Class Reference

Collaboration diagram for Error:

[legend]
List of all members.

Public Methods

? Error ()
? ~Error ()
void? clear ()
void? set (CmtError::code code, const cmt_string &text)
CmtError::code? get_code () const
const cmt_string &? get_text () const
const cmt_string &? get_name (CmtError::code error) const

Static Public Methods

Error &? instance ()

Private Attributes

CmtError::code? m_code
cmt_string? m_text
cmt_vector< cmt_string >? error_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::~Error (? ? )? [inline]
?

Definition at line 37 of file cmt_error.cxx.

00038   {
00039   }

Member Function Documentation

void Error::clear (? ? )? [inline]
?

Definition at line 41 of file cmt_error.cxx.

References m_code, m_text, and CmtError::ok.

Referenced by CmtError::clear().

00042   {
00043     m_code = CmtError::ok;
00044     m_text = "";
00045   }

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

Definition at line 53 of file cmt_error.cxx.

References CmtError::code.

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

00054   {
00055     return (m_code);
00056   }

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

Definition at line 63 of file cmt_error.cxx.

References CmtError::code, and error_names.

Referenced by CmtError::get_error_name().

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

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

Definition at line 58 of file cmt_error.cxx.

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

00059   {
00060     return (m_text);
00061   }

Error & Error::instance (? ? )? [static]
?

Definition at line 77 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().

00078 {
00079   static Error e;
00080   
00081   return (e);
00082 }

void Error::set (? CmtError::code? ? code,
const cmt_string &? ? text
)? [inline]
?

Definition at line 47 of file cmt_error.cxx.

References CmtError::code, m_code, and m_text.

Referenced by CmtError::set().

00048   {
00049     m_code = code;
00050     m_text = text;
00051   }

Member Data Documentation

cmt_vector<cmt_string> Error::error_names [private]
?

Definition at line 73 of file cmt_error.cxx.

Referenced by Error(), and get_name().

CmtError::code Error::m_code [private]
?

Definition at line 71 of file cmt_error.cxx.

Referenced by clear(), and set().

cmt_string Error::m_text [private]
?

Definition at line 72 of file cmt_error.cxx.

Referenced by clear(), and set().


The documentation for this class was generated from the following file:
Generated on Wed Sep 1 11:00:19 2004 for CMT by 1.2.18