Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
IndentPrintWriter.h
이 파일의 문서화 페이지로 가기
1 // Copyright FreeHEP, 2005.
2 #ifndef CHEPREP_INDENTPRINTWRITER_H
3 #define CHEPREP_INDENTPRINTWRITER_H 1
4 
5 #include "cheprep/config.h"
6 
7 #include <iostream>
8 #include <string>
9 
20 namespace cheprep {
21 
23 
24  public:
25  IndentPrintWriter(std::ostream* out, int level = 0);
26  virtual ~IndentPrintWriter();
27 
28  void close();
29  IndentPrintWriter& operator<< (const std::string & s);
30  IndentPrintWriter& operator<< (std::ostream& (*pf)(std::ostream&));
31  void println(const std::string & s);
32  void print(const std::string & s);
33  void println();
34  void indent();
35  void outdent();
36  int getIndent() const;
37  void setIndent(const int level);
38  std::string getIndentString() const;
39  void setIndentString(const std::string & indentString);
40 
41  private:
42  void doIndent();
43 
44  std::ostream* out;
45  bool closed;
47  bool indented;
48  std::string indentString;
49 };
50 
51 } // cheprep
52 
53 
54 #endif
55 
IndentPrintWriter(std::ostream *out, int level=0)
void print(const std::string &s)
const XML_Char * s
Definition: expat.h:262
IndentPrintWriter & operator<<(const std::string &s)
void setIndent(const int level)
void setIndentString(const std::string &indentString)
std::string getIndentString() const