// 客户端 int main_bridge2() { HandsetBrand *brand; brand = new HandsetBrandM(); brand->SetHandsetSoft(new HandsetGame()); brand->Run(); brand->SetHandsetSoft(new HandSetAddressList()); brand->Run(); return 0; }
int test_Bridge1() { HandsetBrand* brand; brand = new HandsetBrandM(); brand->SetHandsetSoft(new HandsetGame()); brand->Run(); brand->SetHandsetSoft(new HandSetAddressList()); brand->Run(); /* result: 运行手机游戏 手机通讯录 */ return 0; }