MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / read

Method read

3rdparty/cppdap/src/io.cpp:162–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 bool isOpen() override { return r->isOpen(); }
161 void close() override { r->close(); }
162 size_t read(void* buffer, size_t n) override {
163 auto c = r->read(buffer, n);
164 if (c > 0) {
165 auto chars = reinterpret_cast<const char*>(buffer);
166 std::string buf = prefix;
167 buf.append(chars, chars + c);
168 s->write(buf.data(), buf.size());
169 }
170 return c;
171 }
172
173 private:
174 const std::shared_ptr<dap::Reader> r;

Callers

nothing calls this directly

Calls 5

readMethod · 0.45
appendMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected