Lines Matching refs:valStr
256 static int ParseBoolFlag(const std::string& flag, const std::string& valStr)
259 if (valStr.compare("false") == 0) {
261 } else if (valStr.compare("true") == 0) {
266 << valStr << " is given" << std::endl;
274 static int ParseInt8Flag(const std::string& flag, const std::string& valStr)
277 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
281 << valStr << " is given" << std::endl;
289 static int ParseInt16Flag(const std::string& flag, const std::string& valStr)
292 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
296 << valStr << " is given" << std::endl;
304 static int ParseInt32Flag(const std::string& flag, const std::string& valStr)
307 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
311 << valStr << " is given" << std::endl;
319 static int ParseInt64Flag(const std::string& flag, const std::string& valStr)
322 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
326 << valStr << " is given" << std::endl;
334 static int ParseUint8Flag(const std::string& flag, const std::string& valStr)
337 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
341 << valStr << " is given" << std::endl;
349 static int ParseUint16Flag(const std::string& flag, const std::string& valStr)
352 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
356 << valStr << " is given" << std::endl;
364 static int ParseUint32Flag(const std::string& flag, const std::string& valStr)
367 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
371 << valStr << " is given" << std::endl;
379 static int ParseUint64Flag(const std::string& flag, const std::string& valStr)
382 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
386 << valStr << " is given" << std::endl;
394 static int ParseDoubleFlag(const std::string& flag, const std::string& valStr)
397 double tmpVal = strtod(valStr.c_str(), &pos);
401 << valStr << " is given" << std::endl;
409 static int ParseStringFlag(const std::string& flag, const std::string& valStr)
412 *val = valStr;
416 static int ParseBoolArrayFlag(const std::string& flag, const std::string& valStr)
419 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
420 if (valStr[end] == ',' or end == valStr.length()) {
425 auto str = valStr.substr(start, end - start);
433 << valStr << " is given" << std::endl;
443 static int ParseInt8ArrayFlag(const std::string& flag, const std::string& valStr)
446 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
447 if (valStr[end] == ',' or end == valStr.length()) {
452 auto str = valStr.substr(start, end - start);
454 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
458 << valStr << " is given" << std::endl;
469 static int ParseInt16ArrayFlag(const std::string& flag, const std::string& valStr)
472 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
473 if (valStr[end] == ',' or end == valStr.length()) {
478 auto str = valStr.substr(start, end - start);
480 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
484 << valStr << " is given" << std::endl;
495 static int ParseInt32ArrayFlag(const std::string& flag, const std::string& valStr)
498 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
499 if (valStr[end] == ',' or end == valStr.length()) {
504 auto str = valStr.substr(start, end - start);
506 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
510 << valStr << " is given" << std::endl;
521 static int ParseInt64ArrayFlag(const std::string& flag, const std::string& valStr)
524 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
525 if (valStr[end] == ',' or end == valStr.length()) {
530 auto str = valStr.substr(start, end - start);
532 long int tmpVal = strtol(valStr.c_str(), &pos, 10);
536 << valStr << " is given" << std::endl;
547 static int ParseUint8ArrayFlag(const std::string& flag, const std::string& valStr)
550 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
551 if (valStr[end] == ',' or end == valStr.length()) {
556 auto str = valStr.substr(start, end - start);
558 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
562 << valStr << " is given" << std::endl;
573 static int ParseUint16ArrayFlag(const std::string& flag, const std::string& valStr)
576 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
577 if (valStr[end] == ',' or end == valStr.length()) {
582 auto str = valStr.substr(start, end - start);
584 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
588 << valStr << " is given" << std::endl;
599 static int ParseUint32ArrayFlag(const std::string& flag, const std::string& valStr)
602 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
603 if (valStr[end] == ',' or end == valStr.length()) {
608 auto str = valStr.substr(start, end - start);
610 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
614 << valStr << " is given" << std::endl;
625 static int ParseUint64ArrayFlag(const std::string& flag, const std::string& valStr)
628 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
629 if (valStr[end] == ',' or end == valStr.length()) {
634 auto str = valStr.substr(start, end - start);
636 unsigned long long int tmpVal = strtoull(valStr.c_str(), &pos, 10);
640 << valStr << " is given" << std::endl;
651 static int ParseDoubleArrayFlag(const std::string& flag, const std::string& valStr)
654 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
655 if (valStr[end] == ',' or end == valStr.length()) {
660 auto str = valStr.substr(start, end - start);
662 double tmpVal = strtod(valStr.c_str(), &pos);
666 << valStr << " is given" << std::endl;
677 static int ParseStringArrayFlag(const std::string& flag, const std::string& valStr)
680 for (std::size_t start = 0, end = 0; end <= valStr.length(); ++end) {
681 if (valStr[end] == ',' or end == valStr.length()) {
686 val->emplace_back(valStr.c_str() + start, end - start);