MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / keyCallback

Method keyCallback

plugins/webReport/webReport.cpp:119–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void WebReport::keyCallback(std::string& data, const std::string& key) {
120 if (key == "evenodd") {
121 data = evenLine ? "even" : "odd";
122 }
123 else if (key == "report") {
124 if (reports && report > 0 && report < (int)reports->size()) {
125 data = reports->get(report).c_str();
126 }
127 else {
128 data = "";
129 }
130 }
131}
132
133bool WebReport::loopCallback(const std::string& key) {
134 if (key != "report") {

Callers

nothing calls this directly

Calls 3

c_strMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected