00001 #ifndef CEP_INTERSECTION_INDENTATION_H
00002 #define CEP_INTERSECTION_INDENTATION_H
00003
00004
00005 class Indentation
00006 {
00007 static const int space_per_level = 4;
00008 int level;
00009
00010 public:
00011 Indentation() : level(0) {}
00012
00013 Indentation& operator++ () { ++level; return *this; }
00014 Indentation& operator-- () { --level; return *this; }
00015
00016 int num_spaces () const { return level*space_per_level; };
00017 };
00018
00019
00020 ostream& operator<< ( ostream& os, const Indentation& in )
00021 {
00022 for( int i = 0; i < in.num_spaces(); ++i )
00023 os << ' ';
00024 return os;
00025 }
00026
00027
00028 #endif