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

Class ContentReader

3rdparty/cppdap/src/content_stream.h:30–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28class Writer;
29
30class ContentReader {
31 public:
32 ContentReader() = default;
33 ContentReader(const std::shared_ptr<Reader>&);
34 ContentReader& operator=(ContentReader&&) noexcept;
35
36 bool isOpen();
37 void close();
38 std::string read();
39
40 private:
41 bool scan(const uint8_t* seq, size_t len);
42 bool scan(const char* str);
43 bool match(const uint8_t* seq, size_t len);
44 bool match(const char* str);
45 char matchAny(const char* chars);
46 bool buffer(size_t bytes);
47
48 std::shared_ptr<Reader> reader;
49 std::deque<uint8_t> buf;
50 uint32_t matched_idx = 0;
51};
52
53class ContentWriter {
54 public:

Callers 1

connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected