MCPcopy Create free account
hub / github.com/Kitware/CMake / ContentReader

Class ContentReader

Utilities/cmcppdap/src/content_stream.h:32–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…