add a parameter to make_help to inidicate output
This commit is contained in:
parent
5d6f87c98c
commit
70f21e95cf
2 changed files with 4 additions and 4 deletions
|
|
@ -50,7 +50,7 @@
|
||||||
#include "eoGenCounter.h"
|
#include "eoGenCounter.h"
|
||||||
|
|
||||||
// and make_help - any better suggestion to include it?
|
// and make_help - any better suggestion to include it?
|
||||||
void make_help(eoParser & _parser, bool exit_after = true);
|
void make_help(eoParser & _parser, bool exit_after = true, std::ostream& out = std::cout);
|
||||||
|
|
||||||
#endif // !_CHECKPOINTING_
|
#endif // !_CHECKPOINTING_
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
* It is declared in all make_xxx.h files in representation-dependent dirs
|
* It is declared in all make_xxx.h files in representation-dependent dirs
|
||||||
* but it is NOT representation-dependent itself - that's why it's in utils
|
* but it is NOT representation-dependent itself - that's why it's in utils
|
||||||
*/
|
*/
|
||||||
void make_help(eoParser & _parser, bool exit_after)
|
void make_help(eoParser & _parser, bool exit_after, std::ostream& out)
|
||||||
{
|
{
|
||||||
// name of the "status" file where all actual parameter values will be saved
|
// name of the "status" file where all actual parameter values will be saved
|
||||||
std::string str_status = _parser.ProgramName() + ".status"; // default value
|
std::string str_status = _parser.ProgramName() + ".status"; // default value
|
||||||
|
|
@ -62,8 +62,8 @@ void make_help(eoParser & _parser, bool exit_after)
|
||||||
// i.e. in case you need parameters somewhere else, postpone these
|
// i.e. in case you need parameters somewhere else, postpone these
|
||||||
if (_parser.userNeedsHelp())
|
if (_parser.userNeedsHelp())
|
||||||
{
|
{
|
||||||
_parser.printHelp(std::cout);
|
_parser.printHelp(out);
|
||||||
std::cout << "You can use an edited copy of file " << statusParam.value()
|
out << "You can use an edited copy of file " << statusParam.value()
|
||||||
<< " as parameter file" << std::endl;
|
<< " as parameter file" << std::endl;
|
||||||
if(exit_after) {
|
if(exit_after) {
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue