/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DbiExceptionLog.h
Go to the documentation of this file.
00001 #ifndef DBIEXCEPTIONLOG
00002 #define DBIEXCEPTIONLOG
00003 
00004 
00008 
00030 #include <iosfwd>
00031 #include <string>
00032 #include <vector>
00033 
00034 #include "Rtypes.h"
00035 
00036 #include "DatabaseInterface/DbiException.h"
00037 
00038 class TSQLServer;
00039 class TSQLStatement;
00040 class DbiExceptionLog;
00041 
00042 std::ostream& operator<<(std::ostream& s, const DbiExceptionLog& el);    
00043 
00044 class DbiExceptionLog
00045 
00046 {
00047 
00048 public:
00049            DbiExceptionLog(const DbiException* e = 0);
00050   virtual ~DbiExceptionLog();
00051 
00052 // State testing member functions
00053 
00054     Bool_t IsEmpty() const { return fEntries.size() == 0; }
00055 const std::vector<DbiException>&
00056            GetEntries() const { return fEntries; }
00057       void Print() const;
00058     UInt_t Size() const { return fEntries.size(); }
00059       void Copy(DbiExceptionLog& that, UInt_t start=0) const;
00060 
00061 // State changing member functions
00062 
00063  void AddLog(const DbiExceptionLog& el);
00064  void AddEntry(const DbiException& e) { fEntries.push_back(e); }
00065  void AddEntry(const char* errMsg, Int_t code = -1, Int_t dbType = -1) {
00066    this->AddEntry(DbiException(errMsg,code,dbType));}
00067  void AddEntry(const std::string& errMsg, Int_t code = -1, Int_t dbType = -1) {
00068    this->AddEntry(DbiException(errMsg.c_str(),code,dbType));}
00069  void AddEntry(const TSQLServer& server, Int_t dbType = -1) {
00070    this->AddEntry(DbiException(server,dbType));}
00071  void AddEntry(const TSQLStatement& statement, Int_t dbType = -1) {
00072    this->AddEntry(DbiException(statement,dbType));}
00073  void Clear() { fEntries.clear(); }
00074 
00075 // The Global Exception Log
00076  static DbiExceptionLog& GetGELog() { return fgGELog;}
00077 
00078  private:
00079 
00080 
00081 // Data members
00082 
00083 private:  
00084 
00086   std::vector<DbiException> fEntries;   
00087 
00089    static DbiExceptionLog fgGELog;   
00090 
00091  // Removed: ClassDef(DbiExceptionLog,0) // Object to hold database exceptions
00092 
00093 };
00094 
00095 #endif // DBIEXCEPTIONLOG
00096 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:45 for DatabaseInterface by doxygen 1.7.4