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) {}; \
virtual \
int Main(int argc, ArgvType argv); \
}; // provide a main() runtine
#define APPL_DEFINE_MAIN( YourAppClass ) \
int \
main(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 ; }
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的更多相关文章
- Object Oriented Programming python
Object Oriented Programming python new concepts of the object oriented programming : class encapsula ...
- JavaScript: Constructor and Object Oriented Programming
Constructor : Grammar: object.constructor Example: Javascript code: 1 function obj1() { this.number ...
- 面对对象编程(OOP, Object Oriented Programming)及其三个基本特性
一千个读者,一千个哈姆雷特.对于面对对象编程,书上都会告诉我们它有三个基本特性,封装,继承,多态,但谈起对这三点的见解,又是仁者见仁智者见智,感觉还是得多去编程中体验把 . 面向对象编程(OOP, O ...
- Python 面向導向語言 Object Oriented Programming Language
Pytho 是面向對象的程式語言,舉凡 Literals 值都是 Object.例如: >>> id(38)8791423739696 與 >>> id('ABC' ...
- leetcode@ [355] Design Twitter (Object Oriented Programming)
https://leetcode.com/problems/design-twitter/ Design a simplified version of Twitter where users can ...
- opp(Object Oriented Programming)
嗯,昨天忙了一天没来及发,过年啊,打扫啊,什么搽窗户啊,拖地啊,整理柜子啊,什么乱七八糟的都有,就是一个字,忙. 好了,废话也不多说,把自己学到的放上来吧.嗯,说什么好呢,就说原型链啊 原型对象 每个 ...
- oop(Object Oriented Programming)
嗯,昨天忙了一天没来及发,过年啊,打扫啊,什么搽窗户啊,拖地啊,整理柜子啊,什么乱七八糟的都有,就是一个字,忙. 好了,废话也不多说,把自己学到的放上来吧.嗯,说什么好呢,就说原型链啊 原型对象 每个 ...
- Week 5: Object Oriented Programming 9. Classes and Inheritance Exercise: int set
class intSet(object): """An intSet is a set of integers The value is represented by a ...
- python, 面向对象编程Object Oriented Programming(OOP)
把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 面向过程的程序设计把计算机程序视为一系列的命令集合,即一组函数的顺序执行.为了简化程序设计,面向过程把函数继续切分为子函数,即把大块函数 ...
随机推荐
- Golang入门教程(十二)安装注意事项
1.$GOPATH (1)go 命令依赖一个重要的环境变量:$GOPATH .注:这个不是Go安装目录 (2) (3) (4)git 安装 (5)包管理对应关系 (6)安装完之后bee 工具后,bee ...
- C++ WString与String互相转换
std::wstring StringToWString(const std::string& str) { , str.c_str(), -, NULL, ); wchar_t *wide ...
- 四十二、Linux 线程——线程同步之条件变量之线程状态转换
42.1 线程状态转换 42.1.1 状态转换图 42.1.2 一个线程计算,多个线程获取的案例 #include <stdio.h> #include <stdlib.h> ...
- PHP文件管理—实现网盘以及压缩包的功能操作
代码如下: 1.主页面file_zip.php <!DOCTYPE html> <html> <head> <meta charset="UTF-8 ...
- APPLE-SA-2019-3-25-7 Xcode 10.2
APPLE-SA-2019-3-25-7 Xcode 10.2 Xcode 10.2 is now available and addresses the following: KernelAvail ...
- QWidget扩充父子关系
childAt(x, y) 获取在指定坐标处的子控件 parentWidget() 获取指定控件的父控件 s=label.parentWidget() #返回label的父 ...
- react 在IE9下input标签使用e.target.value取值失败
在react项目开发中,input标签使用onChange方法获取输入值改变state: <input type="text" id="redeemNum" ...
- 第26月第8天 android studio 国内
1. //东软信息学院 mirrors.neusoft.edu.cn 80 使用方法: 启动 Android SDK Manager ,打开主界面,依次选择「Tools」.「Options…」,弹 ...
- Lattice
Lattice是一个无环WFSA,结点可以是hmm状态.hmm(音素).词,每个结点是一段音频在某个时间的对齐 用训练好的声学模型.现成的语言模型和发音字典构建解码网络(wfst),最后将提取的测试集 ...
- git操作手册
git教案链接:https://git-scm.com/book/zh/v2 1.1 起步 - 关于版本控制 于是分布式版本控制系统(Distributed Version Control Syste ...