errlog_s.h

00001 /*<std-header orig-src='shore' incl-file-exclusion='ERRLOG_S_H'>
00002 
00003  $Id: errlog_s.h,v 1.10 2010/05/26 01:20:21 nhall Exp $
00004 
00005 SHORE -- Scalable Heterogeneous Object REpository
00006 
00007 Copyright (c) 1994-99 Computer Sciences Department, University of
00008                       Wisconsin -- Madison
00009 All Rights Reserved.
00010 
00011 Permission to use, copy, modify and distribute this software and its
00012 documentation is hereby granted, provided that both the copyright
00013 notice and this permission notice appear in all copies of the
00014 software, derivative works or modified versions, and any portions
00015 thereof, and that both notices appear in supporting documentation.
00016 
00017 THE AUTHORS AND THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY
00018 OF WISCONSIN - MADISON ALLOW FREE USE OF THIS SOFTWARE IN ITS
00019 "AS IS" CONDITION, AND THEY DISCLAIM ANY LIABILITY OF ANY KIND
00020 FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
00021 
00022 This software was developed with support by the Advanced Research
00023 Project Agency, ARPA order number 018 (formerly 8230), monitored by
00024 the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.
00025 Further funding for this work was provided by DARPA through
00026 Rome Research Laboratory Contract No. F30602-97-2-0247.
00027 
00028 */
00029 
00030 #ifndef ERRLOG_S_H
00031 #define ERRLOG_S_H
00032 
00033 #include "w_defines.h"
00034 
00035 /*  -- do not edit anything above this line --   </std-header>*/
00036 
00037 #include <w_base.h>
00038 
00039 #ifdef __GNUG__
00040 #pragma interface
00041 #endif
00042 
00043 /** \cond skip */
00044 class simple_string {
00045     const char *_s;
00046 public:
00047     // friend w_base_t uint4_t hash(const simple_string &);
00048     simple_string(const char *s) { _s = s; }
00049     bool operator==(const simple_string &another) const {
00050         return strcmp(this->_s,another._s)==0; 
00051     }
00052     bool operator!=(const simple_string &another) const {
00053         return strcmp(this->_s,another._s)!=0; 
00054     }
00055     friend ostream &operator<<(ostream &out, const simple_string x);
00056 };
00057 
00058 // w_base_t::uint4_t w_hash(const simple_string &s){
00059 //    return (w_base_t::uint4_t) w_hash(s._s); 
00060 //}
00061 
00062 extern w_base_t::uint4_t w_hash(const char *); // in stringhash.C
00063 
00064 class ErrLog;
00065 struct ErrLogInfo {
00066 public:
00067     simple_string _ident; // identity for syslog & local use
00068     w_link_t    hash_link;
00069 
00070     ErrLog *_e;
00071     // const simple_string & hash_key() { return _ident; } 
00072     ErrLogInfo(ErrLog *e);
00073     void dump() const {
00074         cerr <<  _ident;
00075         cerr << endl;
00076     };
00077 private:
00078     NORET ErrLogInfo(const ErrLogInfo &); // disabled
00079     NORET ErrLogInfo(ErrLogInfo &); // disabled
00080 };
00081 /** \endcond skip */
00082 
00083 /*<std-footer incl-file-exclusion='ERRLOG_S_H'>  -- do not edit anything below this line -- */
00084 
00085 #endif          /*</std-footer>*/

Generated on Wed Jul 7 17:22:32 2010 for Shore Storage Manager by  doxygen 1.4.7