- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- File List
- File Members

# CApplication.hpp

Go to the documentation of this file.

    00001 #ifndef __CApplication__
    00002 #define __CApplication__
    00003
    00004 #include "../Basics/CSystemString.hpp"
    00005 using Exponent::Basics::CSystemString;
    00006
    00007 //  ===========================================================================
    00008
    00012 #ifndef __IWINDOW_GUARD__
    00013 #define __IWINDOW_GUARD__
    00014     namespace Exponent { namespace GUI { namespace Windowing { interface IWindow; } } }
    00015     using Exponent::GUI::Windowing::IWindow;
    00016 #endif
    00017
    00021 //  ===========================================================================
    00022
    00023 namespace Exponent
    00024 {
    00025     namespace Host
    00026     {
    00049         class CApplication
    00050         {
    00051         public:
    00052
    00053 //  ===========================================================================
    00055 #ifdef WIN32
    00056
    00062             static void setApplicationInstance(HINSTANCE instance) { CAPPLICATION_INSTANCEHANDLE = instance; }
    00063
    00068             static void setApplicationWindowHandle(HWND windowHandle) { CAPPLICATION_WINDOWHANDLE = windowHandle; }
    00069
    00074             static void setApplicationModuleHandle(HMODULE moduleInstance) { CAPPLICATION_MODULEHANDLE = moduleInstance; }
    00075
    00080             static HINSTANCE getApplicationInstance() { return CAPPLICATION_INSTANCEHANDLE; }
    00081
    00086             static HWND getApplicationWindowHandle() { return CAPPLICATION_WINDOWHANDLE; }
    00087
    00092             static HMODULE getApplicationModuleHandle() { return CAPPLICATION_MODULEHANDLE; }
    00093
    00100             static void getCurrentExecutableFileName(CString &filename);
    00101
    00108             static void getModuleFileName(CString &filename);
    00110 #else
    00111
    00117             static void setApplicationInstance(const CString &instance) { CAPPLICATION_INSTANCEHANDLE = instance; }
    00118
    00123             static void setApplicationModuleHandle(const CString &moduleInstance) { CAPPLICATION_MODULEHANDLE = moduleInstance; }
    00124
    00129             static const CString &getApplicationInstance() { return CAPPLICATION_INSTANCEHANDLE; }
    00130
    00135             static const CString &getApplicationModuleHandle() { return CAPPLICATION_MODULEHANDLE; }
    00137 #endif
    00138
    00140 //  ===========================================================================
    00141
    00147             static unsigned long runApplicationEventLoop();
    00148
    00152             static void stopApplicationEventLoop();
    00153
    00154 //  ===========================================================================
    00155
    00160             static void setApplicationName(const CString &applicationName);
    00161
    00166             static void setApplicationDeveloper(const CString &applicationDeveloper);
    00167
    00172             static void setApplicationVersion(const CString &applicationVersion);
    00173
    00178             static void setApplicationCopyrightInformation(const CString &applicationCopyRight);
    00179
    00184             static void setApplicationDescription(const CString &applicationDescription);
    00185
    00190             static void setApplicationInstallPath(const CSystemString &path);
    00191
    00195             static void setApplicationInstallPathFromApplicationHandle();
    00196
    00206             static void setApplicationWindow(IWindow *window);
    00207
    00212             static void setApplicationRegistry(const CString &path);
    00213
    00214 //  ===========================================================================
    00215
    00220             static const CString &getApplicationName();
    00221
    00226             static const CString &getApplicationDeveloper();
    00227
    00232             static const CString &getApplicationVersion();
    00233
    00238             static const CString &getApplicationCopyrightInformation();
    00239
    00244             static const CString &getApplicationDescription();
    00245
    00250             static const CSystemString &getApplicationInstallPath();
    00251
    00256             static const IWindow *getApplicationWindow();
    00257
    00262             static const CString &getApplicationRegistry();
    00263
    00264 //  ===========================================================================
    00265
    00266         protected:
    00267
    00268 //  ===========================================================================
    00270 #ifdef WIN32
    00271
    00272             static HINSTANCE CAPPLICATION_INSTANCEHANDLE;
    00273             static HMODULE CAPPLICATION_MODULEHANDLE;
    00274             static HWND CAPPLICATION_WINDOWHANDLE;
    00276 #else
    00277
    00278             static CString CAPPLICATION_INSTANCEHANDLE;
    00279             static CString CAPPLICATION_MODULEHANDLE;
    00281 #endif
    00282
    00283             static CString CAPPLICATION_NAME;
    00284             static CString CAPPLICATION_DEVELOPER;
    00285             static CString CAPPLICATION_VERSION;
    00286             static CString CAPPLICATION_COPYRIGHT;
    00287             static CString CAPPLICATION_PRODUCT;
    00288             static CString CAPPLICATION_REGISTRY;
    00289             static CSystemString CAPPLICATION_INSTALL_PATH;
    00291             static IWindow *CAPPLICATION_WINDOW;
    00292         };
    00293     }
    00294 }
    00295 #endif  // End of CApplication.hpp