libvirt is a library that provides a common API for managing popular virtualization solutions, among them KVM and Xen. 使用virt-install创建image qemu-img ...
分类:
其他好文 时间:
2014-07-16 18:35:42
阅读次数:
273
Virtual Machine Lifecycle This page describes the basics of the virtual machine lifecycle. Its aim is to provide fundamental information to create, ru...
分类:
其他好文 时间:
2014-07-16 18:29:27
阅读次数:
365
How the virtual networks used by guests work Networking using libvirt is generally fairly simple, and in this section you'll learn the concepts you ne...
分类:
Web程序 时间:
2014-07-16 18:27:29
阅读次数:
311
Running your own dnsmasq with libvirtd On linux host servers, libvirtd uses dnsmasq to service the virtual networks, such as the default network. A ne...
分类:
其他好文 时间:
2014-07-16 18:18:01
阅读次数:
173
经验:private 继承意味 is-implemented-in-terms of。它通常比 composition 的级别低。
但是当 derived class 需要访问 protected base class 的成员,或需要重新定义继承而来的 virtual 函数时,这么设计是合理的
经验:和 composition 不同, private 继承可以造成 empty base 最优化。这对致力于“对象尺寸最小化”的程序库开发者而言,可能很重要
示例1:虽是 Empty class,但却不仅要花...
分类:
编程语言 时间:
2014-07-15 22:41:05
阅读次数:
284
1.virtual 函数版本
class GameCharacter{
public:
virtual int healthValue() const; //返回人物的健康指数, derived classes 可重新定义它
};
2.使用 non-virtual interface 手法,那是 Template Method 设计模式的一种特殊形式。
让客户通过 public non-virtual 成员函数间接调用 private virtual 函数
class GameCharacter{
pu...
分类:
编程语言 时间:
2014-07-15 22:36:18
阅读次数:
364
TObject消息分派 procedure Dispatch(var Message); virtual; #负责分派消息到特定VCL组件的事件处理函数 procedure DefaultHandler(var Message); virtual; #消息分类:通过子类覆盖此方法,处理窗...
分类:
其他好文 时间:
2014-07-15 09:40:31
阅读次数:
444
首先,把最真挚的情感送与梅西,加油!写在前面 阅读目录:重申业务场景Domain Model 设计后记 上一篇《设计窘境:来自 Repository 的一丝线索,Domain Model 再重新设计》。 讲本篇内容之前,先回顾上一篇所讨论的内容,主要是 Repository(仓储)的职责问题,...
分类:
其他好文 时间:
2014-07-15 00:13:42
阅读次数:
491
今天我来测试连接的安全,数据是否可嗅探。android模拟器提供了内置的tcpdump,我们使用这个来抓包。1. 启动带tcpdump的模拟器santoku@santoku-virtual-machine:~/Desktop$ emulator -avd avd1 -tcpdump 7-14.cap...
分类:
移动开发 时间:
2014-07-14 22:18:19
阅读次数:
433
在虚函数的声明的参数列表后加上“=0”就将函数变成了纯虚函数class Base{ virtual void function()=0;}我们不需要为纯虚函数Base::function()提供任何定义,那些声明了纯虚函数的类就是抽象类。任何试图创建一个抽象类对象的操作都会导致编译器错误。如果一个....
分类:
其他好文 时间:
2014-07-14 20:06:09
阅读次数:
258