int main() { UnixBuilder unixBuilder; VmsBuilder vmsBuilder; Reader reader; // Reader: director reader.setBuilder(&unixBuilder); reader.construct(input, NUM_ENTRIES); std::cout << unixBuilder.getResult()->getState() << std::endl; reader.setBuilder(&vmsBuilder); reader.construct(input, NUM_ENTRIES); std::cout << vmsBuilder.getResult()->getState() << std::endl; }
int main () { UnixBuilder unixBuilder; VmsBuilder vmsBuilder; Reader reader; reader.setBuilder(&unixBuilder); reader.construct(input, 4); cout << unixBuilder.getResult()->getState() << endl; reader.setBuilder(&vmsBuilder); reader.construct(input, 4); cout << vmsBuilder.getResult()->getState() << endl; }
int main(int argc, char *argv[]) { UnixBuilder unixBuilder; VmsBuilder vmsBuilder; Reader reader; reader.setBuilder(&unixBuilder); reader.construct(input, NUM_ENTRIES); cout << unixBuilder.getResult()->getState() << endl; reader.setBuilder(&vmsBuilder); reader.construct(input, NUM_ENTRIES); cout << vmsBuilder.getResult()->getState() << endl; return 0; }