MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / emitDebugString

Method emitDebugString

tools/ipc_codegen/ipc_codegen.cpp:976–992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

974 }
975
976 void emitDebugString(const std::string& cls, const std::vector<Field>& fields) {
977 out_ << " std::string DebugString() const {\n"
978 " std::ostringstream os;\n"
979 << " os << \"" << cls << "{\";\n";
980 for (size_t i = 0; i < fields.size(); ++i) {
981 if (i) out_ << " os << ' ';\n";
982 if (fields[i].type == "bytes")
983 out_ << " detail::AppendBytes(os, \"" << fields[i].name
984 << "\", " << fields[i].name << "());\n";
985 else
986 out_ << " detail::AppendField(os, \"" << fields[i].name
987 << "\", " << fields[i].name << "());\n";
988 }
989 out_ << " os << '}';\n"
990 " return os.str();\n"
991 " }\n";
992 }
993
994 static std::vector<Field> fieldsFor(const Method& method, Dir direction, bool includeReturn) {
995 std::vector<Field> fields;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected