PlayaTabs.hpp
00001
00002
00003
00004
00005 #ifndef PLAYA_TABS_H
00006 #define PLAYA_TABS_H
00007
00008 #include "PlayaDefs.hpp"
00009
00010 namespace Playa
00011 {
00066 class Tabs
00067 {
00068 public:
00070 Tabs(bool jump=true);
00071
00073 ~Tabs();
00074
00079 void print(std::ostream& os) const ;
00080
00082 static void setTabSize(int ts) {tabSize() = ts;}
00083
00085 static bool& showDepth() {static bool rtn = true; return rtn;}
00086
00087 private:
00089 static int& tabLevel() {static int rtn = 0; return rtn;}
00090
00092 static int& tabSize() {static int rtn = 2; return rtn;}
00093
00094 bool jump_;
00095
00096 int myLevel_;
00097 };
00098 }
00099
00100 namespace Playa
00101 {
00103 inline std::ostream& operator<<(std::ostream& os, const Tabs& t)
00104 {
00105 t.print(os);
00106 return os;
00107 }
00108 }
00109
00110 #endif