Code:
Brain b1 = new Brain();
b1.addLogicalSkill(new DiHelloWorld());
b1.addHardwareSkill(new DiSysOut());
b1.doIt("hello", "", "");
Code:
Brain b1 = new Brain();
b1.addLogicalSkill(new DiHelloWorld());
b1.addHardwareSkill(new DiSysOut());
b1.doIt("hello", "", "");
Code:
Brain* b1 = new Brain();
b1->addLogicalSkill(new DiHelloWorld());
b1->addHardwareSkill(new DiSysOut());
b1->doIt("hello", "", "");
Code:
Brain b1;
unique_ptr< DiHelloWorld> dihello = make_unique< DiHelloWorld>();
unique_ptr< DiSysOut> disys = make_unique< DiSysOut>();
b1.addLogicalSkill(dihello.get());
b1.addHardwareSkill(disys.get());