MCPcopy Create free account
hub / github.com/dhbloo/rapfi / editDatabaseBoardLabel

Function editDatabaseBoardLabel

Rapfi/command/gomocup.cpp:910–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

908}
909
910void editDatabaseBoardLabel()
911{
912 using namespace ::Database;
913 std::string coordStr, newText;
914 std::cin >> coordStr;
915 std::cin.ignore(1);
916 std::getline(std::cin, newText);
917 getDatabasePosition();
918
919 std::stringstream ss;
920 ss << coordStr;
921 auto pos = parseLegalCoord(ss, *board);
922 if (!pos.has_value())
923 return;
924
925 if (Search::Threads.dbStorage() && !Config::DatabaseReadonlyMode) {
926 DBClient dbClient(*Search::Threads.dbStorage(), RECORD_MASK_TEXT);
927 dbClient.setBoardText(*board, options.rule, *pos, ConsoleCPToUTF8(newText));
928 }
929}
930
931void deleteDatabaseAll(bool getPosition)
932{

Callers

nothing calls this directly

Calls 5

getDatabasePositionFunction · 0.85
parseLegalCoordFunction · 0.85
ConsoleCPToUTF8Function · 0.85
dbStorageMethod · 0.80
setBoardTextMethod · 0.45

Tested by

no test coverage detected