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

error.h

Go to the documentation of this file.
00001 // SuperMix version 1.0  C++ source file
00002 //
00003 // Copyright (c) 1999 California Institute of Technology.
00004 // All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms for noncommercial
00007 // purposes are permitted provided that the above copyright notice and
00008 // this paragraph are duplicated in all such forms and that any
00009 // documentation and other materials related to such distribution and
00010 // use acknowledge that the software was developed by California
00011 // Institute of Technology. Redistribution and/or use in source or
00012 // binary forms is not permitted for any commercial purpose. Use of
00013 // this software does not include a permitted use of the Institute's
00014 // name or trademark for any purpose.
00015 //
00016 // DISCLAIMER:
00017 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT
00018 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR
00019 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET
00020 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
00021 // LICENSED PRODUCT, HOWEVER USED.  IN NO EVENT SHALL CALTECH/JPL BE
00022 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO
00023 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC
00024 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF
00025 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN
00026 // FACT SHALL KNOW OF THE POSSIBILITY.  THE USER BEARS ALL RISK
00027 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED
00028 // MATERIALS.
00029 //
00030 // **************************************************************************
00031 
00042 // 5/15/01: Converted comments to javadoc format.
00043 // 9/16/99: Added 2nd argument to function calls
00044 // 9/15/98: Added message, select output stream
00045 
00046 #ifndef ERROR_H
00047 #define ERROR_H
00048 
00049 #include <string>
00050 class ostream;
00051 
00071 class error
00072 {
00073 public:
00075   static int strict;
00076 
00078   static int messages;
00079 
00081   static void fatal(const char *);
00082 
00084   static void fatal(const string &);
00085 
00087   static void fatal(const char *, const char *);
00088 
00090   static void fatal(const string &, const string &);
00091 
00096   static void warning(const char *);
00097 
00102   static void warning(const string &);
00103 
00108   static void warning(const char *, const char *);
00109 
00114   static void warning(const string &, const string &);
00115 
00117   static void message(const char *);
00118 
00120   static void message(const string &);
00121 
00123   static void message(const char *, const char *);
00124 
00126   static void message(const string &, const string &);
00127 
00133   static ostream & stream(ostream & s)
00134   { ostream *temp = pout; pout = &s; return *temp; }
00135 
00136 
00138   static ostream & stream()
00139   { return *pout; }
00140 
00141 private:
00143   static ostream *pout;
00144 };
00145 
00146 #endif /* ERROR_H */

Please direct comments and corrections to supermix@submm.caltech.edu
Go to the supermix home page
Generated by doxygen1.2.7