source: src/global/wtl_app.hpp @ 268

Revision 268, 1.3 KB 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_WTL_APP
8#define GLOBAL_WTL_APP
9
10#include <string>
11#include <vector>
12#include <sstream>
13
14#include <boost/signals.hpp>
15#include <boost/function.hpp>
16
17#include <boost/static_assert.hpp>
18#include <boost/filesystem/path.hpp>
19
20namespace hal
21{
22
23class app_module
24{
25public: 
26        const std::wstring& exe_string() const { return exe_string_; }
27        const boost::filesystem::wpath& exe_path() const { return exe_path_; }
28        const std::vector<std::wstring>& command_args() const { return command_args_; }
29       
30        std::wstring res_wstr(unsigned uID);
31        void set_res_dll(std::wstring dll);
32        void revert_res();
33        std::pair<void*,size_t> find_lock_res(unsigned name, unsigned type);
34       
35        void set_initial_hinstance(HINSTANCE instance) { instance_ = instance; }
36       
37        friend app_module& app();
38       
39private:
40        app_module();
41       
42        HMODULE hmod_;
43        HINSTANCE instance_;
44        std::wstring exe_string_;
45        std::wstring res_dll_;
46        boost::filesystem::wpath exe_path_;
47        std::vector<std::wstring> command_args_;       
48};
49
50app_module& app();
51
52}
53
54#endif // GLOBAL_WTL_APP
Note: See TracBrowser for help on using the repository browser.