Lines Matching refs:OptionParser

640                 case OptionParser::eNoArgument:                       break;
641 case OptionParser::eRequiredArgument: sstr << ':'; break;
642 case OptionParser::eOptionalArgument: sstr << "::"; break;
647 OptionParser::Prepare();
652 val = OptionParser::Parse(GetArgumentCount(),
690 long_options[long_options_index].has_arg == OptionParser::eNoArgument ? NULL : OptionParser::GetOptionArgument());
701 m_argv.erase(m_argv.begin(), m_argv.begin() + OptionParser::GetOptionIndex());
1289 case OptionParser::eNoArgument:
1291 case OptionParser::eRequiredArgument:
1294 case OptionParser::eOptionalArgument:
1301 OptionParser::Prepare();
1306 val = OptionParser::Parse (GetArgumentCount(),
1350 case OptionParser::eNoArgument:
1352 OptionArgValue (OptionParser::eNoArgument, "<no-argument>")));
1355 case OptionParser::eRequiredArgument:
1356 if (OptionParser::GetOptionArgument() != NULL)
1359 OptionArgValue (OptionParser::eRequiredArgument,
1360 std::string (OptionParser::GetOptionArgument()))));
1370 case OptionParser::eOptionalArgument:
1371 if (OptionParser::GetOptionArgument() != NULL)
1374 OptionArgValue (OptionParser::eOptionalArgument,
1375 std::string (OptionParser::GetOptionArgument()))));
1381 OptionArgValue (OptionParser::eOptionalArgument, "<no-argument>")));
1413 if ((long_options[long_options_index].has_arg != OptionParser::eNoArgument)
1414 && (OptionParser::GetOptionArgument() != NULL)
1416 && (strcmp (OptionParser::GetOptionArgument(), GetArgumentAtIndex(idx+1)) == 0))
1464 case OptionParser::eNoArgument:
1466 case OptionParser::eRequiredArgument:
1469 case OptionParser::eOptionalArgument:
1476 OptionParser::Prepare();
1477 OptionParser::EnableError(false);
1482 // Fooey... OptionParser::Parse permutes the GetArgumentVector to move the options to the front.
1483 // So we have to build another Arg and pass that to OptionParser::Parse so it doesn't
1496 val = OptionParser::Parse (dummy_vec.size() - 1,
1514 // I let it pass to OptionParser::Parse which will terminate the option parsing.
1519 if (OptionParser::GetOptionIndex() < dummy_vec.size() - 1
1520 && (strcmp (dummy_vec[OptionParser::GetOptionIndex()-1], "--") == 0))
1522 dash_dash_pos = OptionParser::GetOptionIndex() - 1;
1523 if (OptionParser::GetOptionIndex() - 1 == cursor_index)
1525 option_element_vector.push_back (OptionArgElement (OptionArgElement::eBareDoubleDash, OptionParser::GetOptionIndex() - 1,
1537 option_element_vector.push_back (OptionArgElement (OptionArgElement::eUnrecognizedArg, OptionParser::GetOptionIndex() - 1,
1548 val = OptionParser::GetOptionErrorCause();
1586 case OptionParser::eNoArgument:
1587 option_element_vector.push_back (OptionArgElement (opt_defs_index, OptionParser::GetOptionIndex() - 1, 0));
1589 case OptionParser::eRequiredArgument:
1590 if (OptionParser::GetOptionArgument() != NULL)
1596 arg_index = OptionParser::GetOptionIndex() - 1;
1598 option_element_vector.push_back (OptionArgElement (opt_defs_index, OptionParser::GetOptionIndex() - 2, arg_index));
1602 option_element_vector.push_back (OptionArgElement (opt_defs_index, OptionParser::GetOptionIndex() - 1, -1));
1605 case OptionParser::eOptionalArgument:
1606 if (OptionParser::GetOptionArgument() != NULL)
1608 option_element_vector.push_back (OptionArgElement (opt_defs_index, OptionParser::GetOptionIndex() - 2, OptionParser::GetOptionIndex() - 1));
1612 option_element_vector.push_back (OptionArgElement (opt_defs_index, OptionParser::GetOptionIndex() - 2, OptionParser::GetOptionIndex() - 1));
1617 option_element_vector.push_back (OptionArgElement (OptionArgElement::eUnrecognizedArg, OptionParser::GetOptionIndex() - 1,
1624 option_element_vector.push_back (OptionArgElement (OptionArgElement::eUnrecognizedArg, OptionParser::GetOptionIndex() - 1,
1630 // the option_element_vector, but only if it is not after the "--". But it turns out that OptionParser::Parse just ignores