MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
formio.h
1//
2// formio.h
3//
4// Copyright (C) 1996 Limit Point Systems, Inc.
5//
6// Author: Curtis Janssen <cljanss@limitpt.com>
7// Maintainer: LPS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _util_misc_formio_h
29#define _util_misc_formio_h
30
31#include <iostream>
32#include <fstream>
33
34namespace sc {
35
38class SCFormIO {
39 private:
40 static char *default_basename_;
41 static int ready_;
42 static int xalloc_inited_;
43 static long nindent_;
44 static long indent_size_;
45 static long skip_indent_;
46 static long verbose_;
47 static long initialized_;
48 static int node_to_print_;
49 static int debug_;
50 static int parallel_;
51 static int me_;
52 static void init();
53 public:
54 static std::ios& indent(std::ios&o);
55 static std::ios& decindent(std::ios&o);
56 static std::ios& incindent(std::ios&o);
57 static std::ios& skipnextindent(std::ios&o);
58
59 static void setverbose(std::ios&o, long v);
60 static long getverbose(std::ios&o);
61 static void setindent(std::ios&o, long column);
62 static long getindent(std::ios&o);
63 static int set_printnode(int);
64 static int get_printnode() { return node_to_print_; }
65 static void set_debug(int);
66 static int get_debug() { return debug_; }
67 static void init_mp(int me);
68 static int get_node() { return me_; }
69
70 static void set_default_basename(const char *);
71 static const char *default_basename();
72 static char *fileext_to_filename(const char *extension);
73 static std::string fileext_to_filename_string(const char *extension);
74
75 static void init_ostream(std::ostream &);
76
77 static std::ostream& license(std::ostream&);
78 static std::ostream& warranty(std::ostream&);
79 static std::ostream& copyright(std::ostream&);
80};
81
82std::ios& indent(std::ios&);
83
84std::ios& decindent(std::ios&);
85
86std::ios& incindent(std::ios&);
87
88std::ios& skipnextindent(std::ios&);
89
90// ///////////////////////////////////////////////////////////////////////////
91
92class scprintf;
93std::ostream& operator<<(std::ostream&, const scprintf&);
94
97class scprintf {
98 private:
99 char str_[1024];
100
101 public:
102 scprintf(const char*,...);
103 const char* str() const { return str_; }
104};
105
106}
107
108#endif
109
110// Local Variables:
111// mode: c++
112// c-file-style: "CLJ"
113// End:
This utility class is used to print only on node 0 and to provide attractive indentation of output.
Definition formio.h:38
This class allows printf-like output to be sent to an ostream.
Definition formio.h:97
std::vector< unsigned int > operator<<(const GaussianBasisSet &B, const GaussianBasisSet &A)
computes a map from basis functions in A to the equivalent basis functions in B.
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:31 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.