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)
把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 面向过程的程序设计把计算机程序视为一系列的命令集合,即一组函数的顺序执行.为了简化程序设计,面向过程把函数继续切分为子函数,即把大块函数 ...
随机推荐
- AAndroid Studio的\drawable还是mipmap
图片应该放在drawable文件夹下,而mipmap文件夹只适合放app icons
- Generic XXE Detection
参考连接:https://www.christian-schneider.net/GenericXxeDetection.html In this article I present some tho ...
- excel数据 入库mysql 和 mysql数据 导入excel文件
1.excel数据入库mysql 首先准备excel文件, 标红的地方需要留意,一个是字段名所在行,一个表名对应页: 然后私用mysql工具 navicat, 选择数据库,然后导入文件, 选中相应ex ...
- 使用PHP连接数据库实现留言板功能
PHP实现留言板功能: 1 首先是登录页面: <!DOCTYPE html><html> <head> <meta charset=&qu ...
- Redis是可以安装成windows服务-开机自启
其实Redis是可以安装成windows服务的,开机自启动,命令如下 redis-server --service-install redis.windows.conf 安装完之后,就可看到Redis ...
- Java基础_0205: 程序逻辑结构
使用if语句进行判断 public class TestDemo { public static void main(String args[]) { double score = 90.0; // ...
- jq的css方法
读属性: $(selector).css(name) 设置属性: 法一: $(selector).css(name,value) 法二: $(selector).css(name,function(i ...
- MySQL去重案列(待更新...)
谈谈distinct 查询单个字段,没问题! SELECT DISTINCT username FROM t_user 但是我想加入id字段,这样写,报错! SELECT id, DISTINCT u ...
- F - Auxiliary Set HDU - 5927 (dfs判断lca)
题目链接: F - Auxiliary Set HDU - 5927 学习网址:https://blog.csdn.net/yiqzq/article/details/81952369题目大意一棵节点 ...
- Print Article(斜率DP入门+单调队列)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3507 题目大意:给你n个数,然后问你怎么分割当前的这n个数位那几组,使得每一组的权值加起来最大.每一组 ...