MVault 0.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mvlt::CsvParser Class Reference

A class for parsing csv files that provides data in a form similar to generators. More...

#include <CsvParser.h>

Public Member Functions

bool OpenFile (const std::string &fileName) noexcept
 The method for opening the file.
 
bool GetNextVector (std::vector< std::string > &vectorWithNext, const char &separator) noexcept
 The method for getting the next record in the file. It works by analogy with generators in Python.
 
 ~CsvParser () noexcept
 Default destructor.
 

Detailed Description

A class for parsing csv files that provides data in a form similar to generators.

Member Function Documentation

◆ GetNextVector()

bool mvlt::CsvParser::GetNextVector ( std::vector< std::string > &  vectorWithNext,
const char separator 
)
noexcept

The method for getting the next record in the file. It works by analogy with generators in Python.

Parameters
[out]vectorWithNextvector with all fields in the record
[in]separatorthe symbol used to separate the records in the file
Returns
it will return the true if it was possible to open the file otherwise it will return a false

◆ OpenFile()

bool mvlt::CsvParser::OpenFile ( const std::string &  fileName)
noexcept

The method for opening the file.

Parameters
[in]fileNameThe name of the file to open
Returns
it will return the true if it was possible to open the file otherwise it will return a false

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