tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
file_storage.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_PROPERTY_FILESTORAGE_HPP)
8#define TETENGO_PROPERTY_FILESTORAGE_HPP
9
10#include <filesystem>
11#include <memory>
12
14
15
16namespace tetengo::property
17{
21 class file_storage : public storage
22 {
23 public:
24 // constructors and destructor
25
29 virtual ~file_storage();
30
31
32 private:
33 // types
34
35 class impl;
36
37 friend class file_storage_loader;
38
39
40 // variables
41
42 const std::unique_ptr<impl> m_p_impl;
43
44
45 // constructors
46
47 file_storage(value_map_type value_map, const std::filesystem::path& path);
48
49
50 // virtual functions
51
52 virtual void save_impl() const override;
53 };
54
55
62 {
63 public:
64 // constructors and destructor
65
70
75
76
77 private:
78 // types
79
80 class impl;
81
82
83 // variables
84
85 const std::unique_ptr<impl> m_p_impl;
86
87
88 // virtual functions
89
90 virtual std::unique_ptr<storage> load_impl(const std::filesystem::path& path) const override;
91 };
92
93
94}
95
96
97#endif
A file storage loader.
Definition file_storage.hpp:62
file_storage_loader()
Creates a file storage loader.
virtual ~file_storage_loader()
Destroys the file storage loader.
A file storage.
Definition file_storage.hpp:22
virtual ~file_storage()
Destroys the file storage.
A storage loader.
Definition storage.hpp:156
A storage.
Definition storage.hpp:27
const value_map_type & value_map() const
Returns the value map.
std::unordered_map< std::string, std::variant< bool, std::uint32_t, std::string > > value_map_type
The value map type.
Definition storage.hpp:32
A property set library.
A storage.