OLD | NEW |
1 /** | 1 /** |
2 * \file abp_ca.cpp Top-level source for custom actions. Includes DLL initializat
ion. | 2 * \file DLL.cpp Top-level source for custom actions. Includes DLL initialization
. |
3 */ | 3 */ |
4 #include "DLL.h" | 4 #include "DLL.h" |
5 #include <stdexcept> | 5 #include <stdexcept> |
6 | 6 |
7 std::shared_ptr< DllModule > DllModule::singleton = 0 ; | 7 std::shared_ptr< DllModule > DllModule::singleton = 0 ; |
8 | 8 |
9 DllModule & DllModule::module() | 9 DllModule & DllModule::Module() |
10 { | 10 { |
11 if ( singleton ) | 11 if ( singleton ) |
12 { | 12 { |
13 return * singleton; | 13 return * singleton; |
14 } | 14 } |
15 throw std::runtime_error( "DllModule::module() called when DLL module was not
attached." ); | 15 throw std::runtime_error( "DllModule::module() called when DLL module was not
attached." ); |
16 } | 16 } |
17 | 17 |
18 /** | 18 /** |
19 * The attachment function is the _de facto_ equivalent of initialization. Under
ordinary circumstances, this should | 19 * The attachment function is the _de facto_ equivalent of initialization. Under
ordinary circumstances, this should |
(...skipping 18 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 /** | 40 /** |
41 * Since this class is mostly a replacement for a global variable, it's no surpri
sing the constructor is almost trivial. | 41 * Since this class is mostly a replacement for a global variable, it's no surpri
sing the constructor is almost trivial. |
42 */ | 42 */ |
43 DllModule::DllModule( HINSTANCE handle ) | 43 DllModule::DllModule( HINSTANCE handle ) |
44 : handle( handle ) | 44 : handle( handle ) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 std::wstring DllModule::name() | 48 std::wstring DllModule::Name() |
49 { | 49 { |
50 if ( _name ) | 50 if ( name ) |
51 return *_name ; | 51 return *name ; |
52 throw std::runtime_error( "Not yet implemented" ); | 52 throw std::runtime_error( "Not yet implemented" ); |
53 } | 53 } |
OLD | NEW |