Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

formio.h

00001 //
00002 // formio.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _util_misc_formio_h
00029 #define _util_misc_formio_h
00030 
00031 #include <iostream>
00032 #include <fstream>
00033 
00036 class SCFormIO {
00037   private:
00038     static char *default_basename_;
00039     static int  ready_;
00040     static int  xalloc_inited_;
00041     static long nindent_;
00042     static long indent_size_;
00043     static long skip_indent_;
00044     static long verbose_;
00045     static long initialized_;
00046     static int node_to_print_;
00047     static int debug_;
00048     static int parallel_;
00049     static int me_;
00050     static std::ofstream nullstream_;
00051     static void init();
00052   public:
00053     static std::ios& indent(std::ios&o);
00054     static std::ios& decindent(std::ios&o);
00055     static std::ios& incindent(std::ios&o);
00056     static std::ios& skipnextindent(std::ios&o);
00057     static std::ostream& node0(std::ostream&o);
00058 
00059     static void setverbose(std::ios&o, long v);
00060     static long getverbose(std::ios&o);
00061     static void setindent(std::ios&o, long column);
00062     static long getindent(std::ios&o);
00063     static int  set_printnode(int);
00064     static void set_debug(int);
00065     static void init_mp(int me);
00066 
00067     static void set_default_basename(const char *);
00068     static const char *default_basename();
00069     static char *fileext_to_filename(const char *extension);
00070 
00071     static void init_ostream(std::ostream &);
00072 
00073     static std::ostream& license(std::ostream&);
00074     static std::ostream& warranty(std::ostream&);
00075     static std::ostream& copyright(std::ostream&);
00076 };
00077 
00078 std::ios& indent(std::ios&);
00079 
00080 std::ios& decindent(std::ios&);
00081 
00082 std::ios& incindent(std::ios&);
00083 
00084 std::ios& skipnextindent(std::ios&);
00085 
00086 std::ostream& node0(std::ostream&);
00087 
00088 // ///////////////////////////////////////////////////////////////////////////
00089 
00092 class scprintf {
00093   private:
00094     char str[1024];
00095 
00096   public:
00097     scprintf(const char*,...);
00098     friend std::ostream& operator<<(std::ostream&, const scprintf&);
00099 };
00100 
00101 std::ostream& operator<<(std::ostream&, const scprintf&);
00102 
00103 #endif
00104 
00105 // Local Variables:
00106 // mode: c++
00107 // c-file-style: "CLJ"
00108 // End:

Generated at Thu Oct 4 18:08:44 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.