时人不识凌云木,直待凌云始道高。这篇文章主要讲述object oriented programming : class application相关的知识,希望能为你提供帮助。
class Thread_Sync; class Critical; class Info; class Info{Info(std::string str):m_info(str){} private: std::string m_info; }; // a process need: { pre-run(); run(); post-run(); mutex for threads, running previlledge}#define APPL_DECLARE_APP( YourAppClass )class YourAppClass : public Application{public:YourAppClass(int argc, const char * argv[]): Application(argc, argv) {}; virtualint Main(int argc, ArgvType argv); }; // provide a main() runtine #define APPL_DEFINE_MAIN( YourAppClass )intmain(int argc, const char * argv[]){a YourAppClass theApp(argc, argv); return(theApp.Run()); }class Application { public: virtual ~Application(); int Run(){if(Startup() & & Main(argc,argv)& & Shutdown()) { return true; } return false; ) static Application & TheApp(); bool SetProcessPriority(int priority); protected: Application(int argc, const char * argv[]); virtual int Startup(); virtual int Main(int argc, char ** argv) { return 1; } virtual int Shutdown(); private: Critical* m_pGuard; Info * m_info; int m_priority; int m_argc; char ** m_argv; static Application * pInstance; };
【object oriented programming : class application】
推荐阅读
- 微软小娜APP
- mac 上如何安装非app store上的下载的软件-------打开未知来源
- Android 应用安全风险与防范
- Android监听home键
- Android DecorView浅析
- 从adb prrmission denied到理解android手机提权背后
- Android--SQLite应用
- 得到application
- 手机App调试(Android)