Template Class file_parser

Class Documentation

template<typename T>
class file_parser

File parsing class using template design pattern. Parses each line of a file into a vector of whitespace delimited tokens, and returns a vector of vectors (1 vector of parsed tokens per line).

Template Parameters:

T – The type of tokens the file contains.

Public Functions

inline explicit file_parser(const std::string &fname)
inline std::vector<T> *parse_file(char delim)

Parse a file into a vector of sets of tokens.

Returns:

A vector of the parse results.