Playa::Tabs Class Reference
List of all members.
Public Member Functions
| ||Tabs (bool jump=true)|
| ||~Tabs ()|
|void ||print (std::ostream &os) const |
Static Public Member Functions
|static void ||setTabSize (int ts)|
|static bool & ||showDepth ()|
|(Note that these are not member functions.) |
|std::ostream & ||operator<< (std::ostream &os, const Tabs &t)|
Tabbing utility for output. Constructing a new Tabs
object automatically increments the number of tabs to be written. When the Tabs
object goes out of scope, the original tabs level is restored.
The tab size and character can be specified through the setTabSize() and setTabChar() methods, for example,
The tab character can be set on an object-by-object basis through a constructor argument.
By default, a header giving the depth of tabs is written to each line; this can simplify scanning by eye for when a given tab level is reached. This header can be turned off by calling
Example: the code
cout << tab << "in f()" << std::endl;
cout << tab << "leaving f()" << std::endl;
cout << tab0 << "in g()" << std::endl;
for (int i=0; i<3; i++)
cout << tab1 << "i=" << i << std::endl;
cout << tab0 << "leaving g()" << std::endl;
writes the following output
 in f()
 in g()
 leaving g()
 leaving f()
Definition at line 66 of file PlayaTabs.hpp.
Constructor & Destructor Documentation
|| jump =
Constructor increments tab level
Definition at line 10 of file PlayaTabs.cpp.
Destructor decrements tab level
Definition at line 17 of file PlayaTabs.cpp.
Member Function Documentation
Print to stream. This method is usually not called directly, as tabs will usually be written with the insertion operator
Definition at line 22 of file PlayaTabs.cpp.
|static void Playa::Tabs::setTabSize
Change the tab size. Default is 2.
Definition at line 82 of file PlayaTabs.hpp.
|static bool& Playa::Tabs::showDepth
Indicate whether to print the tab depth as a header for each line.
Definition at line 85 of file PlayaTabs.hpp.
Friends And Related Function Documentation
|std::ostream & operator<<
||const Tabs &
The documentation for this class was generated from the following files: