Index: src/ch/ch.h =================================================================== diff -u -N -r4fe995b304ea342b50293f92d3c1992b43b820f7 -r6f8b891b60eb0f33199fd29db75d4d9f4a22c248 --- src/ch/ch.h (.../ch.h) (revision 4fe995b304ea342b50293f92d3c1992b43b820f7) +++ src/ch/ch.h (.../ch.h) (revision 6f8b891b60eb0f33199fd29db75d4d9f4a22c248) @@ -24,12 +24,10 @@ #include "../libchcore/TConfig.h" #include "TShellExtensionClient.h" #include "TCommandLineParser.h" +#include "../common/TLogger.h" +#include "../common/TLoggerInitializer.h" +#include "../libchcore/TCoreEngine.h" -///////////////////////////////////////////////////////////////////////////// -// CCopyHandlerApp: -// See CopyHandler.cpp for the implementation of this class -// - class CCopyHandlerApp : public CWinApp, public CAppHelper { public: @@ -45,10 +43,12 @@ friend int MsgBox(UINT uiID, UINT nType=MB_OK, UINT nIDHelp=0); - friend CCopyHandlerApp& GetApp(); - friend ictranslate::CResourceManager& GetResManager(); - friend chcore::TConfig& GetConfig(); + friend CCopyHandlerApp& GetApplication(); + static ictranslate::CResourceManager& GetResManager(); + static chcore::TConfig& GetConfig(); + TLogger& GetLogger(); + void RegisterShellExtension(); void UnregisterShellExtension(); @@ -68,9 +68,33 @@ TShellExtensionClient m_tShellExtClient; TCommandLineParser m_cmdLineParser; + chcore::TCoreEngine m_chEngine; + TLoggerInitializer m_logInitializer; + TLogger m_log; + CWnd *m_pMainWindow; DECLARE_MESSAGE_MAP() }; +inline CCopyHandlerApp& GetApp() +{ + return GetApplication(); +} + +inline TLogger& GetLogger() +{ + return GetApp().GetLogger(); +} + +inline ictranslate::CResourceManager& GetResManager() +{ + return CCopyHandlerApp::GetResManager(); +} + +inline chcore::TConfig& GetConfig() +{ + return CCopyHandlerApp::GetConfig(); +} + #endif