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)
把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 面向过程的程序设计把计算机程序视为一系列的命令集合,即一组函数的顺序执行.为了简化程序设计,面向过程把函数继续切分为子函数,即把大块函数 ...
随机推荐
- HDU 1026(迷宫 BFS+打印)
题意是要穿过一个迷宫并且将每一步打印出来. 用宽搜的方法找到路径,在 vis 中存一下方向,只是这题被看到的一种不太对的运算符重载坑了很久...... 代码如下: #include <bits/ ...
- Jsp的四大作用域与九大对象
内置对象特点: 1. 由JSP规范提供,不用编写者实例化. 2. 通过Web容器实现和管理 3. 所有JSP页面均可使用 4. 只有在脚本元素的表达式或代码段中才可使用(<%=使用内置对象%&g ...
- JVM垃圾回收机制与内存回收
暂时转于:https://blog.csdn.net/qq_27035123/article/details/72857739 垃圾回收机制 GC是垃圾回收机制,java中将内存管理交给垃圾回收机制, ...
- python学习路线--从入门到入土
入门技术博客 进阶自己挑选 入门基础 Python入门相对容易又可以干很多事(网站,运维,数据,爬虫等),是一门方便的工具语言.2016年TIOBE排名显示Python已经名列第四,成为脚本语言之首. ...
- 23.Secondary Index
一. Secondary Index(二级索引)1.1. Secondary Index 介绍 • Clustered Index(聚集索引) ◦ 叶子节点存储所有记录(all row data) • ...
- 简单回射程序之处理accept返回EINTR错误的服务器程序版本
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <errno.h> ...
- C#--IEnumerable 与 IEnumerator 的区别
一. IEnumerator 解释:它是一个的集合访问器,使用foreach语句遍历集合或数组时,就是调用 Current.MoveNext()的结果. // 定义如下public interface ...
- zookeeper客户端 zkCli使用及常用命令
上篇(http://www.cnblogs.com/yangzhenlong/p/8270835.html)zk伪集群搭建好后,使用zkCli连接zk服务 切换到zk1/bin 目录,执行zkCli. ...
- Docker 空间大小设置 - 十
一.容器启动 默认存储大小: 1.一种在启动项 docker.service 中配置. 2.在启动项配置调用的 docker-storage 配置文件中配置: 二.Docker 容器默认启动文件: / ...
- Windows打开文件
cmd中, windows 打开文件命令:start: Linux 打开文件命令:open