|
Vince's CSV Parser
|
Proxy class that wraps a CSVRow and intercepts field access to check for edits. More...
#include <data_frame.hpp>
Public Member Functions | |
| DataFrameRow () | |
| Default constructor (creates an unbound proxy). | |
| DataFrameRow (const CSVRow *_row, const std::unordered_map< size_t, std::string > *_edits, const KeyType *_key) | |
| Construct a DataFrameRow wrapper. | |
| CSVField | operator[] (const std::string &col) const |
| Access a field by column name, checking edits first. | |
| CSVField | operator[] (size_t n) const |
| Access a field by position (positional access never checks edits). | |
| size_t | size () const |
| Get the number of fields in the row. | |
| bool | empty () const |
| Check if the row is empty. | |
| std::vector< std::string > | get_col_names () const |
| Get column names. | |
| const CSVRow & | get_underlying_row () const |
| Get the underlying CSVRow for compatibility. | |
| const KeyType & | get_key () const |
| Get the key for this row (only valid for keyed DataFrames). | |
| operator std::vector< std::string > () const | |
| Convert to vector of strings for CSVWriter compatibility. | |
| std::string | to_json (const std::vector< std::string > &subset={}) const |
| Convert to JSON. | |
| std::string | to_json_array (const std::vector< std::string > &subset={}) const |
| Convert to JSON array. | |
| auto | to_sv_range () const |
| Convert this DataFrameRow into a std::ranges::input_range of string_views, respecting the sparse overlay (edited values take precedence). | |
Proxy class that wraps a CSVRow and intercepts field access to check for edits.
Provides transparent access to both original and edited cell values.
Definition at line 104 of file data_frame.hpp.
|
inline |
Default constructor (creates an unbound proxy).
Definition at line 107 of file data_frame.hpp.
|
inline |
Construct a DataFrameRow wrapper.
Definition at line 110 of file data_frame.hpp.
|
inline |
Check if the row is empty.
Definition at line 146 of file data_frame.hpp.
|
inline |
Get column names.
Definition at line 149 of file data_frame.hpp.
|
inline |
Get the key for this row (only valid for keyed DataFrames).
Definition at line 155 of file data_frame.hpp.
|
inline |
Get the underlying CSVRow for compatibility.
Definition at line 152 of file data_frame.hpp.
|
inline |
Convert to vector of strings for CSVWriter compatibility.
Definition at line 158 of file data_frame.hpp.
|
inline |
Access a field by column name, checking edits first.
Definition at line 117 of file data_frame.hpp.
|
inline |
Access a field by position (positional access never checks edits).
Definition at line 138 of file data_frame.hpp.
|
inline |
Get the number of fields in the row.
Definition at line 143 of file data_frame.hpp.
|
inline |
Convert to JSON.
Definition at line 178 of file data_frame.hpp.
|
inline |
Convert to JSON array.
Definition at line 183 of file data_frame.hpp.
|
inline |
Convert this DataFrameRow into a std::ranges::input_range of string_views, respecting the sparse overlay (edited values take precedence).
Definition at line 191 of file data_frame.hpp.