Mondschein Engine  0.3.0
buffer.h
Go to the documentation of this file.
1 #ifndef BUFFER_H_INCLUDED
2 #define BUFFER_H_INCLUDED
3 
4 /* Mondschein Engine is a fast, powerful, and easy-to-use 3D realtime rendering engine.
5  *
6  * Copyright (C) 2009-2013 by Andreas Amereller
7  * E-Mail: andreas.amereller.dev@googlemail.com
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the Free
11  * Software Foundation; either version 3 of the License, or (at your option)
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17  * more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
24 
25 #include "types.h"
26 #include <iostream>
27 
28 namespace mondschein
29 {
30  namespace io
31  {
37  class Buffer
38  {
39  private:
40  io_objects_t io_objects;
41 
42  protected:
43  explicit Buffer();
44  explicit Buffer(Buffer_c _b);
45  virtual ~Buffer();
46  virtual Buffer &operator=(Buffer_c _b);
47 
48  public:
54  virtual void set_io_objects(const io_objects_t &_io_objects);
55 
61  virtual io_objects_t get_io_objects() const;
62 
74  virtual void parse_istream(std::istream &_in) = 0;
75 
87  virtual void parse_string(const std::string &_in) = 0;
88 
99  virtual void serialize_ostream(std::ostream &_out) const = 0;
100 
111  virtual void serialize_string(std::string &_out) const = 0;
112  };
113  }
114 }
115 #endif // BUFFER_H_INCLUDED