MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / addSolution

Method addSolution

MiniZincIDE/server.cpp:49–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void VisConnector::addSolution(const QJsonObject& solution, qint64 time)
50{
51 auto solIndex = _solutionCount++;
52 for (auto it = solution.begin(); it != solution.end(); it++) {
53 QJsonObject sol({{"time", time},
54 {"data", it.value()},
55 {"index", solIndex}});
56 if (_solutions.contains(it.key())) {
57 _solutions[it.key()].append(sol);
58 }
59 }
60 QJsonObject obj({{"event", "solution"},
61 {"time", time},
62 {"solution", solution},
63 {"index", solIndex}});
64 broadcastMessage(QJsonDocument(obj));
65}
66
67void VisConnector::setFinalStatus(const QString& status, qint64 time)
68{

Callers 1

startVisualisationMethod · 0.45

Calls 4

containsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected