orcus_json
Defined in header: <orcus/orcus_json.hpp>
-
class orcus_json
Public Functions
-
orcus_json() = delete
-
orcus_json(const orcus_json&) = delete
-
orcus_json &operator=(const orcus_json&) = delete
-
orcus_json(spreadsheet::iface::import_factory *im_fact)
-
~orcus_json()
-
void set_cell_link(std::string_view path, std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col)
-
void start_range(std::string_view sheet, spreadsheet::row_t row, spreadsheet::col_t col, bool row_header)
-
void append_field_link(std::string_view path, std::string_view label)
-
void set_range_row_group(std::string_view path)
-
void commit_range()
-
void append_sheet(std::string_view name)
-
void read_stream(std::string_view stream)
-
void read_map_definition(std::string_view stream)
Read a JSON string that contains an entire set of mapping rules.
This method also inserts all necessary sheets into the document model.
- Parameters:
stream – JSON string.
-
void detect_map_definition(std::string_view stream)
Read a JSON string, and detect and define mapping rules for one or more ranges.
- Parameters:
stream – JSON string.
-
void write_map_definition(std::string_view stream, std::ostream &out) const
Detect the mapping structure of a JSON string and write the result as a JSON map definition to an output stream. The output can be edited and then passed to read_map_definition() to apply the rules.
- Parameters:
stream – JSON string to analyse.
out – output stream to write the map definition to.
Public Static Functions
-
static bool detect(std::string_view strm)
-
static bool has_range(std::string_view stream)
Detect whether or not a given JSON document contains at least one linkable range.
- Parameters:
stream – JSON document stream to check.
- Returns:
True if the document contains at least one linkable range, otherwise false.
-
orcus_json() = delete