MCPcopy Create free account
hub / github.com/dds-bridge/dds / parse_DEALERPAR

Function parse_DEALERPAR

library/tests/parse.cpp:425–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423
424
425bool parse_DEALERPAR(
426 const vector<string>& list,
427 ParResultsDealer * par)
428{
429 const size_t l = list.size();
430 if (l < 3)
431 {
432 cout << "PAR2 list does not have 3+ elements: " << l << endl;
433 return false;
434 }
435
436 if (! get_head_element(list[0], "PAR2"))
437 return false;
438
439 if (! strip_quotes(list[1], par->score, "PBN string"))
440 return false;
441
442 unsigned no = 0;
443 while (no+2 < l)
444 {
445 if (! strip_quotes(list[no+2], par->contracts[no], "PAR2 contract"))
446 break;
447 no++;
448 }
449
450 par->number = static_cast<int>(no);
451 return true;
452}
453
454
455bool parse_PLAY(

Callers 1

read_fileFunction · 0.85

Calls 2

get_head_elementFunction · 0.85
strip_quotesFunction · 0.85

Tested by

no test coverage detected