MCPcopy Create free account
hub / github.com/Tencent/embedx / DumpText

Method DumpText

src/tools/graph/main_util.cc:85–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85bool MainUtil::DumpText(deepx_core::AutoOutputFileStream& ofs /* NOLINT */,
86 std::ostringstream& oss /* NOLINT*/,
87 const vec_int_t& nodes,
88 const std::vector<vec_pair_t>& pairs_list) const {
89 for (size_t i = 0; i < nodes.size(); ++i) {
90 oss.clear();
91 oss.str("");
92 oss << nodes[i];
93
94 for (const auto& pair : pairs_list[i]) {
95 oss << " " << pair.first << ":" << pair.second;
96 }
97 oss << "\n";
98
99 std::string s = oss.str();
100 ofs.Write(s.data(), s.size());
101 if (!ofs) {
102 DXERROR("Failed to dump file.");
103 return false;
104 }
105 }
106
107 return true;
108}
109
110} // namespace embedx

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected