2000-03-06 02:42:40 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
#ifndef LYX_MANIP_H
|
|
|
|
#define LYX_MANIP_H
|
|
|
|
|
2000-03-08 01:45:25 +00:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
///
|
|
|
|
struct NewLineAndDepth_ {
|
|
|
|
int depth_;
|
|
|
|
};
|
2000-03-06 02:42:40 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
inline
|
2000-03-08 01:45:25 +00:00
|
|
|
NewLineAndDepth_ newlineAndDepth(int n)
|
2000-03-06 02:42:40 +00:00
|
|
|
{
|
2000-03-08 01:45:25 +00:00
|
|
|
NewLineAndDepth_ nlad_;
|
|
|
|
nlad_.depth_ = n;
|
|
|
|
return nlad_;
|
2000-03-06 02:42:40 +00:00
|
|
|
}
|
|
|
|
///
|
|
|
|
inline
|
2000-03-08 01:45:25 +00:00
|
|
|
ostream & operator<<(ostream & os, NewLineAndDepth_ const & nlad_)
|
2000-03-06 02:42:40 +00:00
|
|
|
{
|
2000-03-08 01:45:25 +00:00
|
|
|
os << string(nlad_.depth_, ' ');
|
|
|
|
return os;
|
2000-03-06 02:42:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|