|
Vince's CSV Parser
|
A data structure for handling column name information. More...
#include <col_names.hpp>
Public Member Functions | |
| ColNames (const std::vector< std::string > &names) | |
| std::vector< std::string > | get_col_names () const |
| void | set_col_names (const std::vector< std::string > &) |
| int | index_of (csv::string_view) const |
| bool | empty () const noexcept |
| size_t | size () const noexcept |
| const std::string & | operator[] (size_t i) const |
| Retrieve column name by index. | |
A data structure for handling column name information.
These are created by CSVReader and passed (via smart pointer) to CSVRow objects it creates, thus allowing for indexing by column name.
Definition at line 22 of file col_names.hpp.
|
inline |
Definition at line 25 of file col_names.hpp.
|
inlinenoexcept |
Definition at line 33 of file col_names.hpp.
| std::vector< std::string > csv::internals::ColNames::get_col_names | ( | ) | const |
Definition at line 5 of file col_names.cpp.
| int csv::internals::ColNames::index_of | ( | csv::string_view | col_name | ) | const |
Definition at line 17 of file col_names.cpp.
Retrieve column name by index.
Throws if index is out of bounds.
Definition at line 29 of file col_names.cpp.
Definition at line 9 of file col_names.cpp.
|
noexcept |
Definition at line 25 of file col_names.cpp.