Mondschein Engine  0.3.0
buffer.h
1 #ifndef FI_BUFFER_H_INCLUDED
2 #define FI_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 "fi_types.h"
26 #include "core/buffer.h"
27 #include <FreeImage.h>
28 
29 
30 namespace mondschein
31 {
32  namespace io
33  {
42  class FI_Buffer : virtual public Buffer
43  {
44  private:
45  FREE_IMAGE_FORMAT format;
46 
47  public:
48  FI_Buffer();
49  FI_Buffer(FI_Buffer_c _b);
50  FI_Buffer(FREE_IMAGE_FORMAT _format);
51  virtual ~FI_Buffer();
52  virtual FI_Buffer &operator=(FI_Buffer_c _b);
53 
54  virtual void parse_istream(std::istream &_in);
55  virtual void parse_string(const std::string &_in);
56  virtual void serialize_ostream(std::ostream &_out) const;
57  virtual void serialize_string(std::string &_out) const;
58 
59  virtual void set_format(FREE_IMAGE_FORMAT _format);
60  virtual FREE_IMAGE_FORMAT get_format() const;
61  };
62  }
63 }
64 #endif // FI_BUFFER_H_INCLUDED