Logo Search packages:      
Sourcecode: passwordmaker-cli version File versions  Download package

template<class T >
bool TCLAP::MultiArg< T >::processArg ( int *  i,
std::vector< std::string > &  args 
) [virtual]

Handles the processing of the argument. This re-implements the Arg version of this method to set the _value of the argument appropriately. It knows the difference between labeled and unlabeled.

Parameters:
i- Pointer the the current argument in the list.
args- Mutable list of strings. Passed from main().

Implements TCLAP::Arg.

Reimplemented in TCLAP::UnlabeledMultiArg< T >.

Definition at line 439 of file MultiArg.h.

References TCLAP::Arg::delimiter(), and TCLAP::Arg::ignoreRest().

{
      if ( _ignoreable && Arg::ignoreRest() )
            return false;

      if ( _hasBlanks( args[*i] ) )
            return false;

      std::string flag = args[*i];
      std::string value = "";

      trimFlag( flag, value );

      if ( argMatches( flag ) )
      {
            if ( Arg::delimiter() != ' ' && value == "" )
                  throw( ArgParseException( 
                             "Couldn't find delimiter for this argument!",
                                 toString() ) );

            if ( value == "" )
            {
                  (*i)++;
                  if ( (unsigned int)*i < args.size() )
                        _extractValue( args[*i] );
                  else
                        throw( ArgParseException("Missing a value for this argument!",
                                         toString() ) );
            }
            else
                  _extractValue( value );

            _checkWithVisitor();

            return true;
      }
      else
            return false;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index