You.i Engine
YiAppContext.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_APP_CONTEXT_H_
3 #define _YI_APP_CONTEXT_H_
4 
5 #include <framework/YiPredef.h>
6 
7 class CYIApp;
8 class CYIScreen;
9 class CYISurface;
10 
22 {
23 public:
24  static CYIAppContext *GetInstance();
26 
31 
36 
40  CYIApp *GetApp();
41 
45  void SetApp(CYIApp *pApp);
46 
50  void SetSurface(CYISurface *pSurface);
51 
55  void SetScreen(CYIScreen *pScreen);
56 
57  bool IsSurfaceUndefined() const;
58 
59 private:
60 
61  CYIAppContext();
62 
63  CYISurface *m_pSurface;
64  CYIScreen *m_pScreen;
65  CYIApp *m_pApp;
66 
67  static CYIAppContext* ms_pAppContext;
68 
70 };
71 
74 #endif // _YI_APP_CONTEXT_H_
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
Delete the copy constructor and assignment operator (and consequently the move constructor as well) ...
Definition: YiPredef.h:114
Definition: YiScreen.h:25
static CYIAppContext * GetInstance()
CYISurface * GetSurface()
void SetSurface(CYISurface *pSurface)
Definition: YiAppContext.h:21
void SetScreen(CYIScreen *pScreen)
Definition: YiSurface.h:28
bool IsSurfaceUndefined() const
void SetApp(CYIApp *pApp)
CYIApp * GetApp()
The base class for all applications.
Definition: YiApp.h:43
CYIScreen * GetScreen()