Left: | ||
Right: |
OLD | NEW |
---|---|
1 #pragma once | 1 #ifndef PLUGIN_USER_SETTINGS_H |
sergei
2015/01/09 15:42:54
What does it improve?
Eric
2015/01/09 16:25:24
Consistency. All the other headers use #ifndef gua
| |
2 #define PLUGIN_USER_SETTINGS_H | |
2 | 3 |
3 #include <vector> | 4 #include <OAIdl.h> |
4 #include <utility> | |
5 | 5 |
6 /* | 6 /* |
7 Class is used to call methods Get,Set,Update of Settings object from JavaScript. | 7 Class is used to call methods Get,Set,Update of Settings object from JavaScript. |
8 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript. | 8 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript. |
9 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript | 9 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript |
10 */ | 10 */ |
11 class CPluginUserSettings: public IDispatch | 11 class CPluginUserSettings: public IDispatch |
12 { | 12 { |
13 public: | 13 public: |
14 CPluginUserSettings(); | 14 CPluginUserSettings() // = default; |
sergei
2015/01/09 15:42:54
If the implementation of the ctr is default and ca
Eric
2015/01/09 16:25:24
OK.
This class shouldn't be copyable or movable,
| |
15 { | |
16 } | |
15 | 17 |
16 // IUnknown | 18 // IUnknown |
17 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); | 19 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); |
18 ULONG __stdcall AddRef(); | 20 ULONG __stdcall AddRef(); |
19 ULONG __stdcall Release(); | 21 ULONG __stdcall Release(); |
20 | 22 |
21 // IDispatch | 23 // IDispatch |
22 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); | 24 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); |
23 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); | 25 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); |
24 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid); | 26 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid); |
25 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult, | 27 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult, |
26 EXCEPINFO* pExcepinfo, UINT* pArgErr); | 28 EXCEPINFO* pExcepinfo, UINT* pArgErr); |
27 }; | 29 }; |
30 | |
31 #endif | |
OLD | NEW |