mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-12 05:35:08 -04:00
added backward compatibility
This commit is contained in:
parent
9385af7073
commit
6f5b735414
@ -88,8 +88,30 @@ class CmdLine
|
||||
*/
|
||||
bool _emptyCombined(const string& s);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Encapsulates the code common to the constructors (which is all
|
||||
* of it).
|
||||
*/
|
||||
void _constructor();
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Command line constructor. DEPRECATED!!! This is here to maintain
|
||||
* backwards compatibility with earlier releases. Note that the
|
||||
* program name will be overwritten with argv[0]. The delimiter
|
||||
* used is ' ' (as before).
|
||||
* \param name - The program name - will be overwritten with argv[0].
|
||||
* \param message - The message to be used in the usage output.
|
||||
* \param version - The version number to be used in the
|
||||
* --version switch.
|
||||
*/
|
||||
CmdLine(const string& name,
|
||||
const string& message,
|
||||
const string& version = "none" );
|
||||
|
||||
/**
|
||||
* Command line constructor. Defines how the arguments will be
|
||||
* parsed.
|
||||
|
@ -24,12 +24,27 @@
|
||||
|
||||
namespace TCLAP {
|
||||
|
||||
CmdLine::CmdLine(const string& n, const string& m, const string& v )
|
||||
: _progName(n),
|
||||
_message(m),
|
||||
_version(v),
|
||||
_numRequired(0),
|
||||
_delimiter(' ')
|
||||
{
|
||||
_constructor();
|
||||
}
|
||||
|
||||
CmdLine::CmdLine(const string& m, char delim, const string& v )
|
||||
: _progName("not_set_yet"),
|
||||
_message(m),
|
||||
_version(v),
|
||||
_numRequired(0),
|
||||
_delimiter(delim)
|
||||
{
|
||||
_constructor();
|
||||
}
|
||||
|
||||
void CmdLine::_constructor()
|
||||
{
|
||||
Arg::setDelimiter( _delimiter );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user