source: ThirdParty/mpqc_open/src/lib/util/misc/formio.h@ b7e5b0

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since b7e5b0 was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 3.1 KB
Line 
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
36/** This utility class is used to print only on node 0 and to
37 provide attractive indentation of output. */
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
74 static void init_ostream(std::ostream &);
75
76 static std::ostream& license(std::ostream&);
77 static std::ostream& warranty(std::ostream&);
78 static std::ostream& copyright(std::ostream&);
79};
80
81std::ios& indent(std::ios&);
82
83std::ios& decindent(std::ios&);
84
85std::ios& incindent(std::ios&);
86
87std::ios& skipnextindent(std::ios&);
88
89// ///////////////////////////////////////////////////////////////////////////
90
91class scprintf;
92std::ostream& operator<<(std::ostream&, const scprintf&);
93
94/** This class allows <tt>printf</tt> like output to put sent
95 to an <tt>ostream</tt>. */
96class scprintf {
97 private:
98 char str[1024];
99
100 public:
101 scprintf(const char*,...);
102 friend std::ostream& sc::operator<<(std::ostream&, const scprintf&);
103};
104
105}
106
107#endif
108
109// Local Variables:
110// mode: c++
111// c-file-style: "CLJ"
112// End:
Note: See TracBrowser for help on using the repository browser.