csv-parser 1.1.0
Csv::Parser (csv-parser)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Csv::CellStringValue Class Reference

A value of a cell. More...

#include <csv_cell.h>

Public Member Functions

 CellStringValue ()=default
 Constructor.
 
template<typename BehaviorPolicy >
 CellStringValue (std::string_view cell, CellTypeHint hint, BehaviorPolicy policy)
 Constructor, which stores a copy of the cell data.
 
const std::string & getString () const
 Get stored cell reference as string.
 

Detailed Description

A value of a cell.

The object owns its data and does not reference the original CSV text. All cell contents are treated as strings. This may be useful if the CSV has string data without quotes.

Constructor & Destructor Documentation

◆ CellStringValue()

template<typename BehaviorPolicy >
Csv::CellStringValue::CellStringValue ( std::string_view  cell,
CellTypeHint  hint,
BehaviorPolicy  policy 
)

Constructor, which stores a copy of the cell data.

Parameters
cellCell data to store.
hintType hint associated with the cell during parsing.
policyArgument used for type inference.
Template Parameters
BehaviorPolicyPolicy to use for parsing, same as BehaviorPolicy in Parser.

Member Function Documentation

◆ getString()

const std::string & Csv::CellStringValue::getString ( ) const
inline

Get stored cell reference as string.

Cell type is assumed to be String, regardless of autodetected type. The string has collapsed consecutive double-quotes inside.


The documentation for this class was generated from the following file: