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)
把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数. 面向过程的程序设计把计算机程序视为一系列的命令集合,即一组函数的顺序执行.为了简化程序设计,面向过程把函数继续切分为子函数,即把大块函数 ...
随机推荐
- 【转载】C# List用法 List介绍
https://www.cnblogs.com/dyhao/p/9501479.html
- 指定so动态链接库连接器
在学习x86_64汇编时, 发现一旦使用glibc库函数, 如printf时, 一般是需要使用为ld传递命令行参数-lc来动态连接libc.so的, 但是, 生成的可执行文件却无法运行: 气煞我也! ...
- 使用js请求Servlet时的路径
项目结构如下: 全是web的html页面 js部分重要代码: function ajaxValidate() { var flag=false; $.ajax({ "url":&q ...
- 三十五、minishell(3)
35.1 内容 在当前的 minishell 中,如果执行 date clear 命令等,minishell 会停止: 这是因为引入进程组的时候,mshell 放置在前台进程组,同时之后在子进程中又创 ...
- 【Django】不知道为什么就是想学一下 01
1. Django安装.项目创建及服务器连接 系统:Ubuntu 14.04.4 > cat /etc/issue //查看系统版本 安装Django > sudo pip install ...
- 为什么要用日志框架 Logback 基本使用
[日志框架]以时间为单位描述应用项目运行状态:用户下线.接口超时.数据库崩溃等等一系列事件 [日志框架能力] 1.定制输出格式 2.定制输出目标 3.携带 Context 比如 HelloWorld. ...
- Ubuntu中拷贝文件的操作
cp(copy)命令 该命令的功能是将给出的文件或目录拷贝到另一文件或目录中. 语法: cp [选项] 源文件或目录 目标文件或目录 说明:该命令把指定的源文件复制到目标文件或把多个源文件复制到目标目 ...
- html5 area实例
真实页面效果:就是一张图 html代码: <!DOCTYPE HTML> <html> <style> body{ padding:0px; margin:0px; ...
- Zipkin 分布式数据追踪系统
Zipkin 是一个分布式数据追踪系统,适用于微服务架构下的调用链路数据采集及分析工作. 可通过一个 Web 前端轻松的收集和分析数据,例如用户每次请求服务的处理时间等,可方便的监测系统中存在的瓶颈. ...
- char,wchar_t 长度
(测试环境:VC++6.0) char类型 wchar_t类型 类型大小(32位系统) 8位 16位 常量字符表示法 'A' L'A' 或 'A' 常量字符串表示法 'hello' L'hello' ...