simdjson 4.0.7
Ridiculously Fast JSON
Loading...
Searching...
No Matches
document.h
1#ifndef SIMDJSON_DOM_DOCUMENT_H
2#define SIMDJSON_DOM_DOCUMENT_H
3
4#include "simdjson/dom/base.h"
5
6#include <memory>
7
8namespace simdjson {
9namespace dom {
10
16class document {
17public:
25
33 document(const document &) = delete; // Disallow copying
41 document &operator=(const document &) = delete; // Disallow copying
42
47
54 bool dump_raw_tape(std::ostream &os) const noexcept;
55
57 std::unique_ptr<uint64_t[]> tape{};
58
63 std::unique_ptr<uint8_t[]> string_buf{};
75 error_code allocate(size_t len) noexcept;
80 size_t capacity() const noexcept;
81
82
83private:
84 size_t allocated_capacity{0};
85 friend class parser;
86}; // class document
87
88} // namespace dom
89} // namespace simdjson
90
91#endif // SIMDJSON_DOM_DOCUMENT_H
JSON array.
Definition array.h:15
A parsed JSON document.
Definition document.h:16
document() noexcept=default
Create a document container with zero capacity.
element root() const noexcept
Get the root element of this document as a JSON array.
A JSON element.
Definition element.h:33
The top level simdjson namespace, containing everything the library provides.
Definition base.h:8
error_code
All possible errors returned by simdjson.
Definition error.h:19