Orcus
cell_buffer.hpp
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6  */
7 
8 #ifndef __ORCUS_CELL_BUFFER_HPP__
9 #define __ORCUS_CELL_BUFFER_HPP__
10 
11 #include "env.hpp"
12 
13 #include <string>
14 
15 namespace orcus {
16 
21 class ORCUS_PSR_DLLPUBLIC cell_buffer
22 {
23  std::string m_buffer;
24  size_t m_buf_size;
25 public:
26  cell_buffer(const cell_buffer&) = delete;
27 
28  cell_buffer();
29  ~cell_buffer();
30 
31  void append(const char* p, size_t len);
32  void reset();
33 
34  std::string_view str() const;
35 
36  bool empty() const;
37 };
38 
39 }
40 
41 #endif
42 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: cell_buffer.hpp:22