mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-11 13:14:45 -04:00
now the Arg adds itself to the CmdLine arglist
This commit is contained in:
parent
4337d270db
commit
c17ad76595
@ -132,6 +132,12 @@ class Arg
|
||||
void _checkWithVisitor() const;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Adds this to the specified list of Args.
|
||||
* \param argList - The list to add this to.
|
||||
*/
|
||||
virtual void addToList( list<Arg*>& argList ) const;
|
||||
|
||||
/**
|
||||
* Begin ignoring arguments since the "--" argument was specified.
|
||||
|
@ -91,6 +91,11 @@ class UnlabeledMultiArg : public MultiArg<T>
|
||||
*/
|
||||
virtual bool operator==(const Arg& a) const;
|
||||
|
||||
/**
|
||||
* Pushes this to back of list rather than front.
|
||||
* \param argList - The list this should be added to.
|
||||
*/
|
||||
virtual void addToList( list<Arg*>& argList ) const;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@ -142,6 +147,12 @@ bool UnlabeledMultiArg<T>::operator==(const Arg& a) const
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void UnlabeledMultiArg<T>::addToList( list<Arg*>& argList ) const
|
||||
{
|
||||
argList.push_back( (Arg*)this );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -101,6 +101,11 @@ class UnlabeledValueArg : public ValueArg<T>
|
||||
*/
|
||||
virtual bool operator==(const Arg& a ) const;
|
||||
|
||||
/**
|
||||
* Instead of pushing to the front of list, push to the back.
|
||||
* \param argList - The list to add this to.
|
||||
*/
|
||||
virtual void addToList( list<Arg*>& argList ) const;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -175,5 +180,11 @@ bool UnlabeledValueArg<T>::operator==(const Arg& a ) const
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void UnlabeledValueArg<T>::addToList( list<Arg*>& argList ) const
|
||||
{
|
||||
argList.push_back( (Arg*)this );
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user