]> git.lyx.org Git - lyx.git/blob - src/support/lyxmanip.h
noncopyable + read ChangeLog
[lyx.git] / src / support / lyxmanip.h
1 // -*- C++ -*-
2 #ifndef LYX_MANIP_H
3 #define LYX_MANIP_H
4
5 #include "support/LOstream.h"
6
7 ///
8 struct NewLineAndDepth_ {
9         int depth_;
10 };
11
12 //
13 inline
14 NewLineAndDepth_ newlineAndDepth(int n)
15 {
16         NewLineAndDepth_ nlad_;
17         nlad_.depth_ = n;
18         return nlad_;
19 }
20
21 //
22 inline
23 std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
24 {
25         os << string(nlad_.depth_, ' ');
26         return os;
27 }
28
29 #endif