typedef arglist_type::const_reverse_iterator const_reverse_iterator;
private:
- /// The full list of arguments.
- arglist_type &Args;
+ /// The internal list of arguments.
+ arglist_type Args;
protected:
- ArgList(arglist_type &Args);
+ ArgList();
public:
virtual ~ArgList();
void operator=(const ArgList &); // DO NOT IMPLEMENT
private:
- /// The internal list of arguments.
- arglist_type ActualArgs;
-
/// List of argument strings used by the contained Args.
///
/// This is mutable since we treat the ArgList as being the list
class DerivedArgList : public ArgList {
InputArgList &BaseArgs;
- /// The internal list of arguments.
- arglist_type ActualArgs;
-
/// The list of arguments we synthesized.
mutable arglist_type SynthesizedArgs;
- /// Is this only a proxy for the base ArgList?
- bool OnlyProxy;
-
public:
/// Construct a new derived arg list from \arg BaseArgs.
///
//
-ArgList::ArgList(arglist_type &_Args) : Args(_Args) {
+ArgList::ArgList() {
}
ArgList::~ArgList() {
//
InputArgList::InputArgList(const char **ArgBegin, const char **ArgEnd)
- : ArgList(ActualArgs), NumInputArgStrings(ArgEnd - ArgBegin) {
+ : NumInputArgStrings(ArgEnd - ArgBegin) {
ArgStrings.append(ArgBegin, ArgEnd);
}
//
-DerivedArgList::DerivedArgList(InputArgList &_BaseArgs, bool _OnlyProxy)
- : ArgList(_OnlyProxy ? _BaseArgs.getArgs() : ActualArgs),
- BaseArgs(_BaseArgs), OnlyProxy(_OnlyProxy) {
+DerivedArgList::DerivedArgList(InputArgList &_BaseArgs, bool OnlyProxy)
+ : BaseArgs(_BaseArgs) {
+ if (OnlyProxy)
+ getArgs() = _BaseArgs.getArgs();
}
DerivedArgList::~DerivedArgList() {