mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 12:23:39 -04:00
fixed output override bug
This commit is contained in:
parent
14ba43861a
commit
4ad3b2e82c
@ -577,6 +577,20 @@ class MyOutput : public StdOutput
|
||||
cerr << "My special failure message for: " << endl
|
||||
<< e.what() << endl;
|
||||
}
|
||||
|
||||
virtual void usage(CmdLineInterface& c)
|
||||
{
|
||||
cout << "my usage message:" << endl;
|
||||
list<Arg*> args = c.getArgList();
|
||||
for (ArgListIterator it = args.begin(); it != args.end(); it++)
|
||||
cout << (*it)->longID()
|
||||
<< " (" << (*it)->getDescription() << ")" << endl;
|
||||
}
|
||||
|
||||
virtual void version(CmdLineInterface& c)
|
||||
{
|
||||
cout << "my version message: 0.1" << endl;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -736,6 +736,20 @@ class MyOutput : public StdOutput
|
||||
cerr << "My special failure message for: " << endl
|
||||
<< e.what() << endl;
|
||||
}
|
||||
|
||||
virtual void usage(CmdLineInterface& c)
|
||||
{
|
||||
cout << "my usage message:" << endl;
|
||||
list<Arg*> args = c.getArgList();
|
||||
for (ArgListIterator it = args.begin(); it != args.end(); it++)
|
||||
cout << (*it)->longID()
|
||||
<< " (" << (*it)->getDescription() << ")" << endl;
|
||||
}
|
||||
|
||||
virtual void version(CmdLineInterface& c)
|
||||
{
|
||||
cout << "my version message: 0.1" << endl;
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user