]> git.lyx.org Git - features.git/blob - src/support/lyxmanip.h
Replace LString.h with support/std_string.h,
[features.git] / src / support / lyxmanip.h
1 // -*- C++ -*-
2 /**
3  * \file lyxmanip.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_MANIP_H
13 #define LYX_MANIP_H
14
15 #include "support/std_string.h"
16 #include "support/std_ostream.h"
17
18 ///
19 struct NewLineAndDepth_ {
20         int depth_;
21 };
22
23 ///
24 inline
25 NewLineAndDepth_ newlineAndDepth(int n)
26 {
27         NewLineAndDepth_ nlad_;
28         nlad_.depth_ = n;
29         return nlad_;
30 }
31
32 ///
33 inline
34 std::ostream & operator<<(std::ostream & os, NewLineAndDepth_ const & nlad_)
35 {
36         os << string(nlad_.depth_, ' ');
37         return os;
38 }
39
40 #endif