Google

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 
00034 namespace sc {
00035 
00038 class SCFormIO {
00039   private:
00040     static char *default_basename_;
00041     static int  ready_;
00042     static int  xalloc_inited_;
00043     static long nindent_;
00044     static long indent_size_;
00045     static long skip_indent_;
00046     static long verbose_;
00047     static long initialized_;
00048     static int node_to_print_;
00049     static int debug_;
00050     static int parallel_;
00051     static int me_;
00052     static void init();
00053   public:
00054     static std::ios& indent(std::ios&o);
00055     static std::ios& decindent(std::ios&o);
00056     static std::ios& incindent(std::ios&o);
00057     static std::ios& skipnextindent(std::ios&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 int  get_printnode() { return node_to_print_; }
00065     static void set_debug(int);
00066     static int  get_debug() { return debug_; }
00067     static void init_mp(int me);
00068     static int  get_node() { return me_; }
00069 
00070     static void set_default_basename(const char *);
00071     static const char *default_basename();
00072     static char *fileext_to_filename(const char *extension);
00073 
00074     static void init_ostream(std::ostream &);
00075 
00076     static std::ostream& license(std::ostream&);
00077     static std::ostream& warranty(std::ostream&);
00078     static std::ostream& copyright(std::ostream&);
00079 };
00080 
00081 std::ios& indent(std::ios&);
00082 
00083 std::ios& decindent(std::ios&);
00084 
00085 std::ios& incindent(std::ios&);
00086 
00087 std::ios& skipnextindent(std::ios&);
00088 
00089 // ///////////////////////////////////////////////////////////////////////////
00090 
00091 class scprintf;
00092 std::ostream& operator<<(std::ostream&, const scprintf&);
00093 
00096 class scprintf {
00097   private:
00098     char str[1024];
00099 
00100   public:
00101     scprintf(const char*,...);
00102     friend std::ostream& sc::operator<<(std::ostream&, const scprintf&);
00103 };
00104 
00105 }
00106 
00107 #endif
00108 
00109 // Local Variables:
00110 // mode: c++
00111 // c-file-style: "CLJ"
00112 // End:

Generated at Fri Jan 10 08:14:08 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14.