source: src/global/ini.hpp @ 268

Revision 268, 985 bytes checked in by Eoin, 12 years ago (diff)

Added copyright eventually.

Line 
1
2//         Copyright Eóin O'Callaghan 2006 - 2007.
3// Distributed under the Boost Software License, Version 1.0.
4//    (See accompanying file LICENSE_1_0.txt or copy at
5//          http://www.boost.org/LICENSE_1_0.txt)
6
7#ifndef GLOBAL_INI_FILE
8#define GLOBAL_INI_FILE
9
10#include <boost/smart_ptr.hpp>
11#include <boost/filesystem/path.hpp>
12
13namespace tinyxml
14{
15class node;
16}
17
18namespace hal
19{
20
21class ini_impl;
22
23class ini_file
24{
25public: 
26        void load_data();
27        void save_data();
28       
29        bool save(boost::filesystem::path location, std::string data);
30        bool save(boost::filesystem::path location, tinyxml::node* data);
31       
32        tinyxml::node* load(boost::filesystem::path location);
33       
34        friend ini_file& ini();
35       
36private:
37        ini_file(std::wstring filename);
38       
39        boost::scoped_ptr<ini_impl> pimpl;
40};
41
42ini_file& ini();
43
44} // namespace hal
45
46class ini_base
47{
48public:
49        virtual void load_data() = 0;
50        virtual void save_data() = 0;
51};
52
53#endif // GLOBAL_INI_FILE
Note: See TracBrowser for help on using the repository browser.