indentation.h
Go to the documentation of this file.
1 #ifndef INDENTATION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define INDENTATION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
3 
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
5 #pragma once
6 #endif
7 
8 
9 #include "yaml-cpp-pm/ostream.h"
10 #include <iostream>
11 
12 namespace YAML_PM
13 {
14  struct Indentation {
15  Indentation(unsigned n_): n(n_) {}
16  unsigned n;
17  };
18 
19  inline ostream& operator << (ostream& out, const Indentation& indent) {
20  for(unsigned i=0;i<indent.n;i++)
21  out << ' ';
22  return out;
23  }
24 
25  struct IndentTo {
26  IndentTo(unsigned n_): n(n_) {}
27  unsigned n;
28  };
29 
30  inline ostream& operator << (ostream& out, const IndentTo& indent) {
31  while(out.col() < indent.n)
32  out << ' ';
33  return out;
34  }
35 }
36 
37 
38 #endif // INDENTATION_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
ostream.h
YAML_PM
Definition: aliasmanager.h:11
YAML_PM::Indentation
Definition: indentation.h:14
YAML_PM::IndentTo::IndentTo
IndentTo(unsigned n_)
Definition: indentation.h:26
YAML_PM::IndentTo::n
unsigned n
Definition: indentation.h:27
YAML_PM::Indentation::n
unsigned n
Definition: indentation.h:16
kitti-batch-convert.out
string out
Definition: kitti-batch-convert.py:7
YAML_PM::IndentTo
Definition: indentation.h:25
YAML_PM::operator<<
Emitter & operator<<(Emitter &emitter, const std::string &v)
Definition: emitter.h:148
YAML_PM::ostream
Definition: ostream.h:13
YAML_PM::Indentation::Indentation
Indentation(unsigned n_)
Definition: indentation.h:15


mp2p_icp
Author(s):
autogenerated on Wed Oct 23 2024 02:45:40