MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / Highs_getStringOptionValues

Function Highs_getStringOptionValues

highs/interfaces/highs_c_api.cpp:485–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485HighsInt Highs_getStringOptionValues(const void* highs, const char* option,
486 char* current_value, char* default_value) {
487 std::string current_v;
488 std::string default_v;
489 // Inherited from Highs_getStringOptionValue: cannot see why this
490 // was ever useful. Must assume that current_value is of length at
491 // least 7, which isn't necessarily true
492 //
493 // if (current_value) memset(current_value, 0, 7);
494 // if (default_value) memset(default_value, 0, 7);
495 HighsInt retcode =
496 (HighsInt)((Highs*)highs)
497 ->getStringOptionValues(std::string(option), &current_v, &default_v);
498 // current_value and default_value are nullptr by default
499 if (current_value) strcpy(current_value, current_v.c_str());
500 if (default_value) strcpy(default_value, default_v.c_str());
501 return retcode;
502}
503
504HighsInt Highs_resetOptions(void* highs) {
505 return (HighsInt)((Highs*)highs)->resetOptions();

Callers 2

fullApiOptionsFunction · 0.85

Calls 2

getStringOptionValuesMethod · 0.80
c_strMethod · 0.80

Tested by 1

fullApiOptionsFunction · 0.68