diff -r 598a575ae57f -r 145b45ef7751 c++/parameter-lister/CLI.cpp --- a/c++/parameter-lister/CLI.cpp Sun May 03 22:19:03 2015 +0200 +++ b/c++/parameter-lister/CLI.cpp Sun May 03 23:41:43 2015 +0200 @@ -3,6 +3,7 @@ #include #include #include +#include #include "info/globalcode/parameterLister/terminalCodes/TerminalCodes.h" #include "info/globalcode/parameterLister/OutputModule.h" @@ -24,6 +25,9 @@ } } +void process(shared_ptr om) { + om->process(cout); +} } } @@ -62,15 +66,16 @@ cout << "ENV: " << envName << " is missing" << endl; } } - + { - OutputModule om; - TerminalOutputModule tom; - - om.process(cout); - tom.process(cout); + shared_ptr om(new OutputModule()); + shared_ptr tom(new TerminalOutputModule()); + shared_ptr o(new TerminalOutputModule()); + + process(om); + process(tom); + process(o); } - return 0; -} \ No newline at end of file +}