#include <string>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cstdlib>
Classes | |
class | csv_parser |
Defines | |
#define | LIBCSV_PARSER_MAJOR_VERSION 1 |
#define | LIBCSV_PARSER_MINOR_VERSION 0 |
#define | LIBCSV_PARSER_PATCH_VERSION 0 |
#define | LIBCSV_PARSER_VERSION_NUMBER 10000 |
#define | CSV_PARSER_FREE_BUFFER_PTR(ptr) |
#define | CSV_PARSER_FREE_FILE_PTR(fptr) |
Typedefs | |
typedef vector< string > | csv_row |
typedef csv_row * | csv_row_ptr |
Enumerations | |
enum | enclosure_type_t { ENCLOSURE_TYPE_BEGIN = 0, ENCLOSURE_NONE = 1, ENCLOSURE_REQUIRED = 2, ENCLOSURE_OPTIONAL = 3, ENCLOSURE_TYPE_END } |
#define CSV_PARSER_FREE_BUFFER_PTR | ( | ptr | ) |
Value:
if (ptr != NULL) \
{ \
free(ptr); \
\
ptr = NULL; \
}
It deallocates the pointer only if it is not null
#define CSV_PARSER_FREE_FILE_PTR | ( | fptr | ) |
Value:
if (fptr != NULL) \
{ \
fclose(fptr); \
\
fptr = NULL; \
}
It closes the file only if it is not null
#define LIBCSV_PARSER_MAJOR_VERSION 1 |
csv_parser Header File
This object is used to parse text documents that are delimited by some type of character. Some of the common ones use spaces, tabs, commas and semi-colons.
This is a list of common characters encountered by this program
This list was prepared from the data from http://www.asciitable.com
#define LIBCSV_PARSER_MINOR_VERSION 0 |
#define LIBCSV_PARSER_PATCH_VERSION 0 |
#define LIBCSV_PARSER_VERSION_NUMBER 10000 |
Data structure used to represent a record.
This is an alias for vector <string>
Pointer to a csv_row object
Expands to vector <string> *
enum enclosure_type_t |
This enum type is used to set the mode in which the CSV file is parsed.