5 #include "cheprep/IndentPrintWriter.h"
15 IndentPrintWriter::IndentPrintWriter(ostream* outstream,
int level)
23 IndentPrintWriter::~IndentPrintWriter() {
26 void IndentPrintWriter::close() {
34 if (!indented) doIndent();
45 void IndentPrintWriter::println(
const string & s) {
53 void IndentPrintWriter::println() {
58 void IndentPrintWriter::doIndent() {
59 for (
int i=0; i<indentLevel; i++) {
65 void IndentPrintWriter::indent() {
69 void IndentPrintWriter::outdent() {
73 int IndentPrintWriter::getIndent()
const {
77 void IndentPrintWriter::setIndent(
const int level) {
81 string IndentPrintWriter::getIndentString()
const {
85 void IndentPrintWriter::setIndentString(
const string & anIndent) {
86 indentString = anIndent;
std::ostream & operator<<(std::ostream &ostr, const G4String &astr)
void print(const std::vector< T > &data)