Changeset 2054
- Timestamp:
- Sep 6, 2009, 8:25:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/CommandLine.h
r2046 r2054 52 52 CommandLine cmd; 53 53 OptionHelp help(cmd); 54 OptionInFile in(cmd, "i,in", 55 "Read input from file (rather than standard input)"); 56 OptionOutFile out(cmd, "o,out", "Place the output to file"); 54 OptionFile in(cmd, "i,in", 55 "Read input from file (rather than standard input)", 56 false, true, "r"); 57 OptionFile out(cmd, "o,out", "Place the output to file", false, false, "w"); 57 58 OptionSwitch target(cmd, "T,target", "treat DEST as a normal file", true); 58 59 OptionSwitch verbose(cmd, "v,verbose", "explain what is being done"); … … 79 80 return EXIT_SUCCESS; 80 81 } 82 StreamRedirect sr_out(std::cout, out.value(), out.present()); 83 StreamRedirect sr_in(std::cin, in.value(), in.present()); 81 84 ... 82 85 \endcode
Note: See TracChangeset
for help on using the changeset viewer.