LIBPOLYMNIA
pictio.h
[詳解]
1 /**************************************************************************
2  *
3  * pictio.h
4  * by oZ/acy
5  * (c) 2012-2018 oZ/acy. ALL RIGHTS RESERVED.
6  *
7  * PICTue buffer IO
8  * 畫像バッファのロード、セーブ用基底クラステンプレート
9  *
10  * 履歴
11  * 2016.3.2 C++11對應
12  * 2018.12.23 C++17對應 パスの渡し方を變更
13  */
14 
15 #ifndef INC_POLYMNIA_PICTURE_IO_H___
16 #define INC_POLYMNIA_PICTURE_IO_H___
17 
18 #include <string>
19 #include <filesystem>
20 #include <boost/utility.hpp>
21 
22 
23 namespace polymnia
24 {
25  template <class P> class PictLoader;
26  template <class P> class PictSaver;
27 }
28 
29 
30 /*---------------------------------
31  * PictLoader<P_>
32  * 畫像ロード用クラス基底
33  */
34 template<class P_>
35 class polymnia::PictLoader : boost::noncopyable
36 {
37 public:
38  PictLoader() noexcept {}
39  virtual ~PictLoader() {}
40 
41  virtual P_* load(const std::filesystem::path& path) =0;
42 };
43 
44 
45 /*---------------------------------
46  * PictSaver<P_>
47  * 畫像セーブ用クラス基底
48  */
49 template<class P_>
50 class polymnia::PictSaver : boost::noncopyable
51 {
52 public:
53  PictSaver() noexcept {}
54  virtual ~PictSaver() {}
55 
56  virtual bool save(const P_*, const std::filesystem::path& path) =0;
57 };
58 
59 
60 
61 
62 #endif // INC_POLYMNIA_PICTURE_IO_H___
virtual P_ * load(const std::filesystem::path &path)=0
Definition: dibio.h:20
PictSaver() noexcept
Definition: pictio.h:53
PictLoader() noexcept
Definition: pictio.h:38
virtual ~PictSaver()
Definition: pictio.h:54
virtual ~PictLoader()
Definition: pictio.h:39
Definition: pictio.h:26
virtual bool save(const P_ *, const std::filesystem::path &path)=0
Definition: pictio.h:25