码迷,mamicode.com
首页 >  
搜索关键字:proxy classes    ( 8879个结果
Effective C++ Item 41 了解隐式接口和编译期多态
经验:class 和 templates 都支持接口和多态。 对 classes 而言接口是显式的,以函数签名为中心。多态则是通过 virtual 函数发生于运行期 对 templates 参数而言,接口是隐式的,奠基于有效表达式。多态则是通过 templates 具体化和函数重载解析(function overloading resolution)发生于编译期。 示例1:显式接口和运行期多态 class Widget{ public: Widget(); virtual ~Widget(); vir...
分类:编程语言   时间:2014-07-14 12:54:57    阅读次数:195
mysql数据库读写分离
1.检查程序依赖lua语言环境[root@localhost~]#rpm-qa|greplualua-5.1.4-4.1.el6.x86_642.安装proxy软件包[root@localhost~]#tar-zxvfmysql-proxy-0.8.3-linux-rhel5-x86-64bit.tar.gz//解压软件[root@localhost~]#mvmysql-proxy-0.8.3-linux-rhel5-x86-64bit/usr/local/mysqlpr..
分类:数据库   时间:2014-07-14 12:00:09    阅读次数:321
Proxy Design Pattern 代理设计模式
代理设计模式,这个模式很多用于服务器客户端之类的,上网也经常使用代理之类的,想起来感觉是很复杂的,不过这个设置模式本身是很简单的。 就是一个类调用另外一个类的函数,客户调用的是一个类,而实际的工作是由另外一个类做的。 体现这个设计模式的代码: #include class RealObj { public: virtual void handleReq() = 0; };...
分类:其他好文   时间:2014-07-13 17:30:48    阅读次数:188
static, readonly, const
static Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object. The static modifier can be used with classes, fields, methods, proper...
分类:其他好文   时间:2014-07-12 22:32:04    阅读次数:320
Effective C++ Item 32 确定你的 public 继承塑模出 is-a 关系
经验:"public继承"意味 is-a。适用于 base classes 身上的每一件事情一定也适用于 derived classes 身上, 因为每一个 derived classes 身上,因为每一个 derived class 对象也都是一个 base class 对象。 示例: class Person {...}; class Student: public Person {...}; void eat(const Person &p); //任何人都会吃 void study(const ...
分类:编程语言   时间:2014-07-12 21:18:25    阅读次数:230
android sdk manager proxy
### Settings for Android Tool #Tue Jun 12 01:34:55 PDT 2012 http.proxyPort=3128 sdkman.monitor.density=108 http.proxyHost=127.0.0.1 sdkman.show.update.only=true sdkman.ask.adb.restart=false sdkman.for...
分类:移动开发   时间:2014-07-12 20:30:01    阅读次数:228
Proxy - 代理模式
定义 为其他对象提供一种代理以控制对这个对象的访问。 案例 对一个对象进行访问控制的原因在于只有确实需要这个对象的时候,才会进行创建和初始化。比如一个文件编辑系统,要打开一个文件,但是文件里边除了文字,还有许多的图片。而打开文件的时候,屏幕只有那么大,不一定能完整的显示。为了提升打开文件的速度,这时候不能显示的图片就可以延迟创建,在需要显示的时候才把它创建处对象,再显...
分类:其他好文   时间:2014-07-12 19:57:06    阅读次数:208
Effective C++ Item 31 降低文件间编译依存关系
经验:支持”编译依存性最小化“的一般构想是:相依于声明式,不要相依于定义式。 基于此构想的两个手段是 Handle classes 和 Interface classes. 示例:相依于定义式 #include #include "date.h" #include "address.h" class Person{ public: Person(const std::string &name, const Data &birthday, const Address &addr); st...
分类:编程语言   时间:2014-07-12 19:39:46    阅读次数:347
设计模式 - 代理模式(proxy pattern) 未使用代理模式 详解
代理模式(proxy pattern) 未使用代理模式 详解本文地址: http://blog.csdn.net/caroline_wendy部分代码参考: http://blog.csdn.net/caroline_wendy/article/details/37698747如果需要监控(monitor)类的某些状态, 则需要编写一个监控类, 并同过监控类进行监控.但仅仅局限于本地, 如果需要远...
分类:其他好文   时间:2014-07-12 19:34:23    阅读次数:343
Effective C++ Item 33 避免遮掩继承过来的名称
经验:derived classes 内的名称会遮掩 base classes 内的名称。在 public 继承下从来没有人希望如此。 C++ 的名称遮掩规则所做的唯一事情就是: 遮掩名称 derived class 作用域被嵌套在 base class 作用域里 class Base { private: int x; public: virtual void mf1() = 0; virtual void mf1(int); virtual void mf2(); void mf3(); v...
分类:编程语言   时间:2014-07-12 19:05:42    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!