00001 /* @HEADER@ */ 00002 // 00003 /* @HEADER@ */ 00004 00005 #include "PlayaTabs.hpp" 00006 00007 using namespace Playa; 00008 00009 00010 Tabs::Tabs(bool jump) 00011 : jump_(jump), myLevel_(0) 00012 { 00013 if (jump) tabLevel()++; 00014 myLevel_ = tabLevel(); 00015 } 00016 00017 Tabs::~Tabs() 00018 { 00019 if (jump_) tabLevel()--; 00020 } 00021 00022 void Tabs::print(std::ostream& os) const 00023 { 00024 if (showDepth()) 00025 { 00026 os << "[" << tabLevel() << "]"; 00027 } 00028 int n = myLevel_ * tabSize(); 00029 for (int i=0; i<n; i++) os << " "; 00030 } 00031 00032 00033