2011CaoTme7: Indentation.h

File Indentation.h, 618 bytes (added by jpc, 15 years ago)

C++ Header: Classe Indentation

Line 
1
2#ifndef __INDENTATION_H__
3#define __INDENTATION_H__
4
5#include <string>
6#include <iostream>
7
8
9class Indentation {
10 public:
11 Indentation& operator++ ();
12 Indentation operator++ (int);
13 Indentation& operator-- ();
14 Indentation operator-- (int);
15 private:
16 size_t _tabulationSize;
17 std::string _indentation;
18 private:
19 Indentation ();
20
21 friend std::ostream& operator<< ( std::ostream&, const Indentation& );
22 friend Indentation& indent ();
23};
24
25
26Indentation& indent ();
27
28
29#endif // __INDENTATION_H__