Orcus
Public Member Functions | List of all members
orcus::orcus_json Class Reference

Public Member Functions

 orcus_json (const orcus_json &)=delete
 
orcus_jsonoperator= (const orcus_json &)=delete
 
 orcus_json (spreadsheet::iface::import_factory *im_fact)
 
void set_cell_link (const pstring &path, const pstring &sheet, spreadsheet::row_t row, spreadsheet::col_t col)
 
void start_range (const pstring &sheet, spreadsheet::row_t row, spreadsheet::col_t col, bool row_header)
 
void append_field_link (const pstring &path, const pstring &label)
 
void set_range_row_group (const pstring &path)
 
void commit_range ()
 
void append_sheet (const pstring &name)
 
void read_stream (const char *p, size_t n)
 
void read_map_definition (const char *p, size_t n)
 
void detect_map_definition (const char *p, size_t n)
 

Member Function Documentation

◆ detect_map_definition()

void orcus::orcus_json::detect_map_definition ( const char *  p,
size_t  n 
)

Read a JSON string, and detect and define mapping rules for one or more ranges.

Parameters
ppointer to the in-memory buffer that contains the JSON string.
nsize of the buffer.

◆ read_map_definition()

void orcus::orcus_json::read_map_definition ( const char *  p,
size_t  n 
)

Read a JSON string that contains an entire set of mapping rules.

This method also inserts all necessary sheets into the document model.

Parameters
ppointer to the in-memory buffer that contains the JSON string.
nsize of the buffer.