ostream.h
Go to the documentation of this file.
1 #ifndef OSTREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
2 #define OSTREAM_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 <string>
10 
11 namespace YAML_PM
12 {
13  class ostream
14  {
15  public:
16  ostream();
17  ~ostream();
18 
19  void reserve(unsigned size);
20  void put(char ch);
21  const char *str() const { return m_buffer; }
22 
23  unsigned row() const { return m_row; }
24  unsigned col() const { return m_col; }
25  unsigned pos() const { return m_pos; }
26 
27  private:
28  char *m_buffer;
29  unsigned m_pos;
30  unsigned m_size;
31 
32  unsigned m_row, m_col;
33  };
34 
35  ostream& operator << (ostream& out, const char *str);
37  ostream& operator << (ostream& out, char ch);
38 }
39 
40 #endif // OSTREAM_H_62B23520_7C8E_11DE_8A39_0800200C9A66_PM
unsigned pos() const
Definition: ostream.h:25
unsigned m_pos
Definition: ostream.h:29
::std::string string
Definition: gtest.h:1979
unsigned col() const
Definition: ostream.h:24
char * m_buffer
Definition: ostream.h:28
Emitter & operator<<(Emitter &emitter, const std::string &v)
Definition: emitter.h:148
const char * str() const
Definition: ostream.h:21
void reserve(unsigned size)
Definition: ostream.cpp:16
void put(char ch)
Definition: ostream.cpp:29
unsigned row() const
Definition: ostream.h:23
unsigned m_size
Definition: ostream.h:30
unsigned m_col
Definition: ostream.h:32
unsigned m_row
Definition: ostream.h:32


libpointmatcher
Author(s):
autogenerated on Sat May 27 2023 02:38:02