From bcd14c3047117c2f521b5381b6562def6b355649 Mon Sep 17 00:00:00 2001 From: Vincent La Date: Sun, 31 Mar 2019 16:30:34 -0700 Subject: [PATCH] Memory fix (#20) * Fixed read_csv() memory errors * Fixed segfaults in MSVC debug mode * Travis build changes * Fixed .travis.yml * Attempted Travis fix #2 * Fix Makefile * Fixed g++ compilation warnings * Fix linker errors * Keep forgetting stuff * Final Makefile fix (I hope) * Updated documentation --- .gitignore | 4 + .travis.yml | 25 +- CMakeLists.txt | 2 +- Doxyfile | 8 +- LICENSE | 2 +- Makefile | 79 +- README.md | 42 +- docs/README_8md_source.html | 98 - docs/annotated.html | 114 -- docs/annotated_dup.js | 4 - docs/bc_s.png | Bin 676 -> 0 bytes docs/bdwn.png | Bin 147 -> 0 bytes docs/classcsv_1_1CSVField-members.html | 111 -- docs/classcsv_1_1CSVField.html | 213 --- docs/classcsv_1_1CSVField.js | 14 - docs/classcsv_1_1CSVReader-members.html | 145 -- docs/classcsv_1_1CSVReader.html | 467 ----- docs/classcsv_1_1CSVReader.js | 50 - ...scsv_1_1CSVReader_1_1iterator-members.html | 115 -- docs/classcsv_1_1CSVReader_1_1iterator.html | 168 -- docs/classcsv_1_1CSVReader_1_1iterator.js | 18 - docs/classcsv_1_1CSVRow-members.html | 113 -- docs/classcsv_1_1CSVRow.html | 277 --- docs/classcsv_1_1CSVRow.js | 17 - ...lasscsv_1_1CSVRow_1_1iterator-members.html | 116 -- docs/classcsv_1_1CSVRow_1_1iterator.html | 170 -- docs/classcsv_1_1CSVRow_1_1iterator.js | 19 - docs/classcsv_1_1CSVStat-members.html | 154 -- docs/classcsv_1_1CSVStat.html | 340 ---- docs/classcsv_1_1CSVStat.js | 14 - docs/classcsv_1_1DelimWriter-members.html | 104 -- docs/classcsv_1_1DelimWriter.html | 215 --- docs/classcsv_1_1DelimWriter.js | 7 - ...sv_1_1internals_1_1CSVGuesser-members.html | 107 -- docs/classcsv_1_1internals_1_1CSVGuesser.html | 204 --- docs/classcsv_1_1internals_1_1CSVGuesser.js | 10 - docs/classes.html | 110 -- docs/closed.png | Bin 132 -> 0 bytes docs/csv__parser_8hpp.html | 224 --- docs/csv__parser_8hpp.js | 26 - docs/csv__parser_8hpp_source.html | 140 -- docs/csv__reader_8cpp.html | 151 -- docs/csv__reader_8cpp.js | 11 - docs/csv__reader_8cpp_source.html | 151 -- docs/csv__reader__iterator_8cpp_source.html | 111 -- docs/csv__row_8cpp_source.html | 117 -- docs/csv__row_8hpp_source.html | 105 -- docs/csv__stat_8cpp.html | 121 -- docs/csv__stat_8cpp.js | 4 - docs/csv__stat_8cpp_source.html | 121 -- docs/csv__writer_8hpp.html | 146 -- docs/csv__writer_8hpp.js | 9 - docs/csv__writer_8hpp_source.html | 104 -- docs/data__type_8cpp_source.html | 101 -- docs/data__type_8h_source.html | 101 -- .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 111 -- docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js | 13 - docs/doc.png | Bin 746 -> 0 bytes docs/doxygen.css | 1596 ----------------- docs/doxygen.png | Bin 3779 -> 0 bytes docs/dynsections.js | 104 -- docs/files.html | 112 -- docs/files.js | 4 - docs/folderclosed.png | Bin 616 -> 0 bytes docs/folderopen.png | Bin 597 -> 0 bytes docs/functions.html | 346 ---- docs/functions_enum.html | 98 - docs/functions_func.html | 251 --- docs/functions_rela.html | 98 - docs/functions_type.html | 98 - docs/functions_vars.html | 161 -- docs/group__csv__internal.html | 409 ----- docs/group__csv__internal.js | 24 - docs/hierarchy.html | 112 -- docs/hierarchy.js | 15 - docs/index.html | 164 -- docs/jquery.js | 87 - docs/memory_8hpp_source.html | 99 - docs/menu.js | 26 - docs/menudata.js | 53 - docs/modules.html | 102 -- docs/modules.js | 4 - docs/namespacecsv.html | 609 ------- docs/namespacecsv.js | 11 - docs/namespacecsv_1_1internals.html | 272 --- docs/namespacecsv_1_1internals.js | 5 - docs/namespacemembers.html | 164 -- docs/namespacemembers_enum.html | 98 - docs/namespacemembers_func.html | 137 -- docs/namespacemembers_type.html | 104 -- docs/namespacemembers_vars.html | 110 -- docs/namespaces.html | 103 -- docs/namespaces.js | 4 - docs/nav_f.png | Bin 153 -> 0 bytes docs/nav_g.png | Bin 95 -> 0 bytes docs/nav_h.png | Bin 98 -> 0 bytes docs/navtree.css | 146 -- docs/navtree.js | 517 ------ docs/navtreedata.js | 40 - docs/navtreeindex0.js | 242 --- docs/open.png | Bin 123 -> 0 bytes docs/resize.js | 114 -- docs/search/all_0.html | 26 - docs/search/all_0.js | 5 - docs/search/all_1.html | 26 - docs/search/all_1.js | 26 - docs/search/all_10.html | 26 - docs/search/all_10.js | 4 - docs/search/all_11.html | 26 - docs/search/all_11.js | 5 - docs/search/all_2.html | 26 - docs/search/all_2.js | 10 - docs/search/all_3.html | 26 - docs/search/all_3.js | 5 - docs/search/all_4.html | 26 - docs/search/all_4.js | 10 - docs/search/all_5.html | 26 - docs/search/all_5.js | 18 - docs/search/all_6.html | 26 - docs/search/all_6.js | 5 - docs/search/all_7.html | 26 - docs/search/all_7.js | 8 - docs/search/all_8.html | 26 - docs/search/all_8.js | 7 - docs/search/all_9.html | 26 - docs/search/all_9.js | 5 - docs/search/all_a.html | 26 - docs/search/all_a.js | 10 - docs/search/all_b.html | 26 - docs/search/all_b.js | 6 - docs/search/all_c.html | 26 - docs/search/all_c.js | 4 - docs/search/all_d.html | 26 - docs/search/all_d.js | 11 - docs/search/all_e.html | 26 - docs/search/all_e.js | 7 - docs/search/all_f.html | 26 - docs/search/all_f.js | 5 - docs/search/classes_0.html | 26 - docs/search/classes_0.js | 11 - docs/search/classes_1.html | 26 - docs/search/classes_1.js | 4 - docs/search/classes_2.html | 26 - docs/search/classes_2.js | 4 - docs/search/close.png | Bin 273 -> 0 bytes docs/search/enums_0.html | 26 - docs/search/enums_0.js | 4 - docs/search/enums_1.html | 26 - docs/search/enums_1.js | 4 - docs/search/files_0.html | 26 - docs/search/files_0.js | 7 - docs/search/functions_0.html | 26 - docs/search/functions_0.js | 5 - docs/search/functions_1.html | 26 - docs/search/functions_1.js | 9 - docs/search/functions_2.html | 26 - docs/search/functions_2.js | 4 - docs/search/functions_3.html | 26 - docs/search/functions_3.js | 5 - docs/search/functions_4.html | 26 - docs/search/functions_4.js | 6 - docs/search/functions_5.html | 26 - docs/search/functions_5.js | 17 - docs/search/functions_6.html | 26 - docs/search/functions_6.js | 5 - docs/search/functions_7.html | 26 - docs/search/functions_7.js | 6 - docs/search/functions_8.html | 26 - docs/search/functions_8.js | 10 - docs/search/functions_9.html | 26 - docs/search/functions_9.js | 4 - docs/search/functions_a.html | 26 - docs/search/functions_a.js | 6 - docs/search/functions_b.html | 26 - docs/search/functions_b.js | 5 - docs/search/functions_c.html | 26 - docs/search/functions_c.js | 4 - docs/search/functions_d.html | 26 - docs/search/functions_d.js | 5 - docs/search/groups_0.html | 26 - docs/search/groups_0.js | 4 - docs/search/mag_sel.png | Bin 563 -> 0 bytes docs/search/namespaces_0.html | 26 - docs/search/namespaces_0.js | 5 - docs/search/nomatches.html | 12 - docs/search/pages_0.html | 26 - docs/search/pages_0.js | 4 - docs/search/related_0.html | 26 - docs/search/related_0.js | 4 - docs/search/search.css | 271 --- docs/search/search.js | 791 -------- docs/search/search_l.png | Bin 604 -> 0 bytes docs/search/search_m.png | Bin 158 -> 0 bytes docs/search/search_r.png | Bin 612 -> 0 bytes docs/search/searchdata.js | 45 - docs/search/typedefs_0.html | 26 - docs/search/typedefs_0.js | 4 - docs/search/typedefs_1.html | 26 - docs/search/typedefs_1.js | 5 - docs/search/typedefs_2.html | 26 - docs/search/typedefs_2.js | 4 - docs/search/variables_0.html | 26 - docs/search/variables_0.js | 6 - docs/search/variables_1.html | 26 - docs/search/variables_1.js | 7 - docs/search/variables_2.html | 26 - docs/search/variables_2.js | 7 - docs/search/variables_3.html | 26 - docs/search/variables_3.js | 4 - docs/search/variables_4.html | 26 - docs/search/variables_4.js | 5 - docs/search/variables_5.html | 26 - docs/search/variables_5.js | 5 - docs/search/variables_6.html | 26 - docs/search/variables_6.js | 4 - docs/search/variables_7.html | 26 - docs/search/variables_7.js | 5 - docs/search/variables_8.html | 26 - docs/search/variables_8.js | 4 - docs/search/variables_9.html | 26 - docs/search/variables_9.js | 4 - docs/search/variables_a.html | 26 - docs/search/variables_a.js | 6 - docs/search/variables_b.html | 26 - docs/search/variables_b.js | 5 - docs/source/Doxy.md | 164 ++ docs/source/faq.md | 29 + docs/splitbar.png | Bin 314 -> 0 bytes docs/structcsv_1_1CSVFileInfo-members.html | 105 -- docs/structcsv_1_1CSVFileInfo.html | 210 --- docs/structcsv_1_1CSVFileInfo.js | 8 - docs/structcsv_1_1CSVFormat-members.html | 105 -- docs/structcsv_1_1CSVFormat.html | 140 -- docs/structcsv_1_1CSVFormat.js | 8 - ...tcsv_1_1internals_1_1ColNames-members.html | 105 -- docs/structcsv_1_1internals_1_1ColNames.html | 138 -- docs/structcsv_1_1internals_1_1ColNames.js | 8 - docs/sync_off.png | Bin 853 -> 0 bytes docs/sync_on.png | Bin 845 -> 0 bytes docs/tab_a.png | Bin 142 -> 0 bytes docs/tab_b.png | Bin 169 -> 0 bytes docs/tab_h.png | Bin 177 -> 0 bytes docs/tab_s.png | Bin 184 -> 0 bytes docs/tabs.css | 1 - include/csv.hpp | 27 + include/internal/compatibility.hpp | 2 +- include/internal/csv_reader.cpp | 78 +- include/internal/csv_reader.hpp | 28 +- include/internal/csv_row.cpp | 9 +- include/internal/csv_row.hpp | 14 +- include/internal/data_type.cpp | 4 + include/internal/giant_string_buffer.cpp | 43 + include/internal/giant_string_buffer.hpp | 22 + tests/test_csv_row.cpp | 2 +- 254 files changed, 442 insertions(+), 15939 deletions(-) delete mode 100644 docs/README_8md_source.html delete mode 100644 docs/annotated.html delete mode 100644 docs/annotated_dup.js delete mode 100644 docs/bc_s.png delete mode 100644 docs/bdwn.png delete mode 100644 docs/classcsv_1_1CSVField-members.html delete mode 100644 docs/classcsv_1_1CSVField.html delete mode 100644 docs/classcsv_1_1CSVField.js delete mode 100644 docs/classcsv_1_1CSVReader-members.html delete mode 100644 docs/classcsv_1_1CSVReader.html delete mode 100644 docs/classcsv_1_1CSVReader.js delete mode 100644 docs/classcsv_1_1CSVReader_1_1iterator-members.html delete mode 100644 docs/classcsv_1_1CSVReader_1_1iterator.html delete mode 100644 docs/classcsv_1_1CSVReader_1_1iterator.js delete mode 100644 docs/classcsv_1_1CSVRow-members.html delete mode 100644 docs/classcsv_1_1CSVRow.html delete mode 100644 docs/classcsv_1_1CSVRow.js delete mode 100644 docs/classcsv_1_1CSVRow_1_1iterator-members.html delete mode 100644 docs/classcsv_1_1CSVRow_1_1iterator.html delete mode 100644 docs/classcsv_1_1CSVRow_1_1iterator.js delete mode 100644 docs/classcsv_1_1CSVStat-members.html delete mode 100644 docs/classcsv_1_1CSVStat.html delete mode 100644 docs/classcsv_1_1CSVStat.js delete mode 100644 docs/classcsv_1_1DelimWriter-members.html delete mode 100644 docs/classcsv_1_1DelimWriter.html delete mode 100644 docs/classcsv_1_1DelimWriter.js delete mode 100644 docs/classcsv_1_1internals_1_1CSVGuesser-members.html delete mode 100644 docs/classcsv_1_1internals_1_1CSVGuesser.html delete mode 100644 docs/classcsv_1_1internals_1_1CSVGuesser.js delete mode 100644 docs/classes.html delete mode 100644 docs/closed.png delete mode 100644 docs/csv__parser_8hpp.html delete mode 100644 docs/csv__parser_8hpp.js delete mode 100644 docs/csv__parser_8hpp_source.html delete mode 100644 docs/csv__reader_8cpp.html delete mode 100644 docs/csv__reader_8cpp.js delete mode 100644 docs/csv__reader_8cpp_source.html delete mode 100644 docs/csv__reader__iterator_8cpp_source.html delete mode 100644 docs/csv__row_8cpp_source.html delete mode 100644 docs/csv__row_8hpp_source.html delete mode 100644 docs/csv__stat_8cpp.html delete mode 100644 docs/csv__stat_8cpp.js delete mode 100644 docs/csv__stat_8cpp_source.html delete mode 100644 docs/csv__writer_8hpp.html delete mode 100644 docs/csv__writer_8hpp.js delete mode 100644 docs/csv__writer_8hpp_source.html delete mode 100644 docs/data__type_8cpp_source.html delete mode 100644 docs/data__type_8h_source.html delete mode 100644 docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html delete mode 100644 docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js delete mode 100644 docs/doc.png delete mode 100644 docs/doxygen.css delete mode 100644 docs/doxygen.png delete mode 100644 docs/dynsections.js delete mode 100644 docs/files.html delete mode 100644 docs/files.js delete mode 100644 docs/folderclosed.png delete mode 100644 docs/folderopen.png delete mode 100644 docs/functions.html delete mode 100644 docs/functions_enum.html delete mode 100644 docs/functions_func.html delete mode 100644 docs/functions_rela.html delete mode 100644 docs/functions_type.html delete mode 100644 docs/functions_vars.html delete mode 100644 docs/group__csv__internal.html delete mode 100644 docs/group__csv__internal.js delete mode 100644 docs/hierarchy.html delete mode 100644 docs/hierarchy.js delete mode 100644 docs/index.html delete mode 100644 docs/jquery.js delete mode 100644 docs/memory_8hpp_source.html delete mode 100644 docs/menu.js delete mode 100644 docs/menudata.js delete mode 100644 docs/modules.html delete mode 100644 docs/modules.js delete mode 100644 docs/namespacecsv.html delete mode 100644 docs/namespacecsv.js delete mode 100644 docs/namespacecsv_1_1internals.html delete mode 100644 docs/namespacecsv_1_1internals.js delete mode 100644 docs/namespacemembers.html delete mode 100644 docs/namespacemembers_enum.html delete mode 100644 docs/namespacemembers_func.html delete mode 100644 docs/namespacemembers_type.html delete mode 100644 docs/namespacemembers_vars.html delete mode 100644 docs/namespaces.html delete mode 100644 docs/namespaces.js delete mode 100644 docs/nav_f.png delete mode 100644 docs/nav_g.png delete mode 100644 docs/nav_h.png delete mode 100644 docs/navtree.css delete mode 100644 docs/navtree.js delete mode 100644 docs/navtreedata.js delete mode 100644 docs/navtreeindex0.js delete mode 100644 docs/open.png delete mode 100644 docs/resize.js delete mode 100644 docs/search/all_0.html delete mode 100644 docs/search/all_0.js delete mode 100644 docs/search/all_1.html delete mode 100644 docs/search/all_1.js delete mode 100644 docs/search/all_10.html delete mode 100644 docs/search/all_10.js delete mode 100644 docs/search/all_11.html delete mode 100644 docs/search/all_11.js delete mode 100644 docs/search/all_2.html delete mode 100644 docs/search/all_2.js delete mode 100644 docs/search/all_3.html delete mode 100644 docs/search/all_3.js delete mode 100644 docs/search/all_4.html delete mode 100644 docs/search/all_4.js delete mode 100644 docs/search/all_5.html delete mode 100644 docs/search/all_5.js delete mode 100644 docs/search/all_6.html delete mode 100644 docs/search/all_6.js delete mode 100644 docs/search/all_7.html delete mode 100644 docs/search/all_7.js delete mode 100644 docs/search/all_8.html delete mode 100644 docs/search/all_8.js delete mode 100644 docs/search/all_9.html delete mode 100644 docs/search/all_9.js delete mode 100644 docs/search/all_a.html delete mode 100644 docs/search/all_a.js delete mode 100644 docs/search/all_b.html delete mode 100644 docs/search/all_b.js delete mode 100644 docs/search/all_c.html delete mode 100644 docs/search/all_c.js delete mode 100644 docs/search/all_d.html delete mode 100644 docs/search/all_d.js delete mode 100644 docs/search/all_e.html delete mode 100644 docs/search/all_e.js delete mode 100644 docs/search/all_f.html delete mode 100644 docs/search/all_f.js delete mode 100644 docs/search/classes_0.html delete mode 100644 docs/search/classes_0.js delete mode 100644 docs/search/classes_1.html delete mode 100644 docs/search/classes_1.js delete mode 100644 docs/search/classes_2.html delete mode 100644 docs/search/classes_2.js delete mode 100644 docs/search/close.png delete mode 100644 docs/search/enums_0.html delete mode 100644 docs/search/enums_0.js delete mode 100644 docs/search/enums_1.html delete mode 100644 docs/search/enums_1.js delete mode 100644 docs/search/files_0.html delete mode 100644 docs/search/files_0.js delete mode 100644 docs/search/functions_0.html delete mode 100644 docs/search/functions_0.js delete mode 100644 docs/search/functions_1.html delete mode 100644 docs/search/functions_1.js delete mode 100644 docs/search/functions_2.html delete mode 100644 docs/search/functions_2.js delete mode 100644 docs/search/functions_3.html delete mode 100644 docs/search/functions_3.js delete mode 100644 docs/search/functions_4.html delete mode 100644 docs/search/functions_4.js delete mode 100644 docs/search/functions_5.html delete mode 100644 docs/search/functions_5.js delete mode 100644 docs/search/functions_6.html delete mode 100644 docs/search/functions_6.js delete mode 100644 docs/search/functions_7.html delete mode 100644 docs/search/functions_7.js delete mode 100644 docs/search/functions_8.html delete mode 100644 docs/search/functions_8.js delete mode 100644 docs/search/functions_9.html delete mode 100644 docs/search/functions_9.js delete mode 100644 docs/search/functions_a.html delete mode 100644 docs/search/functions_a.js delete mode 100644 docs/search/functions_b.html delete mode 100644 docs/search/functions_b.js delete mode 100644 docs/search/functions_c.html delete mode 100644 docs/search/functions_c.js delete mode 100644 docs/search/functions_d.html delete mode 100644 docs/search/functions_d.js delete mode 100644 docs/search/groups_0.html delete mode 100644 docs/search/groups_0.js delete mode 100644 docs/search/mag_sel.png delete mode 100644 docs/search/namespaces_0.html delete mode 100644 docs/search/namespaces_0.js delete mode 100644 docs/search/nomatches.html delete mode 100644 docs/search/pages_0.html delete mode 100644 docs/search/pages_0.js delete mode 100644 docs/search/related_0.html delete mode 100644 docs/search/related_0.js delete mode 100644 docs/search/search.css delete mode 100644 docs/search/search.js delete mode 100644 docs/search/search_l.png delete mode 100644 docs/search/search_m.png delete mode 100644 docs/search/search_r.png delete mode 100644 docs/search/searchdata.js delete mode 100644 docs/search/typedefs_0.html delete mode 100644 docs/search/typedefs_0.js delete mode 100644 docs/search/typedefs_1.html delete mode 100644 docs/search/typedefs_1.js delete mode 100644 docs/search/typedefs_2.html delete mode 100644 docs/search/typedefs_2.js delete mode 100644 docs/search/variables_0.html delete mode 100644 docs/search/variables_0.js delete mode 100644 docs/search/variables_1.html delete mode 100644 docs/search/variables_1.js delete mode 100644 docs/search/variables_2.html delete mode 100644 docs/search/variables_2.js delete mode 100644 docs/search/variables_3.html delete mode 100644 docs/search/variables_3.js delete mode 100644 docs/search/variables_4.html delete mode 100644 docs/search/variables_4.js delete mode 100644 docs/search/variables_5.html delete mode 100644 docs/search/variables_5.js delete mode 100644 docs/search/variables_6.html delete mode 100644 docs/search/variables_6.js delete mode 100644 docs/search/variables_7.html delete mode 100644 docs/search/variables_7.js delete mode 100644 docs/search/variables_8.html delete mode 100644 docs/search/variables_8.js delete mode 100644 docs/search/variables_9.html delete mode 100644 docs/search/variables_9.js delete mode 100644 docs/search/variables_a.html delete mode 100644 docs/search/variables_a.js delete mode 100644 docs/search/variables_b.html delete mode 100644 docs/search/variables_b.js create mode 100644 docs/source/Doxy.md create mode 100644 docs/source/faq.md delete mode 100644 docs/splitbar.png delete mode 100644 docs/structcsv_1_1CSVFileInfo-members.html delete mode 100644 docs/structcsv_1_1CSVFileInfo.html delete mode 100644 docs/structcsv_1_1CSVFileInfo.js delete mode 100644 docs/structcsv_1_1CSVFormat-members.html delete mode 100644 docs/structcsv_1_1CSVFormat.html delete mode 100644 docs/structcsv_1_1CSVFormat.js delete mode 100644 docs/structcsv_1_1internals_1_1ColNames-members.html delete mode 100644 docs/structcsv_1_1internals_1_1ColNames.html delete mode 100644 docs/structcsv_1_1internals_1_1ColNames.js delete mode 100644 docs/sync_off.png delete mode 100644 docs/sync_on.png delete mode 100644 docs/tab_a.png delete mode 100644 docs/tab_b.png delete mode 100644 docs/tab_h.png delete mode 100644 docs/tab_s.png delete mode 100644 docs/tabs.css create mode 100644 include/internal/giant_string_buffer.cpp create mode 100644 include/internal/giant_string_buffer.hpp diff --git a/.gitignore b/.gitignore index 27c0d7f4..8fcd72f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ # Build bin/ +# Doxygen +docs/html +*.tmp + # Visual Studio Debug/ Release/ diff --git a/.travis.yml b/.travis.yml index 59faf6c5..497ec421 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,33 @@ matrix: include: - os: linux + env: STD=c++11 MAIN_BUILD=true + compiler: gcc addons: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['g++-8', 'valgrind'] + - os: linux + env: STD=c++17 + compiler: gcc + addons: + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['g++-8'] + #- os: linux + # env: CXX=clang++ dist: trusty sudo: required language: - cpp script: - - export CC=gcc-8 - - export CXX=g++-8 - - make test_all - # - valgrind --leak-check=full ./test_csv_parser - # Disable until Travis updates their version of Valgrind + - make run_csv_test + - if [ "$MAIN_BUILD" == "true" ]; then + make code_cov; + make valgrind; + fi; after_success: - - if [ "$CXX" == "g++-8" ]; then + - if [ "$MAIN_BUILD" == "true" ]; then cd test_results; bash <(curl -s https://codecov.io/bash); - fi; \ No newline at end of file + fi; diff --git a/CMakeLists.txt b/CMakeLists.txt index d3c20429..e5484f34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,13 +26,13 @@ set(TEST_DIR ${CMAKE_CURRENT_LIST_DIR}/tests) # file(GLOB_RECURSE SOURCES include/ *.hpp *.cpp) set(SOURCES - ${CMAKE_CURRENT_LIST_DIR}/include/external/string_view.hpp ${SOURCE_DIR}/csv_reader.cpp ${SOURCE_DIR}/csv_reader_iterator.cpp ${SOURCE_DIR}/csv_row.cpp ${SOURCE_DIR}/csv_stat.cpp ${SOURCE_DIR}/csv_utility.cpp ${SOURCE_DIR}/data_type.cpp + ${SOURCE_DIR}/giant_string_buffer.cpp ) set(TEST_SOURCES ${TEST_DIR}/catch.hpp diff --git a/Doxyfile b/Doxyfile index 2183d322..599540c4 100644 --- a/Doxyfile +++ b/Doxyfile @@ -771,14 +771,14 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = README.md src/ +INPUT = docs/source/ include/internal/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. -# The default value is: UTF-8. +# The default value is: UTF-8.f INPUT_ENCODING = UTF-8 @@ -920,7 +920,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = README.md +USE_MDFILE_AS_MAINPAGE = Doxy.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1068,7 +1068,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = docs +HTML_OUTPUT = docs/html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/LICENSE b/LICENSE index 166f3f04..da835973 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Vincent La +Copyright (c) 2017-2019 Vincent La Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index d0f1399e..9f6b80cc 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,27 @@ +# Makefile used for building/testing on Travis CI + +# Force Travis to use updated compilers +ifeq ($(TRAVIS_COMPILER), gcc) + CXX = g++-8 +else ifeq ($(TRAVIS_COMPILER), clang) + CXX = clang++ +endif + +ifeq ($(STD), ) + STD = c++11 +endif + BUILD_DIR = build +SOURCE_DIR = include TEST_DIR = tests -IDIR = include/ -CFLAGS = -pthread -std=c++14 -TFLAGS = -I$(IDIR) -Itests/ $(CFLAGS) -Og -g --coverage +CFLAGS = -pthread -std=$(STD) + +TEST_OFLAGS = +ifeq ($(CXX), g++-8) + TEST_OFLAGS = -Og +endif + +TEST_FLAGS = -Itests/ $(CFLAGS) $(TEST_OFLAGS) -g --coverage -Wall # Main Library SOURCES = $(wildcard include/internal/*.cpp) @@ -13,43 +32,65 @@ TEST_SOURCES_NO_EXT = $(subst tests/,,$(subst .cpp,,$(TEST_SOURCES))) all: csv_parser test_all clean distclean -# Main Library -csv_parser: - $(CXX) -c -O3 -Wall $(CFLAGS) $(SOURCES) -I$(IDIR) +################ +# Main Library # +################ +csv: + $(CXX) -c -O3 $(CFLAGS) $(SOURCES) mkdir -p $(BUILD_DIR) mv *.o $(BUILD_DIR) -test_all: - make run_test_csv_parser - make code_cov +libcsv.a: + make csv + ar rvs libcsv.a $(wildcard build/*.o) + +docs: + doxygen Doxyfile -test_csv_parser: - $(CXX) -o test_csv_parser $(SOURCES) $(TEST_SOURCES) $(TFLAGS) +############ +# Programs # +############ +csv_stats: # libcsv.a + $(CXX) -o csv_stats -O3 $(CFLAGS) programs/csv_stats.cpp $(SOURCES) -I$(SOURCE_DIR) + # $(CXX) -o csv_stats -O3 -lcsv $(CFLAGS) programs/csv_stats.cpp -L./ -I$(SOURCE_DIR) -run_test_csv_parser: test_csv_parser +######### +# Tests # +######### +csv_test: + $(CXX) -o csv_test $(SOURCES) $(TEST_SOURCES) -I${SOURCE_DIR} $(TEST_FLAGS) + +run_csv_test: csv_test mkdir -p tests/temp - ./test_csv_parser + ./csv_test # Test Clean-Up rm -rf $(TEST_DIR)/temp -code_cov: test_csv_parser +# Run code coverage analysis +code_cov: csv_test mkdir -p test_results mv *.gcno *.gcda $(PWD)/test_results gcov-8 $(SOURCES) -o test_results --relative-only mv *.gcov test_results +# Generate report code_cov_report: cd test_results lcov --capture --directory test_results --output-file coverage.info genhtml coverage.info --output-directory out + +valgrind: csv_stats + # Can't run valgrind against csv_test because it mangles the working directory + # which causes csv_test to not be able to find test files + valgrind --leak-check=full ./csv_stats $(TEST_DIR)/data/real_data/2016_Gaz_place_national.txt .PHONY: all clean distclean -docs: - doxygen Doxyfile - -clean: - rm -rf test_csv_parser +clean: + rm -f build/* + rm -f *.gc* + rm -f libcsv.a + rm -f csv_* distclean: clean \ No newline at end of file diff --git a/README.md b/README.md index caa269fa..dda712b0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ This CSV parser uses multiple threads to simulatenously pull data from disk and ### RFC 4180 Compliance This CSV parser is much more than a fancy string splitter, and follows every guideline from [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.txt). On the other hand, it is also robust and capable of handling deviances from the standard. An optional strict parsing mode can be enabled to sniff out errors in files. +#### Encoding +This CSV parser will handle ANSI and UTF-8 encoded files. It does not try to decode UTF-8, except for detecting and stripping byte order marks. + ### Easy to Use and [Well-Documented](https://vincentlaucsb.github.io/csv-parser) In additon to being easy on your computer's hardware, this library is also easy on you--the developer. Some helpful features include: @@ -19,13 +22,21 @@ In additon to being easy on your computer's hardware, this library is also easy * Ability to manually set the delimiter and quoting character of the parser ### Well Tested -In addition to using modern C++ features to build a memory safe parser while still performing well, this parser has a extensive test suite. +This CSV parser has an extensive test suite and is checked for memory safety with Valgrind. If you still manage to find a bug, +do not hesitate to report it. + +## Building and Compatibility [(latest stable version)](https://github.com/vincentlaucsb/csv-parser/releases) -## Building [(latest stable version)](https://github.com/vincentlaucsb/csv-parser/releases) +This library was developed with Microsoft Visual Studio and is compatible with g++ and clang. +All of the code required to build this library, aside from the C++ standard library, is contained under `include/`. -All of this library's essentials are located under `src/`, with no dependencies aside from the STL. This is a C++17 library developed using Microsoft Visual Studio and compatible with g++ and clang. The CMakeList and Makefile contain instructions for building the main library, some sample programs, and the test suite. +**One-line compilation** `g++ -pthread -c -O3 -std=c++17 include/internal/*.cpp` -**GCC/Clang Compiler Flags**: `-pthread -O3 -std=c++17` +### C++ Version +C++11 is the minimal version required. This library makes extensive use of string views, either through +[Martin Moene's string view library](https://github.com/martinmoene/string-view-lite) or +`std:string_view` when compiling with C++17. Please be aware of this if you use parts of the public API that +return string views. ### CMake Instructions If you're including this in another CMake project, you can simply clone this repo into your project directory, @@ -41,27 +52,8 @@ target_link_libraries( csv) ``` -## Thirty-Second Introduction to Vince's CSV Parser - -* **Parsing CSV Files from..** - * Files: csv::CSVReader(filename) - * In-Memory Sources: - * Small: csv::parse() or csv::operator""_csv(); - * Large: csv::CSVReader::feed(); -* **Retrieving Parsed CSV Rows (from CSVReader)** - * csv::CSVReader::iterator (supports range-based for loop) - * csv::CSVReader::read_row() -* **Working with CSV Rows** - * Index by number or name: csv::CSVRow::operator[]() - * Random access iterator: csv::CSVRow::iterator - * Conversion: csv::CSVRow::operator std::vector(); -* **Calculating Statistics** - * Files: csv::CSVStat(filename) - * In-Memory: csv::CSVStat::feed() -* **Utility Functions** - * Return column names: get_col_names() - * Return the position of a column: get_col_pos(); - * Return column types (for uploading to a SQL database): csv_data_types(); +### Single Header +A single header version of this library is in the works. ## Features & Examples ### Reading a Large File (with Iterators) diff --git a/docs/README_8md_source.html b/docs/README_8md_source.html deleted file mode 100644 index 068548d0..00000000 --- a/docs/README_8md_source.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -Vince's CSV Parser: README.md Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
README.md
-
-
-
1 # Vince's CSV Parser
2 [![Build Status](https://travis-ci.org/vincentlaucsb/csv-parser.svg?branch=master)](https://travis-ci.org/vincentlaucsb/csv-parser)
3 [![codecov](https://codecov.io/gh/vincentlaucsb/csv-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/vincentlaucsb/csv-parser)
4 
5 ## Motivation
6 There's plenty of other CSV parsers in the wild, but I had a hard time finding what I wanted. Specifically, I wanted something which had an interface similar to Python's `csv` module. Furthermore, I wanted support for special use cases such as calculating statistics on very large files. Thus, this library was created with these following goals in mind:
7 
8 ### Performance
9 This CSV parser uses multiple threads to simulatenously pull data from disk and parse it. Furthermore, it is capable of incremental streaming (parsing larger than RAM files), and quickly parsing data types.
10 
11 ### RFC 4180 Compliance
12 This CSV parser is much more than a fancy string splitter, and follows every guideline from [RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.txt). On the other hand, it is also robust and capable of handling deviances from the standard. An optional strict parsing mode can be enabled to sniff out errors in files.
13 
14 ### Easy to Use and [Well-Documented](https://vincentlaucsb.github.io/csv-parser)
15 
16 In additon to being easy on your computer's hardware, this library is also easy on you--the developer. Some helpful features include:
17  * Decent ability to guess the dialect of a file (CSV, tab-delimited, etc.)
18  * Ability to handle common deviations from the CSV standard, such as inconsistent row lengths, and leading comments
19  * Ability to manually set the delimiter and quoting character of the parser
20 
21 ### Well Tested
22 In addition to using modern C++ features to build a memory safe parser while still performing well, this parser has a extensive test suite.
23 
24 ## Building [(latest stable version)](https://github.com/vincentlaucsb/csv-parser/releases)
25 
26 All of this library's essentials are located under `src/`, with no dependencies aside from the STL. This is a C++17 library developed using Microsoft Visual Studio and compatible with g++ and clang. The CMakeList and Makefile contain instructions for building the main library, some sample programs, and the test suite.
27 
28 **GCC/Clang Compiler Flags**: `-pthread -O3 -std=c++17`
29 
30 ### CMake Instructions
31 If you're including this in another CMake project, you can simply clone this repo into your project directory,
32 and add the following to your CMakeLists.txt:
33 
34 ```
35 include(${CMAKE_SOURCE_DIR}/.../csv-parser/CMakeLists.txt)
36 
37 # ...
38 
39 add_executable(<your program> ...)
40 target_link_libraries(<your program> csv)
41 
42 ```
43 
44 ## Thirty-Second Introduction to Vince's CSV Parser
45 
46 * **Parsing CSV Files from..**
47  * Files: csv::CSVReader(filename)
48  * In-Memory Sources:
49  * Small: csv::parse() or csv::operator""_csv();
50  * Large: csv::CSVReader::feed();
51 * **Retrieving Parsed CSV Rows (from CSVReader)**
52  * csv::CSVReader::iterator() (supports range-based for loop)
53  * csv::CSVReader::read_row()
54 * **Working with CSV Rows**
55  * Index by number or name: csv::CSVRow::operator[]()
56  * Random access iterator: csv::CSVRow::iterator()
57  * Conversion: csv::CSVRow::operator std::vector<std::string>();
58 * **Calculating Statistics**
59  * Files: csv::CSVStat(filename)
60  * In-Memory: csv::CSVStat::feed()
61 * **Utility Functions**
62  * Return column names: get_col_names()
63  * Return the position of a column: get_col_pos();
64  * Return column types (for uploading to a SQL database): csv_data_types();
65 
66 ## Features & Examples
67 ### Reading a Large File (with Iterators)
68 With this library, you can easily stream over a large file without reading its entirety into memory.
69 
70 **C++ Style**
71 ```cpp
72 # include "csv_parser.hpp"
73 
74 using namespace csv;
75 
76 ...
77 
78 CSVReader reader("very_big_file.csv");
79 
80 for (CSVRow& row: reader) { // Input iterator
81  for (CSVField& field: row) {
82  // For efficiency, get<>() produces a string_view
83  std::cout << field.get<>() << ...
84  }
85 }
86 
87 ...
88 ```
89 
90 **Old-Fashioned C Style Loop**
91 ```cpp
92 ...
93 
94 CSVReader reader("very_big_file.csv");
95 CSVRow row;
96 
97 while (reader.read_row(row)) {
98  // Do stuff with row here
99 }
100 
101 ...
102 ```
103 
104 ### Indexing by Column Names
105 Retrieving values using a column name string is a cheap, constant time operation.
106 
107 ```cpp
108 # include "csv_parser.hpp"
109 
110 using namespace csv;
111 
112 ...
113 
114 CSVReader reader("very_big_file.csv");
115 double sum = 0;
116 
117 for (auto& row: reader) {
118  // Note: Can also use index of column with [] operator
119  sum += row["Total Salary"].get<double>();
120 }
121 
122 ...
123 ```
124 
125 ### Type Conversions
126 If your CSV has lots of numeric values, you can also have this parser (lazily)
127 convert them to the proper data type. Type checking is performed on conversions
128 to prevent undefined behavior.
129 
130 ```cpp
131 # include "csv_parser.hpp"
132 
133 using namespace csv;
134 
135 ...
136 
137 CSVReader reader("very_big_file.csv");
138 
139 for (auto& row: reader) {
140  if (row["timestamp"].is_int()) {
141  row["timestamp"].get<int>();
142 
143  // ..
144  }
145 }
146 
147 ```
148 
149 ### Specifying a Specific Delimiter, Quoting Character, etc.
150 Although the CSV parser has a decent guessing mechanism, in some cases it is preferrable to specify the exact parameters of a file.
151 
152 ```cpp
153 # include "csv_parser.hpp"
154 # include ...
155 
156 using namespace csv;
157 
158 CSVFormat format = {
159  '\t', // Delimiter
160  '~', // Quote-character
161  '2', // Line number of header
162  {} // Column names -- if empty, then filled by reading header row
163 };
164 
165 CSVReader reader("wierd_csv_dialect.csv", {}, format);
166 
167 for (auto& row: reader) {
168  // Do stuff with rows here
169 }
170 
171 ```
172 
173 ### Parsing an In-Memory String
174 
175 ```cpp
176 # include "csv_parser.hpp"
177 
178 using namespace csv;
179 
180 ...
181 
182 // Method 1: Using parse()
183 std::string csv_string = "Actor,Character"
184  "Will Ferrell,Ricky Bobby\r\n"
185  "John C. Reilly,Cal Naughton Jr.\r\n"
186  "Sacha Baron Cohen,Jean Giard\r\n"
187 
188 auto rows = parse(csv_string);
189 for (auto& r: rows) {
190  // Do stuff with row here
191 }
192 
193 // Method 2: Using _csv operator
194 auto rows = "Actor,Character"
195  "Will Ferrell,Ricky Bobby\r\n"
196  "John C. Reilly,Cal Naughton Jr.\r\n"
197  "Sacha Baron Cohen,Jean Giard\r\n"_csv;
198 
199 for (auto& r: rows) {
200  // Do stuff with row here
201 }
202 
203 ```
204 
205 ### Writing CSV Files
206 
207 ```cpp
208 # include "csv_writer.hpp"
209 # include ...
210 
211 using namespace csv;
212 using vector;
213 using string;
214 
215 ...
216 
217 std::stringstream ss; // Can also use ifstream, etc.
218 auto writer = make_csv_writer(ss);
219 writer << vector<string>({ "A", "B", "C" })
220  << vector<string>({ "I'm", "too", "tired" })
221  << vector<string>({ "to", "write", "documentation" });
222 
223 ...
224 
225 ```
226 
227 ## Contributing
228 Bug reports, feature requests, and so on are always welcome. Feel free to leave a note in the Issues section.
-
- - - - diff --git a/docs/annotated.html b/docs/annotated.html deleted file mode 100644 index 51ba613d..00000000 --- a/docs/annotated.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
-
[detail level 123]
- - - - - - - - - - - - - -
 NcsvThe all encompassing namespace
 NinternalsStuff that is generally not of interest to end-users
 CColNamesA data structure for handling column name information
 CCSVGuesser
 CCSVFieldData type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[]
 CCSVFileInfo
 CCSVFormatStores information about how to parse a CSV file
 CCSVReaderMain class for parsing CSVs from files and in-memory sources
 CiteratorAn input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end()
 CCSVRowData structure for representing CSV rows
 CiteratorA random access iterator over the contents of a CSV row. Each iterator points to a CSVField
 CCSVStatClass for calculating statistics from CSV files and in-memory sources
 CDelimWriterClass for writing delimiter separated values files
-
-
-
- - - - diff --git a/docs/annotated_dup.js b/docs/annotated_dup.js deleted file mode 100644 index b51bde99..00000000 --- a/docs/annotated_dup.js +++ /dev/null @@ -1,4 +0,0 @@ -var annotated_dup = -[ - [ "csv", "namespacecsv.html", "namespacecsv" ] -]; \ No newline at end of file diff --git a/docs/bc_s.png b/docs/bc_s.png deleted file mode 100644 index 224b29aa9847d5a4b3902efd602b7ddf7d33e6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT diff --git a/docs/bdwn.png b/docs/bdwn.png deleted file mode 100644 index 940a0b950443a0bb1b216ac03c45b8a16c955452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVField Member List
-
-
- -

This is the complete list of members for csv::CSVField, including all inherited members.

- - - - - - - - - - - - -
CSVField(std::string_view _sv) (defined in csv::CSVField)csv::CSVFieldinline
get()csv::CSVFieldinline
get() (defined in csv::CSVField)csv::CSVFieldinline
is_float() (defined in csv::CSVField)csv::CSVFieldinline
is_int() (defined in csv::CSVField)csv::CSVFieldinline
is_null() (defined in csv::CSVField)csv::CSVFieldinline
is_num() (defined in csv::CSVField)csv::CSVFieldinline
is_str() (defined in csv::CSVField)csv::CSVFieldinline
operator==(std::string_view other) const (defined in csv::CSVField)csv::CSVField
operator==(const long double &other) (defined in csv::CSVField)csv::CSVField
type()csv::CSVField
-
- - - - diff --git a/docs/classcsv_1_1CSVField.html b/docs/classcsv_1_1CSVField.html deleted file mode 100644 index 362c9b17..00000000 --- a/docs/classcsv_1_1CSVField.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVField Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::CSVField Class Reference
-
-
- -

Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[]. - More...

- -

#include <csv_row.hpp>

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

CSVField (std::string_view _sv)
 
template<typename T = std::string_view>
get ()
 
-bool operator== (std::string_view other) const
 
-bool operator== (const long double &other)
 
DataType type ()
 Return the type number of the stored value in accordance with the DataType enum. More...
 
-bool is_null ()
 
-bool is_str ()
 
-bool is_num ()
 
-bool is_int ()
 
-bool is_float ()
 
-template<>
long double get ()
 
-

Detailed Description

-

Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[].

- -

Definition at line 38 of file csv_row.hpp.

-

Member Function Documentation

- -

◆ get()

- -
-
-
-template<typename T = std::string_view>
- - - - - -
- - - - - - - -
T csv::CSVField::get ()
-
-inline
-
-

Returns the value casted to the requested type, performing type checking before. An std::runtime_error will be thrown if a type mismatch occurs, with the exception of T = std::string, in which the original string representation is always returned. Converting long ints to ints will be checked for overflow.

-

Valid options for T:

    -
  • std::string or std::string_view
  • -
  • int
  • -
  • long
  • -
  • long long
  • -
  • double
  • -
  • long double
  • -
- -

Definition at line 55 of file csv_row.hpp.

- -
-
- -

◆ type()

- -
-
- - - - - - - -
DataType csv::CSVField::type ()
-
- -

Return the type number of the stored value in accordance with the DataType enum.

-

<

- -

Definition at line 107 of file csv_row.cpp.

- -
-
-
The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVField.js b/docs/classcsv_1_1CSVField.js deleted file mode 100644 index 9cf1ba2a..00000000 --- a/docs/classcsv_1_1CSVField.js +++ /dev/null @@ -1,14 +0,0 @@ -var classcsv_1_1CSVField = -[ - [ "CSVField", "classcsv_1_1CSVField.html#af2522aba384653dd198540ad668a9ab0", null ], - [ "get", "classcsv_1_1CSVField.html#a67ff24172c5ac52417bbc36697511644", null ], - [ "get", "classcsv_1_1CSVField.html#a2f8e1cc269190283c8a668f5273df99d", null ], - [ "is_float", "classcsv_1_1CSVField.html#ad1822e7540f144deeab1a87f8e5268fa", null ], - [ "is_int", "classcsv_1_1CSVField.html#a888d4f9ac3c0f8e85761ceed3e856af4", null ], - [ "is_null", "classcsv_1_1CSVField.html#a855f05d296b992f5d6bb0bbfb94bf792", null ], - [ "is_num", "classcsv_1_1CSVField.html#aa0a899b3c0b597512506183edfb4ad62", null ], - [ "is_str", "classcsv_1_1CSVField.html#aa515c7eba5f76bd73e6f448d1069c6af", null ], - [ "operator==", "classcsv_1_1CSVField.html#a18cf4ba59439652c4d283248e2464c29", null ], - [ "operator==", "classcsv_1_1CSVField.html#a02c2efa7c701c534e97220e5405ef9d6", null ], - [ "type", "classcsv_1_1CSVField.html#aee31987c4c62c8ef7a89b475bd089618", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1CSVReader-members.html b/docs/classcsv_1_1CSVReader-members.html deleted file mode 100644 index 69bad2c1..00000000 --- a/docs/classcsv_1_1CSVReader-members.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVReader Member List
-
-
- -

This is the complete list of members for csv::CSVReader, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bad_row_handler(std::vector< std::string >)csv::CSVReaderprotectedvirtual
begin()csv::CSVReader
close()csv::CSVReader
col_namescsv::CSVReaderprotected
correct_rowscsv::CSVReader
CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)csv::CSVReader
CSVReader(CSVFormat format=DEFAULT_CSV)csv::CSVReader
CSVReader(const CSVReader &)=delete (defined in csv::CSVReader)csv::CSVReader
CSVReader(CSVReader &&)=default (defined in csv::CSVReader)csv::CSVReader
delimitercsv::CSVReaderprotected
DELIMITER enum value (defined in csv::CSVReader)csv::CSVReaderprotected
end()csv::CSVReader
end_feed()csv::CSVReader
eof() (defined in csv::CSVReader)csv::CSVReaderinlineprotected
feed(std::string_view in)csv::CSVReader
feed(std::unique_ptr< std::string > &&)csv::CSVReaderprotected
feed_buffercsv::CSVReaderprotected
feed_condcsv::CSVReaderprotected
feed_lockcsv::CSVReaderprotected
get_col_names() constcsv::CSVReader
get_format() constcsv::CSVReader
header_rowcsv::CSVReaderprotected
index_of(const std::string &col_name) constcsv::CSVReader
infilecsv::CSVReaderprotected
make_flags() constcsv::CSVReaderprotected
min_row_lencsv::CSVReaderprotected
NEWLINE enum value (defined in csv::CSVReader)csv::CSVReaderprotected
NOT_SPECIAL enum value (defined in csv::CSVReader)csv::CSVReaderprotected
operator=(const CSVReader &)=delete (defined in csv::CSVReader)csv::CSVReader
operator=(CSVReader &&other)=default (defined in csv::CSVReader)csv::CSVReader
parse(const std::string &, CSVFormat)csv::CSVReaderfriend
parse_flagscsv::CSVReaderprotected
ParseFlags enum namecsv::CSVReaderprotected
QUOTE enum value (defined in csv::CSVReader)csv::CSVReaderprotected
quote_charcsv::CSVReaderprotected
read_csv(const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)csv::CSVReaderprotected
read_csv_worker()csv::CSVReaderprotected
read_row(CSVRow &row)csv::CSVReader
record_buffercsv::CSVReaderprotected
recordscsv::CSVReaderprotected
row_numcsv::CSVReader
split_buffercsv::CSVReaderprotected
strictcsv::CSVReaderprotected
write_record()csv::CSVReaderprotected
~CSVReader() (defined in csv::CSVReader)csv::CSVReaderinline
-
- - - - diff --git a/docs/classcsv_1_1CSVReader.html b/docs/classcsv_1_1CSVReader.html deleted file mode 100644 index 9b7f82e4..00000000 --- a/docs/classcsv_1_1CSVReader.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVReader Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- - -
- -

Main class for parsing CSVs from files and in-memory sources. - More...

- -

#include <csv_parser.hpp>

- -

Inherited by csv::CSVStat.

- - - - - -

-Classes

class  iterator
 An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end(). More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

CSVReader (const CSVReader &)=delete
 
CSVReader (CSVReader &&)=default
 
-CSVReaderoperator= (const CSVReader &)=delete
 
-CSVReaderoperator= (CSVReader &&other)=default
 
-void close ()
 Close the open file handle. Automatically called by ~CSVReader().
 
Constructors

Constructors for iterating over large files and parsing in-memory sources.

-
 CSVReader (const std::string &filename, CSVFormat format=GUESS_CSV)
 Allows reading a CSV file in chunks, using overlapped threads for simulatenously reading from disk and parsing. Rows should be retrieved with read_row() or by using CSVReader::iterator. More...
 
CSVReader (CSVFormat format=DEFAULT_CSV)
 Allows parsing in-memory sources (by calling feed() and end_feed()).
 
Reading In-Memory Strings

You can piece together incomplete CSV fragments by calling feed() on them before finally calling end_feed().

-

Alternatively, you can also use the parse() shorthand function for smaller strings.

-
void feed (std::string_view in)
 
void end_feed ()
 
Retrieving CSV Rows
bool read_row (CSVRow &row)
 Retrieve rows as CSVRow objects, returning true if more rows are available. More...
 
-iterator begin ()
 Return an iterator to the first row in the reader.
 
-iterator end ()
 A placeholder for the imaginary past the end row in a CSV. Attempting to deference this will lead to bad things.
 
CSV Metadata
-CSVFormat get_format () const
 Return the format of the original raw CSV.
 
-std::vector< std::string > get_col_names () const
 Return the CSV's column names as a vector of strings.
 
-int index_of (const std::string &col_name) const
 Return the index of the column name if found or csv::CSV_NOT_FOUND otherwise.
 
- - - - - - - - -

-Public Attributes

CSV Metadata: Attributes
-RowCount row_num = 0
 How many lines have been parsed so far.
 
-RowCount correct_rows = 0
 How many correct rows (minus header) have been parsed so far.
 
- - - - -

-Protected Types

enum  ParseFlags { NOT_SPECIAL, -QUOTE, -DELIMITER, -NEWLINE - }
 An enum used for describing the significance of each character with respect to CSV parsing.
 
- - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

std::vector< CSVReader::ParseFlagsmake_flags () const
 
-bool eof ()
 
CSV Parsing Callbacks

The heart of the CSV parser. These methods are called by feed().

-
void write_record ()
 
virtual void bad_row_handler (std::vector< std::string >)
 
Multi-Threaded File Reading Functions
-void feed (std::unique_ptr< std::string > &&)
 Helper for read_csv_worker()
 
void read_csv (const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)
 Parse a CSV file using multiple threads. More...
 
void read_csv_worker ()
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

-std::string record_buffer = ""
 Buffer for current row being parsed.
 
-std::vector< size_t > split_buffer
 Positions where current row is split.
 
-size_t min_row_len = (size_t)INFINITY
 Shortest row seen so far; used to determine how much memory to allocate for new strings.
 
-std::deque< CSVRowrecords
 Queue of parsed CSV rows.
 
CSV Settings
-char delimiter
 Delimiter character.
 
-char quote_char
 Quote character.
 
-int header_row
 Line number of the header row (zero-indexed)
 
-bool strict = false
 Strictness of parser.
 
-std::vector< CSVReader::ParseFlagsparse_flags
 A table where the (i + 128)th slot gives the ParseFlags for ASCII character i.
 
Parser State
std::shared_ptr< internals::ColNamescol_names
 Pointer to a object containing column information. More...
 
Multi-Threaded File Reading: Flags and State
-std::FILE * infile = nullptr
 Current file handle. Destroyed by ~CSVReader().
 
-std::deque< std::unique_ptr< std::string > > feed_buffer
 Message queue for worker.
 
-std::mutex feed_lock
 Allow only one worker to write.
 
-std::condition_variable feed_cond
 Wake up worker.
 
- - - - -

-Friends

CSVCollection parse (const std::string &, CSVFormat)
 Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects. More...
 
-

Detailed Description

-

Main class for parsing CSVs from files and in-memory sources.

-

All rows are compared to the column names for length consistency

    -
  • By default, rows that are too short or too long are dropped
  • -
  • Custom behavior can be defined by overriding bad_row_handler in a subclass
  • -
- -

Definition at line 103 of file csv_parser.hpp.

-

Constructor & Destructor Documentation

- -

◆ CSVReader()

- -
-
- - - - - - - - - - - - - - - - - - -
csv::CSVReader::CSVReader (const std::string & filename,
CSVFormat format = GUESS_CSV 
)
-
- -

Allows reading a CSV file in chunks, using overlapped threads for simulatenously reading from disk and parsing. Rows should be retrieved with read_row() or by using CSVReader::iterator.

-

Details: Reads the first 500kB of a CSV file to infer file information such as column names and delimiting character.

-
Parameters
- - - -
[in]filenamePath to CSV file
[in]formatFormat of the CSV file
-
-
-
TEST_CASE("Test read_row() CSVField - Easy", "[read_row_csvf1]") {
// Test that integers are type-casted properly
CSVReader reader("./tests/data/fake_data/ints.csv");
CSVRow row;
while (reader.read_row(row)) {
for (size_t i = 0; i < row.size(); i++) {
REQUIRE(row[i].is_int());
REQUIRE(row[i].get<int>() <= 100);
}
}
}
-

Definition at line 275 of file csv_reader.cpp.

- -
-
-

Member Function Documentation

- -

◆ end_feed()

- -
-
- - - - - - - -
void csv::CSVReader::end_feed ()
-
-

Indicate that there is no more data to receive, and handle the last row

- -

Definition at line 385 of file csv_reader.cpp.

- -
-
- -

◆ feed()

- -
-
- - - - - - - - -
void csv::CSVReader::feed (std::string_view in)
-
-

Parse a CSV-formatted string.

-

Incomplete CSV fragments can be joined together by calling feed() on them sequentially. Note: end_feed() should be called after the last string

- -

Definition at line 319 of file csv_reader.cpp.

- -
-
- -

◆ read_row()

- -
-
- - - - - - - - -
bool csv::CSVReader::read_row (CSVRowrow)
-
- -

Retrieve rows as CSVRow objects, returning true if more rows are available.

-

Performance Notes:

-
Parameters
- - -
[out]rowThe variable where the parsed row will be stored
-
-
-
See also
CSVRow, CSVField
-

Example:

TEST_CASE("Test read_row() CSVField - Easy", "[read_row_csvf1]") {
// Test that integers are type-casted properly
CSVReader reader("./tests/data/fake_data/ints.csv");
CSVRow row;
while (reader.read_row(row)) {
for (size_t i = 0; i < row.size(); i++) {
REQUIRE(row[i].is_int());
REQUIRE(row[i].get<int>() <= 100);
}
}
}
-

Definition at line 538 of file csv_reader.cpp.

- -
-
-

Friends And Related Function Documentation

- -

◆ parse

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
CSVCollection parse (const std::string & in,
CSVFormat format 
)
-
-friend
-
- -

Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects.

-
TEST_CASE( "Test Escaped Quote", "[read_csv_quote]" ) {
// Per RFC 1480, escaped quotes should be doubled up
string csv_string = (
"A,B,C\r\n" // Header row
"123,\"234\"\"345\",456\r\n"
"123,\"234\"345\",456\r\n" // Unescaped single quote (not strictly valid)
);
auto rows = parse(csv_string);
// Expected Results: Double " is an escape for a single "
vector<string> correct_row = {"123", "234\"345", "456"};
// First Row
REQUIRE( vector<string>(rows.front()) == correct_row );
// Second Row
rows.pop_front();
REQUIRE( vector<string>(rows.front()) == correct_row );
-

Definition at line 182 of file csv_reader.cpp.

- -
-
-
The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVReader.js b/docs/classcsv_1_1CSVReader.js deleted file mode 100644 index 35c7516a..00000000 --- a/docs/classcsv_1_1CSVReader.js +++ /dev/null @@ -1,50 +0,0 @@ -var classcsv_1_1CSVReader = -[ - [ "iterator", "classcsv_1_1CSVReader_1_1iterator.html", "classcsv_1_1CSVReader_1_1iterator" ], - [ "ParseFlags", "group__csv__internal.html#ga22d269500460026ed8d99947f0766200", [ - [ "NOT_SPECIAL", "group__csv__internal.html#gga22d269500460026ed8d99947f0766200a30811cbbb0943b582fec514b3d774dca", null ], - [ "QUOTE", "group__csv__internal.html#gga22d269500460026ed8d99947f0766200aafcfa10031ecb3faa308f731aaaabcd8", null ], - [ "DELIMITER", "group__csv__internal.html#gga22d269500460026ed8d99947f0766200a872279918b4b7e39a27ce9cb8dc314fe", null ], - [ "NEWLINE", "group__csv__internal.html#gga22d269500460026ed8d99947f0766200a50815293f8da5a02b23b6b53b8ab5fea", null ] - ] ], - [ "CSVReader", "classcsv_1_1CSVReader.html#aab773760e65004c49fa476eb2eb70b54", null ], - [ "CSVReader", "classcsv_1_1CSVReader.html#adc5c14177ad156c9fad1d10f5e9d5d2d", null ], - [ "CSVReader", "classcsv_1_1CSVReader.html#abcacc66b4d05a2bc7ca7df4c2e97e8ea", null ], - [ "CSVReader", "classcsv_1_1CSVReader.html#a0f4843effc02b4c4d2239f59f4fcbbec", null ], - [ "~CSVReader", "classcsv_1_1CSVReader.html#a3a18f9f9a81386881f35bbd8712979b1", null ], - [ "bad_row_handler", "group__csv__internal.html#gaea3e7875478c79feba84d6ee97b1d476", null ], - [ "begin", "classcsv_1_1CSVReader.html#ac2b664c3ba18ac36076c1a1891bd1cf2", null ], - [ "close", "classcsv_1_1CSVReader.html#a759e9508e80832b3b394d5afb8f7a8bf", null ], - [ "end", "classcsv_1_1CSVReader.html#a13a1161c1512e23a6be6f8b7f0ead6eb", null ], - [ "end_feed", "classcsv_1_1CSVReader.html#a8ac02ea6f091b18f9ef9c9a793d4c3bd", null ], - [ "eof", "group__csv__internal.html#ga46873bb32329e95bb946989b88a39200", null ], - [ "feed", "classcsv_1_1CSVReader.html#a0e16afa967b390c29e2aab63087f5abe", null ], - [ "feed", "group__csv__internal.html#gae2934a7ef4abb2829b4455f2068bf214", null ], - [ "get_col_names", "classcsv_1_1CSVReader.html#ab282ff63cde3ff7c453cf377cc05de1c", null ], - [ "get_format", "classcsv_1_1CSVReader.html#a3bd56841002f21a77653d5212f03ef52", null ], - [ "index_of", "classcsv_1_1CSVReader.html#a76b59e4a7f140ba9e4d0fa9a1758a039", null ], - [ "make_flags", "group__csv__internal.html#gac2215271c176fa343fdfea1d319aab4c", null ], - [ "operator=", "classcsv_1_1CSVReader.html#ad9a46371150999b2b5eec22adbf93c20", null ], - [ "operator=", "classcsv_1_1CSVReader.html#a02107152ca221ce704ac69b9dfa742de", null ], - [ "read_csv", "group__csv__internal.html#ga44deca7b16b9de9092a029f6c014b1fa", null ], - [ "read_csv_worker", "group__csv__internal.html#ga49ab4671b28da24f5ae8670a9eef557d", null ], - [ "read_row", "classcsv_1_1CSVReader.html#aa28b87c77c5366e34ef86b35fb9f7238", null ], - [ "write_record", "group__csv__internal.html#ga609293317d4520eb6cc711c012240cb0", null ], - [ "parse", "classcsv_1_1CSVReader.html#af78ef3e1fa6f53b5fabf8ac20d985ebd", null ], - [ "col_names", "group__csv__internal.html#gac63e71ea5f74271f366cab7af8689b48", null ], - [ "correct_rows", "classcsv_1_1CSVReader.html#abf6ee7c791d118092eab3eecf81c966a", null ], - [ "delimiter", "group__csv__internal.html#gaf3cd9076878b66ce3a173d1d781ba9f6", null ], - [ "feed_buffer", "group__csv__internal.html#ga0b727379853c20bb8a6fb2af78fce314", null ], - [ "feed_cond", "group__csv__internal.html#ga77144227a1cdf5ef728a68a1f2bfc9e4", null ], - [ "feed_lock", "group__csv__internal.html#ga9a8b06d3470032217b592070866e315f", null ], - [ "header_row", "group__csv__internal.html#gaee0d4c8865e2abaae5bcfae76702eb8d", null ], - [ "infile", "group__csv__internal.html#gaa823a7be2b314559dcf0f9efd7ef4e57", null ], - [ "min_row_len", "group__csv__internal.html#gae59eb9a27868a8ccc4e86901051fb9b6", null ], - [ "parse_flags", "group__csv__internal.html#gae73cb1981c9866e1ea73a54ee6ac6002", null ], - [ "quote_char", "group__csv__internal.html#gae928205d7834e243ff41aaf74bd70735", null ], - [ "record_buffer", "group__csv__internal.html#gabee3f8a985267182e9ffd289012f042f", null ], - [ "records", "group__csv__internal.html#ga309c7035f6b7fe25ca9b1c2d8df30e59", null ], - [ "row_num", "classcsv_1_1CSVReader.html#a189e31dc240dc4f0bf7776b437d5c517", null ], - [ "split_buffer", "group__csv__internal.html#ga98792115fd80e24782a6816c73f94148", null ], - [ "strict", "group__csv__internal.html#gab5b7ac71d40acf632e031f2059c0cb9b", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1CSVReader_1_1iterator-members.html b/docs/classcsv_1_1CSVReader_1_1iterator-members.html deleted file mode 100644 index 055ff35c..00000000 --- a/docs/classcsv_1_1CSVReader_1_1iterator-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVReader::iterator Member List
-
-
- -

This is the complete list of members for csv::CSVReader::iterator, including all inherited members.

- - - - - - - - - - - - - - - - -
difference_type typedef (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
iterator()=default (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
iterator(CSVReader *reader) (defined in csv::CSVReader::iterator)csv::CSVReader::iteratorinline
iterator(CSVReader *, CSVRow &&) (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
iterator_category typedef (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
operator!=(const iterator &other) const (defined in csv::CSVReader::iterator)csv::CSVReader::iteratorinline
operator*()csv::CSVReader::iterator
operator++()csv::CSVReader::iterator
operator++(int) (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
operator--() (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
operator->()csv::CSVReader::iterator
operator==(const iterator &) constcsv::CSVReader::iterator
pointer typedef (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
reference typedef (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
value_type typedef (defined in csv::CSVReader::iterator)csv::CSVReader::iterator
-
- - - - diff --git a/docs/classcsv_1_1CSVReader_1_1iterator.html b/docs/classcsv_1_1CSVReader_1_1iterator.html deleted file mode 100644 index 4a82c8a4..00000000 --- a/docs/classcsv_1_1CSVReader_1_1iterator.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVReader::iterator Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::CSVReader::iterator Class Reference
-
-
- -

An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end(). - More...

- -

#include <csv_parser.hpp>

- - - - - - - - - - - - -

-Public Types

-using value_type = CSVRow
 
-using difference_type = std::ptrdiff_t
 
-using pointer = CSVRow *
 
-using reference = CSVRow &
 
-using iterator_category = std::input_iterator_tag
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

iterator (CSVReader *reader)
 
iterator (CSVReader *, CSVRow &&)
 
-reference operator* ()
 Access the CSVRow held by the iterator.
 
-pointer operator-> ()
 Return a pointer to the CSVRow the iterator has stopped at.
 
-iteratoroperator++ ()
 Advance the iterator by one row. If this CSVReader has an associated file, then the iterator will lazily pull more data from that file until EOF.
 
-iterator operator++ (int)
 
-iteratoroperator-- ()
 
-bool operator== (const iterator &) const
 Returns true if iterators were constructed from the same CSVReader and point to the same row.
 
-bool operator!= (const iterator &other) const
 
-

Detailed Description

-

An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end().

-

Iterating over a file:

TEST_CASE("Basic CSVReader Iterator Test", "[read_ints_iter]") {
// A file where each value in the ith row is the number i
// There are 100 rows
CSVReader reader("./tests/data/fake_data/ints.csv");
size_t i = 1;
for (auto it = reader.begin(); it != reader.end(); ++it) {
REQUIRE((*it)[0].get<int>() == i);
i++;
}
}
TEST_CASE("Basic CSVReader Range-Based For Test", "[read_ints_range]") {
CSVReader reader("./tests/data/fake_data/ints.csv");
std::vector<std::string> col_names = {
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J"
};
size_t i = 1;
for (auto& row : reader) {
for (auto& j : col_names) REQUIRE(row[j].get<int>() == i);
i++;
}
}

Using with <algorithm> library:

TEST_CASE("CSVReader Iterator + std::max_elem", "[iter_max_elem]") {
// The first is such that each value in the ith row is the number i
// There are 100 rows
// The second file is a database of California state employee salaries
CSVReader r1("./tests/data/fake_data/ints.csv"),
r2("./tests/data/real_data/2015_StateDepartment.csv");
// Find largest number
auto int_finder = [](CSVRow& left, CSVRow& right) {
return (left["A"].get<int>() < right["A"].get<int>());
};
auto max_int = std::max_element(r1.begin(), r2.end(), int_finder);
// Find highest salary
auto wage_finder = [](CSVRow& left, CSVRow& right) {
return (left["Total Wages"].get<double>() < right["Total Wages"].get<double>());
};
auto max_wage = std::max_element(r2.begin(), r2.end(), wage_finder);
REQUIRE((*max_int)["A"] == 100);
REQUIRE((*max_wage)["Total Wages"] == "812064.87");
}
-

Definition at line 115 of file csv_parser.hpp.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVReader_1_1iterator.js b/docs/classcsv_1_1CSVReader_1_1iterator.js deleted file mode 100644 index f8204b49..00000000 --- a/docs/classcsv_1_1CSVReader_1_1iterator.js +++ /dev/null @@ -1,18 +0,0 @@ -var classcsv_1_1CSVReader_1_1iterator = -[ - [ "difference_type", "classcsv_1_1CSVReader_1_1iterator.html#a5119b9f5753819f295c83b54179fe50b", null ], - [ "iterator_category", "classcsv_1_1CSVReader_1_1iterator.html#a0be3c32cc099196352a35f0f13119bdd", null ], - [ "pointer", "classcsv_1_1CSVReader_1_1iterator.html#aa9291e50fb10ca010ffcef5bd6ff02c4", null ], - [ "reference", "classcsv_1_1CSVReader_1_1iterator.html#aa6627dfb01592b8bedf67d8c2d143b17", null ], - [ "value_type", "classcsv_1_1CSVReader_1_1iterator.html#aa459ecca951d62645f5052e72aa50c8a", null ], - [ "iterator", "classcsv_1_1CSVReader_1_1iterator.html#a7f93524c43658b487ee78e182b21c9c7", null ], - [ "iterator", "classcsv_1_1CSVReader_1_1iterator.html#afec9cb06ed8a271f4350c93f56f530f1", null ], - [ "iterator", "classcsv_1_1CSVReader_1_1iterator.html#aa881fa7af040181ce439e62e0a4f4830", null ], - [ "operator!=", "classcsv_1_1CSVReader_1_1iterator.html#a4fe9db74068f9228786d13dbb1476881", null ], - [ "operator*", "classcsv_1_1CSVReader_1_1iterator.html#a90659253cc409c96908ad00aa743061c", null ], - [ "operator++", "classcsv_1_1CSVReader_1_1iterator.html#a280ee76af5604b6bc954ed0f23ac1a5f", null ], - [ "operator++", "classcsv_1_1CSVReader_1_1iterator.html#a01ab253111ef4b5a5cd065b47ba11fe0", null ], - [ "operator--", "classcsv_1_1CSVReader_1_1iterator.html#a46c94ee370c910932069f8a16e10aee6", null ], - [ "operator->", "classcsv_1_1CSVReader_1_1iterator.html#ab4cfd07f9bfcd6cdd64d1f36bcacfe66", null ], - [ "operator==", "classcsv_1_1CSVReader_1_1iterator.html#af24cee2d26b85bde5c93975d8fe70fc0", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1CSVRow-members.html b/docs/classcsv_1_1CSVRow-members.html deleted file mode 100644 index 8702c043..00000000 --- a/docs/classcsv_1_1CSVRow-members.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVRow Member List
-
-
- -

This is the complete list of members for csv::CSVRow, including all inherited members.

- - - - - - - - - - - - - - -
begin() constcsv::CSVRow
CSVRow()=default (defined in csv::CSVRow)csv::CSVRow
CSVRow(std::string &&_str, std::vector< size_t > &&_splits, std::shared_ptr< internals::ColNames > _cnames=nullptr) (defined in csv::CSVRow)csv::CSVRowinline
empty() const (defined in csv::CSVRow)csv::CSVRowinline
end() constcsv::CSVRow
get_string_view(size_t n) constcsv::CSVRow
operator std::vector< std::string >() const (defined in csv::CSVRow)csv::CSVRow
operator[](size_t n) constcsv::CSVRow
operator[](const std::string &) constcsv::CSVRow
rbegin() const (defined in csv::CSVRow)csv::CSVRow
rend() const (defined in csv::CSVRow)csv::CSVRow
reverse_iterator typedefcsv::CSVRow
size() constcsv::CSVRow
-
- - - - diff --git a/docs/classcsv_1_1CSVRow.html b/docs/classcsv_1_1CSVRow.html deleted file mode 100644 index 973f0ddf..00000000 --- a/docs/classcsv_1_1CSVRow.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVRow Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::CSVRow Class Reference
-
-
- -

Data structure for representing CSV rows. - More...

- -

#include <csv_row.hpp>

- - - - - -

-Classes

class  iterator
 A random access iterator over the contents of a CSV row. Each iterator points to a CSVField. More...
 
- - - - -

-Public Types

-using reverse_iterator = std::reverse_iterator< iterator >
 A reverse iterator over the contents of a CSVRow.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

CSVRow (std::string &&_str, std::vector< size_t > &&_splits, std::shared_ptr< internals::ColNames > _cnames=nullptr)
 
-bool empty () const
 
-size_t size () const
 Return the number of fields in this row.
 
Value Retrieval
CSVField operator[] (size_t n) const
 Return a CSVField object corrsponding to the nth value in the row. More...
 
CSVField operator[] (const std::string &) const
 Retrieve a value by its associated column name. If the column specified can't be round, a runtime error is thrown. More...
 
std::string_view get_string_view (size_t n) const
 Return a string view of the nth field. More...
 
operator std::vector< std::string > () const
 
Iterators

Each iterator points to a CSVField object.

-
-iterator begin () const
 Return an iterator pointing to the first field.
 
iterator end () const
 Return an iterator pointing to just after the end of the CSVRow. More...
 
-reverse_iterator rbegin () const
 
-reverse_iterator rend () const
 
-

Detailed Description

-

Data structure for representing CSV rows.

-

Internally, a CSVRow consists of:

    -
  • A pointer to the original column names
  • -
  • A string containing the entire CSV row (row_str)
  • -
  • An array of positions in that string where individual fields begin (splits)
  • -
-

CSVRow::operator[] uses splits to compute a string_view over row_str.

- -

Definition at line 99 of file csv_row.hpp.

-

Member Function Documentation

- -

◆ end()

- -
-
- - - - - - - -
CSVRow::iterator csv::CSVRow::end () const
-
- -

Return an iterator pointing to just after the end of the CSVRow.

-

Attempting to dereference the end iterator results in undefined behavior.

- -

Definition at line 149 of file csv_row.cpp.

- -
-
- -

◆ get_string_view()

- -
-
- - - - - - - - -
std::string_view csv::CSVRow::get_string_view (size_t n) const
-
- -

Return a string view of the nth field.

-
Complexity:
Constant
- -

Definition at line 34 of file csv_row.cpp.

- -
-
- -

◆ operator[]() [1/2]

- -
-
- - - - - - - - -
CSVField csv::CSVRow::operator[] (size_t n) const
-
- -

Return a CSVField object corrsponding to the nth value in the row.

-

This method performs boounds checking, and will throw an std::runtime_error if n is invalid.

-
Complexity:
Constant, by calling CSVRow::get_string_view()
- -

Definition at line 67 of file csv_row.cpp.

- -
-
- -

◆ operator[]() [2/2]

- -
-
- - - - - - - - -
CSVField csv::CSVRow::operator[] (const std::string & col_name) const
-
- -

Retrieve a value by its associated column name. If the column specified can't be round, a runtime error is thrown.

-
Complexity:
Constant. This calls the other CSVRow::operator[]() after converting column names into indices using a hash table.
-
Parameters
- - -
[in]col_nameThe column to look for
-
-
- -

Definition at line 79 of file csv_row.cpp.

- -
-
-
The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVRow.js b/docs/classcsv_1_1CSVRow.js deleted file mode 100644 index 9d05cb6b..00000000 --- a/docs/classcsv_1_1CSVRow.js +++ /dev/null @@ -1,17 +0,0 @@ -var classcsv_1_1CSVRow = -[ - [ "iterator", "classcsv_1_1CSVRow_1_1iterator.html", "classcsv_1_1CSVRow_1_1iterator" ], - [ "reverse_iterator", "classcsv_1_1CSVRow.html#a5563065ee9b3ecb511469259ee843e3c", null ], - [ "CSVRow", "classcsv_1_1CSVRow.html#ad6618c30aac6b38108e9299accdd76ac", null ], - [ "CSVRow", "classcsv_1_1CSVRow.html#a1f4f2984dfd7b809dbce92172a46ee15", null ], - [ "begin", "classcsv_1_1CSVRow.html#af43866d896d9ac0cb54f4d018d6a74df", null ], - [ "empty", "classcsv_1_1CSVRow.html#a511ec843578fdddfd4aee54d581a250a", null ], - [ "end", "classcsv_1_1CSVRow.html#a57d1e7d834d471332238abed5a5da112", null ], - [ "get_string_view", "classcsv_1_1CSVRow.html#a76f5d7b3c24f456fffcaf674bdaba633", null ], - [ "operator std::vector< std::string >", "classcsv_1_1CSVRow.html#a0cf4c4b97a5a6add302108e283fc4f5e", null ], - [ "operator[]", "classcsv_1_1CSVRow.html#ad523d2b544bc7dab0a121891e5062d2c", null ], - [ "operator[]", "classcsv_1_1CSVRow.html#a7279b8be87c4ce717447a432c9143839", null ], - [ "rbegin", "classcsv_1_1CSVRow.html#a7992b6b50f78971543e77e974b73b9d3", null ], - [ "rend", "classcsv_1_1CSVRow.html#a4c5b5e8d8cac8b1052bba40c0e46c925", null ], - [ "size", "classcsv_1_1CSVRow.html#afd489a3a2920fda476bbfe3ed549f0b9", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1CSVRow_1_1iterator-members.html b/docs/classcsv_1_1CSVRow_1_1iterator-members.html deleted file mode 100644 index f86ff582..00000000 --- a/docs/classcsv_1_1CSVRow_1_1iterator-members.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVRow::iterator Member List
-
-
- -

This is the complete list of members for csv::CSVRow::iterator, including all inherited members.

- - - - - - - - - - - - - - - - - -
difference_type typedef (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
iterator(const CSVRow *, int i) (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
iterator_category typedef (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator!=(const iterator &other) const (defined in csv::CSVRow::iterator)csv::CSVRow::iteratorinline
operator*() const (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator+(difference_type n) const (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator++(int) (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator++() (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator-(difference_type n) const (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator--(int) (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator--() (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator->() const (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
operator==(const iterator &) const (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
pointer typedef (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
reference typedef (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
value_type typedef (defined in csv::CSVRow::iterator)csv::CSVRow::iterator
-
- - - - diff --git a/docs/classcsv_1_1CSVRow_1_1iterator.html b/docs/classcsv_1_1CSVRow_1_1iterator.html deleted file mode 100644 index 4df1515f..00000000 --- a/docs/classcsv_1_1CSVRow_1_1iterator.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVRow::iterator Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::CSVRow::iterator Class Reference
-
-
- -

A random access iterator over the contents of a CSV row. Each iterator points to a CSVField. - More...

- -

#include <csv_row.hpp>

- - - - - - - - - - - - -

-Public Types

-using value_type = CSVField
 
-using difference_type = int
 
-using pointer = CSVField *
 
-using reference = CSVField &
 
-using iterator_category = std::random_access_iterator_tag
 
- - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

iterator (const CSVRow *, int i)
 
-reference operator* () const
 
-pointer operator-> () const
 
-iterator operator++ (int)
 
-iteratoroperator++ ()
 
-iterator operator-- (int)
 
-iteratoroperator-- ()
 
-iterator operator+ (difference_type n) const
 
-iterator operator- (difference_type n) const
 
-bool operator== (const iterator &) const
 
-bool operator!= (const iterator &other) const
 
-

Detailed Description

-

A random access iterator over the contents of a CSV row. Each iterator points to a CSVField.

- -

Definition at line 123 of file csv_row.hpp.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVRow_1_1iterator.js b/docs/classcsv_1_1CSVRow_1_1iterator.js deleted file mode 100644 index 85d72ca9..00000000 --- a/docs/classcsv_1_1CSVRow_1_1iterator.js +++ /dev/null @@ -1,19 +0,0 @@ -var classcsv_1_1CSVRow_1_1iterator = -[ - [ "difference_type", "classcsv_1_1CSVRow_1_1iterator.html#a19063382626f17155d821b22cd01d4bb", null ], - [ "iterator_category", "classcsv_1_1CSVRow_1_1iterator.html#af391dd28b9999c9091e2f42f67b0a420", null ], - [ "pointer", "classcsv_1_1CSVRow_1_1iterator.html#a4aebf06107b87b9e0b153c912ca85fe3", null ], - [ "reference", "classcsv_1_1CSVRow_1_1iterator.html#a3700763ec67d2b34bbc30c9eb8743384", null ], - [ "value_type", "classcsv_1_1CSVRow_1_1iterator.html#ac0a94a8cebccc88e62cbaf7f88b46326", null ], - [ "iterator", "classcsv_1_1CSVRow_1_1iterator.html#a26a367999501bafa959d1673a8c30d69", null ], - [ "operator!=", "classcsv_1_1CSVRow_1_1iterator.html#a63a1971ae8fcb57f07723c34bb6d20f5", null ], - [ "operator*", "classcsv_1_1CSVRow_1_1iterator.html#a3b8633b2653690fddfb00bb31d1d4da5", null ], - [ "operator+", "classcsv_1_1CSVRow_1_1iterator.html#a8e1a8bf1ccd30466188a2e40ee605bf9", null ], - [ "operator++", "classcsv_1_1CSVRow_1_1iterator.html#a280f41da3389fc7fa111d88c4851171f", null ], - [ "operator++", "classcsv_1_1CSVRow_1_1iterator.html#a7111ca098a4c80cca2b8b7342d3bb091", null ], - [ "operator-", "classcsv_1_1CSVRow_1_1iterator.html#a7d4779d24350a84d5c38fe1028fd73f9", null ], - [ "operator--", "classcsv_1_1CSVRow_1_1iterator.html#a307b957cd50bd7489b2028de4b4e378d", null ], - [ "operator--", "classcsv_1_1CSVRow_1_1iterator.html#af3046adcad2d388334b274ad8c09a22a", null ], - [ "operator->", "classcsv_1_1CSVRow_1_1iterator.html#a1e163389469664f3b99dd4365c945d42", null ], - [ "operator==", "classcsv_1_1CSVRow_1_1iterator.html#aa24ed38bc3e3f6a25220e57248592049", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1CSVStat-members.html b/docs/classcsv_1_1CSVStat-members.html deleted file mode 100644 index 37f87664..00000000 --- a/docs/classcsv_1_1CSVStat-members.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::CSVStat Member List
-
-
- -

This is the complete list of members for csv::CSVStat, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bad_row_handler(std::vector< std::string >)csv::CSVReaderprotectedvirtual
begin()csv::CSVReader
close()csv::CSVReader
col_namescsv::CSVReaderprotected
correct_rowscsv::CSVReader
CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)csv::CSVReader
CSVReader(CSVFormat format=DEFAULT_CSV)csv::CSVReader
CSVReader(const CSVReader &)=delete (defined in csv::CSVReader)csv::CSVReader
CSVReader(CSVReader &&)=default (defined in csv::CSVReader)csv::CSVReader
CSVStat(std::string filename, CSVFormat format=GUESS_CSV)csv::CSVStat
CSVStat(CSVFormat format=DEFAULT_CSV) (defined in csv::CSVStat)csv::CSVStatinline
DELIMITER enum value (defined in csv::CSVReader)csv::CSVReaderprotected
delimitercsv::CSVReaderprotected
end()csv::CSVReader
end_feed() (defined in csv::CSVStat)csv::CSVStat
eof() (defined in csv::CSVReader)csv::CSVReaderinlineprotected
feed(std::string_view in)csv::CSVReader
feed(std::unique_ptr< std::string > &&)csv::CSVReaderprotected
feed_buffercsv::CSVReaderprotected
feed_condcsv::CSVReaderprotected
feed_lockcsv::CSVReaderprotected
FreqCount typedef (defined in csv::CSVStat)csv::CSVStat
get_col_names() constcsv::CSVReader
get_counts() constcsv::CSVStat
get_dtypes() constcsv::CSVStat
get_format() constcsv::CSVReader
get_maxes() constcsv::CSVStat
get_mean() constcsv::CSVStat
get_mins() constcsv::CSVStat
get_variance() constcsv::CSVStat
header_rowcsv::CSVReaderprotected
index_of(const std::string &col_name) constcsv::CSVReader
infilecsv::CSVReaderprotected
make_flags() constcsv::CSVReaderprotected
min_row_lencsv::CSVReaderprotected
NEWLINE enum value (defined in csv::CSVReader)csv::CSVReaderprotected
NOT_SPECIAL enum value (defined in csv::CSVReader)csv::CSVReaderprotected
operator=(const CSVReader &)=delete (defined in csv::CSVReader)csv::CSVReader
operator=(CSVReader &&other)=default (defined in csv::CSVReader)csv::CSVReader
parse_flagscsv::CSVReaderprotected
ParseFlags enum namecsv::CSVReaderprotected
QUOTE enum value (defined in csv::CSVReader)csv::CSVReaderprotected
quote_charcsv::CSVReaderprotected
read_csv(const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)csv::CSVReaderprotected
read_csv_worker()csv::CSVReaderprotected
read_row(CSVRow &row)csv::CSVReader
record_buffercsv::CSVReaderprotected
recordscsv::CSVReaderprotected
row_numcsv::CSVReader
split_buffercsv::CSVReaderprotected
strictcsv::CSVReaderprotected
TypeCount typedef (defined in csv::CSVStat)csv::CSVStat
write_record()csv::CSVReaderprotected
~CSVReader() (defined in csv::CSVReader)csv::CSVReaderinline
-
- - - - diff --git a/docs/classcsv_1_1CSVStat.html b/docs/classcsv_1_1CSVStat.html deleted file mode 100644 index 1b1785ff..00000000 --- a/docs/classcsv_1_1CSVStat.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVStat Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::CSVStat Class Reference
-
-
- -

Class for calculating statistics from CSV files and in-memory sources. - More...

- -

#include <csv_parser.hpp>

- -

Inherits csv::CSVReader.

- - - - - - -

-Public Types

-using FreqCount = std::unordered_map< std::string, RowCount >
 
-using TypeCount = std::unordered_map< DataType, RowCount >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-void end_feed ()
 
-std::vector< long double > get_mean () const
 Return current means.
 
-std::vector< long double > get_variance () const
 Return current variances.
 
-std::vector< long double > get_mins () const
 Return current mins.
 
-std::vector< long double > get_maxes () const
 Return current maxes.
 
-std::vector< FreqCount > get_counts () const
 Get counts for each column.
 
-std::vector< TypeCount > get_dtypes () const
 Get data type counts for each column.
 
 CSVStat (std::string filename, CSVFormat format=GUESS_CSV)
 
CSVStat (CSVFormat format=DEFAULT_CSV)
 
- Public Member Functions inherited from csv::CSVReader
CSVReader (const CSVReader &)=delete
 
CSVReader (CSVReader &&)=default
 
-CSVReaderoperator= (const CSVReader &)=delete
 
-CSVReaderoperator= (CSVReader &&other)=default
 
-void close ()
 Close the open file handle. Automatically called by ~CSVReader().
 
 CSVReader (const std::string &filename, CSVFormat format=GUESS_CSV)
 Allows reading a CSV file in chunks, using overlapped threads for simulatenously reading from disk and parsing. Rows should be retrieved with read_row() or by using CSVReader::iterator. More...
 
CSVReader (CSVFormat format=DEFAULT_CSV)
 Allows parsing in-memory sources (by calling feed() and end_feed()).
 
void feed (std::string_view in)
 
void end_feed ()
 
bool read_row (CSVRow &row)
 Retrieve rows as CSVRow objects, returning true if more rows are available. More...
 
-iterator begin ()
 Return an iterator to the first row in the reader.
 
-iterator end ()
 A placeholder for the imaginary past the end row in a CSV. Attempting to deference this will lead to bad things.
 
-CSVFormat get_format () const
 Return the format of the original raw CSV.
 
-std::vector< std::string > get_col_names () const
 Return the CSV's column names as a vector of strings.
 
-int index_of (const std::string &col_name) const
 Return the index of the column name if found or csv::CSV_NOT_FOUND otherwise.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Public Attributes inherited from csv::CSVReader
-RowCount row_num = 0
 How many lines have been parsed so far.
 
-RowCount correct_rows = 0
 How many correct rows (minus header) have been parsed so far.
 
- Protected Types inherited from csv::CSVReader
enum  ParseFlags { NOT_SPECIAL, -QUOTE, -DELIMITER, -NEWLINE - }
 An enum used for describing the significance of each character with respect to CSV parsing.
 
- Protected Member Functions inherited from csv::CSVReader
std::vector< CSVReader::ParseFlagsmake_flags () const
 
-bool eof ()
 
void write_record ()
 
virtual void bad_row_handler (std::vector< std::string >)
 
-void feed (std::unique_ptr< std::string > &&)
 Helper for read_csv_worker()
 
void read_csv (const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)
 Parse a CSV file using multiple threads. More...
 
void read_csv_worker ()
 
- Protected Attributes inherited from csv::CSVReader
-std::string record_buffer = ""
 Buffer for current row being parsed.
 
-std::vector< size_t > split_buffer
 Positions where current row is split.
 
-size_t min_row_len = (size_t)INFINITY
 Shortest row seen so far; used to determine how much memory to allocate for new strings.
 
-std::deque< CSVRowrecords
 Queue of parsed CSV rows.
 
-char delimiter
 Delimiter character.
 
-char quote_char
 Quote character.
 
-int header_row
 Line number of the header row (zero-indexed)
 
-bool strict = false
 Strictness of parser.
 
-std::vector< CSVReader::ParseFlagsparse_flags
 A table where the (i + 128)th slot gives the ParseFlags for ASCII character i.
 
std::shared_ptr< internals::ColNamescol_names
 Pointer to a object containing column information. More...
 
-std::FILE * infile = nullptr
 Current file handle. Destroyed by ~CSVReader().
 
-std::deque< std::unique_ptr< std::string > > feed_buffer
 Message queue for worker.
 
-std::mutex feed_lock
 Allow only one worker to write.
 
-std::condition_variable feed_cond
 Wake up worker.
 
-

Detailed Description

-

Class for calculating statistics from CSV files and in-memory sources.

-

Example

#include "csv_parser.hpp"
int main(int argc, char** argv) {
using namespace csv;
if (argc < 2) {
std::cout << "Usage: " << argv[0] << " [file]" << std::endl;
exit(1);
}
std::string filename = argv[1];
CSVStat stats(filename);
auto col_names = stats.get_col_names();
auto min = stats.get_mins(), max = stats.get_maxes(),
means = stats.get_mean(), vars = stats.get_variance();
for (size_t i = 0; i < col_names.size(); i++) {
std::cout << col_names[i] << std::endl
<< "Min: " << min[i] << std::endl
<< "Max: " << max[i] << std::endl
<< "Mean: " << means[i] << std::endl
<< "Var: " << vars[i] << std::endl;
}
return 0;
}
-

Definition at line 292 of file csv_parser.hpp.

-

Constructor & Destructor Documentation

- -

◆ CSVStat()

- -
-
- - - - - - - - - - - - - - - - - - -
csv::CSVStat::CSVStat (std::string filename,
CSVFormat format = GUESS_CSV 
)
-
-

Lazily calculate statistics for a potentially large file. Once this constructor is called, CSVStat will process the entire file iteratively. Once finished, methods like get_mean(), get_counts(), etc... can be used to retrieve statistics.

- -

Definition at line 8 of file csv_stat.cpp.

- -
-
-
The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1CSVStat.js b/docs/classcsv_1_1CSVStat.js deleted file mode 100644 index 699ecd50..00000000 --- a/docs/classcsv_1_1CSVStat.js +++ /dev/null @@ -1,14 +0,0 @@ -var classcsv_1_1CSVStat = -[ - [ "FreqCount", "classcsv_1_1CSVStat.html#a30513bcd8434bbf186fd24845dd75001", null ], - [ "TypeCount", "classcsv_1_1CSVStat.html#a2e89591f08fd9c84aee3ada3e4afb634", null ], - [ "CSVStat", "classcsv_1_1CSVStat.html#a67da63a7557bf7efb8884dd553113b90", null ], - [ "CSVStat", "classcsv_1_1CSVStat.html#a4619eedf9edc2cce4b81f4c977dcd482", null ], - [ "end_feed", "classcsv_1_1CSVStat.html#a3575165b15a9a555b4bf8c8d7b4af15d", null ], - [ "get_counts", "classcsv_1_1CSVStat.html#affadbcfa1bf312afd6504ebd9c179067", null ], - [ "get_dtypes", "classcsv_1_1CSVStat.html#a881131249d111032b2da1ca81b71e96c", null ], - [ "get_maxes", "classcsv_1_1CSVStat.html#a8d2af11719354b5bb2a2296e595f2c0d", null ], - [ "get_mean", "classcsv_1_1CSVStat.html#a20a3fa0650861a1206d5717b38e1119d", null ], - [ "get_mins", "classcsv_1_1CSVStat.html#a77adc53d21f2ff86d8537df33416ac13", null ], - [ "get_variance", "classcsv_1_1CSVStat.html#a2a856a1b6a52d13a5d985ec6ce06aeeb", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1DelimWriter-members.html b/docs/classcsv_1_1DelimWriter-members.html deleted file mode 100644 index 475c7007..00000000 --- a/docs/classcsv_1_1DelimWriter-members.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::DelimWriter< OutputStream, Delim, Quote > Member List
-
-
- -

This is the complete list of members for csv::DelimWriter< OutputStream, Delim, Quote >, including all inherited members.

- - - - - -
DelimWriter(OutputStream &_out) (defined in csv::DelimWriter< OutputStream, Delim, Quote >)csv::DelimWriter< OutputStream, Delim, Quote >inline
DelimWriter(const std::string &filename) (defined in csv::DelimWriter< OutputStream, Delim, Quote >)csv::DelimWriter< OutputStream, Delim, Quote >inline
operator<<(const std::vector< std::string > &record)csv::DelimWriter< OutputStream, Delim, Quote >inline
write_row(const std::vector< std::string > &record, bool quote_minimal=true)csv::DelimWriter< OutputStream, Delim, Quote >inline
-
- - - - diff --git a/docs/classcsv_1_1DelimWriter.html b/docs/classcsv_1_1DelimWriter.html deleted file mode 100644 index 32a65420..00000000 --- a/docs/classcsv_1_1DelimWriter.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::DelimWriter< OutputStream, Delim, Quote > Class Template Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::DelimWriter< OutputStream, Delim, Quote > Class Template Reference
-
-
- -

Class for writing delimiter separated values files. - More...

- -

#include <csv_writer.hpp>

- - - - - - - - - - -

-Public Member Functions

DelimWriter (OutputStream &_out)
 
DelimWriter (const std::string &filename)
 
void write_row (const std::vector< std::string > &record, bool quote_minimal=true)
 
DelimWriteroperator<< (const std::vector< std::string > &record)
 
-

Detailed Description

-

template<class OutputStream, char Delim, char Quote>
-class csv::DelimWriter< OutputStream, Delim, Quote >

- -

Class for writing delimiter separated values files.

-

To write formatted strings, one should

    -
  1. Initialize a DelimWriter with respect to some output stream (e.g. std::ifstream or std::stringstream)
  2. -
  3. Call write_row() on std::vector<std::string>s of unformatted text
  4. -
-

Hint: Use the aliases CSVWriter<OutputStream> to write CSV formatted strings and TSVWriter<OutputStream> to write tab separated strings

- -

Definition at line 64 of file csv_writer.hpp.

-

Member Function Documentation

- -

◆ operator<<()

- -
-
-
-template<class OutputStream , char Delim, char Quote>
- - - - - -
- - - - - - - - -
DelimWriter& csv::DelimWriter< OutputStream, Delim, Quote >::operator<< (const std::vector< std::string > & record)
-
-inline
-
-

Calls write_row() on record

- -

Definition at line 85 of file csv_writer.hpp.

- -
-
- -

◆ write_row()

- -
-
-
-template<class OutputStream , char Delim, char Quote>
- - - - - -
- - - - - - - - - - - - - - - - - - -
void csv::DelimWriter< OutputStream, Delim, Quote >::write_row (const std::vector< std::string > & record,
bool quote_minimal = true 
)
-
-inline
-
-

Format a sequence of strings and write to CSV according to RFC 4180

-

Note: This does not check to make sure row lengths are consistent

Parameters
- - - -
[in]recordVector of strings to be formatted
quote_minimalOnly quote fields if necessary
-
-
- -

Definition at line 69 of file csv_writer.hpp.

- -
-
-
The documentation for this class was generated from the following file: -
-
- - - - diff --git a/docs/classcsv_1_1DelimWriter.js b/docs/classcsv_1_1DelimWriter.js deleted file mode 100644 index 93fff6e0..00000000 --- a/docs/classcsv_1_1DelimWriter.js +++ /dev/null @@ -1,7 +0,0 @@ -var classcsv_1_1DelimWriter = -[ - [ "DelimWriter", "classcsv_1_1DelimWriter.html#ac52b59d332b306f4d77fd749fb253366", null ], - [ "DelimWriter", "classcsv_1_1DelimWriter.html#a5bc11ebddf3777dab942fc1a05b35988", null ], - [ "operator<<", "classcsv_1_1DelimWriter.html#af060b8e69e8519a9d70e2864e29a5745", null ], - [ "write_row", "classcsv_1_1DelimWriter.html#af71375d3bd496f10965e3a78d710e89c", null ] -]; \ No newline at end of file diff --git a/docs/classcsv_1_1internals_1_1CSVGuesser-members.html b/docs/classcsv_1_1internals_1_1CSVGuesser-members.html deleted file mode 100644 index a7c680a9..00000000 --- a/docs/classcsv_1_1internals_1_1CSVGuesser-members.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv::internals::CSVGuesser Member List
-
- -
- - - - diff --git a/docs/classcsv_1_1internals_1_1CSVGuesser.html b/docs/classcsv_1_1internals_1_1CSVGuesser.html deleted file mode 100644 index b9f831ec..00000000 --- a/docs/classcsv_1_1internals_1_1CSVGuesser.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::internals::CSVGuesser Class Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv::internals::CSVGuesser Class Reference
-
-
- -

#include <csv_parser.hpp>

- - - - - - - - - - -

-Public Member Functions

CSVGuesser (const std::string &_filename)
 
void guess_delim ()
 
bool first_guess ()
 
void second_guess ()
 
- - - - - - - -

-Public Attributes

-std::vector< char > delims = { ',', '|', '\t', ';', '^' }
 
-char delim
 
-int header_row = 0
 
-

Detailed Description

-

Class for guessing the delimiter & header row number of CSV files

- -

Definition at line 330 of file csv_parser.hpp.

-

Member Function Documentation

- -

◆ first_guess()

- -
-
- - - - - - - -
bool csv::internals::CSVGuesser::first_guess ()
-
-

Guess the delimiter of a delimiter separated values file by scanning the first 100 lines

-
    -
  • "Winner" is based on which delimiter has the most number of correctly parsed rows + largest number of columns
  • -
  • Note: Assumes that whatever the dialect, all records are newline separated
  • -
-

Returns True if guess was a good one and second guess isn't needed

- -

Definition at line 47 of file csv_reader.cpp.

- -
-
- -

◆ guess_delim()

- -
-
- - - - - - - -
void csv::internals::CSVGuesser::guess_delim ()
-
-

Guess the delimiter of a CSV by scanning the first 100 lines by First assuming that the header is on the first row If the first guess returns too few rows, then we move to the second guess method

- -

Definition at line 38 of file csv_reader.cpp.

- -
-
- -

◆ second_guess()

- -
-
- - - - - - - -
void csv::internals::CSVGuesser::second_guess ()
-
-

For each delimiter, find out which row length was most common. The delimiter with the longest mode row length wins. Then, the line number of the header row is the first row with the mode row length.

- -

Definition at line 87 of file csv_reader.cpp.

- -
-
-
The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/classcsv_1_1internals_1_1CSVGuesser.js b/docs/classcsv_1_1internals_1_1CSVGuesser.js deleted file mode 100644 index 73dfffb0..00000000 --- a/docs/classcsv_1_1internals_1_1CSVGuesser.js +++ /dev/null @@ -1,10 +0,0 @@ -var classcsv_1_1internals_1_1CSVGuesser = -[ - [ "CSVGuesser", "classcsv_1_1internals_1_1CSVGuesser.html#ae894ee0c5f8f83ef6acc52e5552655c3", null ], - [ "first_guess", "classcsv_1_1internals_1_1CSVGuesser.html#aa73a9a48294ca4ae3ab564e729456ca4", null ], - [ "guess_delim", "classcsv_1_1internals_1_1CSVGuesser.html#a82275ad726eb22e14b57334e8d5b9245", null ], - [ "second_guess", "classcsv_1_1internals_1_1CSVGuesser.html#a3ea5d2dee87b8cb23aca15b9c9aaa351", null ], - [ "delim", "classcsv_1_1internals_1_1CSVGuesser.html#aa29c141d3bc4d3b170b35f79e7df45a8", null ], - [ "delims", "classcsv_1_1internals_1_1CSVGuesser.html#ae64532443303194559680962763f1978", null ], - [ "header_row", "classcsv_1_1internals_1_1CSVGuesser.html#a8f47d7200459bd23b533ae62f7a77b0e", null ] -]; \ No newline at end of file diff --git a/docs/classes.html b/docs/classes.html deleted file mode 100644 index 50f80e90..00000000 --- a/docs/classes.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Index - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Class Index
-
-
-
c | d | i
- - - - - - - -
  c  
-
CSVFileInfo (csv)   CSVRow (csv)   
  i  
-
CSVFormat (csv)   CSVStat (csv)   
ColNames (csv::internals)   CSVGuesser (csv::internals)   
  d  
-
CSVRow::iterator (csv)   
CSVField (csv)   CSVReader (csv)   CSVReader::iterator (csv)   
DelimWriter (csv)   
-
c | d | i
-
-
- - - - diff --git a/docs/closed.png b/docs/closed.png deleted file mode 100644 index 98cc2c909da37a6df914fbf67780eebd99c597f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT diff --git a/docs/csv__parser_8hpp.html b/docs/csv__parser_8hpp.html deleted file mode 100644 index 226f2829..00000000 --- a/docs/csv__parser_8hpp.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_parser.hpp File Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv_parser.hpp File Reference
-
-
-
#include <string_view>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <deque>
-#include <unordered_map>
-#include <stdexcept>
-#include <cstdio>
-#include <iostream>
-#include <fstream>
-#include <functional>
-#include <algorithm>
-#include <thread>
-#include <mutex>
-#include <condition_variable>
-#include <iterator>
-#include "memory.hpp"
-#include "data_type.h"
-#include "csv_row.hpp"
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - -

-Classes

struct  csv::CSVFormat
 Stores information about how to parse a CSV file. More...
 
struct  csv::CSVFileInfo
 
class  csv::CSVReader
 Main class for parsing CSVs from files and in-memory sources. More...
 
class  csv::CSVReader::iterator
 An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end(). More...
 
class  csv::CSVStat
 Class for calculating statistics from CSV files and in-memory sources. More...
 
class  csv::internals::CSVGuesser
 
- - - - - - - -

-Namespaces

 csv
 The all encompassing namespace.
 
 csv::internals
 Stuff that is generally not of interest to end-users.
 
- - - - - - -

-Typedefs

-using csv::RowCount = long long int
 Used for counting number of rows.
 
-using csv::CSVCollection = std::deque< CSVRow >
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

bool csv::internals::is_equal (double a, double b, double epsilon=0.001)
 
-std::string csv::internals::type_name (const DataType &dtype)
 
std::string csv::internals::format_row (const std::vector< std::string > &row, const std::string &delim=", ")
 
Shorthand Parsing Functions

Convienience functions for parsing small strings

-
CSVCollection csv::operator""_csv (const char *in, size_t n)
 Parse a RFC 4180 CSV string, returning a collection of CSVRow objects. More...
 
CSVCollection csv::parse (const std::string &in, CSVFormat format)
 Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects. More...
 
Utility Functions
std::unordered_map< std::string, DataType > csv::csv_data_types (const std::string &filename)
 Useful for uploading CSV files to SQL databases. More...
 
CSVFileInfo csv::get_file_info (const std::string &filename)
 Get basic information about a CSV file. More...
 
-CSVFormat csv::guess_format (const std::string &filename)
 Guess the delimiter used by a delimiter-separated values file.
 
std::vector< std::string > csv::get_col_names (const std::string &filename, CSVFormat format)
 Return a CSV's column names. More...
 
int csv::get_col_pos (const std::string filename, const std::string col_name, const CSVFormat format)
 Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise. More...
 
- - - - - - - - - - - - - - - - - -

-Variables

-const int csv::CSV_NOT_FOUND = -1
 Integer indicating a requested column wasn't found.
 
Global Constants
-const size_t csv::ITERATION_CHUNK_SIZE = 10000000
 For functions that lazy load a large CSV, this determines how many bytes are read at a time.
 
-const CSVFormat csv::GUESS_CSV = { '\0', '"', 0, {}, false }
 A dummy variable used to indicate delimiter should be guessed.
 
-const CSVFormat csv::DEFAULT_CSV = { ',', '"', 0, {}, false }
 RFC 4180 CSV format.
 
-const CSVFormat csv::DEFAULT_CSV_STRICT = { ',', '"', 0, {}, true }
 RFC 4180 CSV format with strict parsing.
 
-
-
- - - - diff --git a/docs/csv__parser_8hpp.js b/docs/csv__parser_8hpp.js deleted file mode 100644 index 7a66ab3c..00000000 --- a/docs/csv__parser_8hpp.js +++ /dev/null @@ -1,26 +0,0 @@ -var csv__parser_8hpp = -[ - [ "CSVFormat", "structcsv_1_1CSVFormat.html", "structcsv_1_1CSVFormat" ], - [ "CSVFileInfo", "structcsv_1_1CSVFileInfo.html", "structcsv_1_1CSVFileInfo" ], - [ "CSVReader", "classcsv_1_1CSVReader.html", "classcsv_1_1CSVReader" ], - [ "iterator", "classcsv_1_1CSVReader_1_1iterator.html", "classcsv_1_1CSVReader_1_1iterator" ], - [ "CSVStat", "classcsv_1_1CSVStat.html", "classcsv_1_1CSVStat" ], - [ "CSVGuesser", "classcsv_1_1internals_1_1CSVGuesser.html", "classcsv_1_1internals_1_1CSVGuesser" ], - [ "CSVCollection", "csv__parser_8hpp.html#aa8a890537dc2de490cd44094ae8cb526", null ], - [ "RowCount", "csv__parser_8hpp.html#a5ee7c8c04afbcd1f4d24046143addc29", null ], - [ "csv_data_types", "csv__parser_8hpp.html#ad4aa91cb61332520a139962f5b55944f", null ], - [ "format_row", "csv__parser_8hpp.html#a7ab04b6d1c0bc499c8f494dad23f1307", null ], - [ "get_col_names", "csv__parser_8hpp.html#a3d46fa01407dce7fd8f33d55604e74da", null ], - [ "get_col_pos", "csv__parser_8hpp.html#af36e457d080e4567f0939db04e193bff", null ], - [ "get_file_info", "csv__parser_8hpp.html#a59dfc8c288720becdd3a55485262e670", null ], - [ "guess_format", "csv__parser_8hpp.html#abd689f33ce9fe246fd3229c53654232c", null ], - [ "is_equal", "csv__parser_8hpp.html#a80e5b06741dfc9a8273e982bacafee98", null ], - [ "operator\"\"_csv", "csv__parser_8hpp.html#abcbc9a3ab5e6eb6905a995964c7cbf13", null ], - [ "parse", "csv__parser_8hpp.html#af2d1242068d0e53a248c61e83c8349d9", null ], - [ "type_name", "csv__parser_8hpp.html#acdca37d8af11632927216d556657bee9", null ], - [ "CSV_NOT_FOUND", "csv__parser_8hpp.html#a7742b9dcd46ed5d7698106d3e523a3c8", null ], - [ "DEFAULT_CSV", "csv__parser_8hpp.html#ae5efeba17998ae0b741f10201c77a9cb", null ], - [ "DEFAULT_CSV_STRICT", "csv__parser_8hpp.html#a2aef42e5fa96f1eb42968856f7348901", null ], - [ "GUESS_CSV", "csv__parser_8hpp.html#a934424955c1b950cd80a5f0a1e7faaf1", null ], - [ "ITERATION_CHUNK_SIZE", "csv__parser_8hpp.html#a82452d316c535c04ad187c1863b1e228", null ] -]; \ No newline at end of file diff --git a/docs/csv__parser_8hpp_source.html b/docs/csv__parser_8hpp_source.html deleted file mode 100644 index 9f1fb305..00000000 --- a/docs/csv__parser_8hpp_source.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_parser.hpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_parser.hpp
-
-
-Go to the documentation of this file.
1 #pragma once
2 #include <string_view>
3 #include <string>
4 #include <sstream>
5 #include <vector>
6 #include <deque>
7 #include <unordered_map>
8 #include <stdexcept>
9 #include <cstdio>
10 #include <iostream>
11 #include <fstream>
12 #include <functional>
13 #include <algorithm>
14 #include <thread>
15 #include <mutex>
16 #include <condition_variable>
17 #include <iterator>
18 
19 #include "memory.hpp"
20 #include "data_type.h"
21 #include "csv_row.hpp"
22 
28 namespace csv {
30  const int CSV_NOT_FOUND = -1;
31 
33  using RowCount = long long int;
34 
35  class CSVRow;
36  using CSVCollection = std::deque<CSVRow>;
37 
47  struct CSVFormat {
48  char delim;
49  char quote_char;
50 
52  int header;
53 
55  std::vector<std::string> col_names;
56 
58  bool strict;
59  };
60 
62  struct CSVFileInfo {
63  std::string filename;
64  std::vector<std::string> col_names;
65  char delim;
67  int n_cols;
68  };
69 
73  namespace internals {
74  bool is_equal(double a, double b, double epsilon = 0.001);
75  std::string type_name(const DataType& dtype);
76  std::string format_row(const std::vector<std::string>& row, const std::string& delim = ", ");
77  }
78 
80 
84  const size_t ITERATION_CHUNK_SIZE = 10000000; // 10MB
85 
87  const CSVFormat GUESS_CSV = { '\0', '"', 0, {}, false };
88 
90  const CSVFormat DEFAULT_CSV = { ',', '"', 0, {}, false };
91 
93  const CSVFormat DEFAULT_CSV_STRICT = { ',', '"', 0, {}, true };
95 
103  class CSVReader {
104  public:
115  class iterator {
116  public:
117  using value_type = CSVRow;
118  using difference_type = std::ptrdiff_t;
119  using pointer = CSVRow * ;
120  using reference = CSVRow & ;
121  using iterator_category = std::input_iterator_tag;
122 
123  iterator() = default;
124  iterator(CSVReader* reader) : daddy(reader) {};
126 
127  reference operator*();
128  pointer operator->();
129  iterator& operator++(); // Pre-inc
130  iterator operator++(int); // Post-inc
131  iterator& operator--();
132 
133  bool operator==(const iterator&) const;
134  bool operator!=(const iterator& other) const { return !operator==(other); }
135 
136  private:
137  CSVReader * daddy = nullptr; // Pointer to parent
138  CSVRow row; // Current row
139  RowCount i = 0; // Index of current row
140  };
141 
145  CSVReader(const std::string& filename, CSVFormat format = GUESS_CSV);
147  CSVReader(CSVFormat format = DEFAULT_CSV);
149 
150  CSVReader(const CSVReader&) = delete; // No copy constructor
151  CSVReader(CSVReader&&) = default; // Move constructor
152  CSVReader& operator=(const CSVReader&) = delete; // No copy assignment
153  CSVReader& operator=(CSVReader&& other) = default;
154  ~CSVReader() { this->close(); }
155 
163  void feed(std::string_view in);
165  void end_feed();
167 
169  bool read_row(CSVRow &row);
171  iterator begin();
172  iterator end();
174 
176  CSVFormat get_format() const;
178  std::vector<std::string> get_col_names() const;
179  int index_of(const std::string& col_name) const;
181 
183  RowCount row_num = 0;
187  RowCount correct_rows = 0;
190 
192  void close();
196  friend CSVCollection parse(const std::string&, CSVFormat);
197  protected:
209  enum ParseFlags {
210  NOT_SPECIAL,
211  QUOTE,
212  DELIMITER,
213  NEWLINE
214  };
215 
216  std::vector<CSVReader::ParseFlags> make_flags() const;
217 
218  std::string record_buffer = "";
221  std::vector<size_t> split_buffer;
224  size_t min_row_len = (size_t)INFINITY;
228  std::deque<CSVRow> records;
229  inline bool eof() { return !(this->infile); };
230 
235  void write_record();
237  virtual void bad_row_handler(std::vector<std::string>);
239 
241  char delimiter;
243  char quote_char;
245  bool strict = false;
247  std::vector<CSVReader::ParseFlags> parse_flags;
249 
252 
255  std::shared_ptr<internals::ColNames> col_names =
256  std::make_shared<internals::ColNames>(std::vector<std::string>({}));
258 
260  void feed(std::unique_ptr<std::string>&&);
262  void read_csv(
263  const std::string& filename,
264  const size_t& bytes = ITERATION_CHUNK_SIZE,
265  bool close = true
266  );
267  void read_csv_worker();
269 
271  std::FILE* infile = nullptr;
275  std::deque<std::unique_ptr<std::string>>
278  std::mutex feed_lock;
279  std::condition_variable feed_cond;
280  // End of parser internals
283  };
284 
292  class CSVStat: public CSVReader {
293  public:
294  using FreqCount = std::unordered_map<std::string, RowCount>;
295  using TypeCount = std::unordered_map<DataType, RowCount>;
296 
297  void end_feed();
298  std::vector<long double> get_mean() const;
299  std::vector<long double> get_variance() const;
300  std::vector<long double> get_mins() const;
301  std::vector<long double> get_maxes() const;
302  std::vector<FreqCount> get_counts() const;
303  std::vector<TypeCount> get_dtypes() const;
304 
305  CSVStat(std::string filename, CSVFormat format = GUESS_CSV);
306  CSVStat(CSVFormat format = DEFAULT_CSV) : CSVReader(format) {};
307  private:
308  // An array of rolling averages
309  // Each index corresponds to the rolling mean for the column at said index
310  std::vector<long double> rolling_means;
311  std::vector<long double> rolling_vars;
312  std::vector<long double> mins;
313  std::vector<long double> maxes;
314  std::vector<FreqCount> counts;
315  std::vector<TypeCount> dtypes;
316  std::vector<long double> n;
317 
318  // Statistic calculators
319  void variance(const long double&, const size_t&);
320  void count(CSVField&, const size_t&);
321  void min_max(const long double&, const size_t&);
322  void dtype(CSVField&, const size_t&);
323 
324  void calc();
325  void calc_worker(const size_t&);
326  };
327 
328  namespace internals {
330  class CSVGuesser {
331  struct Guesser : public CSVReader {
332  using CSVReader::CSVReader;
333  void bad_row_handler(std::vector<std::string> record) override;
334  friend CSVGuesser;
335 
336  // Frequency counter of row length
337  std::unordered_map<size_t, size_t> row_tally = { { 0, 0 } };
338 
339  // Map row lengths to row num where they first occurred
340  std::unordered_map<size_t, size_t> row_when = { { 0, 0 } };
341  };
342 
343  public:
344  CSVGuesser(const std::string& _filename) : filename(_filename) {};
345  std::vector<char> delims = { ',', '|', '\t', ';', '^' };
346  void guess_delim();
347  bool first_guess();
348  void second_guess();
349 
350  char delim;
351  int header_row = 0;
352 
353  private:
354  std::string filename;
355  };
356  }
357 
361  CSVCollection operator ""_csv(const char*, size_t);
363  CSVCollection parse(const std::string& in, CSVFormat format = DEFAULT_CSV);
365 
367  std::unordered_map<std::string, DataType> csv_data_types(const std::string&);
369  CSVFileInfo get_file_info(const std::string& filename);
370  CSVFormat guess_format(const std::string& filename);
371  std::vector<std::string> get_col_names(
372  const std::string& filename,
373  const CSVFormat format = GUESS_CSV);
374  int get_col_pos(const std::string filename, const std::string col_name,
375  const CSVFormat format = GUESS_CSV);
377 }
const int CSV_NOT_FOUND
Integer indicating a requested column wasn&#39;t found.
Definition: csv_parser.hpp:30
- -
char quote_char
Quote character.
Definition: csv_parser.hpp:243
-
std::mutex feed_lock
Allow only one worker to write.
Definition: csv_parser.hpp:278
-
CSVCollection parse(const std::string &in, CSVFormat format=DEFAULT_CSV)
Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects.
Definition: csv_reader.cpp:182
-
Class for calculating statistics from CSV files and in-memory sources.
Definition: csv_parser.hpp:292
-
bool is_equal(double a, double b, double epsilon=0.001)
Definition: csv_reader.cpp:9
-
std::condition_variable feed_cond
Wake up worker.
Definition: csv_parser.hpp:279
- -
CSVFormat guess_format(const std::string &filename)
Guess the delimiter used by a delimiter-separated values file.
Definition: csv_reader.cpp:128
-
An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end()...
Definition: csv_parser.hpp:115
- -
const size_t ITERATION_CHUNK_SIZE
For functions that lazy load a large CSV, this determines how many bytes are read at a time...
Definition: csv_parser.hpp:84
-
CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)
Allows reading a CSV file in chunks, using overlapped threads for simulatenously reading from disk an...
Definition: csv_reader.cpp:275
-
char quote_char
Row number with columns (ignored if col_names is non-empty)
Definition: csv_parser.hpp:49
-
std::vector< std::string > get_col_names(const std::string &filename, const CSVFormat format=GUESS_CSV)
Return a CSV&#39;s column names.
Definition: csv_reader.cpp:209
-
DataType
Definition: data_type.h:22
-
std::vector< size_t > split_buffer
Positions where current row is split.
Definition: csv_parser.hpp:221
-
const CSVFormat DEFAULT_CSV_STRICT
RFC 4180 CSV format with strict parsing.
Definition: csv_parser.hpp:93
-
std::string format_row(const std::vector< std::string > &row, const std::string &delim=", ")
Definition: csv_reader.cpp:14
-
const CSVFormat GUESS_CSV
A dummy variable used to indicate delimiter should be guessed.
Definition: csv_parser.hpp:87
-
std::deque< CSVRow > records
Queue of parsed CSV rows.
Definition: csv_parser.hpp:228
-
ParseFlags
An enum used for describing the significance of each character with respect to CSV parsing...
Definition: csv_parser.hpp:209
-
Main class for parsing CSVs from files and in-memory sources.
Definition: csv_parser.hpp:103
- -
std::vector< std::string > col_names
Definition: csv_parser.hpp:64
-
int header
Should be left empty unless file doesn&#39;t include header.
Definition: csv_parser.hpp:52
-
long long int RowCount
Used for counting number of rows.
Definition: csv_parser.hpp:33
-
int header_row
Line number of the header row (zero-indexed)
Definition: csv_parser.hpp:244
-
Data structure for representing CSV rows.
Definition: csv_row.hpp:99
-
int get_col_pos(const std::string filename, const std::string col_name, const CSVFormat format=GUESS_CSV)
Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise.
Definition: csv_reader.cpp:221
-
Stores information about how to parse a CSV file.
Definition: csv_parser.hpp:47
-
The all encompassing namespace.
-
Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[].
Definition: csv_row.hpp:38
-
std::vector< CSVReader::ParseFlags > parse_flags
A table where the (i + 128)th slot gives the ParseFlags for ASCII character i.
Definition: csv_parser.hpp:247
-
std::deque< std::unique_ptr< std::string > > feed_buffer
Message queue for worker.
Definition: csv_parser.hpp:276
-
std::vector< std::string > col_names
RFC 4180 non-compliance -> throw an error.
Definition: csv_parser.hpp:55
- -
std::unordered_map< std::string, DataType > csv_data_types(const std::string &)
Useful for uploading CSV files to SQL databases.
Definition: csv_stat.cpp:219
-
const CSVFormat DEFAULT_CSV
RFC 4180 CSV format.
Definition: csv_parser.hpp:90
-
std::string filename
Definition: csv_parser.hpp:63
-
CSVFileInfo get_file_info(const std::string &filename)
Get basic information about a CSV file.
Definition: csv_reader.cpp:232
-
-
- - - - diff --git a/docs/csv__reader_8cpp.html b/docs/csv__reader_8cpp.html deleted file mode 100644 index 7ff89277..00000000 --- a/docs/csv__reader_8cpp.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_reader.cpp File Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv_reader.cpp File Reference
-
-
- -

Defines all functionality needed for basic CSV parsing. -More...

-
#include "csv_parser.hpp"
-
-

Go to the source code of this file.

- - - - - - - - -

-Namespaces

 csv
 The all encompassing namespace.
 
 csv::internals
 Stuff that is generally not of interest to end-users.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

bool csv::internals::is_equal (double a, double b, double epsilon=0.001)
 
std::string csv::internals::format_row (const std::vector< std::string > &row, const std::string &delim=", ")
 
Utility Functions
-CSVFormat csv::guess_format (const std::string &filename)
 Guess the delimiter used by a delimiter-separated values file.
 
std::vector< std::string > csv::get_col_names (const std::string &filename, CSVFormat format)
 Return a CSV's column names. More...
 
int csv::get_col_pos (const std::string filename, const std::string col_name, const CSVFormat format)
 Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise. More...
 
CSVFileInfo csv::get_file_info (const std::string &filename)
 Get basic information about a CSV file. More...
 
Shorthand Parsing Functions

Convienience functions for parsing small strings

-
CSVCollection csv::parse (const std::string &in, CSVFormat format)
 Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects. More...
 
CSVCollection csv::operator""_csv (const char *in, size_t n)
 Parse a RFC 4180 CSV string, returning a collection of CSVRow objects. More...
 
-

Detailed Description

-

Defines all functionality needed for basic CSV parsing.

- -

Definition in file csv_reader.cpp.

-
-
- - - - diff --git a/docs/csv__reader_8cpp.js b/docs/csv__reader_8cpp.js deleted file mode 100644 index 615c9fed..00000000 --- a/docs/csv__reader_8cpp.js +++ /dev/null @@ -1,11 +0,0 @@ -var csv__reader_8cpp = -[ - [ "format_row", "csv__reader_8cpp.html#a7ab04b6d1c0bc499c8f494dad23f1307", null ], - [ "get_col_names", "csv__reader_8cpp.html#a3d46fa01407dce7fd8f33d55604e74da", null ], - [ "get_col_pos", "csv__reader_8cpp.html#af36e457d080e4567f0939db04e193bff", null ], - [ "get_file_info", "csv__reader_8cpp.html#a59dfc8c288720becdd3a55485262e670", null ], - [ "guess_format", "csv__reader_8cpp.html#abd689f33ce9fe246fd3229c53654232c", null ], - [ "is_equal", "csv__reader_8cpp.html#a80e5b06741dfc9a8273e982bacafee98", null ], - [ "operator\"\"_csv", "csv__reader_8cpp.html#abcbc9a3ab5e6eb6905a995964c7cbf13", null ], - [ "parse", "csv__reader_8cpp.html#af2d1242068d0e53a248c61e83c8349d9", null ] -]; \ No newline at end of file diff --git a/docs/csv__reader_8cpp_source.html b/docs/csv__reader_8cpp_source.html deleted file mode 100644 index abfaedbf..00000000 --- a/docs/csv__reader_8cpp_source.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_reader.cpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_reader.cpp
-
-
-Go to the documentation of this file.
1 #include "csv_parser.hpp"
2 
7 namespace csv {
8  namespace internals {
9  bool is_equal(double a, double b, double epsilon) {
11  return std::abs(a - b) < epsilon;
12  }
13 
14  std::string format_row(const std::vector<std::string>& row, const std::string& delim) {
16  std::stringstream ret;
17  for (size_t i = 0; i < row.size(); i++) {
18  ret << row[i];
19  if (i + 1 < row.size()) ret << delim;
20  else ret << std::endl;
21  }
22 
23  return ret.str();
24  }
25 
26  //
27  // CSVGuesser
28  //
29  void CSVGuesser::Guesser::bad_row_handler(std::vector<std::string> record) {
31  if (row_tally.find(record.size()) != row_tally.end()) row_tally[record.size()]++;
32  else {
33  row_tally[record.size()] = 1;
34  row_when[record.size()] = this->row_num + 1;
35  }
36  }
37 
44  if (!first_guess()) second_guess();
45  }
46 
59  CSVFormat format = DEFAULT_CSV;
60  char current_delim{ ',' };
61  RowCount max_rows = 0;
62  RowCount temp_rows = 0;
63  size_t max_cols = 0;
64 
65  for (size_t i = 0; i < delims.size(); i++) {
66  format.delim = delims[i];
67  CSVReader guesser(this->filename, format);
68 
69  // WORKAROUND on Unix systems because certain newlines
70  // get double counted
71  // temp_rows = guesser.correct_rows;
72  temp_rows = std::min(guesser.correct_rows, (RowCount)100);
73  if ((guesser.row_num >= max_rows) &&
74  (guesser.get_col_names().size() > max_cols)) {
75  max_rows = temp_rows;
76  max_cols = guesser.get_col_names().size();
77  current_delim = delims[i];
78  }
79  }
80 
81  this->delim = current_delim;
82 
83  // If there are only a few rows/columns, trying guessing again
84  return (max_rows > 10 && max_cols > 2);
85  }
86 
94  CSVFormat format = DEFAULT_CSV;
95  size_t max_rlen = 0;
96  size_t header = 0;
97 
98  for (auto it = delims.begin(); it != delims.end(); ++it) {
99  format.delim = *it;
100  Guesser guess(format);
101  guess.read_csv(filename, 500000);
102 
103  // Most common row length
104  auto max = std::max_element(guess.row_tally.begin(), guess.row_tally.end(),
105  [](const std::pair<size_t, size_t>& x,
106  const std::pair<size_t, size_t>& y) {
107  return x.second < y.second; });
108 
109  // Idea: If CSV has leading comments, actual rows don't start
110  // until later and all actual rows get rejected because the CSV
111  // parser mistakenly uses the .size() of the comment rows to
112  // judge whether or not they are valid.
113  //
114  // The first part of the if clause means we only change the header
115  // row if (number of rejected rows) > (number of actual rows)
116  if (max->second > guess.records.size() &&
117  (max->first > max_rlen)) {
118  max_rlen = max->first;
119  header = guess.row_when[max_rlen];
120  }
121  }
122 
123  this->header_row = static_cast<int>(header);
124  }
125  }
126 
128  CSVFormat guess_format(const std::string& filename) {
129  internals::CSVGuesser guesser(filename);
130  guesser.guess_delim();
131  return { guesser.delim, '"', guesser.header_row };
132  }
133 
134  std::vector<CSVReader::ParseFlags> CSVReader::make_flags() const {
140  std::vector<ParseFlags> ret;
141  for (int i = -128; i < 128; i++) {
142  char ch = char(i);
143 
144  if (ch == this->delimiter)
145  ret.push_back(DELIMITER);
146  else if (ch == this->quote_char)
147  ret.push_back(QUOTE);
148  else if (ch == '\r' || ch == '\n')
149  ret.push_back(NEWLINE);
150  else
151  ret.push_back(NOT_SPECIAL);
152  }
153 
154  return ret;
155  }
156 
157  void CSVReader::bad_row_handler(std::vector<std::string> record) {
163  if (this->strict) {
164  std::string problem;
165  if (record.size() > this->col_names->size()) problem = "too long";
166  else problem = "too short";
167 
168  throw std::runtime_error("Line " + problem + " around line " +
169  std::to_string(correct_rows) + " near\n" +
170  internals::format_row(record)
171  );
172  }
173  };
174 
182  CSVCollection parse(const std::string& in, CSVFormat format) {
183  CSVReader parser(format);
184  parser.feed(in);
185  parser.end_feed();
186  return parser.records;
187  }
188 
197  CSVCollection operator ""_csv(const char* in, size_t n) {
198  std::string temp(in, n);
199  return parse(temp);
200  }
201 
209  std::vector<std::string> get_col_names(const std::string& filename, CSVFormat format) {
210  CSVReader reader(filename, format);
211  return reader.get_col_names();
212  }
213 
222  const std::string filename,
223  const std::string col_name,
224  const CSVFormat format) {
225  CSVReader reader(filename, format);
226  return reader.index_of(col_name);
227  }
228 
232  CSVFileInfo get_file_info(const std::string& filename) {
233  CSVReader reader(filename);
234  CSVFormat format = reader.get_format();
235  for (auto& row: reader);
236 
237  CSVFileInfo info = {
238  filename,
239  reader.get_col_names(),
240  format.delim,
241  reader.correct_rows,
242  (int)reader.get_col_names().size()
243  };
244 
245  return info;
246  }
247 
252  delimiter(format.delim), quote_char(format.quote_char),
253  header_row(format.header), strict(format.strict) {
254  if (!format.col_names.empty()) {
255  this->header_row = -1;
256  this->col_names = std::make_shared<internals::ColNames>(format.col_names);
257  }
258  };
259 
275  CSVReader::CSVReader(const std::string& filename, CSVFormat format) {
276  if (format.delim == '\0')
277  format = guess_format(filename);
278 
279  this->col_names = std::make_shared<internals::ColNames>(format.col_names);
280  delimiter = format.delim;
281  quote_char = format.quote_char;
282  header_row = format.header;
283  strict = format.strict;
284 
285  // Read first 500KB of CSV
286  read_csv(filename, 500000, false);
287  }
288 
291  return {
292  this->delimiter,
293  this->quote_char,
294  this->header_row,
295  this->col_names->col_names
296  };
297  }
298 
300  std::vector<std::string> CSVReader::get_col_names() const {
301  return this->col_names->get_col_names();
302  }
303 
307  int CSVReader::index_of(const std::string& col_name) const {
308  auto col_names = this->get_col_names();
309  for (size_t i = 0; i < col_names.size(); i++)
310  if (col_names[i] == col_name) return (int)i;
311 
312  return CSV_NOT_FOUND;
313  }
314 
315  void CSVReader::feed(std::unique_ptr<std::string>&& buff) {
316  this->feed(std::string_view(buff->c_str()));
317  }
318 
319  void CSVReader::feed(std::string_view in) {
326  if (parse_flags.empty()) parse_flags = this->make_flags();
327 
328  bool quote_escape = false; // Are we currently in a quote escaped field?
329 
330  for (size_t c_pos = 0; c_pos < in.size(); c_pos++) {
331  const char& ch = in[c_pos];
332  if (!quote_escape) {
333  switch (this->parse_flags[ch + 128]) {
334  case NOT_SPECIAL:
335  this->record_buffer += ch;
336  break;
337  case DELIMITER:
338  this->split_buffer.push_back(this->record_buffer.size());
339  break;
340  case NEWLINE:
341  // End of record -> Write record
342  if (in[c_pos + 1] == '\n') // Catches CRLF (or LFLF)
343  ++c_pos;
344  this->write_record();
345  break;
346  default: // Quote
347  // Case: Previous character was delimiter or newline
348  if (c_pos) { // Don't deref past beginning
349  auto prev_ch = this->parse_flags[in[c_pos - 1] + 128];
350  if (prev_ch >= DELIMITER) quote_escape = true;
351  }
352  break;
353  }
354  }
355  else {
356  switch (this->parse_flags[ch + 128]) {
357  case NOT_SPECIAL:
358  case DELIMITER:
359  case NEWLINE:
360  // Treat as a regular character
361  this->record_buffer += ch;
362  break;
363  default: // Quote
364  auto next_ch = this->parse_flags[in[c_pos + 1] + 128];
365  if (next_ch >= DELIMITER) {
366  // Case: Delim or newline => end of field
367  quote_escape = false;
368  }
369  else {
370  // Case: Escaped quote
371  this->record_buffer += ch;
372 
373  if (next_ch == QUOTE)
374  ++c_pos; // Case: Two consecutive quotes
375  else if (this->strict)
376  throw std::runtime_error("Unescaped single quote around line " +
377  std::to_string(this->correct_rows) + " near:\n" +
378  std::string(in.substr(c_pos, 100)));
379  }
380  }
381  }
382  }
383  }
384 
389  this->write_record();
390  }
391 
397  size_t col_names_size = this->col_names->size();
398  this->min_row_len = std::min(this->min_row_len, this->record_buffer.size());
399  auto row = CSVRow(
400  std::move(this->record_buffer),
401  std::move(this->split_buffer),
402  this->col_names
403  );
404 
405  if (this->row_num > this->header_row) {
406  // Make sure record is of the right length
407  if (row.size() == col_names_size) {
408  this->correct_rows++;
409  this->records.push_back(row);
410  }
411  else {
412  /* 1) Zero-length record, probably caused by extraneous newlines
413  * 2) Too short or too long
414  */
415  this->row_num--;
416  if (!row.empty())
417  bad_row_handler(std::vector<std::string>(row));
418  }
419  }
420  else if (this->row_num == this->header_row) {
421  this->col_names = std::make_shared<internals::ColNames>(
422  std::vector<std::string>(row));
423  } // else: Ignore rows before header row
424 
425  // Some memory allocation optimizations
426  this->record_buffer = "";
427  if (this->record_buffer.capacity() < size_t(this->min_row_len * 1.5))
428  record_buffer.reserve(size_t(this->min_row_len * 1.5));
429 
430  this->split_buffer = {};
431  if (this->split_buffer.capacity() < col_names_size)
432  split_buffer.reserve(col_names_size);
433 
434  this->row_num++;
435  }
436 
441  while (true) {
442  std::unique_lock<std::mutex> lock{ this->feed_lock }; // Get lock
443  this->feed_cond.wait(lock, // Wait
444  [this] { return !(this->feed_buffer.empty()); });
445 
446  // Wake-up
447  auto in = std::move(this->feed_buffer.front());
448  this->feed_buffer.pop_front();
449 
450  // Nullptr --> Die
451  if (!in) break;
452 
453  lock.unlock(); // Release lock
454  this->feed(std::move(in));
455  }
456  }
457 
467  void CSVReader::read_csv(const std::string& filename, const size_t& bytes, bool close) {
468  if (!this->infile) {
469  #ifdef _MSC_BUILD
470  // Silence compiler warnings in Microsoft Visual C++
471  size_t err = fopen_s(&(this->infile), filename.c_str(), "rb");
472  if (err)
473  throw std::runtime_error("Cannot open file " + filename);
474  #else
475  this->infile = std::fopen(filename.c_str(), "rb");
476  if (!this->infile)
477  throw std::runtime_error("Cannot open file " + filename);
478  #endif
479  }
480 
481  const size_t BUFFER_UPPER_LIMIT = std::min(bytes, (size_t)1000000);
482  std::unique_ptr<char[]> line_buffer(new char[PAGE_SIZE]);
483  auto buffer = std::make_unique<std::string>();
484  std::thread worker(&CSVReader::read_csv_worker, this);
485 
486  for (size_t processed = 0; processed < bytes; ) {
487  char * result = std::fgets(line_buffer.get(), PAGE_SIZE, this->infile);
488  if (result == NULL) break;
489  else {
490  *buffer += line_buffer.get();
491  if (std::feof(this->infile)) break;
492  }
493 
494  if (buffer->size() >= BUFFER_UPPER_LIMIT) {
495  processed += buffer->size();
496  std::unique_lock<std::mutex> lock{ this->feed_lock };
497  this->feed_buffer.push_back(std::move(buffer));
498  this->feed_cond.notify_one();
499  buffer = std::make_unique<std::string>(); // New pointer
500  }
501  }
502 
503  // Feed remaining bits
504  std::unique_lock<std::mutex> lock{ this->feed_lock };
505  this->feed_buffer.push_back(std::move(buffer));
506  this->feed_buffer.push_back(nullptr); // Termination signal
507  this->feed_cond.notify_one();
508  lock.unlock();
509  worker.join();
510 
511  if (std::feof(this->infile)) {
512  this->end_feed();
513  this->close();
514  }
515  }
516 
518  if (this->infile) {
519  std::fclose(this->infile);
520  this->infile = nullptr;
521  }
522  }
523 
539  if (this->records.empty()) {
540  if (!this->eof()) {
541  this->read_csv("", ITERATION_CHUNK_SIZE, false);
542  }
543  else return false; // Stop reading
544  }
545 
546  row = std::move(this->records.front());
547  this->records.pop_front();
548 
549  return true;
550  }
551 }
bool strict
Strictness of parser.
Definition: csv_parser.hpp:245
-
const int CSV_NOT_FOUND
Integer indicating a requested column wasn&#39;t found.
Definition: csv_parser.hpp:30
-
int index_of(const std::string &col_name) const
Return the index of the column name if found or csv::CSV_NOT_FOUND otherwise.
Definition: csv_reader.cpp:307
- -
char quote_char
Quote character.
Definition: csv_parser.hpp:243
-
std::mutex feed_lock
Allow only one worker to write.
Definition: csv_parser.hpp:278
-
CSVCollection parse(const std::string &in, CSVFormat format=DEFAULT_CSV)
Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects.
Definition: csv_reader.cpp:182
- -
bool read_row(CSVRow &row)
Retrieve rows as CSVRow objects, returning true if more rows are available.
Definition: csv_reader.cpp:538
-
bool is_equal(double a, double b, double epsilon=0.001)
Definition: csv_reader.cpp:9
-
std::condition_variable feed_cond
Wake up worker.
Definition: csv_parser.hpp:279
-
CSVFormat guess_format(const std::string &filename)
Guess the delimiter used by a delimiter-separated values file.
Definition: csv_reader.cpp:128
-
void write_record()
Definition: csv_reader.cpp:392
-
CSVFormat get_format() const
Return the format of the original raw CSV.
Definition: csv_reader.cpp:290
- - -
void read_csv_worker()
Definition: csv_reader.cpp:437
-
const size_t ITERATION_CHUNK_SIZE
For functions that lazy load a large CSV, this determines how many bytes are read at a time...
Definition: csv_parser.hpp:84
-
void close()
Close the open file handle. Automatically called by ~CSVReader().
Definition: csv_reader.cpp:517
-
CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)
Allows reading a CSV file in chunks, using overlapped threads for simulatenously reading from disk an...
Definition: csv_reader.cpp:275
-
char quote_char
Row number with columns (ignored if col_names is non-empty)
Definition: csv_parser.hpp:49
-
std::vector< std::string > get_col_names(const std::string &filename, const CSVFormat format=GUESS_CSV)
Return a CSV&#39;s column names.
Definition: csv_reader.cpp:209
-
size_t min_row_len
Shortest row seen so far; used to determine how much memory to allocate for new strings.
Definition: csv_parser.hpp:224
-
std::vector< size_t > split_buffer
Positions where current row is split.
Definition: csv_parser.hpp:221
-
std::string format_row(const std::vector< std::string > &row, const std::string &delim=", ")
Definition: csv_reader.cpp:14
-
void read_csv(const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)
Parse a CSV file using multiple threads.
Definition: csv_reader.cpp:467
-
char delimiter
Delimiter character.
Definition: csv_parser.hpp:242
-
std::deque< CSVRow > records
Queue of parsed CSV rows.
Definition: csv_parser.hpp:228
-
std::vector< CSVReader::ParseFlags > make_flags() const
Definition: csv_reader.cpp:134
-
Main class for parsing CSVs from files and in-memory sources.
Definition: csv_parser.hpp:103
- -
std::shared_ptr< internals::ColNames > col_names
Pointer to a object containing column information.
Definition: csv_parser.hpp:255
-
void feed(std::string_view in)
Definition: csv_reader.cpp:319
-
int header
Should be left empty unless file doesn&#39;t include header.
Definition: csv_parser.hpp:52
-
long long int RowCount
Used for counting number of rows.
Definition: csv_parser.hpp:33
-
std::vector< std::string > get_col_names() const
Return the CSV&#39;s column names as a vector of strings.
Definition: csv_reader.cpp:300
- -
int header_row
Line number of the header row (zero-indexed)
Definition: csv_parser.hpp:244
-
Data structure for representing CSV rows.
Definition: csv_row.hpp:99
-
int get_col_pos(const std::string filename, const std::string col_name, const CSVFormat format=GUESS_CSV)
Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise.
Definition: csv_reader.cpp:221
- -
std::string record_buffer
Buffer for current row being parsed.
Definition: csv_parser.hpp:218
-
std::FILE * infile
Current file handle. Destroyed by ~CSVReader().
Definition: csv_parser.hpp:272
-
Stores information about how to parse a CSV file.
Definition: csv_parser.hpp:47
-
RowCount row_num
How many lines have been parsed so far.
Definition: csv_parser.hpp:184
-
RowCount correct_rows
How many correct rows (minus header) have been parsed so far.
Definition: csv_parser.hpp:187
-
The all encompassing namespace.
-
std::vector< CSVReader::ParseFlags > parse_flags
A table where the (i + 128)th slot gives the ParseFlags for ASCII character i.
Definition: csv_parser.hpp:247
-
std::deque< std::unique_ptr< std::string > > feed_buffer
Message queue for worker.
Definition: csv_parser.hpp:276
-
std::vector< std::string > col_names
RFC 4180 non-compliance -> throw an error.
Definition: csv_parser.hpp:55
-
virtual void bad_row_handler(std::vector< std::string >)
Definition: csv_reader.cpp:157
-
const CSVFormat DEFAULT_CSV
RFC 4180 CSV format.
Definition: csv_parser.hpp:90
-
CSVFileInfo get_file_info(const std::string &filename)
Get basic information about a CSV file.
Definition: csv_reader.cpp:232
-
-
- - - - diff --git a/docs/csv__reader__iterator_8cpp_source.html b/docs/csv__reader__iterator_8cpp_source.html deleted file mode 100644 index 9063d636..00000000 --- a/docs/csv__reader__iterator_8cpp_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_reader_iterator.cpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_reader_iterator.cpp
-
-
-
1 #include "csv_parser.hpp"
2 
3 namespace csv {
9  CSVReader::iterator ret(this, std::move(this->records.front()));
10  this->records.pop_front();
11  return ret;
12  }
13 
19  return CSVReader::iterator();
20  }
21 
23  // CSVReader::iterator //
25 
26  CSVReader::iterator::iterator(CSVReader* _daddy, CSVRow&& _row) :
27  daddy(_daddy) {
28  row = std::move(_row);
29  }
30 
33  return this->row;
34  }
35 
38  return &(this->row);
39  }
40 
46  if (daddy->records.empty()) {
47  if (!daddy->eof())
48  daddy->read_csv("", ITERATION_CHUNK_SIZE, false);
49  else {
50  this->daddy = nullptr; // this == end()
51  return *this;
52  }
53  }
54 
55  this->row = std::move(daddy->records.front());
56  this->daddy->records.pop_front();
57  return *this;
58  }
59 
61  auto temp = *this;
62  if (daddy->records.empty()) {
63  if (!daddy->eof())
64  daddy->read_csv("", ITERATION_CHUNK_SIZE, false);
65  else {
66  this->daddy = nullptr;
67  return temp;
68  }
69  }
70 
71  this->row = std::move(daddy->records.front());
72  this->daddy->records.pop_front();
73  return temp;
74  }
75 
80  return (this->daddy == other.daddy) && (this->i == other.i);
81  }
82 }
iterator & operator++()
Advance the iterator by one row. If this CSVReader has an associated file, then the iterator will laz...
-
An input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end()...
Definition: csv_parser.hpp:115
-
const size_t ITERATION_CHUNK_SIZE
For functions that lazy load a large CSV, this determines how many bytes are read at a time...
Definition: csv_parser.hpp:84
-
reference operator*()
Access the CSVRow held by the iterator.
-
iterator begin()
Return an iterator to the first row in the reader.
-
std::deque< CSVRow > records
Queue of parsed CSV rows.
Definition: csv_parser.hpp:228
-
Main class for parsing CSVs from files and in-memory sources.
Definition: csv_parser.hpp:103
-
pointer operator->()
Return a pointer to the CSVRow the iterator has stopped at.
-
Data structure for representing CSV rows.
Definition: csv_row.hpp:99
- -
bool operator==(const iterator &) const
Returns true if iterators were constructed from the same CSVReader and point to the same row...
-
The all encompassing namespace.
-
iterator end()
A placeholder for the imaginary past the end row in a CSV. Attempting to deference this will lead to ...
-
-
- - - - diff --git a/docs/csv__row_8cpp_source.html b/docs/csv__row_8cpp_source.html deleted file mode 100644 index 5fe0759b..00000000 --- a/docs/csv__row_8cpp_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_row.cpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_row.cpp
-
-
-
1 #include "csv_row.hpp"
2 #include <functional>
3 
4 namespace csv {
5  namespace internals {
7  // ColNames //
9 
10  ColNames::ColNames(const std::vector<std::string>& _cnames)
11  : col_names(_cnames) {
12  for (size_t i = 0; i < _cnames.size(); i++) {
13  this->col_pos[_cnames[i]] = i;
14  }
15  }
16 
17  std::vector<std::string> ColNames::get_col_names() const {
18  return this->col_names;
19  }
20 
21  size_t ColNames::size() const {
22  return this->col_names.size();
23  }
24  }
25 
27  size_t CSVRow::size() const {
28  return splits.size() + 1;
29  }
30 
34  std::string_view CSVRow::get_string_view(size_t n) const {
35  std::string_view ret(this->row_str);
36  size_t beg = 0, end = row_str.size(),
37  r_size = this->size();
38 
39  if (n >= r_size)
40  throw std::runtime_error("Index out of bounds.");
41 
42  if (!splits.empty()) {
43  if (n == 0 || r_size == 2) {
44  if (n == 0) end = this->splits[0];
45  else beg = this->splits[0];
46  }
47  else {
48  beg = this->splits[n - 1];
49  if (n != r_size - 1) end = this->splits[n];
50  }
51  }
52 
53  return ret.substr(
54  beg,
55  end - beg // Number of characters
56  );
57  }
58 
67  CSVField CSVRow::operator[](size_t n) const {
68  return CSVField(this->get_string_view(n));
69  }
70 
79  CSVField CSVRow::operator[](const std::string& col_name) const {
80  auto col_pos = this->col_names->col_pos.find(col_name);
81  if (col_pos != this->col_names->col_pos.end())
82  return this->operator[](col_pos->second);
83 
84  throw std::runtime_error("Can't find a column named " + col_name);
85  }
86 
87  CSVRow::operator std::vector<std::string>() const {
93  std::vector<std::string> ret;
94  for (size_t i = 0; i < size(); i++)
95  ret.push_back(std::string(this->get_string_view(i)));
96 
97  return ret;
98  }
99 
101  // CSVField Methods //
103 
108  this->get_value();
109  return (DataType)_type;
110  }
111 
112  #ifndef DOXYGEN_SHOULD_SKIP_THIS
113  void CSVField::get_value() {
114  /* Check to see if value has been cached previously, if not
115  * evaluate it
116  */
117  if (_type < 0) {
118  auto dtype = internals::data_type(this->sv, &this->value);
119  this->_type = (int)dtype;
120  }
121  }
122  #endif
123 
124  //
125  // CSVField Utility Methods
126  //
127 
128  bool CSVField::operator==(std::string_view other) const {
129  return other == this->sv;
130  }
131 
132  bool CSVField::operator==(const long double& other) {
133  return other == this->get<long double>();
134  }
135 
137  // CSVRow Iterator //
139 
142  return CSVRow::iterator(this, 0);
143  }
144 
150  return CSVRow::iterator(this, (int)this->size());
151  }
152 
153  CSVRow::reverse_iterator CSVRow::rbegin() const {
154  return std::make_reverse_iterator<CSVRow::iterator>(this->end());
155  }
156 
157  CSVRow::reverse_iterator CSVRow::rend() const {
158  return std::make_reverse_iterator<CSVRow::iterator>(this->begin());
159  }
160 
161  CSVRow::iterator::iterator(const CSVRow* _reader, int _i)
162  : daddy(_reader), i(_i) {
163  if (_i < this->daddy->size())
164  this->field = std::make_shared<CSVField>(
165  this->daddy->operator[](_i));
166  else
167  this->field = nullptr;
168  }
169 
170  CSVRow::iterator::reference CSVRow::iterator::operator*() const {
171  return *(this->field.get());
172  }
173 
174  CSVRow::iterator::pointer CSVRow::iterator::operator->() const {
175  return this->field.get();
176  }
177 
178  CSVRow::iterator& CSVRow::iterator::operator++() {
179  this->i++;
180  if (this->i < this->daddy->size())
181  this->field = std::make_shared<CSVField>(
182  this->daddy->operator[](i));
183  else
184  this->field = nullptr;
185  return *this;
186  }
187 
188  CSVRow::iterator CSVRow::iterator::operator++(int n) {
189  return CSVRow::iterator(this->daddy, i + n);
190  }
191 
192  CSVRow::iterator& CSVRow::iterator::operator--() {
193  this->i--;
194  this->field = std::make_shared<CSVField>(
195  this->daddy->operator[](this->i));
196  return *this;
197  }
198 
199  CSVRow::iterator CSVRow::iterator::operator--(int n) {
200  return this->operator++(-n);
201  }
202 
203  CSVRow::iterator CSVRow::iterator::operator+(difference_type n) const {
204  return CSVRow::iterator(this->daddy, i + (int)n);
205  }
206 
207  CSVRow::iterator CSVRow::iterator::operator-(difference_type n) const {
208  return CSVRow::iterator::operator+(-n);
209  }
210 
211  bool CSVRow::iterator::operator==(const iterator& other) const {
212  return this->i == other.i;
213  }
214 }
iterator & operator++()
Advance the iterator by one row. If this CSVReader has an associated file, then the iterator will laz...
-
iterator end() const
Return an iterator pointing to just after the end of the CSVRow.
Definition: csv_row.cpp:149
-
std::vector< std::string > get_col_names(const std::string &filename, const CSVFormat format=GUESS_CSV)
Return a CSV&#39;s column names.
Definition: csv_reader.cpp:209
-
DataType
Definition: data_type.h:22
-
size_t size() const
Return the number of fields in this row.
Definition: csv_row.cpp:27
-
iterator begin()
Return an iterator to the first row in the reader.
- -
DataType data_type(std::string_view in, long double *const out)
Definition: data_type.cpp:23
-
std::shared_ptr< internals::ColNames > col_names
Pointer to a object containing column information.
Definition: csv_parser.hpp:255
-
Data structure for representing CSV rows.
Definition: csv_row.hpp:99
-
iterator begin() const
Return an iterator pointing to the first field.
Definition: csv_row.cpp:141
-
std::reverse_iterator< iterator > reverse_iterator
A reverse iterator over the contents of a CSVRow.
Definition: csv_row.hpp:153
-
The all encompassing namespace.
-
Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[].
Definition: csv_row.hpp:38
-
iterator end()
A placeholder for the imaginary past the end row in a CSV. Attempting to deference this will lead to ...
-
CSVField operator[](size_t n) const
Return a CSVField object corrsponding to the nth value in the row.
Definition: csv_row.cpp:67
-
std::string_view get_string_view(size_t n) const
Return a string view of the nth field.
Definition: csv_row.cpp:34
-
DataType type()
Return the type number of the stored value in accordance with the DataType enum.
Definition: csv_row.cpp:107
-
A random access iterator over the contents of a CSV row. Each iterator points to a CSVField...
Definition: csv_row.hpp:123
-
-
- - - - diff --git a/docs/csv__row_8hpp_source.html b/docs/csv__row_8hpp_source.html deleted file mode 100644 index 23a10a99..00000000 --- a/docs/csv__row_8hpp_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_row.hpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_row.hpp
-
-
-
1 #pragma once
2 // Auxiliary data structures for CSV parser
3 
4 #include "data_type.h"
5 #include <math.h>
6 #include <vector>
7 #include <string>
8 #include <string_view>
9 #include <iterator>
10 #include <unordered_map> // For ColNames
11 #include <memory> // For CSVField
12 #include <limits> // For CSVField
13 
14 namespace csv {
15  namespace internals {
23  struct ColNames {
24  ColNames(const std::vector<std::string>&);
25  std::vector<std::string> col_names;
26  std::unordered_map<std::string, size_t> col_pos;
27 
28  std::vector<std::string> get_col_names() const;
29  size_t size() const;
30  };
31  }
32 
38  class CSVField {
39  public:
40  CSVField(std::string_view _sv) : sv(_sv) { };
41 
55  template<typename T=std::string_view> T get() {
56  auto dest_type = internals::type_num<T>();
57  if (dest_type >= CSV_INT && is_num()) {
58  if (internals::type_num<T>() < this->type())
59  throw std::runtime_error("Overflow error.");
60 
61  return static_cast<T>(this->value);
62  }
63 
64  throw std::runtime_error("Attempted to convert a value of type " +
65  internals::type_name(type()) + " to " + internals::type_name(dest_type) + ".");
66  }
67 
68  bool operator==(std::string_view other) const;
69  bool operator==(const long double& other);
70 
71  DataType type();
72  bool is_null() { return type() == CSV_NULL; }
73  bool is_str() { return type() == CSV_STRING; }
74  bool is_num() { return type() >= CSV_INT; }
75  bool is_int() {
76  return (type() >= CSV_INT) && (type() <= CSV_LONG_LONG_INT);
77  }
78  bool is_float() { return type() == CSV_DOUBLE; };
79 
80  private:
81  long double value = 0;
82  std::string_view sv;
83  int _type = -1;
84  void get_value();
85  };
86 
99  class CSVRow {
100  public:
101  CSVRow() = default;
102  CSVRow(std::string&& _str, std::vector<size_t>&& _splits,
103  std::shared_ptr<internals::ColNames> _cnames = nullptr) :
104  row_str(std::move(_str)),
105  splits(std::move(_splits)),
106  col_names(_cnames)
107  {};
108 
109  bool empty() const { return this->row_str.empty(); }
110  size_t size() const;
111 
113  CSVField operator[](size_t n) const;
115  CSVField operator[](const std::string&) const;
116  std::string_view get_string_view(size_t n) const;
117  operator std::vector<std::string>() const;
119 
123  class iterator {
124  public:
125  using value_type = CSVField;
126  using difference_type = int;
127  using pointer = CSVField * ;
128  using reference = CSVField & ;
129  using iterator_category = std::random_access_iterator_tag;
130 
131  iterator(const CSVRow*, int i);
132 
133  reference operator*() const;
134  pointer operator->() const;
135 
136  iterator operator++(int);
137  iterator& operator++();
138  iterator operator--(int);
139  iterator& operator--();
140  iterator operator+(difference_type n) const;
141  iterator operator-(difference_type n) const;
142 
143  bool operator==(const iterator&) const;
144  bool operator!=(const iterator& other) const { return !operator==(other); }
145 
146  private:
147  const CSVRow * daddy = nullptr; // Pointer to parent
148  std::shared_ptr<CSVField> field = nullptr; // Current field pointed at
149  int i = 0; // Index of current field
150  };
151 
153  using reverse_iterator = std::reverse_iterator<iterator>;
154 
158  iterator begin() const;
160  iterator end() const;
161  reverse_iterator rbegin() const;
162  reverse_iterator rend() const;
164 
165  private:
166  std::shared_ptr<internals::ColNames> col_names = nullptr;
167  std::string row_str;
168  std::vector<size_t> splits;
169  };
170 
171  // get() specializations
172  template<>
173  inline std::string CSVField::get<std::string>() {
174  return std::string(this->sv);
175  }
176 
177  template<>
178  inline std::string_view CSVField::get<std::string_view>() {
179  return this->sv;
180  }
181 
182  template<>
183  inline long double CSVField::get<long double>() {
184  if (!is_num())
185  throw std::runtime_error("Not a number.");
186 
187  return this->value;
188  }
189 }
DataType
Definition: data_type.h:22
-
A data structure for handling column name information.
Definition: csv_row.hpp:23
-
Data structure for representing CSV rows.
Definition: csv_row.hpp:99
-
std::reverse_iterator< iterator > reverse_iterator
A reverse iterator over the contents of a CSVRow.
Definition: csv_row.hpp:153
-
The all encompassing namespace.
-
Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[].
Definition: csv_row.hpp:38
-
A random access iterator over the contents of a CSV row. Each iterator points to a CSVField...
Definition: csv_row.hpp:123
-
-
- - - - diff --git a/docs/csv__stat_8cpp.html b/docs/csv__stat_8cpp.html deleted file mode 100644 index 64833eaf..00000000 --- a/docs/csv__stat_8cpp.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_stat.cpp File Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv_stat.cpp File Reference
-
-
-
#include "csv_parser.hpp"
-
-

Go to the source code of this file.

- - - - - -

-Namespaces

 csv
 The all encompassing namespace.
 
- - - - - -

-Functions

Utility Functions
std::unordered_map< std::string, DataType > csv::csv_data_types (const std::string &filename)
 Useful for uploading CSV files to SQL databases. More...
 
-

Detailed Description

-

Calculates statistics from CSV files

- -

Definition in file csv_stat.cpp.

-
-
- - - - diff --git a/docs/csv__stat_8cpp.js b/docs/csv__stat_8cpp.js deleted file mode 100644 index 805a8af1..00000000 --- a/docs/csv__stat_8cpp.js +++ /dev/null @@ -1,4 +0,0 @@ -var csv__stat_8cpp = -[ - [ "csv_data_types", "csv__stat_8cpp.html#ad4aa91cb61332520a139962f5b55944f", null ] -]; \ No newline at end of file diff --git a/docs/csv__stat_8cpp_source.html b/docs/csv__stat_8cpp_source.html deleted file mode 100644 index c3af8c6b..00000000 --- a/docs/csv__stat_8cpp_source.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_stat.cpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_stat.cpp
-
-
-Go to the documentation of this file.
1 #include "csv_parser.hpp"
2 
3 namespace csv {
8  CSVStat::CSVStat(std::string filename, CSVFormat format) :
9  CSVReader(filename, format) {
14  while (!this->eof()) {
15  this->read_csv("", ITERATION_CHUNK_SIZE, false);
16  this->calc();
17  }
18 
19  if (!this->records.empty())
20  this->calc();
21  }
22 
23  void CSVStat::end_feed() {
25  this->calc();
26  }
27 
29  std::vector<long double> CSVStat::get_mean() const {
30  std::vector<long double> ret;
31  for (size_t i = 0; i < this->col_names->size(); i++) {
32  ret.push_back(this->rolling_means[i]);
33  }
34  return ret;
35  }
36 
38  std::vector<long double> CSVStat::get_variance() const {
39  std::vector<long double> ret;
40  for (size_t i = 0; i < this->col_names->size(); i++) {
41  ret.push_back(this->rolling_vars[i]/(this->n[i] - 1));
42  }
43  return ret;
44  }
45 
47  std::vector<long double> CSVStat::get_mins() const {
48  std::vector<long double> ret;
49  for (size_t i = 0; i < this->col_names->size(); i++) {
50  ret.push_back(this->mins[i]);
51  }
52  return ret;
53  }
54 
56  std::vector<long double> CSVStat::get_maxes() const {
57  std::vector<long double> ret;
58  for (size_t i = 0; i < this->col_names->size(); i++) {
59  ret.push_back(this->maxes[i]);
60  }
61  return ret;
62  }
63 
65  std::vector<CSVStat::FreqCount> CSVStat::get_counts() const {
66  std::vector<FreqCount> ret;
67  for (size_t i = 0; i < this->col_names->size(); i++) {
68  ret.push_back(this->counts[i]);
69  }
70  return ret;
71  }
72 
74  std::vector<CSVStat::TypeCount> CSVStat::get_dtypes() const {
75  std::vector<TypeCount> ret;
76  for (size_t i = 0; i < this->col_names->size(); i++) {
77  ret.push_back(this->dtypes[i]);
78  }
79  return ret;
80  }
81 
82  void CSVStat::calc() {
84  for (size_t i = 0; i < this->col_names->size(); i++) {
85  dtypes.push_back({});
86  counts.push_back({});
87  rolling_means.push_back(0);
88  rolling_vars.push_back(0);
89  mins.push_back(NAN);
90  maxes.push_back(NAN);
91  n.push_back(0);
92  }
93 
94  std::vector<std::thread> pool;
95 
96  // Start threads
97  for (size_t i = 0; i < this->col_names->size(); i++)
98  pool.push_back(std::thread(&CSVStat::calc_worker, this, i));
99 
100  // Block until done
101  for (auto& th: pool)
102  th.join();
103 
104  this->records.clear();
105  }
106 
107  void CSVStat::calc_worker(const size_t &i) {
113  auto current_record = this->records.begin();
114  for (size_t processed = 0; current_record != this->records.end(); processed++) {
115  auto current_field = (*current_record)[i];
116 
117  // Optimization: Don't count() if there's too many distinct values in the first 1000 rows
118  if (processed < 1000 || this->counts[i].size() <= 500)
119  this->count(current_field, i);
120 
121  this->dtype(current_field, i);
122 
123  // Numeric Stuff
124  if (current_field.type() >= CSV_INT) {
125  long double x_n = current_field.get<long double>();
126 
127  // This actually calculates mean AND variance
128  this->variance(x_n, i);
129  this->min_max(x_n, i);
130  }
131 
132  ++current_record;
133  }
134  }
135 
136  void CSVStat::dtype(CSVField& data, const size_t &i) {
142  auto type = data.type();
143  if (this->dtypes[i].find(type) !=
144  this->dtypes[i].end()) {
145  // Increment count
146  this->dtypes[i][type]++;
147  } else {
148  // Initialize count
149  this->dtypes[i].insert(std::make_pair(type, 1));
150  }
151  }
152 
153  void CSVStat::count(CSVField& data, const size_t &i) {
159  auto item = data.get<std::string>();
160 
161  if (this->counts[i].find(item) !=
162  this->counts[i].end()) {
163  // Increment count
164  this->counts[i][item]++;
165  } else {
166  // Initialize count
167  this->counts[i].insert(std::make_pair(item, 1));
168  }
169  }
170 
171  void CSVStat::min_max(const long double &x_n, const size_t &i) {
176  if (isnan(this->mins[i]))
177  this->mins[i] = x_n;
178  if (isnan(this->maxes[i]))
179  this->maxes[i] = x_n;
180 
181  if (x_n < this->mins[i])
182  this->mins[i] = x_n;
183  else if (x_n > this->maxes[i])
184  this->maxes[i] = x_n;
185  }
186 
187  void CSVStat::variance(const long double &x_n, const size_t &i) {
193  long double& current_rolling_mean = this->rolling_means[i];
194  long double& current_rolling_var = this->rolling_vars[i];
195  long double& current_n = this->n[i];
196  long double delta;
197  long double delta2;
198 
199  current_n++;
200 
201  if (current_n == 1) {
202  current_rolling_mean = x_n;
203  } else {
204  delta = x_n - current_rolling_mean;
205  current_rolling_mean += delta/current_n;
206  delta2 = x_n - current_rolling_mean;
207  current_rolling_var += delta*delta2;
208  }
209  }
210 
219  std::unordered_map<std::string, DataType> csv_data_types(const std::string& filename) {
220  CSVStat stat(filename);
221  std::unordered_map<std::string, DataType> csv_dtypes;
222 
223  auto& col_names = stat.get_col_names();
224  auto& temp = stat.get_dtypes();
225 
226  for (size_t i = 0; i < stat.get_col_names().size(); i++) {
227  auto& col = temp[i];
228  auto& col_name = col_names[i];
229 
230  if (col[CSV_STRING])
231  csv_dtypes[col_name] = CSV_STRING;
232  else if (col[CSV_LONG_LONG_INT])
233  csv_dtypes[col_name] = CSV_LONG_LONG_INT;
234  else if (col[CSV_LONG_INT])
235  csv_dtypes[col_name] = CSV_LONG_INT;
236  else if (col[CSV_INT])
237  csv_dtypes[col_name] = CSV_INT;
238  else
239  csv_dtypes[col_name] = CSV_DOUBLE;
240  }
241 
242  return csv_dtypes;
243  }
244 }
-
Class for calculating statistics from CSV files and in-memory sources.
Definition: csv_parser.hpp:292
-
std::vector< long double > get_variance() const
Return current variances.
Definition: csv_stat.cpp:38
-
const size_t ITERATION_CHUNK_SIZE
For functions that lazy load a large CSV, this determines how many bytes are read at a time...
Definition: csv_parser.hpp:84
-
void read_csv(const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)
Parse a CSV file using multiple threads.
Definition: csv_reader.cpp:467
-
std::deque< CSVRow > records
Queue of parsed CSV rows.
Definition: csv_parser.hpp:228
- -
Main class for parsing CSVs from files and in-memory sources.
Definition: csv_parser.hpp:103
-
std::shared_ptr< internals::ColNames > col_names
Pointer to a object containing column information.
Definition: csv_parser.hpp:255
-
std::vector< std::string > get_col_names() const
Return the CSV&#39;s column names as a vector of strings.
Definition: csv_reader.cpp:300
-
std::vector< long double > get_mean() const
Return current means.
Definition: csv_stat.cpp:29
- -
std::vector< FreqCount > get_counts() const
Get counts for each column.
Definition: csv_stat.cpp:65
-
CSVStat(std::string filename, CSVFormat format=GUESS_CSV)
Definition: csv_stat.cpp:8
-
Stores information about how to parse a CSV file.
Definition: csv_parser.hpp:47
-
The all encompassing namespace.
-
Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[].
Definition: csv_row.hpp:38
-
std::vector< TypeCount > get_dtypes() const
Get data type counts for each column.
Definition: csv_stat.cpp:74
-
iterator end()
A placeholder for the imaginary past the end row in a CSV. Attempting to deference this will lead to ...
-
std::unordered_map< std::string, DataType > csv_data_types(const std::string &)
Useful for uploading CSV files to SQL databases.
Definition: csv_stat.cpp:219
-
std::vector< long double > get_maxes() const
Return current maxes.
Definition: csv_stat.cpp:56
-
std::vector< long double > get_mins() const
Return current mins.
Definition: csv_stat.cpp:47
-
DataType type()
Return the type number of the stored value in accordance with the DataType enum.
Definition: csv_row.cpp:107
-
-
- - - - diff --git a/docs/csv__writer_8hpp.html b/docs/csv__writer_8hpp.html deleted file mode 100644 index a669fe61..00000000 --- a/docs/csv__writer_8hpp.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_writer.hpp File Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
csv_writer.hpp File Reference
-
-
-
#include <iostream>
-#include <vector>
-#include <string>
-#include <fstream>
-
-

Go to the source code of this file.

- - - - - -

-Classes

class  csv::DelimWriter< OutputStream, Delim, Quote >
 Class for writing delimiter separated values files. More...
 
- - - - -

-Namespaces

 csv
 The all encompassing namespace.
 
- - - - - - - - - - - - - - - - - - -

-CSV Writing

-template<class OutputStream >
using csv::CSVWriter = DelimWriter< OutputStream, ',', '"'>
 Class for writing CSV files.
 
-template<class OutputStream >
using csv::TSVWriter = DelimWriter< OutputStream, '\t', '"'>
 Class for writing tab-separated values files.
 
template<char Delim = ',', char Quote = '"'>
std::string csv::csv_escape (const std::string &in, const bool quote_minimal=true)
 
template<class OutputStream >
CSVWriter< OutputStream > csv::make_csv_writer (OutputStream &out)
 
template<class OutputStream >
TSVWriter< OutputStream > csv::make_tsv_writer (OutputStream &out)
 
-

Detailed Description

-

A standalone header file for writing delimiter-separated files

- -

Definition in file csv_writer.hpp.

-
-
- - - - diff --git a/docs/csv__writer_8hpp.js b/docs/csv__writer_8hpp.js deleted file mode 100644 index 9a337590..00000000 --- a/docs/csv__writer_8hpp.js +++ /dev/null @@ -1,9 +0,0 @@ -var csv__writer_8hpp = -[ - [ "DelimWriter", "classcsv_1_1DelimWriter.html", "classcsv_1_1DelimWriter" ], - [ "CSVWriter", "csv__writer_8hpp.html#abe45a573801e1f10fbb1586486db9bb1", null ], - [ "TSVWriter", "csv__writer_8hpp.html#a0a8b78b3e8a3e124ae9fccc889c283ca", null ], - [ "csv_escape", "csv__writer_8hpp.html#a68da6f11bd08b5659d8ce6719e80abee", null ], - [ "make_csv_writer", "csv__writer_8hpp.html#a7702fc0866ba716a7f7ee1388c15b477", null ], - [ "make_tsv_writer", "csv__writer_8hpp.html#a859684d7d4dc5a8431f3d46d034e7663", null ] -]; \ No newline at end of file diff --git a/docs/csv__writer_8hpp_source.html b/docs/csv__writer_8hpp_source.html deleted file mode 100644 index 917f483e..00000000 --- a/docs/csv__writer_8hpp_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/csv_writer.hpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
csv_writer.hpp
-
-
-Go to the documentation of this file.
1 #pragma once
2 #include <iostream>
3 #include <vector>
4 #include <string>
5 #include <fstream>
6 
7 namespace csv {
13  #ifndef DOXYGEN_SHOULD_SKIP_THIS
15  template<char Delim = ',', char Quote = '"'>
16  inline std::string csv_escape(const std::string& in, const bool quote_minimal = true) {
23  std::string new_string;
24  bool quote_escape = false; // Do we need a quote escape
25  new_string += Quote; // Start initial quote escape sequence
26 
27  for (size_t i = 0; i < in.size(); i++) {
28  switch (in[i]) {
29  case Quote:
30  new_string += std::string(2, Quote);
31  quote_escape = true;
32  break;
33  case Delim:
34  quote_escape = true;
35  // Do not break;
36  default:
37  new_string += in[i];
38  }
39  }
40 
41  if (quote_escape || !quote_minimal) {
42  new_string += Quote; // Finish off quote escape
43  return new_string;
44  }
45  else {
46  return in;
47  }
48  }
49  #endif
50 
63  template<class OutputStream, char Delim, char Quote>
64  class DelimWriter {
65  public:
66  DelimWriter(OutputStream& _out) : out(_out) {};
67  DelimWriter(const std::string& filename) : DelimWriter(std::ifstream(filename)) {};
68 
69  void write_row(const std::vector<std::string>& record, bool quote_minimal = true) {
77  for (size_t i = 0, ilen = record.size(); i < ilen; i++) {
78  out << csv_escape<Delim, Quote>(record[i]);
79  if (i + 1 != ilen) out << Delim;
80  }
81 
82  out << std::endl;
83  }
84 
85  DelimWriter& operator<<(const std::vector<std::string>& record) {
87  this->write_row(record);
88  return *this;
89  }
90 
91  private:
92  OutputStream & out;
93  };
94 
95  /* Uncomment when C++17 support is better
96  template<class OutputStream>
97  DelimWriter(OutputStream&) -> DelimWriter<OutputStream>;
98  */
99 
103  template<class OutputStream>
104  using CSVWriter = DelimWriter<OutputStream, ',', '"'>;
105 
109  template<class OutputStream>
110  using TSVWriter = DelimWriter<OutputStream, '\t', '"'>;
111 
112  //
113  // Temporary: Until more C++17 compilers support template deduction guides
114  //
115  template<class OutputStream>
116  inline CSVWriter<OutputStream> make_csv_writer(OutputStream& out) {
118  return CSVWriter<OutputStream>(out);
119  }
120 
121  template<class OutputStream>
122  inline TSVWriter<OutputStream> make_tsv_writer(OutputStream& out) {
124  return TSVWriter<OutputStream>(out);
125  }
126 
128 }
TSVWriter< OutputStream > make_tsv_writer(OutputStream &out)
Definition: csv_writer.hpp:122
-
Class for writing delimiter separated values files.
Definition: csv_writer.hpp:64
-
void write_row(const std::vector< std::string > &record, bool quote_minimal=true)
Definition: csv_writer.hpp:69
-
CSVWriter< OutputStream > make_csv_writer(OutputStream &out)
Definition: csv_writer.hpp:116
-
std::string csv_escape(const std::string &in, const bool quote_minimal=true)
Definition: csv_writer.hpp:16
-
The all encompassing namespace.
-
-
- - - - diff --git a/docs/data__type_8cpp_source.html b/docs/data__type_8cpp_source.html deleted file mode 100644 index fbacb7de..00000000 --- a/docs/data__type_8cpp_source.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/data_type.cpp Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
data_type.cpp
-
-
-
1 #include "data_type.h"
2 
3 namespace csv::internals {
4  #ifndef DOXYGEN_SHOULD_SKIP_THIS
5  std::string type_name(const DataType& dtype) {
6  switch (dtype) {
7  case CSV_STRING:
8  return "string";
9  case CSV_INT:
10  return "int";
11  case CSV_LONG_INT:
12  return "long int";
13  case CSV_LONG_LONG_INT:
14  return "long long int";
15  case CSV_DOUBLE:
16  return "double";
17  default:
18  return "null";
19  }
20  };
21  #endif
22 
23  DataType data_type(std::string_view in, long double* const out) {
34  // Empty string --> NULL
35  if (in.size() == 0)
36  return CSV_NULL;
37 
38  bool ws_allowed = true;
39  bool neg_allowed = true;
40  bool dot_allowed = true;
41  bool digit_allowed = true;
42  bool has_digit = false;
43  bool prob_float = false;
44 
45  unsigned places_after_decimal = 0;
46  long double num_buff = 0;
47 
48  for (size_t i = 0, ilen = in.size(); i < ilen; i++) {
49  const char& current = in[i];
50 
51  switch (current) {
52  case ' ':
53  if (!ws_allowed) {
54  if (isdigit(in[i - 1])) {
55  digit_allowed = false;
56  ws_allowed = true;
57  }
58  else {
59  // Ex: '510 123 4567'
60  return CSV_STRING;
61  }
62  }
63  break;
64  case '-':
65  if (!neg_allowed) {
66  // Ex: '510-123-4567'
67  return CSV_STRING;
68  }
69  else {
70  neg_allowed = false;
71  }
72  break;
73  case '.':
74  if (!dot_allowed) {
75  return CSV_STRING;
76  }
77  else {
78  dot_allowed = false;
79  prob_float = true;
80  }
81  break;
82  default:
83  if (isdigit(current)) {
84  // Process digit
85  has_digit = true;
86 
87  if (!digit_allowed)
88  return CSV_STRING;
89  else if (ws_allowed) // Ex: '510 456'
90  ws_allowed = false;
91 
92  // Build current number
93  unsigned digit = current - '0';
94  if (num_buff == 0) {
95  num_buff = digit;
96  }
97  else if (prob_float) {
98  num_buff += (long double)digit / pow(10.0, ++places_after_decimal);
99  }
100  else {
101  num_buff *= 10;
102  num_buff += digit;
103  }
104  }
105  else {
106  return CSV_STRING;
107  }
108  }
109  }
110 
111  // No non-numeric/non-whitespace characters found
112  if (has_digit) {
113  if (!neg_allowed) num_buff *= -1;
114  if (out) *out = num_buff;
115 
116  if (prob_float)
117  return CSV_DOUBLE;
118  else {
119  long double log10_num_buff;
120  if (!neg_allowed) log10_num_buff = log10(-num_buff);
121  else log10_num_buff = log10(num_buff);
122 
123  if (log10_num_buff < log10(std::numeric_limits<int>::max()))
124  return CSV_INT;
125  else if (log10_num_buff < log10(std::numeric_limits<long int>::max()))
126  return CSV_LONG_INT;
127  else if (log10_num_buff < log10(std::numeric_limits<long long int>::max()))
128  return CSV_LONG_LONG_INT;
129  else // Conversion to long long will cause an overflow
130  return CSV_DOUBLE;
131  }
132  }
133  else {
134  // Just whitespace
135  return CSV_NULL;
136  }
137  }
138 }
Stuff that is generally not of interest to end-users.
-
DataType
Definition: data_type.h:22
-
DataType data_type(std::string_view in, long double *const out)
Definition: data_type.cpp:23
-
-
- - - - diff --git a/docs/data__type_8h_source.html b/docs/data__type_8h_source.html deleted file mode 100644 index 30b219dc..00000000 --- a/docs/data__type_8h_source.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - -Vince's CSV Parser: src/data_type.h Source File - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
data_type.h
-
-
-
1 #pragma once
2 #include <math.h>
3 #include <cctype>
4 #include <string>
5 #include <string_view>
6 
7 namespace csv {
22  enum DataType {
23  CSV_NULL,
24  CSV_STRING,
25  CSV_INT,
26  CSV_LONG_INT,
27  CSV_LONG_LONG_INT,
28  CSV_DOUBLE
29  };
30 
31  namespace internals {
32  template<typename T>
33  DataType type_num();
34 
35  template<> inline DataType type_num<int>() { return CSV_INT; }
36  template<> inline DataType type_num<long int>() { return CSV_LONG_INT; }
37  template<> inline DataType type_num<long long int>() { return CSV_LONG_LONG_INT; }
38  template<> inline DataType type_num<double>() { return CSV_DOUBLE; }
39  template<> inline DataType type_num<long double>() { return CSV_DOUBLE; }
40  template<> inline DataType type_num<std::nullptr_t>() { return CSV_NULL; }
41  template<> inline DataType type_num<std::string>() { return CSV_STRING; }
42 
43  std::string type_name(const DataType&);
44  DataType data_type(std::string_view in, long double* const out = nullptr);
45  }
46 }
DataType
Definition: data_type.h:22
-
DataType data_type(std::string_view in, long double *const out)
Definition: data_type.cpp:23
-
The all encompassing namespace.
-
-
- - - - diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html deleted file mode 100644 index effd806c..00000000 --- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - -Vince's CSV Parser: src Directory Reference - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
src Directory Reference
-
-
- - - - - - - - - - - -

-Files

file  csv_parser.hpp [code]
 
file  csv_reader.cpp [code]
 Defines all functionality needed for basic CSV parsing.
 
file  csv_stat.cpp [code]
 
file  csv_writer.hpp [code]
 
-
-
- - - - diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js deleted file mode 100644 index ae24a60e..00000000 --- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js +++ /dev/null @@ -1,13 +0,0 @@ -var dir_68267d1309a1af8e8297ef4c3efbcdba = -[ - [ "csv_parser.hpp", "csv__parser_8hpp.html", "csv__parser_8hpp" ], - [ "csv_reader.cpp", "csv__reader_8cpp.html", "csv__reader_8cpp" ], - [ "csv_reader_iterator.cpp", "csv__reader__iterator_8cpp_source.html", null ], - [ "csv_row.cpp", "csv__row_8cpp_source.html", null ], - [ "csv_row.hpp", "csv__row_8hpp_source.html", null ], - [ "csv_stat.cpp", "csv__stat_8cpp.html", "csv__stat_8cpp" ], - [ "csv_writer.hpp", "csv__writer_8hpp.html", "csv__writer_8hpp" ], - [ "data_type.cpp", "data__type_8cpp_source.html", null ], - [ "data_type.h", "data__type_8h_source.html", null ], - [ "memory.hpp", "memory_8hpp_source.html", null ] -]; \ No newline at end of file diff --git a/docs/doc.png b/docs/doc.png deleted file mode 100644 index 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t diff --git a/docs/doxygen.css b/docs/doxygen.css deleted file mode 100644 index 4f1ab919..00000000 --- a/docs/doxygen.css +++ /dev/null @@ -1,1596 +0,0 @@ -/* The standard CSS for doxygen 1.8.13 */ - -body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; -} - -p.reference, p.definition { - font: 400 14px/22px Roboto,sans-serif; -} - -/* @group Heading Levels */ - -h1.groupheader { - font-size: 150%; -} - -.title { - font: 400 14px/28px Roboto,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; - font-size: 150%; - font-weight: normal; - margin-top: 1.75em; - padding-top: 8px; - padding-bottom: 4px; - width: 100%; -} - -h3.groupheader { - font-size: 100%; -} - -h1, h2, h3, h4, h5, h6 { - -webkit-transition: text-shadow 0.5s linear; - -moz-transition: text-shadow 0.5s linear; - -ms-transition: text-shadow 0.5s linear; - -o-transition: text-shadow 0.5s linear; - transition: text-shadow 0.5s linear; - margin-right: 15px; -} - -h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd { - margin-top: 2px; -} - -p.starttd { - margin-top: 0px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; -} - -div.fragment { - padding: 0px; - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; -} - -div.line { - font-family: monospace, fixed; - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -div.line:after { - content:"\000A"; - white-space: pre; -} - -div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; -} - - -span.lineno { - padding-right: 4px; - text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; -} -span.lineno a { - background-color: #D8D8D8; -} - -span.lineno a:hover { - background-color: #C8C8C8; -} - -.lineno { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.ah, span.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; -} - -.memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; - font-size: 80%; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtitle { - padding: 8px; - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - background-image: url('nav_f.png'); - background-repeat: repeat-x; - background-color: #E2E8F2; - line-height: 1.25; - font-weight: 300; - float:left; -} - -.permalink -{ - font-size: 65%; - display: inline-block; - vertical-align: middle; -} - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; -} - -.memitem.glow { - box-shadow: 0 0 15px cyan; -} - -.memname { - font-weight: 400; - margin-left: 6px; -} - -.memname td { - vertical-align: bottom; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-color: #DFE5F1; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - -} - -.overload { - font-family: "courier new",courier,monospace; - font-size: 65%; -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} -.paramname code { - line-height: 14px; -} - -.params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - -table.mlabels { - border-spacing: 0px; -} - -td.mlabels-left { - width: 100%; - padding: 0px; -} - -td.mlabels-right { - vertical-align: bottom; - padding: 0px; - white-space: nowrap; -} - -span.mlabels { - margin-left: 8px; -} - -span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; - text-shadow: none; - color: white; - margin-right: 4px; - padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; - white-space: nowrap; - vertical-align: middle; -} - - - -/* @end */ - -/* these are for tree view inside a (index) page */ - -div.directory { - margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; - width: 100%; -} - -.directory table { - border-collapse:collapse; -} - -.directory td { - margin: 0px; - padding: 0px; - vertical-align: top; -} - -.directory td.entry { - white-space: nowrap; - padding-right: 6px; - padding-top: 3px; -} - -.directory td.entry a { - outline:none; -} - -.directory td.entry a img { - border: none; -} - -.directory td.desc { - width: 100%; - padding-left: 6px; - padding-right: 6px; - padding-top: 3px; - border-left: 1px solid rgba(0,0,0,0.05); -} - -.directory tr.even { - padding-left: 6px; - background-color: #F7F8FB; -} - -.directory img { - vertical-align: -30%; -} - -.directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; -} - -.directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; -} - -.arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -table.directory { - font: 400 14px Roboto,sans-serif; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable caption { - caption-side: top; -} - -table.doxtable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fieldname { - padding-top: 3px; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ -} - -.fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - -.fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - -div.ingroups -{ - font-size: 8pt; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -dl -{ - padding: 0 0 0 10px; -} - -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ -dl.section -{ - margin-left: 0px; - padding-left: 0px; -} - -dl.note -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00D000; -} - -dl.deprecated -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #505050; -} - -dl.todo -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #00C0E0; -} - -dl.test -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #3030E0; -} - -dl.bug -{ - margin-left:-7px; - padding-left: 3px; - border-left:4px solid; - border-color: #C08050; -} - -dl.section dd { - margin-bottom: 6px; -} - - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectalign -{ - vertical-align: middle; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.plantumlgraph -{ - text-align: center; -} - -.diagraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; -} - -div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; -} - -div.toc li.level2 { - margin-left: 15px; -} - -div.toc li.level3 { - margin-left: 30px; -} - -div.toc li.level4 { - margin-left: 45px; -} - -.inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.inherit_header td { - padding: 6px 0px 2px 5px; -} - -.inherit { - display: none; -} - -tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; -} - -/* tooltip related style info */ - -.ttc { - position: absolute; - display: none; -} - -#powerTip { - cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; - display: none; - font-size: smaller; - max-width: 80%; - opacity: 0.9; - padding: 1ex 1em 1em; - position: absolute; - z-index: 2147483647; -} - -#powerTip div.ttdoc { - color: grey; - font-style: italic; -} - -#powerTip div.ttname a { - font-weight: bold; -} - -#powerTip div.ttname { - font-weight: bold; -} - -#powerTip div.ttdeci { - color: #006318; -} - -#powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; -} - -#powerTip:before, #powerTip:after { - content: ""; - position: absolute; - margin: 0px; -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.s:after, #powerTip.s:before, -#powerTip.w:after, #powerTip.w:before, -#powerTip.e:after, #powerTip.e:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.nw:after, #powerTip.nw:before, -#powerTip.sw:after, #powerTip.sw:before { - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; -} - -#powerTip.n:after, #powerTip.s:after, -#powerTip.w:after, #powerTip.e:after, -#powerTip.nw:after, #powerTip.ne:after, -#powerTip.sw:after, #powerTip.se:after { - border-color: rgba(255, 255, 255, 0); -} - -#powerTip.n:before, #powerTip.s:before, -#powerTip.w:before, #powerTip.e:before, -#powerTip.nw:before, #powerTip.ne:before, -#powerTip.sw:before, #powerTip.se:before { - border-color: rgba(128, 128, 128, 0); -} - -#powerTip.n:after, #powerTip.n:before, -#powerTip.ne:after, #powerTip.ne:before, -#powerTip.nw:after, #powerTip.nw:before { - top: 100%; -} - -#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} -#powerTip.n:before { - border-top-color: #808080; - border-width: 11px; - margin: 0px -11px; -} -#powerTip.n:after, #powerTip.n:before { - left: 50%; -} - -#powerTip.nw:after, #powerTip.nw:before { - right: 14px; -} - -#powerTip.ne:after, #powerTip.ne:before { - left: 14px; -} - -#powerTip.s:after, #powerTip.s:before, -#powerTip.se:after, #powerTip.se:before, -#powerTip.sw:after, #powerTip.sw:before { - bottom: 100%; -} - -#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #ffffff; - border-width: 10px; - margin: 0px -10px; -} - -#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; - border-width: 11px; - margin: 0px -11px; -} - -#powerTip.s:after, #powerTip.s:before { - left: 50%; -} - -#powerTip.sw:after, #powerTip.sw:before { - right: 14px; -} - -#powerTip.se:after, #powerTip.se:before { - left: 14px; -} - -#powerTip.e:after, #powerTip.e:before { - left: 100%; -} -#powerTip.e:after { - border-left-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.e:before { - border-left-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -#powerTip.w:after, #powerTip.w:before { - right: 100%; -} -#powerTip.w:after { - border-right-color: #ffffff; - border-width: 10px; - top: 50%; - margin-top: -10px; -} -#powerTip.w:before { - border-right-color: #808080; - border-width: 11px; - top: 50%; - margin-top: -11px; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } -} - -/* @group Markdown */ - -/* -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTableHead tr { -} - -table.markdownTableBodyLeft td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft { - text-align: left -} - -th.markdownTableHeadRight { - text-align: right -} - -th.markdownTableHeadCenter { - text-align: center -} -*/ - -table.markdownTable { - border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; -} - -table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.markdownTable tr { -} - -th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; -} - -th.markdownTableHeadLeft, td.markdownTableBodyLeft { - text-align: left -} - -th.markdownTableHeadRight, td.markdownTableBodyRight { - text-align: right -} - -th.markdownTableHeadCenter, td.markdownTableBodyCenter { - text-align: center -} - - -/* @end */ diff --git a/docs/doxygen.png b/docs/doxygen.png deleted file mode 100644 index 3ff17d807fd8aa003bed8bb2a69e8f0909592fd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} diff --git a/docs/dynsections.js b/docs/dynsections.js deleted file mode 100644 index 1e6bf07f..00000000 --- a/docs/dynsections.js +++ /dev/null @@ -1,104 +0,0 @@ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - - -Vince's CSV Parser: File List - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
-
[detail level 12]
- - - - - - - - - - - -
  src
 csv_parser.hpp
 csv_reader.cppDefines all functionality needed for basic CSV parsing
 csv_reader_iterator.cpp
 csv_row.cpp
 csv_row.hpp
 csv_stat.cpp
 csv_writer.hpp
 data_type.cpp
 data_type.h
 memory.hpp
-
-
-
- - - - diff --git a/docs/files.js b/docs/files.js deleted file mode 100644 index 04b0a8ee..00000000 --- a/docs/files.js +++ /dev/null @@ -1,4 +0,0 @@ -var files = -[ - [ "src", "dir_68267d1309a1af8e8297ef4c3efbcdba.html", "dir_68267d1309a1af8e8297ef4c3efbcdba" ] -]; \ No newline at end of file diff --git a/docs/folderclosed.png b/docs/folderclosed.png deleted file mode 100644 index bb8ab35edce8e97554e360005ee9fc5bffb36e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA diff --git a/docs/functions.html b/docs/functions.html deleted file mode 100644 index 79d839e7..00000000 --- a/docs/functions.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- b -

- - -

- c -

- - -

- d -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- h -

- - -

- i -

- - -

- m -

- - -

- n -

- - -

- o -

- - -

- p -

- - -

- q -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- w -

-
-
- - - - diff --git a/docs/functions_enum.html b/docs/functions_enum.html deleted file mode 100644 index 9edd9caa..00000000 --- a/docs/functions_enum.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - Enumerations - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/functions_func.html b/docs/functions_func.html deleted file mode 100644 index 8a04baff..00000000 --- a/docs/functions_func.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - Functions - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-  - -

- b -

- - -

- c -

- - -

- e -

- - -

- f -

- - -

- g -

- - -

- i -

- - -

- m -

- - -

- o -

- - -

- r -

- - -

- s -

- - -

- t -

- - -

- w -

-
-
- - - - diff --git a/docs/functions_rela.html b/docs/functions_rela.html deleted file mode 100644 index c67f4601..00000000 --- a/docs/functions_rela.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - Related Functions - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/functions_type.html b/docs/functions_type.html deleted file mode 100644 index ca01a5db..00000000 --- a/docs/functions_type.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - Typedefs - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/functions_vars.html b/docs/functions_vars.html deleted file mode 100644 index a9cfb717..00000000 --- a/docs/functions_vars.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Members - Variables - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
- - - - diff --git a/docs/group__csv__internal.html b/docs/group__csv__internal.html deleted file mode 100644 index 29503331..00000000 --- a/docs/group__csv__internal.html +++ /dev/null @@ -1,409 +0,0 @@ - - - - - - - -Vince's CSV Parser: CSV Parser Internals - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
- -
-
CSV Parser Internals
-
-
- -

Internals of CSVReader. Only maintainers and those looking to extend the parser should read this. -More...

- - - - - -

-Enumerations

enum  csv::CSVReader::ParseFlags { NOT_SPECIAL, -QUOTE, -DELIMITER, -NEWLINE - }
 An enum used for describing the significance of each character with respect to CSV parsing.
 
- - - - - -

-Functions

std::vector< CSVReader::ParseFlagscsv::CSVReader::make_flags () const
 
-bool csv::CSVReader::eof ()
 
- - - - - - - - - - - - - -

-Variables

-std::string csv::CSVReader::record_buffer = ""
 Buffer for current row being parsed.
 
-std::vector< size_t > csv::CSVReader::split_buffer
 Positions where current row is split.
 
-size_t csv::CSVReader::min_row_len = (size_t)INFINITY
 Shortest row seen so far; used to determine how much memory to allocate for new strings.
 
-std::deque< CSVRowcsv::CSVReader::records
 Queue of parsed CSV rows.
 
- - - - - - -

-CSV Parsing Callbacks

The heart of the CSV parser. These methods are called by feed().

-
void csv::CSVReader::write_record ()
 
virtual void csv::CSVReader::bad_row_handler (std::vector< std::string >)
 
- - - - - - - - - - - - - - - - -

-CSV Settings

-char csv::CSVReader::delimiter
 Delimiter character.
 
-char csv::CSVReader::quote_char
 Quote character.
 
-int csv::CSVReader::header_row
 Line number of the header row (zero-indexed)
 
-bool csv::CSVReader::strict = false
 Strictness of parser.
 
-std::vector< CSVReader::ParseFlagscsv::CSVReader::parse_flags
 A table where the (i + 128)th slot gives the ParseFlags for ASCII character i.
 
- - - - -

-Parser State

std::shared_ptr< internals::ColNamescsv::CSVReader::col_names
 Pointer to a object containing column information. More...
 
- - - - - - - - - -

-Multi-Threaded File Reading Functions

-void csv::CSVReader::feed (std::unique_ptr< std::string > &&)
 Helper for read_csv_worker()
 
void csv::CSVReader::read_csv (const std::string &filename, const size_t &bytes=ITERATION_CHUNK_SIZE, bool close=true)
 Parse a CSV file using multiple threads. More...
 
void csv::CSVReader::read_csv_worker ()
 
- - - - - - - - - - - - - -

-Multi-Threaded File Reading: Flags and State

-std::FILE * csv::CSVReader::infile = nullptr
 Current file handle. Destroyed by ~CSVReader().
 
-std::deque< std::unique_ptr< std::string > > csv::CSVReader::feed_buffer
 Message queue for worker.
 
-std::mutex csv::CSVReader::feed_lock
 Allow only one worker to write.
 
-std::condition_variable csv::CSVReader::feed_cond
 Wake up worker.
 
-

Detailed Description

-

Internals of CSVReader. Only maintainers and those looking to extend the parser should read this.

-

Function Documentation

- -

◆ bad_row_handler()

- -
-
- - - - - -
- - - - - - - - -
void csv::CSVReader::bad_row_handler (std::vector< std::string > record)
-
-protectedvirtual
-
-

Handler for rejected rows (too short or too long). This does nothing unless strict parsing was set, in which case it throws an eror. Subclasses of CSVReader may easily override this to provide custom behavior.

- -

Definition at line 157 of file csv_reader.cpp.

- -
-
- -

◆ make_flags()

- -
-
- - - - - -
- - - - - - - -
std::vector< CSVReader::ParseFlags > csv::CSVReader::make_flags () const
-
-protected
-
-

Create a vector v where each index i corresponds to the ASCII number for a character and, v[i + 128] labels it according to the CSVReader::ParseFlags enum

- -

Definition at line 134 of file csv_reader.cpp.

- -
-
- -

◆ read_csv()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void csv::CSVReader::read_csv (const std::string & filename,
const size_t & bytes = ITERATION_CHUNK_SIZE,
bool close = true 
)
-
-protected
-
- -

Parse a CSV file using multiple threads.

-
Parameters
- - - -
[in]nrowsNumber of rows to read. Set to -1 to read entire file.
[in]closeClose file after reading?
-
-
-
See also
CSVReader::read_row()
- -

Definition at line 467 of file csv_reader.cpp.

- -
-
- -

◆ read_csv_worker()

- -
-
- - - - - -
- - - - - - - -
void csv::CSVReader::read_csv_worker ()
-
-protected
-
-

Worker thread for read_csv() which parses CSV rows (while the main thread pulls data from disk)

- -

Definition at line 437 of file csv_reader.cpp.

- -
-
- -

◆ write_record()

- -
-
- - - - - -
- - - - - - - -
void csv::CSVReader::write_record ()
-
-protected
-
-

Push the current row into a queue if it is the right length. Drop it otherwise.

- -

Definition at line 392 of file csv_reader.cpp.

- -
-
-

Variable Documentation

- -

◆ col_names

- -
-
- - - - - -
- - - - -
std::shared_ptr<internals::ColNames> csv::CSVReader::col_names
-
-protected
-
-Initial value:
=
std::make_shared<internals::ColNames>(std::vector<std::string>({}))
-

Pointer to a object containing column information.

-

<

- -

Definition at line 255 of file csv_parser.hpp.

- -
-
-
-
- - - - diff --git a/docs/group__csv__internal.js b/docs/group__csv__internal.js deleted file mode 100644 index 2c8266ef..00000000 --- a/docs/group__csv__internal.js +++ /dev/null @@ -1,24 +0,0 @@ -var group__csv__internal = -[ - [ "ParseFlags", "group__csv__internal.html#ga22d269500460026ed8d99947f0766200", null ], - [ "bad_row_handler", "group__csv__internal.html#gaea3e7875478c79feba84d6ee97b1d476", null ], - [ "feed", "group__csv__internal.html#gae2934a7ef4abb2829b4455f2068bf214", null ], - [ "make_flags", "group__csv__internal.html#gac2215271c176fa343fdfea1d319aab4c", null ], - [ "read_csv", "group__csv__internal.html#ga44deca7b16b9de9092a029f6c014b1fa", null ], - [ "read_csv_worker", "group__csv__internal.html#ga49ab4671b28da24f5ae8670a9eef557d", null ], - [ "write_record", "group__csv__internal.html#ga609293317d4520eb6cc711c012240cb0", null ], - [ "col_names", "group__csv__internal.html#gac63e71ea5f74271f366cab7af8689b48", null ], - [ "delimiter", "group__csv__internal.html#gaf3cd9076878b66ce3a173d1d781ba9f6", null ], - [ "feed_buffer", "group__csv__internal.html#ga0b727379853c20bb8a6fb2af78fce314", null ], - [ "feed_cond", "group__csv__internal.html#ga77144227a1cdf5ef728a68a1f2bfc9e4", null ], - [ "feed_lock", "group__csv__internal.html#ga9a8b06d3470032217b592070866e315f", null ], - [ "header_row", "group__csv__internal.html#gaee0d4c8865e2abaae5bcfae76702eb8d", null ], - [ "infile", "group__csv__internal.html#gaa823a7be2b314559dcf0f9efd7ef4e57", null ], - [ "min_row_len", "group__csv__internal.html#gae59eb9a27868a8ccc4e86901051fb9b6", null ], - [ "parse_flags", "group__csv__internal.html#gae73cb1981c9866e1ea73a54ee6ac6002", null ], - [ "quote_char", "group__csv__internal.html#gae928205d7834e243ff41aaf74bd70735", null ], - [ "record_buffer", "group__csv__internal.html#gabee3f8a985267182e9ffd289012f042f", null ], - [ "records", "group__csv__internal.html#ga309c7035f6b7fe25ca9b1c2d8df30e59", null ], - [ "split_buffer", "group__csv__internal.html#ga98792115fd80e24782a6816c73f94148", null ], - [ "strict", "group__csv__internal.html#gab5b7ac71d40acf632e031f2059c0cb9b", null ] -]; \ No newline at end of file diff --git a/docs/hierarchy.html b/docs/hierarchy.html deleted file mode 100644 index 115c3a9b..00000000 --- a/docs/hierarchy.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -Vince's CSV Parser: Class Hierarchy - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Class Hierarchy
-
-
-
This inheritance list is sorted roughly, but not completely, alphabetically:
-
[detail level 12]
- - - - - - - - - - - -
 Ccsv::internals::ColNamesA data structure for handling column name information
 Ccsv::CSVFieldData type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[]
 Ccsv::CSVFileInfo
 Ccsv::CSVFormatStores information about how to parse a CSV file
 Ccsv::internals::CSVGuesser
 Ccsv::CSVReaderMain class for parsing CSVs from files and in-memory sources
 Ccsv::CSVStatClass for calculating statistics from CSV files and in-memory sources
 Ccsv::CSVRowData structure for representing CSV rows
 Ccsv::DelimWriter< OutputStream, Delim, Quote >Class for writing delimiter separated values files
 Ccsv::CSVRow::iteratorA random access iterator over the contents of a CSV row. Each iterator points to a CSVField
 Ccsv::CSVReader::iteratorAn input iterator capable of handling large files. Created by CSVReader::begin() and CSVReader::end()
-
-
-
- - - - diff --git a/docs/hierarchy.js b/docs/hierarchy.js deleted file mode 100644 index d2538796..00000000 --- a/docs/hierarchy.js +++ /dev/null @@ -1,15 +0,0 @@ -var hierarchy = -[ - [ "csv::internals::ColNames", "structcsv_1_1internals_1_1ColNames.html", null ], - [ "csv::CSVField", "classcsv_1_1CSVField.html", null ], - [ "csv::CSVFileInfo", "structcsv_1_1CSVFileInfo.html", null ], - [ "csv::CSVFormat", "structcsv_1_1CSVFormat.html", null ], - [ "csv::internals::CSVGuesser", "classcsv_1_1internals_1_1CSVGuesser.html", null ], - [ "csv::CSVReader", "classcsv_1_1CSVReader.html", [ - [ "csv::CSVStat", "classcsv_1_1CSVStat.html", null ] - ] ], - [ "csv::CSVRow", "classcsv_1_1CSVRow.html", null ], - [ "csv::DelimWriter< OutputStream, Delim, Quote >", "classcsv_1_1DelimWriter.html", null ], - [ "csv::CSVRow::iterator", "classcsv_1_1CSVRow_1_1iterator.html", null ], - [ "csv::CSVReader::iterator", "classcsv_1_1CSVReader_1_1iterator.html", null ] -]; \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 90d01459..00000000 --- a/docs/index.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - -Vince's CSV Parser: Vince's CSV Parser - - - - - - - - - - - - - - -
-
- - - - - - -
-
Vince's CSV Parser -
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Vince's CSV Parser
-
-
-

-

Motivation

-

There's plenty of other CSV parsers in the wild, but I had a hard time finding what I wanted. Specifically, I wanted something which had an interface similar to Python's csv module. Furthermore, I wanted support for special use cases such as calculating statistics on very large files. Thus, this library was created with these following goals in mind:

-

Performance

-

This CSV parser uses multiple threads to simulatenously pull data from disk and parse it. Furthermore, it is capable of incremental streaming (parsing larger than RAM files), and quickly parsing data types.

-

RFC 4180 Compliance

-

This CSV parser is much more than a fancy string splitter, and follows every guideline from RFC 4180. On the other hand, it is also robust and capable of handling deviances from the standard. An optional strict parsing mode can be enabled to sniff out errors in files.

-

Easy to Use and Well-Documented

-

In additon to being easy on your computer's hardware, this library is also easy on you–the developer. Some helpful features include:

    -
  • Decent ability to guess the dialect of a file (CSV, tab-delimited, etc.)
  • -
  • Ability to handle common deviations from the CSV standard, such as inconsistent row lengths, and leading comments
  • -
  • Ability to manually set the delimiter and quoting character of the parser
  • -
-

Well Tested

-

In addition to using modern C++ features to build a memory safe parser while still performing well, this parser has a extensive test suite.

-

Building (latest stable version)

-

All of this library's essentials are located under src/, with no dependencies aside from the STL. This is a C++17 library developed using Microsoft Visual Studio and compatible with g++ and clang. The CMakeList and Makefile contain instructions for building the main library, some sample programs, and the test suite.

-

GCC/Clang Compiler Flags: -pthread -O3 -std=c++17

-

CMake Instructions

-

If you're including this in another CMake project, you can simply clone this repo into your project directory, and add the following to your CMakeLists.txt:

-
include(${CMAKE_SOURCE_DIR}/.../csv-parser/CMakeLists.txt)
# ...
add_executable(<your program> ...)
target_link_libraries(<your program> csv)

Thirty-Second Introduction to Vince's CSV Parser

- -

Features & Examples

-

Reading a Large File (with Iterators)

-

With this library, you can easily stream over a large file without reading its entirety into memory.

-

C++ Style

# include "csv_parser.hpp"
using namespace csv;
...
CSVReader reader("very_big_file.csv");
for (CSVRow& row: reader) { // Input iterator
for (CSVField& field: row) {
// For efficiency, get<>() produces a string_view
std::cout << field.get<>() << ...
}
}
...

Old-Fashioned C Style Loop

...
CSVReader reader("very_big_file.csv");
CSVRow row;
while (reader.read_row(row)) {
// Do stuff with row here
}
...

Indexing by Column Names

-

Retrieving values using a column name string is a cheap, constant time operation.

-
# include "csv_parser.hpp"
using namespace csv;
...
CSVReader reader("very_big_file.csv");
double sum = 0;
for (auto& row: reader) {
// Note: Can also use index of column with [] operator
sum += row["Total Salary"].get<double>();
}
...

Type Conversions

-

If your CSV has lots of numeric values, you can also have this parser (lazily) convert them to the proper data type. Type checking is performed on conversions to prevent undefined behavior.

-
# include "csv_parser.hpp"
using namespace csv;
...
CSVReader reader("very_big_file.csv");
for (auto& row: reader) {
if (row["timestamp"].is_int()) {
row["timestamp"].get<int>();
// ..
}
}

Specifying a Specific Delimiter, Quoting Character, etc.

-

Although the CSV parser has a decent guessing mechanism, in some cases it is preferrable to specify the exact parameters of a file.

-
# include "csv_parser.hpp"
# include ...
using namespace csv;
CSVFormat format = {
'\t', // Delimiter
'~', // Quote-character
'2', // Line number of header
{} // Column names -- if empty, then filled by reading header row
};
CSVReader reader("wierd_csv_dialect.csv", {}, format);
for (auto& row: reader) {
// Do stuff with rows here
}

Parsing an In-Memory String

-
# include "csv_parser.hpp"
using namespace csv;
...
// Method 1: Using parse()
std::string csv_string = "Actor,Character"
"Will Ferrell,Ricky Bobby\r\n"
"John C. Reilly,Cal Naughton Jr.\r\n"
"Sacha Baron Cohen,Jean Giard\r\n"
auto rows = parse(csv_string);
for (auto& r: rows) {
// Do stuff with row here
}
// Method 2: Using _csv operator
auto rows = "Actor,Character"
"Will Ferrell,Ricky Bobby\r\n"
"John C. Reilly,Cal Naughton Jr.\r\n"
"Sacha Baron Cohen,Jean Giard\r\n"_csv;
for (auto& r: rows) {
// Do stuff with row here
}

Writing CSV Files

-
# include "csv_writer.hpp"
# include ...
using namespace csv;
using vector;
using string;
...
std::stringstream ss; // Can also use ifstream, etc.
auto writer = make_csv_writer(ss);
writer << vector<string>({ "A", "B", "C" })
<< vector<string>({ "I'm", "too", "tired" })
<< vector<string>({ "to", "write", "documentation" });
...

Contributing

-

Bug reports, feature requests, and so on are always welcome. Feel free to leave a note in the Issues section.

-
-
- - - - diff --git a/docs/jquery.js b/docs/jquery.js deleted file mode 100644 index f5343eda..00000000 --- a/docs/jquery.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' - - -
-
-
memory.hpp
-
-
-
1 #pragma once
2 // Get operating system specific details
3 
4 namespace csv {
5  #if defined(_WIN32)
6  #include <Windows.h>
7  #undef max
8  #undef min
9  inline int getpagesize() {
10  _SYSTEM_INFO sys_info = {};
11  GetSystemInfo(&sys_info);
12  return sys_info.dwPageSize;
13  }
14 
15  const int PAGE_SIZE = getpagesize();
16  #elif defined(__linux__)
17  #include <unistd.h>
18  const int PAGE_SIZE = getpagesize();
19  #else
20  const int PAGE_SIZE = 4096;
21  #endif
22 }
The all encompassing namespace.
-
- - - - - diff --git a/docs/menu.js b/docs/menu.js deleted file mode 100644 index 97db4c23..00000000 --- a/docs/menu.js +++ /dev/null @@ -1,26 +0,0 @@ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { - function makeTree(data,relPath) { - var result=''; - if ('children' in data) { - result+=''; - } - return result; - } - - $('#main-nav').append(makeTree(menudata,relPath)); - $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); - if (searchEnabled) { - if (serverSide) { - $('#main-menu').append('
  • '); - } else { - $('#main-menu').append('
  • '); - } - } - $('#main-menu').smartmenus(); -} diff --git a/docs/menudata.js b/docs/menudata.js deleted file mode 100644 index 33da3eb1..00000000 --- a/docs/menudata.js +++ /dev/null @@ -1,53 +0,0 @@ -var menudata={children:[ -{text:"Main Page",url:"index.html"}, -{text:"Modules",url:"modules.html"}, -{text:"Namespaces",url:"namespaces.html",children:[ -{text:"Namespace List",url:"namespaces.html"}, -{text:"Namespace Members",url:"namespacemembers.html",children:[ -{text:"All",url:"namespacemembers.html"}, -{text:"Functions",url:"namespacemembers_func.html"}, -{text:"Variables",url:"namespacemembers_vars.html"}, -{text:"Typedefs",url:"namespacemembers_type.html"}, -{text:"Enumerations",url:"namespacemembers_enum.html"}]}]}, -{text:"Classes",url:"annotated.html",children:[ -{text:"Class List",url:"annotated.html"}, -{text:"Class Index",url:"classes.html"}, -{text:"Class Hierarchy",url:"hierarchy.html"}, -{text:"Class Members",url:"functions.html",children:[ -{text:"All",url:"functions.html",children:[ -{text:"b",url:"functions.html#index_b"}, -{text:"c",url:"functions.html#index_c"}, -{text:"d",url:"functions.html#index_d"}, -{text:"e",url:"functions.html#index_e"}, -{text:"f",url:"functions.html#index_f"}, -{text:"g",url:"functions.html#index_g"}, -{text:"h",url:"functions.html#index_h"}, -{text:"i",url:"functions.html#index_i"}, -{text:"m",url:"functions.html#index_m"}, -{text:"n",url:"functions.html#index_n"}, -{text:"o",url:"functions.html#index_o"}, -{text:"p",url:"functions.html#index_p"}, -{text:"q",url:"functions.html#index_q"}, -{text:"r",url:"functions.html#index_r"}, -{text:"s",url:"functions.html#index_s"}, -{text:"t",url:"functions.html#index_t"}, -{text:"w",url:"functions.html#index_w"}]}, -{text:"Functions",url:"functions_func.html",children:[ -{text:"b",url:"functions_func.html#index_b"}, -{text:"c",url:"functions_func.html#index_c"}, -{text:"e",url:"functions_func.html#index_e"}, -{text:"f",url:"functions_func.html#index_f"}, -{text:"g",url:"functions_func.html#index_g"}, -{text:"i",url:"functions_func.html#index_i"}, -{text:"m",url:"functions_func.html#index_m"}, -{text:"o",url:"functions_func.html#index_o"}, -{text:"r",url:"functions_func.html#index_r"}, -{text:"s",url:"functions_func.html#index_s"}, -{text:"t",url:"functions_func.html#index_t"}, -{text:"w",url:"functions_func.html#index_w"}]}, -{text:"Variables",url:"functions_vars.html"}, -{text:"Typedefs",url:"functions_type.html"}, -{text:"Enumerations",url:"functions_enum.html"}, -{text:"Related Functions",url:"functions_rela.html"}]}]}, -{text:"Files",url:"files.html",children:[ -{text:"File List",url:"files.html"}]}]} diff --git a/docs/modules.html b/docs/modules.html deleted file mode 100644 index fbe4cddc..00000000 --- a/docs/modules.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - -Vince's CSV Parser: Modules - - - - - - - - - - - - - - -
    -
    -
    - - - - - -
    -
    Vince's CSV Parser -
    -
    - - - - - - - - - -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    Modules
    -
    -
    -
    Here is a list of all modules:
    - - -
     CSV Parser InternalsInternals of CSVReader. Only maintainers and those looking to extend the parser should read this
    -
    -
    -
    - - - - diff --git a/docs/modules.js b/docs/modules.js deleted file mode 100644 index 2ea0547d..00000000 --- a/docs/modules.js +++ /dev/null @@ -1,4 +0,0 @@ -var modules = -[ - [ "CSV Parser Internals", "group__csv__internal.html", "group__csv__internal" ] -]; \ No newline at end of file diff --git a/docs/namespacecsv.html b/docs/namespacecsv.html deleted file mode 100644 index afeb2638..00000000 --- a/docs/namespacecsv.html +++ /dev/null @@ -1,609 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv Namespace Reference - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    csv Namespace Reference
    -
    -
    - -

    The all encompassing namespace. -More...

    - - - - - -

    -Namespaces

     internals
     Stuff that is generally not of interest to end-users.
     
    - - - - - - - - - - - - - - - - - - - - - -

    -Classes

    class  CSVField
     Data type representing individual CSV values. CSVFields can be obtained by using CSVRow::operator[]. More...
     
    struct  CSVFileInfo
     
    struct  CSVFormat
     Stores information about how to parse a CSV file. More...
     
    class  CSVReader
     Main class for parsing CSVs from files and in-memory sources. More...
     
    class  CSVRow
     Data structure for representing CSV rows. More...
     
    class  CSVStat
     Class for calculating statistics from CSV files and in-memory sources. More...
     
    class  DelimWriter
     Class for writing delimiter separated values files. More...
     
    - - - - - - -

    -Typedefs

    -using RowCount = long long int
     Used for counting number of rows.
     
    -using CSVCollection = std::deque< CSVRow >
     
    - - - -

    -Enumerations

    enum  DataType {
    -  CSV_NULL, -CSV_STRING, -CSV_INT, -CSV_LONG_INT, -
    -  CSV_LONG_LONG_INT, -CSV_DOUBLE -
    - }
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

     CSVRow::operator std::vector< std::string > () const
     
    -template<>
    std::string CSVField::get< std::string > ()
     
    -template<>
    std::string_view CSVField::get< std::string_view > ()
     
    Shorthand Parsing Functions

    Convienience functions for parsing small strings

    -
    CSVCollection operator""_csv (const char *in, size_t n)
     Parse a RFC 4180 CSV string, returning a collection of CSVRow objects. More...
     
    CSVCollection parse (const std::string &in, CSVFormat format)
     Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects. More...
     
    Utility Functions
    std::unordered_map< std::string, DataTypecsv_data_types (const std::string &filename)
     Useful for uploading CSV files to SQL databases. More...
     
    CSVFileInfo get_file_info (const std::string &filename)
     Get basic information about a CSV file. More...
     
    -CSVFormat guess_format (const std::string &filename)
     Guess the delimiter used by a delimiter-separated values file.
     
    std::vector< std::string > get_col_names (const std::string &filename, CSVFormat format)
     Return a CSV's column names. More...
     
    int get_col_pos (const std::string filename, const std::string col_name, const CSVFormat format)
     Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise. More...
     
    - - - - - - - - - - - - - - - - - - - -

    -Variables

    -const int CSV_NOT_FOUND = -1
     Integer indicating a requested column wasn't found.
     
    -const int PAGE_SIZE = 4096
     
    Global Constants
    -const size_t ITERATION_CHUNK_SIZE = 10000000
     For functions that lazy load a large CSV, this determines how many bytes are read at a time.
     
    -const CSVFormat GUESS_CSV = { '\0', '"', 0, {}, false }
     A dummy variable used to indicate delimiter should be guessed.
     
    -const CSVFormat DEFAULT_CSV = { ',', '"', 0, {}, false }
     RFC 4180 CSV format.
     
    -const CSVFormat DEFAULT_CSV_STRICT = { ',', '"', 0, {}, true }
     RFC 4180 CSV format with strict parsing.
     
    - - - - - - - - - - - - - - - - - - -

    -CSV Writing

    -template<class OutputStream >
    using CSVWriter = DelimWriter< OutputStream, ',', '"'>
     Class for writing CSV files.
     
    -template<class OutputStream >
    using TSVWriter = DelimWriter< OutputStream, '\t', '"'>
     Class for writing tab-separated values files.
     
    template<char Delim = ',', char Quote = '"'>
    std::string csv_escape (const std::string &in, const bool quote_minimal=true)
     
    template<class OutputStream >
    CSVWriter< OutputStream > make_csv_writer (OutputStream &out)
     
    template<class OutputStream >
    TSVWriter< OutputStream > make_tsv_writer (OutputStream &out)
     
    -

    Detailed Description

    -

    The all encompassing namespace.

    -

    Enumeration Type Documentation

    - -

    ◆ DataType

    - -
    -
    - - - - -
    enum csv::DataType
    -
    -

    Enumerates the different CSV field types that are recognized by this library

    -
      -
    • 0. CSV_NULL (empty string)
    • -
    • 1. CSV_STRING
    • -
    • 2. CSV_INT
    • -
    • 3. CSV_LONG_INT
    • -
    • 4. CSV_LONG_LONG_INT
    • -
    • 5. CSV_DOUBLE
    • -
    -

    Note: Overflowing integers will be stored and classified as doubles. Furthermore, the same number may either be a CSV_LONG_INT or CSV_INT depending on compiler and platform.

    - -

    Definition at line 22 of file data_type.h.

    - -
    -
    -

    Function Documentation

    - -

    ◆ csv_data_types()

    - -
    -
    - - - - - - - - -
    std::unordered_map< std::string, DataType > csv::csv_data_types (const std::string & filename)
    -
    - -

    Useful for uploading CSV files to SQL databases.

    -

    Return a data type for each column such that every value in a column can be converted to the corresponding data type without data loss.

    Parameters
    - - -
    [in]filenameThe CSV file
    -
    -
    -
    Returns
    A mapping of column names to csv::DataType enums
    - -

    Definition at line 219 of file csv_stat.cpp.

    - -
    -
    - -

    ◆ csv_escape()

    - -
    -
    -
    -template<char Delim = ',', char Quote = '"'>
    - - - - - -
    - - - - - - - - - - - - - - - - - - -
    std::string csv::csv_escape (const std::string & in,
    const bool quote_minimal = true 
    )
    -
    -inline
    -
    -

    Format a string to be RFC 4180-compliant

    Parameters
    - - - -
    [in]inString to be CSV-formatted
    [out]quote_minimalOnly quote fields if necessary. If False, everything is quoted.
    -
    -
    - -

    Definition at line 16 of file csv_writer.hpp.

    - -
    -
    - -

    ◆ CSVRow::operator std::vector< std::string >()

    - -
    -
    - - - - - - - -
    csv::CSVRow::operator std::vector< std::string > () const
    -
    -

    Convert this CSVRow into a vector of strings. Note: This is a less efficient method of accessing data than using the [] operator.

    - -

    Definition at line 87 of file csv_row.cpp.

    - -
    -
    - -

    ◆ get_col_names()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    std::vector< std::string > csv::get_col_names (const std::string & filename,
    CSVFormat format 
    )
    -
    - -

    Return a CSV's column names.

    -
    Parameters
    - - - -
    [in]filenamePath to CSV file
    [in]formatFormat of the CSV file
    -
    -
    - -

    Definition at line 209 of file csv_reader.cpp.

    - -
    -
    - -

    ◆ get_col_pos()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    int csv::get_col_pos (const std::string filename,
    const std::string col_name,
    const CSVFormat format 
    )
    -
    - -

    Find the position of a column in a CSV file or CSV_NOT_FOUND otherwise.

    -
    Parameters
    - - - - -
    [in]filenamePath to CSV file
    [in]col_nameColumn whose position we should resolve
    [in]formatFormat of the CSV file
    -
    -
    - -

    Definition at line 221 of file csv_reader.cpp.

    - -
    -
    - -

    ◆ get_file_info()

    - -
    -
    - - - - - - - - -
    CSVFileInfo csv::get_file_info (const std::string & filename)
    -
    - -

    Get basic information about a CSV file.

    -
    #include "csv_parser.hpp"
    #include <iostream>
    int main(int argc, char** argv) {
    using namespace csv;
    if (argc < 2) {
    std::cout << "Usage: " << argv[0] << " [file]" << std::endl;
    exit(1);
    }
    std::string file = argv[1];
    auto info = get_file_info(file);
    std::cout << file << std::endl
    << "Columns: " << internals::format_row(info.col_names, ", ")
    << "Dimensions: " << info.n_rows << " rows x " << info.n_cols << " columns" << std::endl
    << "Delimiter: " << info.delim << std::endl;
    return 0;
    }
    -

    Definition at line 232 of file csv_reader.cpp.

    - -
    -
    - -

    ◆ make_csv_writer()

    - -
    -
    -
    -template<class OutputStream >
    - - - - - -
    - - - - - - - - -
    CSVWriter<OutputStream> csv::make_csv_writer (OutputStream & out)
    -
    -inline
    -
    -

    Return a CSVWriter over the output stream

    - -

    Definition at line 116 of file csv_writer.hpp.

    - -
    -
    - -

    ◆ make_tsv_writer()

    - -
    -
    -
    -template<class OutputStream >
    - - - - - -
    - - - - - - - - -
    TSVWriter<OutputStream> csv::make_tsv_writer (OutputStream & out)
    -
    -inline
    -
    -

    Return a TSVWriter over the output stream

    - -

    Definition at line 122 of file csv_writer.hpp.

    - -
    -
    - -

    ◆ operator""_csv()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    CSVCollection csv::operator""_csv (const char * in,
    size_t n 
    )
    -
    - -

    Parse a RFC 4180 CSV string, returning a collection of CSVRow objects.

    -

    Example:

    TEST_CASE( "Test Escaped Comma", "[read_csv_comma]" ) {
    auto rows = "A,B,C\r\n" // Header row
    "123,\"234,345\",456\r\n"
    "1,2,3\r\n"
    "1,2,3"_csv;
    REQUIRE( vector<string>(rows.front()) ==
    vector<string>({"123", "234,345", "456"}));
    }
    -

    Definition at line 197 of file csv_reader.cpp.

    - -
    -
    - -

    ◆ parse()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    CSVCollection csv::parse (const std::string & in,
    CSVFormat format 
    )
    -
    - -

    Shorthand function for parsing an in-memory CSV string, a collection of CSVRow objects.

    -
    TEST_CASE( "Test Escaped Quote", "[read_csv_quote]" ) {
    // Per RFC 1480, escaped quotes should be doubled up
    string csv_string = (
    "A,B,C\r\n" // Header row
    "123,\"234\"\"345\",456\r\n"
    "123,\"234\"345\",456\r\n" // Unescaped single quote (not strictly valid)
    );
    auto rows = parse(csv_string);
    // Expected Results: Double " is an escape for a single "
    vector<string> correct_row = {"123", "234\"345", "456"};
    // First Row
    REQUIRE( vector<string>(rows.front()) == correct_row );
    // Second Row
    rows.pop_front();
    REQUIRE( vector<string>(rows.front()) == correct_row );
    -

    Definition at line 182 of file csv_reader.cpp.

    - -
    -
    -
    -
    - - - - diff --git a/docs/namespacecsv.js b/docs/namespacecsv.js deleted file mode 100644 index 9296dd24..00000000 --- a/docs/namespacecsv.js +++ /dev/null @@ -1,11 +0,0 @@ -var namespacecsv = -[ - [ "internals", "namespacecsv_1_1internals.html", "namespacecsv_1_1internals" ], - [ "CSVField", "classcsv_1_1CSVField.html", "classcsv_1_1CSVField" ], - [ "CSVFileInfo", "structcsv_1_1CSVFileInfo.html", "structcsv_1_1CSVFileInfo" ], - [ "CSVFormat", "structcsv_1_1CSVFormat.html", "structcsv_1_1CSVFormat" ], - [ "CSVReader", "classcsv_1_1CSVReader.html", "classcsv_1_1CSVReader" ], - [ "CSVRow", "classcsv_1_1CSVRow.html", "classcsv_1_1CSVRow" ], - [ "CSVStat", "classcsv_1_1CSVStat.html", "classcsv_1_1CSVStat" ], - [ "DelimWriter", "classcsv_1_1DelimWriter.html", "classcsv_1_1DelimWriter" ] -]; \ No newline at end of file diff --git a/docs/namespacecsv_1_1internals.html b/docs/namespacecsv_1_1internals.html deleted file mode 100644 index 3ec17baf..00000000 --- a/docs/namespacecsv_1_1internals.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::internals Namespace Reference - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    csv::internals Namespace Reference
    -
    -
    - -

    Stuff that is generally not of interest to end-users. -More...

    - - - - - - - -

    -Classes

    struct  ColNames
     A data structure for handling column name information. More...
     
    class  CSVGuesser
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Functions

    bool is_equal (double a, double b, double epsilon=0.001)
     
    -std::string type_name (const DataType &dtype)
     
    std::string format_row (const std::vector< std::string > &row, const std::string &delim=", ")
     
    DataType data_type (std::string_view in, long double *const out)
     
    -template<typename T >
    DataType type_num ()
     
    -template<>
    DataType type_num< int > ()
     
    -template<>
    DataType type_num< long int > ()
     
    -template<>
    DataType type_num< long long int > ()
     
    -template<>
    DataType type_num< double > ()
     
    -template<>
    DataType type_num< long double > ()
     
    -template<>
    DataType type_num< std::nullptr_t > ()
     
    -template<>
    DataType type_num< std::string > ()
     
    -

    Detailed Description

    -

    Stuff that is generally not of interest to end-users.

    -

    Function Documentation

    - -

    ◆ data_type()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    DataType csv::internals::data_type (std::string_view in,
    long double *const out 
    )
    -
    -

    Distinguishes numeric from other text values. Used by various type casting functions, like csv_parser::CSVReader::read_row()

    -

    Rules

    -
      -
    • Leading and trailing whitespace ("padding") ignored
    • -
    • A string of just whitespace is NULL
    • -
    -
    Parameters
    - - -
    [in]inString value to be examined
    -
    -
    - -

    Definition at line 23 of file data_type.cpp.

    - -
    -
    - -

    ◆ format_row()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    std::string csv::internals::format_row (const std::vector< std::string > & row,
    const std::string & delim = ", " 
    )
    -
    -

    Print a CSV row

    -

    Print a CSV row

    - -

    Definition at line 14 of file csv_reader.cpp.

    - -
    -
    - -

    ◆ is_equal()

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    bool csv::internals::is_equal (double a,
    double b,
    double epsilon = 0.001 
    )
    -
    -

    Returns true if two doubles are about the same

    -

    Returns true if two doubles are about the same

    - -

    Definition at line 9 of file csv_reader.cpp.

    - -
    -
    -
    -
    - - - - diff --git a/docs/namespacecsv_1_1internals.js b/docs/namespacecsv_1_1internals.js deleted file mode 100644 index 5e38c819..00000000 --- a/docs/namespacecsv_1_1internals.js +++ /dev/null @@ -1,5 +0,0 @@ -var namespacecsv_1_1internals = -[ - [ "ColNames", "structcsv_1_1internals_1_1ColNames.html", "structcsv_1_1internals_1_1ColNames" ], - [ "CSVGuesser", "classcsv_1_1internals_1_1CSVGuesser.html", "classcsv_1_1internals_1_1CSVGuesser" ] -]; \ No newline at end of file diff --git a/docs/namespacemembers.html b/docs/namespacemembers.html deleted file mode 100644 index 9ff2cc79..00000000 --- a/docs/namespacemembers.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace Members - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    Here is a list of all documented namespace members with links to the namespaces they belong to:
      -
    • csv_data_types() -: csv -
    • -
    • csv_escape() -: csv -
    • -
    • CSV_NOT_FOUND -: csv -
    • -
    • CSVRow::operator std::vector< std::string >() -: csv -
    • -
    • CSVWriter -: csv -
    • -
    • data_type() -: csv::internals -
    • -
    • DataType -: csv -
    • -
    • DEFAULT_CSV -: csv -
    • -
    • DEFAULT_CSV_STRICT -: csv -
    • -
    • format_row() -: csv::internals -
    • -
    • get_col_names() -: csv -
    • -
    • get_col_pos() -: csv -
    • -
    • get_file_info() -: csv -
    • -
    • GUESS_CSV -: csv -
    • -
    • guess_format() -: csv -
    • -
    • is_equal() -: csv::internals -
    • -
    • ITERATION_CHUNK_SIZE -: csv -
    • -
    • make_csv_writer() -: csv -
    • -
    • make_tsv_writer() -: csv -
    • -
    • operator""_csv() -: csv -
    • -
    • parse() -: csv -
    • -
    • RowCount -: csv -
    • -
    • TSVWriter -: csv -
    • -
    -
    -
    - - - - diff --git a/docs/namespacemembers_enum.html b/docs/namespacemembers_enum.html deleted file mode 100644 index 61bed47d..00000000 --- a/docs/namespacemembers_enum.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace Members - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
      -
    • DataType -: csv -
    • -
    -
    -
    - - - - diff --git a/docs/namespacemembers_func.html b/docs/namespacemembers_func.html deleted file mode 100644 index 1b6355e4..00000000 --- a/docs/namespacemembers_func.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace Members - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
      -
    • csv_data_types() -: csv -
    • -
    • csv_escape() -: csv -
    • -
    • CSVRow::operator std::vector< std::string >() -: csv -
    • -
    • data_type() -: csv::internals -
    • -
    • format_row() -: csv::internals -
    • -
    • get_col_names() -: csv -
    • -
    • get_col_pos() -: csv -
    • -
    • get_file_info() -: csv -
    • -
    • guess_format() -: csv -
    • -
    • is_equal() -: csv::internals -
    • -
    • make_csv_writer() -: csv -
    • -
    • make_tsv_writer() -: csv -
    • -
    • operator""_csv() -: csv -
    • -
    • parse() -: csv -
    • -
    -
    -
    - - - - diff --git a/docs/namespacemembers_type.html b/docs/namespacemembers_type.html deleted file mode 100644 index 0c629c93..00000000 --- a/docs/namespacemembers_type.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace Members - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
      -
    • CSVWriter -: csv -
    • -
    • RowCount -: csv -
    • -
    • TSVWriter -: csv -
    • -
    -
    -
    - - - - diff --git a/docs/namespacemembers_vars.html b/docs/namespacemembers_vars.html deleted file mode 100644 index 9a671e60..00000000 --- a/docs/namespacemembers_vars.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace Members - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
      -
    • CSV_NOT_FOUND -: csv -
    • -
    • DEFAULT_CSV -: csv -
    • -
    • DEFAULT_CSV_STRICT -: csv -
    • -
    • GUESS_CSV -: csv -
    • -
    • ITERATION_CHUNK_SIZE -: csv -
    • -
    -
    -
    - - - - diff --git a/docs/namespaces.html b/docs/namespaces.html deleted file mode 100644 index 5f54f8ea..00000000 --- a/docs/namespaces.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - -Vince's CSV Parser: Namespace List - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    Namespace List
    -
    -
    -
    Here is a list of all documented namespaces with brief descriptions:
    -
    [detail level 12]
    - - -
     NcsvThe all encompassing namespace
     NinternalsStuff that is generally not of interest to end-users
    -
    -
    -
    - - - - diff --git a/docs/namespaces.js b/docs/namespaces.js deleted file mode 100644 index b4db379f..00000000 --- a/docs/namespaces.js +++ /dev/null @@ -1,4 +0,0 @@ -var namespaces = -[ - [ "csv", "namespacecsv.html", "namespacecsv" ] -]; \ No newline at end of file diff --git a/docs/nav_f.png b/docs/nav_f.png deleted file mode 100644 index 72a58a529ed3a9ed6aa0c51a79cf207e026deee2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc) zn!W8uqtnIQ>_z8U diff --git a/docs/nav_g.png b/docs/nav_g.png deleted file mode 100644 index 2093a237a94f6c83e19ec6e5fd42f7ddabdafa81..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5=67#uj90@pIL wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&vFVdQ&MBb@0HFXL=0 ? varName.substring(i+1) : varName; - return eval(n.replace(/\-/g,'_')); -} - -function stripPath(uri) -{ - return uri.substring(uri.lastIndexOf('/')+1); -} - -function stripPath2(uri) -{ - var i = uri.lastIndexOf('/'); - var s = uri.substring(i+1); - var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); - return m ? uri.substring(i-6) : s; -} - -function hashValue() -{ - return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); -} - -function hashUrl() -{ - return '#'+hashValue(); -} - -function pathName() -{ - return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); -} - -function localStorageSupported() -{ - try { - return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; - } - catch(e) { - return false; - } -} - - -function storeLink(link) -{ - if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { - window.localStorage.setItem('navpath',link); - } -} - -function deleteLink() -{ - if (localStorageSupported()) { - window.localStorage.setItem('navpath',''); - } -} - -function cachedLink() -{ - if (localStorageSupported()) { - return window.localStorage.getItem('navpath'); - } else { - return ''; - } -} - -function getScript(scriptName,func,show) -{ - var head = document.getElementsByTagName("head")[0]; - var script = document.createElement('script'); - script.id = scriptName; - script.type = 'text/javascript'; - script.onload = func; - script.src = scriptName+'.js'; - if ($.browser.msie && $.browser.version<=8) { - // script.onload does not work with older versions of IE - script.onreadystatechange = function() { - if (script.readyState=='complete' || script.readyState=='loaded') { - func(); if (show) showRoot(); - } - } - } - head.appendChild(script); -} - -function createIndent(o,domNode,node,level) -{ - var level=-1; - var n = node; - while (n.parentNode) { level++; n=n.parentNode; } - if (node.childrenData) { - var imgNode = document.createElement("span"); - imgNode.className = 'arrow'; - imgNode.style.paddingLeft=(16*level).toString()+'px'; - imgNode.innerHTML=arrowRight; - node.plus_img = imgNode; - node.expandToggle = document.createElement("a"); - node.expandToggle.href = "javascript:void(0)"; - node.expandToggle.onclick = function() { - if (node.expanded) { - $(node.getChildrenUL()).slideUp("fast"); - node.plus_img.innerHTML=arrowRight; - node.expanded = false; - } else { - expandNode(o, node, false, false); - } - } - node.expandToggle.appendChild(imgNode); - domNode.appendChild(node.expandToggle); - } else { - var span = document.createElement("span"); - span.className = 'arrow'; - span.style.width = 16*(level+1)+'px'; - span.innerHTML = ' '; - domNode.appendChild(span); - } -} - -var animationInProgress = false; - -function gotoAnchor(anchor,aname,updateLocation) -{ - var pos, docContent = $('#doc-content'); - var ancParent = $(anchor.parent()); - if (ancParent.hasClass('memItemLeft') || - ancParent.hasClass('fieldname') || - ancParent.hasClass('fieldtype') || - ancParent.is(':header')) - { - pos = ancParent.position().top; - } else if (anchor.position()) { - pos = anchor.position().top; - } - if (pos) { - var dist = Math.abs(Math.min( - pos-docContent.offset().top, - docContent[0].scrollHeight- - docContent.height()-docContent.scrollTop())); - animationInProgress=true; - docContent.animate({ - scrollTop: pos + docContent.scrollTop() - docContent.offset().top - },Math.max(50,Math.min(500,dist)),function(){ - if (updateLocation) window.location.href=aname; - animationInProgress=false; - }); - } -} - -function newNode(o, po, text, link, childrenData, lastNode) -{ - var node = new Object(); - node.children = Array(); - node.childrenData = childrenData; - node.depth = po.depth + 1; - node.relpath = po.relpath; - node.isLast = lastNode; - - node.li = document.createElement("li"); - po.getChildrenUL().appendChild(node.li); - node.parentNode = po; - - node.itemDiv = document.createElement("div"); - node.itemDiv.className = "item"; - - node.labelSpan = document.createElement("span"); - node.labelSpan.className = "label"; - - createIndent(o,node.itemDiv,node,0); - node.itemDiv.appendChild(node.labelSpan); - node.li.appendChild(node.itemDiv); - - var a = document.createElement("a"); - node.labelSpan.appendChild(a); - node.label = document.createTextNode(text); - node.expanded = false; - a.appendChild(node.label); - if (link) { - var url; - if (link.substring(0,1)=='^') { - url = link.substring(1); - link = url; - } else { - url = node.relpath+link; - } - a.className = stripPath(link.replace('#',':')); - if (link.indexOf('#')!=-1) { - var aname = '#'+link.split('#')[1]; - var srcPage = stripPath(pathName()); - var targetPage = stripPath(link.split('#')[0]); - a.href = srcPage!=targetPage ? url : "javascript:void(0)"; - a.onclick = function(){ - storeLink(link); - if (!$(a).parent().parent().hasClass('selected')) - { - $('.item').removeClass('selected'); - $('.item').removeAttr('id'); - $(a).parent().parent().addClass('selected'); - $(a).parent().parent().attr('id','selected'); - } - var anchor = $(aname); - gotoAnchor(anchor,aname,true); - }; - } else { - a.href = url; - a.onclick = function() { storeLink(link); } - } - } else { - if (childrenData != null) - { - a.className = "nolink"; - a.href = "javascript:void(0)"; - a.onclick = node.expandToggle.onclick; - } - } - - node.childrenUL = null; - node.getChildrenUL = function() { - if (!node.childrenUL) { - node.childrenUL = document.createElement("ul"); - node.childrenUL.className = "children_ul"; - node.childrenUL.style.display = "none"; - node.li.appendChild(node.childrenUL); - } - return node.childrenUL; - }; - - return node; -} - -function showRoot() -{ - var headerHeight = $("#top").height(); - var footerHeight = $("#nav-path").height(); - var windowHeight = $(window).height() - headerHeight - footerHeight; - (function (){ // retry until we can scroll to the selected item - try { - var navtree=$('#nav-tree'); - navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); - } catch (err) { - setTimeout(arguments.callee, 0); - } - })(); -} - -function expandNode(o, node, imm, showRoot) -{ - if (node.childrenData && !node.expanded) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - expandNode(o, node, imm, showRoot); - }, showRoot); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } if (imm || ($.browser.msie && $.browser.version>8)) { - // somehow slideDown jumps to the start of tree for IE9 :-( - $(node.getChildrenUL()).show(); - } else { - $(node.getChildrenUL()).slideDown("fast"); - } - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - } - } -} - -function glowEffect(n,duration) -{ - n.addClass('glow').delay(duration).queue(function(next){ - $(this).removeClass('glow');next(); - }); -} - -function highlightAnchor() -{ - var aname = hashUrl(); - var anchor = $(aname); - if (anchor.parent().attr('class')=='memItemLeft'){ - var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); - glowEffect(rows.children(),300); // member without details - } else if (anchor.parent().attr('class')=='fieldname'){ - glowEffect(anchor.parent().parent(),1000); // enum value - } else if (anchor.parent().attr('class')=='fieldtype'){ - glowEffect(anchor.parent().parent(),1000); // struct field - } else if (anchor.parent().is(":header")) { - glowEffect(anchor.parent(),1000); // section header - } else { - glowEffect(anchor.next(),1000); // normal member - } - gotoAnchor(anchor,aname,false); -} - -function selectAndHighlight(hash,n) -{ - var a; - if (hash) { - var link=stripPath(pathName())+':'+hash.substring(1); - a=$('.item a[class$="'+link+'"]'); - } - if (a && a.length) { - a.parent().parent().addClass('selected'); - a.parent().parent().attr('id','selected'); - highlightAnchor(); - } else if (n) { - $(n.itemDiv).addClass('selected'); - $(n.itemDiv).attr('id','selected'); - } - if ($('#nav-tree-contents .item:first').hasClass('selected')) { - $('#nav-sync').css('top','30px'); - } else { - $('#nav-sync').css('top','5px'); - } - showRoot(); -} - -function showNode(o, node, index, hash) -{ - if (node && node.childrenData) { - if (typeof(node.childrenData)==='string') { - var varName = node.childrenData; - getScript(node.relpath+varName,function(){ - node.childrenData = getData(varName); - showNode(o,node,index,hash); - },true); - } else { - if (!node.childrenVisited) { - getNode(o, node); - } - $(node.getChildrenUL()).css({'display':'block'}); - node.plus_img.innerHTML = arrowDown; - node.expanded = true; - var n = node.children[o.breadcrumbs[index]]; - if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); - else hash=''; - } - if (hash.match(/^#l\d+$/)) { - var anchor=$('a[name='+hash.substring(1)+']'); - glowEffect(anchor.parent(),1000); // line number - hash=''; // strip line number anchors - } - var url=root+hash; - var i=-1; - while (NAVTREEINDEX[i+1]<=url) i++; - if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath) - } else { - getScript(relpath+'navtreeindex'+i,function(){ - navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); - if (navTreeSubIndices[i]) { - gotoNode(o,i,root,hash,relpath); - } - },true); - } -} - -function showSyncOff(n,relpath) -{ - n.html(''); -} - -function showSyncOn(n,relpath) -{ - n.html(''); -} - -function toggleSyncButton(relpath) -{ - var navSync = $('#nav-sync'); - if (navSync.hasClass('sync')) { - navSync.removeClass('sync'); - showSyncOff(navSync,relpath); - storeLink(stripPath2(pathName())+hashUrl()); - } else { - navSync.addClass('sync'); - showSyncOn(navSync,relpath); - deleteLink(); - } -} - -function initNavTree(toroot,relpath) -{ - var o = new Object(); - o.toroot = toroot; - o.node = new Object(); - o.node.li = document.getElementById("nav-tree-contents"); - o.node.childrenData = NAVTREE; - o.node.children = new Array(); - o.node.childrenUL = document.createElement("ul"); - o.node.getChildrenUL = function() { return o.node.childrenUL; }; - o.node.li.appendChild(o.node.childrenUL); - o.node.depth = 0; - o.node.relpath = relpath; - o.node.expanded = false; - o.node.isLast = true; - o.node.plus_img = document.createElement("span"); - o.node.plus_img.className = 'arrow'; - o.node.plus_img.innerHTML = arrowRight; - - if (localStorageSupported()) { - var navSync = $('#nav-sync'); - if (cachedLink()) { - showSyncOff(navSync,relpath); - navSync.removeClass('sync'); - } else { - showSyncOn(navSync,relpath); - } - navSync.click(function(){ toggleSyncButton(relpath); }); - } - - $(window).load(function(){ - navTo(o,toroot,hashUrl(),relpath); - showRoot(); - }); - - $(window).bind('hashchange', function(){ - if (window.location.hash && window.location.hash.length>1){ - var a; - if ($(location).attr('hash')){ - var clslink=stripPath(pathName())+':'+hashValue(); - a=$('.item a[class$="'+clslink.replace(/1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM=desktop_vp) { - if (!collapsed) { - collapseExpand(); - } - } else if (width>desktop_vp && collapsedWidth0) { - restoreWidth(0); - collapsed=true; - } - else { - var width = readCookie('width'); - if (width>200 && width<$(window).width()) { restoreWidth(width); } else { restoreWidth(200); } - collapsed=false; - } - } - - header = $("#top"); - sidenav = $("#side-nav"); - content = $("#doc-content"); - navtree = $("#nav-tree"); - footer = $("#nav-path"); - $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); - $(sidenav).resizable({ minWidth: 0 }); - $(window).resize(function() { resizeHeight(); }); - var device = navigator.userAgent.toLowerCase(); - var touch_device = device.match(/(iphone|ipod|ipad|android)/); - if (touch_device) { /* wider split bar for touch only devices */ - $(sidenav).css({ paddingRight:'20px' }); - $('.ui-resizable-e').css({ width:'20px' }); - $('#nav-sync').css({ right:'34px' }); - barWidth=20; - } - var width = readCookie('width'); - if (width) { restoreWidth(width); } else { resizeWidth(); } - resizeHeight(); - var url = location.href; - var i=url.indexOf("#"); - if (i>=0) window.location.hash=url.substr(i); - var _preventDefault = function(evt) { evt.preventDefault(); }; - $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); - $(".ui-resizable-handle").dblclick(collapseExpand); - $(window).load(resizeHeight); -} - - diff --git a/docs/search/all_0.html b/docs/search/all_0.html deleted file mode 100644 index f25360b7..00000000 --- a/docs/search/all_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_0.js b/docs/search/all_0.js deleted file mode 100644 index 87098653..00000000 --- a/docs/search/all_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['bad_5frow_5fhandler',['bad_row_handler',['../group__csv__internal.html#gaea3e7875478c79feba84d6ee97b1d476',1,'csv::CSVReader']]], - ['begin',['begin',['../classcsv_1_1CSVReader.html#ac2b664c3ba18ac36076c1a1891bd1cf2',1,'csv::CSVReader::begin()'],['../classcsv_1_1CSVRow.html#af43866d896d9ac0cb54f4d018d6a74df',1,'csv::CSVRow::begin()']]] -]; diff --git a/docs/search/all_1.html b/docs/search/all_1.html deleted file mode 100644 index b13f0f7f..00000000 --- a/docs/search/all_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_1.js b/docs/search/all_1.js deleted file mode 100644 index 1f0a9657..00000000 --- a/docs/search/all_1.js +++ /dev/null @@ -1,26 +0,0 @@ -var searchData= -[ - ['close',['close',['../classcsv_1_1CSVReader.html#a759e9508e80832b3b394d5afb8f7a8bf',1,'csv::CSVReader']]], - ['col_5fnames',['col_names',['../structcsv_1_1CSVFormat.html#aad626fe4984a01aeefa2c9d97d864f37',1,'csv::CSVFormat::col_names()'],['../structcsv_1_1CSVFileInfo.html#a60260fffa489d08c2173e44d47cfa00a',1,'csv::CSVFileInfo::col_names()'],['../group__csv__internal.html#gac63e71ea5f74271f366cab7af8689b48',1,'csv::CSVReader::col_names()']]], - ['colnames',['ColNames',['../structcsv_1_1internals_1_1ColNames.html',1,'csv::internals']]], - ['correct_5frows',['correct_rows',['../classcsv_1_1CSVReader.html#abf6ee7c791d118092eab3eecf81c966a',1,'csv::CSVReader']]], - ['csv',['csv',['../namespacecsv.html',1,'']]], - ['csv_5fdata_5ftypes',['csv_data_types',['../namespacecsv.html#ad4aa91cb61332520a139962f5b55944f',1,'csv']]], - ['csv_5fescape',['csv_escape',['../namespacecsv.html#a68da6f11bd08b5659d8ce6719e80abee',1,'csv']]], - ['csv_20parser_20internals',['CSV Parser Internals',['../group__csv__internal.html',1,'']]], - ['csv_5fnot_5ffound',['CSV_NOT_FOUND',['../namespacecsv.html#a7742b9dcd46ed5d7698106d3e523a3c8',1,'csv']]], - ['csv_5fparser_2ehpp',['csv_parser.hpp',['../csv__parser_8hpp.html',1,'']]], - ['csv_5freader_2ecpp',['csv_reader.cpp',['../csv__reader_8cpp.html',1,'']]], - ['csv_5fstat_2ecpp',['csv_stat.cpp',['../csv__stat_8cpp.html',1,'']]], - ['csv_5fwriter_2ehpp',['csv_writer.hpp',['../csv__writer_8hpp.html',1,'']]], - ['csvfield',['CSVField',['../classcsv_1_1CSVField.html',1,'csv']]], - ['csvfileinfo',['CSVFileInfo',['../structcsv_1_1CSVFileInfo.html',1,'csv']]], - ['csvformat',['CSVFormat',['../structcsv_1_1CSVFormat.html',1,'csv']]], - ['csvguesser',['CSVGuesser',['../classcsv_1_1internals_1_1CSVGuesser.html',1,'csv::internals']]], - ['csvreader',['CSVReader',['../classcsv_1_1CSVReader.html',1,'csv::CSVReader'],['../classcsv_1_1CSVReader.html#aab773760e65004c49fa476eb2eb70b54',1,'csv::CSVReader::CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)'],['../classcsv_1_1CSVReader.html#adc5c14177ad156c9fad1d10f5e9d5d2d',1,'csv::CSVReader::CSVReader(CSVFormat format=DEFAULT_CSV)']]], - ['csvrow',['CSVRow',['../classcsv_1_1CSVRow.html',1,'csv']]], - ['csvstat',['CSVStat',['../classcsv_1_1CSVStat.html',1,'csv::CSVStat'],['../classcsv_1_1CSVStat.html#a67da63a7557bf7efb8884dd553113b90',1,'csv::CSVStat::CSVStat()']]], - ['csvwriter',['CSVWriter',['../namespacecsv.html#abe45a573801e1f10fbb1586486db9bb1',1,'csv']]], - ['internals',['internals',['../namespacecsv_1_1internals.html',1,'csv']]], - ['vector_3c_20std_3a_3astring_20_3e',['vector< std::string >',['../namespacecsv.html#a447b12877f241f66ba2f3a2547782134',1,'csv']]] -]; diff --git a/docs/search/all_10.html b/docs/search/all_10.html deleted file mode 100644 index d1345a1f..00000000 --- a/docs/search/all_10.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_10.js b/docs/search/all_10.js deleted file mode 100644 index 8d4a0f7f..00000000 --- a/docs/search/all_10.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['vince_27s_20csv_20parser',['Vince's CSV Parser',['../index.html',1,'']]] -]; diff --git a/docs/search/all_11.html b/docs/search/all_11.html deleted file mode 100644 index 2be8b711..00000000 --- a/docs/search/all_11.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_11.js b/docs/search/all_11.js deleted file mode 100644 index ebbe9ece..00000000 --- a/docs/search/all_11.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['write_5frecord',['write_record',['../group__csv__internal.html#ga609293317d4520eb6cc711c012240cb0',1,'csv::CSVReader']]], - ['write_5frow',['write_row',['../classcsv_1_1DelimWriter.html#af71375d3bd496f10965e3a78d710e89c',1,'csv::DelimWriter']]] -]; diff --git a/docs/search/all_2.html b/docs/search/all_2.html deleted file mode 100644 index 9543c57b..00000000 --- a/docs/search/all_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_2.js b/docs/search/all_2.js deleted file mode 100644 index 5286c3b7..00000000 --- a/docs/search/all_2.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['data_5ftype',['data_type',['../namespacecsv_1_1internals.html#a6f68db7d88a0953107d2a9f13b7b985e',1,'csv::internals']]], - ['datatype',['DataType',['../namespacecsv.html#a1a3911f2387412df696be542923ef62d',1,'csv']]], - ['default_5fcsv',['DEFAULT_CSV',['../namespacecsv.html#ae5efeba17998ae0b741f10201c77a9cb',1,'csv']]], - ['default_5fcsv_5fstrict',['DEFAULT_CSV_STRICT',['../namespacecsv.html#a2aef42e5fa96f1eb42968856f7348901',1,'csv']]], - ['delim',['delim',['../structcsv_1_1CSVFileInfo.html#ab4498493fafd150c9f658ff94c3cb099',1,'csv::CSVFileInfo']]], - ['delimiter',['delimiter',['../group__csv__internal.html#gaf3cd9076878b66ce3a173d1d781ba9f6',1,'csv::CSVReader']]], - ['delimwriter',['DelimWriter',['../classcsv_1_1DelimWriter.html',1,'csv']]] -]; diff --git a/docs/search/all_3.html b/docs/search/all_3.html deleted file mode 100644 index 03405c0f..00000000 --- a/docs/search/all_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_3.js b/docs/search/all_3.js deleted file mode 100644 index 10340db7..00000000 --- a/docs/search/all_3.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['end',['end',['../classcsv_1_1CSVReader.html#a13a1161c1512e23a6be6f8b7f0ead6eb',1,'csv::CSVReader::end()'],['../classcsv_1_1CSVRow.html#a57d1e7d834d471332238abed5a5da112',1,'csv::CSVRow::end()']]], - ['end_5ffeed',['end_feed',['../classcsv_1_1CSVReader.html#a8ac02ea6f091b18f9ef9c9a793d4c3bd',1,'csv::CSVReader']]] -]; diff --git a/docs/search/all_4.html b/docs/search/all_4.html deleted file mode 100644 index 8e1f4b9c..00000000 --- a/docs/search/all_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_4.js b/docs/search/all_4.js deleted file mode 100644 index 5ba61081..00000000 --- a/docs/search/all_4.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['feed',['feed',['../classcsv_1_1CSVReader.html#a0e16afa967b390c29e2aab63087f5abe',1,'csv::CSVReader::feed(std::string_view in)'],['../group__csv__internal.html#gae2934a7ef4abb2829b4455f2068bf214',1,'csv::CSVReader::feed(std::unique_ptr< std::string > &&)']]], - ['feed_5fbuffer',['feed_buffer',['../group__csv__internal.html#ga0b727379853c20bb8a6fb2af78fce314',1,'csv::CSVReader']]], - ['feed_5fcond',['feed_cond',['../group__csv__internal.html#ga77144227a1cdf5ef728a68a1f2bfc9e4',1,'csv::CSVReader']]], - ['feed_5flock',['feed_lock',['../group__csv__internal.html#ga9a8b06d3470032217b592070866e315f',1,'csv::CSVReader']]], - ['filename',['filename',['../structcsv_1_1CSVFileInfo.html#af5efb1adbf817734620564b12ed895e1',1,'csv::CSVFileInfo']]], - ['first_5fguess',['first_guess',['../classcsv_1_1internals_1_1CSVGuesser.html#aa73a9a48294ca4ae3ab564e729456ca4',1,'csv::internals::CSVGuesser']]], - ['format_5frow',['format_row',['../namespacecsv_1_1internals.html#a7ab04b6d1c0bc499c8f494dad23f1307',1,'csv::internals']]] -]; diff --git a/docs/search/all_5.html b/docs/search/all_5.html deleted file mode 100644 index 89a879ea..00000000 --- a/docs/search/all_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_5.js b/docs/search/all_5.js deleted file mode 100644 index 336b55ec..00000000 --- a/docs/search/all_5.js +++ /dev/null @@ -1,18 +0,0 @@ -var searchData= -[ - ['get',['get',['../classcsv_1_1CSVField.html#a67ff24172c5ac52417bbc36697511644',1,'csv::CSVField']]], - ['get_5fcol_5fnames',['get_col_names',['../classcsv_1_1CSVReader.html#ab282ff63cde3ff7c453cf377cc05de1c',1,'csv::CSVReader::get_col_names()'],['../namespacecsv.html#a3d46fa01407dce7fd8f33d55604e74da',1,'csv::get_col_names()']]], - ['get_5fcol_5fpos',['get_col_pos',['../namespacecsv.html#af36e457d080e4567f0939db04e193bff',1,'csv']]], - ['get_5fcounts',['get_counts',['../classcsv_1_1CSVStat.html#affadbcfa1bf312afd6504ebd9c179067',1,'csv::CSVStat']]], - ['get_5fdtypes',['get_dtypes',['../classcsv_1_1CSVStat.html#a881131249d111032b2da1ca81b71e96c',1,'csv::CSVStat']]], - ['get_5ffile_5finfo',['get_file_info',['../namespacecsv.html#a59dfc8c288720becdd3a55485262e670',1,'csv']]], - ['get_5fformat',['get_format',['../classcsv_1_1CSVReader.html#a3bd56841002f21a77653d5212f03ef52',1,'csv::CSVReader']]], - ['get_5fmaxes',['get_maxes',['../classcsv_1_1CSVStat.html#a8d2af11719354b5bb2a2296e595f2c0d',1,'csv::CSVStat']]], - ['get_5fmean',['get_mean',['../classcsv_1_1CSVStat.html#a20a3fa0650861a1206d5717b38e1119d',1,'csv::CSVStat']]], - ['get_5fmins',['get_mins',['../classcsv_1_1CSVStat.html#a77adc53d21f2ff86d8537df33416ac13',1,'csv::CSVStat']]], - ['get_5fstring_5fview',['get_string_view',['../classcsv_1_1CSVRow.html#a76f5d7b3c24f456fffcaf674bdaba633',1,'csv::CSVRow']]], - ['get_5fvariance',['get_variance',['../classcsv_1_1CSVStat.html#a2a856a1b6a52d13a5d985ec6ce06aeeb',1,'csv::CSVStat']]], - ['guess_5fcsv',['GUESS_CSV',['../namespacecsv.html#a934424955c1b950cd80a5f0a1e7faaf1',1,'csv']]], - ['guess_5fdelim',['guess_delim',['../classcsv_1_1internals_1_1CSVGuesser.html#a82275ad726eb22e14b57334e8d5b9245',1,'csv::internals::CSVGuesser']]], - ['guess_5fformat',['guess_format',['../namespacecsv.html#abd689f33ce9fe246fd3229c53654232c',1,'csv']]] -]; diff --git a/docs/search/all_6.html b/docs/search/all_6.html deleted file mode 100644 index 6afac066..00000000 --- a/docs/search/all_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_6.js b/docs/search/all_6.js deleted file mode 100644 index 52cfbae7..00000000 --- a/docs/search/all_6.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['header',['header',['../structcsv_1_1CSVFormat.html#ab729b1e62b62e91cb4023fb51ca5344d',1,'csv::CSVFormat']]], - ['header_5frow',['header_row',['../group__csv__internal.html#gaee0d4c8865e2abaae5bcfae76702eb8d',1,'csv::CSVReader']]] -]; diff --git a/docs/search/all_7.html b/docs/search/all_7.html deleted file mode 100644 index de191077..00000000 --- a/docs/search/all_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_7.js b/docs/search/all_7.js deleted file mode 100644 index 32f5b7d6..00000000 --- a/docs/search/all_7.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['index_5fof',['index_of',['../classcsv_1_1CSVReader.html#a76b59e4a7f140ba9e4d0fa9a1758a039',1,'csv::CSVReader']]], - ['infile',['infile',['../group__csv__internal.html#gaa823a7be2b314559dcf0f9efd7ef4e57',1,'csv::CSVReader']]], - ['is_5fequal',['is_equal',['../namespacecsv_1_1internals.html#a80e5b06741dfc9a8273e982bacafee98',1,'csv::internals']]], - ['iteration_5fchunk_5fsize',['ITERATION_CHUNK_SIZE',['../namespacecsv.html#a82452d316c535c04ad187c1863b1e228',1,'csv']]], - ['iterator',['iterator',['../classcsv_1_1CSVRow_1_1iterator.html',1,'csv::CSVRow::iterator'],['../classcsv_1_1CSVReader_1_1iterator.html',1,'csv::CSVReader::iterator']]] -]; diff --git a/docs/search/all_8.html b/docs/search/all_8.html deleted file mode 100644 index 11e27cdb..00000000 --- a/docs/search/all_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_8.js b/docs/search/all_8.js deleted file mode 100644 index c1dc985b..00000000 --- a/docs/search/all_8.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['make_5fcsv_5fwriter',['make_csv_writer',['../namespacecsv.html#a7702fc0866ba716a7f7ee1388c15b477',1,'csv']]], - ['make_5fflags',['make_flags',['../group__csv__internal.html#gac2215271c176fa343fdfea1d319aab4c',1,'csv::CSVReader']]], - ['make_5ftsv_5fwriter',['make_tsv_writer',['../namespacecsv.html#a859684d7d4dc5a8431f3d46d034e7663',1,'csv']]], - ['min_5frow_5flen',['min_row_len',['../group__csv__internal.html#gae59eb9a27868a8ccc4e86901051fb9b6',1,'csv::CSVReader']]] -]; diff --git a/docs/search/all_9.html b/docs/search/all_9.html deleted file mode 100644 index f8abbbe5..00000000 --- a/docs/search/all_9.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_9.js b/docs/search/all_9.js deleted file mode 100644 index e34098a3..00000000 --- a/docs/search/all_9.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['n_5fcols',['n_cols',['../structcsv_1_1CSVFileInfo.html#a07230a749c9a9e38a0ddcbd47a3e98e3',1,'csv::CSVFileInfo']]], - ['n_5frows',['n_rows',['../structcsv_1_1CSVFileInfo.html#a5cc2f778eeb60b29acdc88662985695c',1,'csv::CSVFileInfo']]] -]; diff --git a/docs/search/all_a.html b/docs/search/all_a.html deleted file mode 100644 index 9601fcee..00000000 --- a/docs/search/all_a.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_a.js b/docs/search/all_a.js deleted file mode 100644 index 87a082a0..00000000 --- a/docs/search/all_a.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['operator_22_22_5fcsv',['operator""_csv',['../namespacecsv.html#abcbc9a3ab5e6eb6905a995964c7cbf13',1,'csv']]], - ['operator_2a',['operator*',['../classcsv_1_1CSVReader_1_1iterator.html#a90659253cc409c96908ad00aa743061c',1,'csv::CSVReader::iterator']]], - ['operator_2b_2b',['operator++',['../classcsv_1_1CSVReader_1_1iterator.html#a280ee76af5604b6bc954ed0f23ac1a5f',1,'csv::CSVReader::iterator']]], - ['operator_2d_3e',['operator->',['../classcsv_1_1CSVReader_1_1iterator.html#ab4cfd07f9bfcd6cdd64d1f36bcacfe66',1,'csv::CSVReader::iterator']]], - ['operator_3c_3c',['operator<<',['../classcsv_1_1DelimWriter.html#af060b8e69e8519a9d70e2864e29a5745',1,'csv::DelimWriter']]], - ['operator_3d_3d',['operator==',['../classcsv_1_1CSVReader_1_1iterator.html#af24cee2d26b85bde5c93975d8fe70fc0',1,'csv::CSVReader::iterator']]], - ['operator_5b_5d',['operator[]',['../classcsv_1_1CSVRow.html#ad523d2b544bc7dab0a121891e5062d2c',1,'csv::CSVRow::operator[](size_t n) const'],['../classcsv_1_1CSVRow.html#a7279b8be87c4ce717447a432c9143839',1,'csv::CSVRow::operator[](const std::string &) const']]] -]; diff --git a/docs/search/all_b.html b/docs/search/all_b.html deleted file mode 100644 index 0814e4e0..00000000 --- a/docs/search/all_b.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_b.js b/docs/search/all_b.js deleted file mode 100644 index 137d8b5f..00000000 --- a/docs/search/all_b.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['parse',['parse',['../classcsv_1_1CSVReader.html#af78ef3e1fa6f53b5fabf8ac20d985ebd',1,'csv::CSVReader::parse()'],['../namespacecsv.html#af2d1242068d0e53a248c61e83c8349d9',1,'csv::parse()']]], - ['parse_5fflags',['parse_flags',['../group__csv__internal.html#gae73cb1981c9866e1ea73a54ee6ac6002',1,'csv::CSVReader']]], - ['parseflags',['ParseFlags',['../group__csv__internal.html#ga22d269500460026ed8d99947f0766200',1,'csv::CSVReader']]] -]; diff --git a/docs/search/all_c.html b/docs/search/all_c.html deleted file mode 100644 index da08c387..00000000 --- a/docs/search/all_c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_c.js b/docs/search/all_c.js deleted file mode 100644 index 32b66999..00000000 --- a/docs/search/all_c.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['quote_5fchar',['quote_char',['../structcsv_1_1CSVFormat.html#a3b158c25f4e353fd855491c50ee47b89',1,'csv::CSVFormat::quote_char()'],['../group__csv__internal.html#gae928205d7834e243ff41aaf74bd70735',1,'csv::CSVReader::quote_char()']]] -]; diff --git a/docs/search/all_d.html b/docs/search/all_d.html deleted file mode 100644 index 9986c9cb..00000000 --- a/docs/search/all_d.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_d.js b/docs/search/all_d.js deleted file mode 100644 index c0022943..00000000 --- a/docs/search/all_d.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['read_5fcsv',['read_csv',['../group__csv__internal.html#ga44deca7b16b9de9092a029f6c014b1fa',1,'csv::CSVReader']]], - ['read_5fcsv_5fworker',['read_csv_worker',['../group__csv__internal.html#ga49ab4671b28da24f5ae8670a9eef557d',1,'csv::CSVReader']]], - ['read_5frow',['read_row',['../classcsv_1_1CSVReader.html#aa28b87c77c5366e34ef86b35fb9f7238',1,'csv::CSVReader']]], - ['record_5fbuffer',['record_buffer',['../group__csv__internal.html#gabee3f8a985267182e9ffd289012f042f',1,'csv::CSVReader']]], - ['records',['records',['../group__csv__internal.html#ga309c7035f6b7fe25ca9b1c2d8df30e59',1,'csv::CSVReader']]], - ['reverse_5fiterator',['reverse_iterator',['../classcsv_1_1CSVRow.html#a5563065ee9b3ecb511469259ee843e3c',1,'csv::CSVRow']]], - ['row_5fnum',['row_num',['../classcsv_1_1CSVReader.html#a189e31dc240dc4f0bf7776b437d5c517',1,'csv::CSVReader']]], - ['rowcount',['RowCount',['../namespacecsv.html#a5ee7c8c04afbcd1f4d24046143addc29',1,'csv']]] -]; diff --git a/docs/search/all_e.html b/docs/search/all_e.html deleted file mode 100644 index 9fa42bba..00000000 --- a/docs/search/all_e.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_e.js b/docs/search/all_e.js deleted file mode 100644 index fd8bac3c..00000000 --- a/docs/search/all_e.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['second_5fguess',['second_guess',['../classcsv_1_1internals_1_1CSVGuesser.html#a3ea5d2dee87b8cb23aca15b9c9aaa351',1,'csv::internals::CSVGuesser']]], - ['size',['size',['../classcsv_1_1CSVRow.html#afd489a3a2920fda476bbfe3ed549f0b9',1,'csv::CSVRow']]], - ['split_5fbuffer',['split_buffer',['../group__csv__internal.html#ga98792115fd80e24782a6816c73f94148',1,'csv::CSVReader']]], - ['strict',['strict',['../group__csv__internal.html#gab5b7ac71d40acf632e031f2059c0cb9b',1,'csv::CSVReader']]] -]; diff --git a/docs/search/all_f.html b/docs/search/all_f.html deleted file mode 100644 index 6ecfc0ed..00000000 --- a/docs/search/all_f.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/all_f.js b/docs/search/all_f.js deleted file mode 100644 index 0ad129b3..00000000 --- a/docs/search/all_f.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['tsvwriter',['TSVWriter',['../namespacecsv.html#a0a8b78b3e8a3e124ae9fccc889c283ca',1,'csv']]], - ['type',['type',['../classcsv_1_1CSVField.html#aee31987c4c62c8ef7a89b475bd089618',1,'csv::CSVField']]] -]; diff --git a/docs/search/classes_0.html b/docs/search/classes_0.html deleted file mode 100644 index 1c3e406a..00000000 --- a/docs/search/classes_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/classes_0.js b/docs/search/classes_0.js deleted file mode 100644 index 953fa0af..00000000 --- a/docs/search/classes_0.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['colnames',['ColNames',['../structcsv_1_1internals_1_1ColNames.html',1,'csv::internals']]], - ['csvfield',['CSVField',['../classcsv_1_1CSVField.html',1,'csv']]], - ['csvfileinfo',['CSVFileInfo',['../structcsv_1_1CSVFileInfo.html',1,'csv']]], - ['csvformat',['CSVFormat',['../structcsv_1_1CSVFormat.html',1,'csv']]], - ['csvguesser',['CSVGuesser',['../classcsv_1_1internals_1_1CSVGuesser.html',1,'csv::internals']]], - ['csvreader',['CSVReader',['../classcsv_1_1CSVReader.html',1,'csv']]], - ['csvrow',['CSVRow',['../classcsv_1_1CSVRow.html',1,'csv']]], - ['csvstat',['CSVStat',['../classcsv_1_1CSVStat.html',1,'csv']]] -]; diff --git a/docs/search/classes_1.html b/docs/search/classes_1.html deleted file mode 100644 index a8e70695..00000000 --- a/docs/search/classes_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/classes_1.js b/docs/search/classes_1.js deleted file mode 100644 index 3d729d55..00000000 --- a/docs/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['delimwriter',['DelimWriter',['../classcsv_1_1DelimWriter.html',1,'csv']]] -]; diff --git a/docs/search/classes_2.html b/docs/search/classes_2.html deleted file mode 100644 index 5c09c969..00000000 --- a/docs/search/classes_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/classes_2.js b/docs/search/classes_2.js deleted file mode 100644 index 512af173..00000000 --- a/docs/search/classes_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['iterator',['iterator',['../classcsv_1_1CSVRow_1_1iterator.html',1,'csv::CSVRow::iterator'],['../classcsv_1_1CSVReader_1_1iterator.html',1,'csv::CSVReader::iterator']]] -]; diff --git a/docs/search/close.png b/docs/search/close.png deleted file mode 100644 index 9342d3dfeea7b7c4ee610987e717804b5a42ceb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 273 zcmV+s0q*{ZP)4(RlMby96)VwnbG{ zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b) zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC X2MT$R4iQDd00000NkvXXu0mjfia~GN diff --git a/docs/search/enums_0.html b/docs/search/enums_0.html deleted file mode 100644 index ee343ac0..00000000 --- a/docs/search/enums_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/enums_0.js b/docs/search/enums_0.js deleted file mode 100644 index 027425b9..00000000 --- a/docs/search/enums_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['datatype',['DataType',['../namespacecsv.html#a1a3911f2387412df696be542923ef62d',1,'csv']]] -]; diff --git a/docs/search/enums_1.html b/docs/search/enums_1.html deleted file mode 100644 index 3fd210a0..00000000 --- a/docs/search/enums_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/enums_1.js b/docs/search/enums_1.js deleted file mode 100644 index dbc1ecdd..00000000 --- a/docs/search/enums_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['parseflags',['ParseFlags',['../group__csv__internal.html#ga22d269500460026ed8d99947f0766200',1,'csv::CSVReader']]] -]; diff --git a/docs/search/files_0.html b/docs/search/files_0.html deleted file mode 100644 index 4f272b83..00000000 --- a/docs/search/files_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/files_0.js b/docs/search/files_0.js deleted file mode 100644 index 2ee5f86e..00000000 --- a/docs/search/files_0.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['csv_5fparser_2ehpp',['csv_parser.hpp',['../csv__parser_8hpp.html',1,'']]], - ['csv_5freader_2ecpp',['csv_reader.cpp',['../csv__reader_8cpp.html',1,'']]], - ['csv_5fstat_2ecpp',['csv_stat.cpp',['../csv__stat_8cpp.html',1,'']]], - ['csv_5fwriter_2ehpp',['csv_writer.hpp',['../csv__writer_8hpp.html',1,'']]] -]; diff --git a/docs/search/functions_0.html b/docs/search/functions_0.html deleted file mode 100644 index 4e6d87d1..00000000 --- a/docs/search/functions_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js deleted file mode 100644 index 87098653..00000000 --- a/docs/search/functions_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['bad_5frow_5fhandler',['bad_row_handler',['../group__csv__internal.html#gaea3e7875478c79feba84d6ee97b1d476',1,'csv::CSVReader']]], - ['begin',['begin',['../classcsv_1_1CSVReader.html#ac2b664c3ba18ac36076c1a1891bd1cf2',1,'csv::CSVReader::begin()'],['../classcsv_1_1CSVRow.html#af43866d896d9ac0cb54f4d018d6a74df',1,'csv::CSVRow::begin()']]] -]; diff --git a/docs/search/functions_1.html b/docs/search/functions_1.html deleted file mode 100644 index b343e2db..00000000 --- a/docs/search/functions_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_1.js b/docs/search/functions_1.js deleted file mode 100644 index ef0ac311..00000000 --- a/docs/search/functions_1.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['close',['close',['../classcsv_1_1CSVReader.html#a759e9508e80832b3b394d5afb8f7a8bf',1,'csv::CSVReader']]], - ['csv_5fdata_5ftypes',['csv_data_types',['../namespacecsv.html#ad4aa91cb61332520a139962f5b55944f',1,'csv']]], - ['csv_5fescape',['csv_escape',['../namespacecsv.html#a68da6f11bd08b5659d8ce6719e80abee',1,'csv']]], - ['csvreader',['CSVReader',['../classcsv_1_1CSVReader.html#aab773760e65004c49fa476eb2eb70b54',1,'csv::CSVReader::CSVReader(const std::string &filename, CSVFormat format=GUESS_CSV)'],['../classcsv_1_1CSVReader.html#adc5c14177ad156c9fad1d10f5e9d5d2d',1,'csv::CSVReader::CSVReader(CSVFormat format=DEFAULT_CSV)']]], - ['csvstat',['CSVStat',['../classcsv_1_1CSVStat.html#a67da63a7557bf7efb8884dd553113b90',1,'csv::CSVStat']]], - ['vector_3c_20std_3a_3astring_20_3e',['vector< std::string >',['../namespacecsv.html#a447b12877f241f66ba2f3a2547782134',1,'csv']]] -]; diff --git a/docs/search/functions_2.html b/docs/search/functions_2.html deleted file mode 100644 index ecce2f31..00000000 --- a/docs/search/functions_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_2.js b/docs/search/functions_2.js deleted file mode 100644 index 227fe9e4..00000000 --- a/docs/search/functions_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['data_5ftype',['data_type',['../namespacecsv_1_1internals.html#a6f68db7d88a0953107d2a9f13b7b985e',1,'csv::internals']]] -]; diff --git a/docs/search/functions_3.html b/docs/search/functions_3.html deleted file mode 100644 index 15f06abd..00000000 --- a/docs/search/functions_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_3.js b/docs/search/functions_3.js deleted file mode 100644 index 10340db7..00000000 --- a/docs/search/functions_3.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['end',['end',['../classcsv_1_1CSVReader.html#a13a1161c1512e23a6be6f8b7f0ead6eb',1,'csv::CSVReader::end()'],['../classcsv_1_1CSVRow.html#a57d1e7d834d471332238abed5a5da112',1,'csv::CSVRow::end()']]], - ['end_5ffeed',['end_feed',['../classcsv_1_1CSVReader.html#a8ac02ea6f091b18f9ef9c9a793d4c3bd',1,'csv::CSVReader']]] -]; diff --git a/docs/search/functions_4.html b/docs/search/functions_4.html deleted file mode 100644 index 8985ff27..00000000 --- a/docs/search/functions_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_4.js b/docs/search/functions_4.js deleted file mode 100644 index de398669..00000000 --- a/docs/search/functions_4.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['feed',['feed',['../classcsv_1_1CSVReader.html#a0e16afa967b390c29e2aab63087f5abe',1,'csv::CSVReader::feed(std::string_view in)'],['../group__csv__internal.html#gae2934a7ef4abb2829b4455f2068bf214',1,'csv::CSVReader::feed(std::unique_ptr< std::string > &&)']]], - ['first_5fguess',['first_guess',['../classcsv_1_1internals_1_1CSVGuesser.html#aa73a9a48294ca4ae3ab564e729456ca4',1,'csv::internals::CSVGuesser']]], - ['format_5frow',['format_row',['../namespacecsv_1_1internals.html#a7ab04b6d1c0bc499c8f494dad23f1307',1,'csv::internals']]] -]; diff --git a/docs/search/functions_5.html b/docs/search/functions_5.html deleted file mode 100644 index 03149184..00000000 --- a/docs/search/functions_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_5.js b/docs/search/functions_5.js deleted file mode 100644 index aac1fdc4..00000000 --- a/docs/search/functions_5.js +++ /dev/null @@ -1,17 +0,0 @@ -var searchData= -[ - ['get',['get',['../classcsv_1_1CSVField.html#a67ff24172c5ac52417bbc36697511644',1,'csv::CSVField']]], - ['get_5fcol_5fnames',['get_col_names',['../classcsv_1_1CSVReader.html#ab282ff63cde3ff7c453cf377cc05de1c',1,'csv::CSVReader::get_col_names()'],['../namespacecsv.html#a3d46fa01407dce7fd8f33d55604e74da',1,'csv::get_col_names()']]], - ['get_5fcol_5fpos',['get_col_pos',['../namespacecsv.html#af36e457d080e4567f0939db04e193bff',1,'csv']]], - ['get_5fcounts',['get_counts',['../classcsv_1_1CSVStat.html#affadbcfa1bf312afd6504ebd9c179067',1,'csv::CSVStat']]], - ['get_5fdtypes',['get_dtypes',['../classcsv_1_1CSVStat.html#a881131249d111032b2da1ca81b71e96c',1,'csv::CSVStat']]], - ['get_5ffile_5finfo',['get_file_info',['../namespacecsv.html#a59dfc8c288720becdd3a55485262e670',1,'csv']]], - ['get_5fformat',['get_format',['../classcsv_1_1CSVReader.html#a3bd56841002f21a77653d5212f03ef52',1,'csv::CSVReader']]], - ['get_5fmaxes',['get_maxes',['../classcsv_1_1CSVStat.html#a8d2af11719354b5bb2a2296e595f2c0d',1,'csv::CSVStat']]], - ['get_5fmean',['get_mean',['../classcsv_1_1CSVStat.html#a20a3fa0650861a1206d5717b38e1119d',1,'csv::CSVStat']]], - ['get_5fmins',['get_mins',['../classcsv_1_1CSVStat.html#a77adc53d21f2ff86d8537df33416ac13',1,'csv::CSVStat']]], - ['get_5fstring_5fview',['get_string_view',['../classcsv_1_1CSVRow.html#a76f5d7b3c24f456fffcaf674bdaba633',1,'csv::CSVRow']]], - ['get_5fvariance',['get_variance',['../classcsv_1_1CSVStat.html#a2a856a1b6a52d13a5d985ec6ce06aeeb',1,'csv::CSVStat']]], - ['guess_5fdelim',['guess_delim',['../classcsv_1_1internals_1_1CSVGuesser.html#a82275ad726eb22e14b57334e8d5b9245',1,'csv::internals::CSVGuesser']]], - ['guess_5fformat',['guess_format',['../namespacecsv.html#abd689f33ce9fe246fd3229c53654232c',1,'csv']]] -]; diff --git a/docs/search/functions_6.html b/docs/search/functions_6.html deleted file mode 100644 index c5061236..00000000 --- a/docs/search/functions_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_6.js b/docs/search/functions_6.js deleted file mode 100644 index c7ec14cb..00000000 --- a/docs/search/functions_6.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['index_5fof',['index_of',['../classcsv_1_1CSVReader.html#a76b59e4a7f140ba9e4d0fa9a1758a039',1,'csv::CSVReader']]], - ['is_5fequal',['is_equal',['../namespacecsv_1_1internals.html#a80e5b06741dfc9a8273e982bacafee98',1,'csv::internals']]] -]; diff --git a/docs/search/functions_7.html b/docs/search/functions_7.html deleted file mode 100644 index 83a7b84b..00000000 --- a/docs/search/functions_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_7.js b/docs/search/functions_7.js deleted file mode 100644 index 561d9c4e..00000000 --- a/docs/search/functions_7.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['make_5fcsv_5fwriter',['make_csv_writer',['../namespacecsv.html#a7702fc0866ba716a7f7ee1388c15b477',1,'csv']]], - ['make_5fflags',['make_flags',['../group__csv__internal.html#gac2215271c176fa343fdfea1d319aab4c',1,'csv::CSVReader']]], - ['make_5ftsv_5fwriter',['make_tsv_writer',['../namespacecsv.html#a859684d7d4dc5a8431f3d46d034e7663',1,'csv']]] -]; diff --git a/docs/search/functions_8.html b/docs/search/functions_8.html deleted file mode 100644 index b55f0e65..00000000 --- a/docs/search/functions_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_8.js b/docs/search/functions_8.js deleted file mode 100644 index 87a082a0..00000000 --- a/docs/search/functions_8.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['operator_22_22_5fcsv',['operator""_csv',['../namespacecsv.html#abcbc9a3ab5e6eb6905a995964c7cbf13',1,'csv']]], - ['operator_2a',['operator*',['../classcsv_1_1CSVReader_1_1iterator.html#a90659253cc409c96908ad00aa743061c',1,'csv::CSVReader::iterator']]], - ['operator_2b_2b',['operator++',['../classcsv_1_1CSVReader_1_1iterator.html#a280ee76af5604b6bc954ed0f23ac1a5f',1,'csv::CSVReader::iterator']]], - ['operator_2d_3e',['operator->',['../classcsv_1_1CSVReader_1_1iterator.html#ab4cfd07f9bfcd6cdd64d1f36bcacfe66',1,'csv::CSVReader::iterator']]], - ['operator_3c_3c',['operator<<',['../classcsv_1_1DelimWriter.html#af060b8e69e8519a9d70e2864e29a5745',1,'csv::DelimWriter']]], - ['operator_3d_3d',['operator==',['../classcsv_1_1CSVReader_1_1iterator.html#af24cee2d26b85bde5c93975d8fe70fc0',1,'csv::CSVReader::iterator']]], - ['operator_5b_5d',['operator[]',['../classcsv_1_1CSVRow.html#ad523d2b544bc7dab0a121891e5062d2c',1,'csv::CSVRow::operator[](size_t n) const'],['../classcsv_1_1CSVRow.html#a7279b8be87c4ce717447a432c9143839',1,'csv::CSVRow::operator[](const std::string &) const']]] -]; diff --git a/docs/search/functions_9.html b/docs/search/functions_9.html deleted file mode 100644 index c73f07bb..00000000 --- a/docs/search/functions_9.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_9.js b/docs/search/functions_9.js deleted file mode 100644 index bb5237f2..00000000 --- a/docs/search/functions_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['parse',['parse',['../namespacecsv.html#af2d1242068d0e53a248c61e83c8349d9',1,'csv']]] -]; diff --git a/docs/search/functions_a.html b/docs/search/functions_a.html deleted file mode 100644 index f10ad638..00000000 --- a/docs/search/functions_a.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_a.js b/docs/search/functions_a.js deleted file mode 100644 index 8e5a59f2..00000000 --- a/docs/search/functions_a.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['read_5fcsv',['read_csv',['../group__csv__internal.html#ga44deca7b16b9de9092a029f6c014b1fa',1,'csv::CSVReader']]], - ['read_5fcsv_5fworker',['read_csv_worker',['../group__csv__internal.html#ga49ab4671b28da24f5ae8670a9eef557d',1,'csv::CSVReader']]], - ['read_5frow',['read_row',['../classcsv_1_1CSVReader.html#aa28b87c77c5366e34ef86b35fb9f7238',1,'csv::CSVReader']]] -]; diff --git a/docs/search/functions_b.html b/docs/search/functions_b.html deleted file mode 100644 index 172ea1b3..00000000 --- a/docs/search/functions_b.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_b.js b/docs/search/functions_b.js deleted file mode 100644 index 049fb123..00000000 --- a/docs/search/functions_b.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['second_5fguess',['second_guess',['../classcsv_1_1internals_1_1CSVGuesser.html#a3ea5d2dee87b8cb23aca15b9c9aaa351',1,'csv::internals::CSVGuesser']]], - ['size',['size',['../classcsv_1_1CSVRow.html#afd489a3a2920fda476bbfe3ed549f0b9',1,'csv::CSVRow']]] -]; diff --git a/docs/search/functions_c.html b/docs/search/functions_c.html deleted file mode 100644 index 99492ba8..00000000 --- a/docs/search/functions_c.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_c.js b/docs/search/functions_c.js deleted file mode 100644 index f4c56f11..00000000 --- a/docs/search/functions_c.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['type',['type',['../classcsv_1_1CSVField.html#aee31987c4c62c8ef7a89b475bd089618',1,'csv::CSVField']]] -]; diff --git a/docs/search/functions_d.html b/docs/search/functions_d.html deleted file mode 100644 index 5be9eccb..00000000 --- a/docs/search/functions_d.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/functions_d.js b/docs/search/functions_d.js deleted file mode 100644 index ebbe9ece..00000000 --- a/docs/search/functions_d.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['write_5frecord',['write_record',['../group__csv__internal.html#ga609293317d4520eb6cc711c012240cb0',1,'csv::CSVReader']]], - ['write_5frow',['write_row',['../classcsv_1_1DelimWriter.html#af71375d3bd496f10965e3a78d710e89c',1,'csv::DelimWriter']]] -]; diff --git a/docs/search/groups_0.html b/docs/search/groups_0.html deleted file mode 100644 index 1ede28df..00000000 --- a/docs/search/groups_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/groups_0.js b/docs/search/groups_0.js deleted file mode 100644 index d4179a8c..00000000 --- a/docs/search/groups_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['csv_20parser_20internals',['CSV Parser Internals',['../group__csv__internal.html',1,'']]] -]; diff --git a/docs/search/mag_sel.png b/docs/search/mag_sel.png deleted file mode 100644 index 81f6040a2092402b4d98f9ffa8855d12a0d4ca17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 563 zcmV-30?hr1P)zxx&tqG15pu7)IiiXFflOc2k;dXd>%13GZAy? zRz!q0=|E6a6vV)&ZBS~G9oe0kbqyw1*gvY`{Pop2oKq#FlzgXt@Xh-7fxh>}`Fxg> z$%N%{$!4=5nM{(;=c!aG1Ofr^Do{u%Ih{^&Fc@H2)+a-?TBXrw5DW&z%Nb6mQ!L9O zl}b@6mB?f=tX3;#vl)}ggh(Vpyh(IK z(Mb0D{l{U$FsRjP;!{($+bsaaVi8T#1c0V#qEIOCYa9@UVLV`f__E81L;?WEaRA;Y zUH;rZ;vb;mk7JX|$=i3O~&If0O@oZfLg8gfIjW=dcBsz;gI=!{-r4# z4%6v$&~;q^j7Fo67yJ(NJWuX+I~I!tj^nW3?}^9bq|<3^+vapS5sgM^x7!cs(+mMT z&y%j};&~po+YO)3hoUH4E*E;e9>?R6SS&`X)p`njycAVcg{rEb41T{~Hk(bl-7eSb zmFxA2uIqo#@R?lKm50ND`~6Nfn|-b1|L6O98vt3Tx@gKz#isxO002ovPDHLkV1kyW B_l^Jn diff --git a/docs/search/namespaces_0.html b/docs/search/namespaces_0.html deleted file mode 100644 index 605ac452..00000000 --- a/docs/search/namespaces_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/namespaces_0.js b/docs/search/namespaces_0.js deleted file mode 100644 index f5b39793..00000000 --- a/docs/search/namespaces_0.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['csv',['csv',['../namespacecsv.html',1,'']]], - ['internals',['internals',['../namespacecsv_1_1internals.html',1,'csv']]] -]; diff --git a/docs/search/nomatches.html b/docs/search/nomatches.html deleted file mode 100644 index b1ded27e..00000000 --- a/docs/search/nomatches.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - -
    -
    No Matches
    -
    - - diff --git a/docs/search/pages_0.html b/docs/search/pages_0.html deleted file mode 100644 index 4955b9e4..00000000 --- a/docs/search/pages_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/pages_0.js b/docs/search/pages_0.js deleted file mode 100644 index 8d4a0f7f..00000000 --- a/docs/search/pages_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['vince_27s_20csv_20parser',['Vince's CSV Parser',['../index.html',1,'']]] -]; diff --git a/docs/search/related_0.html b/docs/search/related_0.html deleted file mode 100644 index 1db947bc..00000000 --- a/docs/search/related_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/related_0.js b/docs/search/related_0.js deleted file mode 100644 index 4fc7b09d..00000000 --- a/docs/search/related_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['parse',['parse',['../classcsv_1_1CSVReader.html#af78ef3e1fa6f53b5fabf8ac20d985ebd',1,'csv::CSVReader']]] -]; diff --git a/docs/search/search.css b/docs/search/search.css deleted file mode 100644 index 3cf9df94..00000000 --- a/docs/search/search.css +++ /dev/null @@ -1,271 +0,0 @@ -/*---------------- Search Box */ - -#FSearchBox { - float: left; -} - -#MSearchBox { - white-space : nowrap; - float: none; - margin-top: 8px; - right: 0px; - width: 170px; - height: 24px; - z-index: 102; -} - -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; -} - -#MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; -} - -#MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; - border:none; - width:115px; - margin-left:20px; - padding-left:4px; - color: #909090; - outline: none; - font: 9pt Arial, Verdana, sans-serif; - -webkit-border-radius: 0px; -} - -#FSearchBox #MSearchField { - margin-left:15px; -} - -#MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:8px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; -} - -#MSearchClose { - display: none; - position: absolute; - top: 4px; - background : none; - border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; - outline: none; -} - -.left #MSearchClose { - left: 6px; -} - -.right #MSearchClose { - right: 2px; -} - -.MSearchBoxActive #MSearchField { - color: #000000; -} - -/*---------------- Search filter selection */ - -#MSearchSelectWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #90A5CE; - background-color: #F9FAFC; - z-index: 10001; - padding-top: 4px; - padding-bottom: 4px; - -moz-border-radius: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -} - -.SelectItem { - font: 8pt Arial, Verdana, sans-serif; - padding-left: 2px; - padding-right: 12px; - border: 0px; -} - -span.SelectionMark { - margin-right: 4px; - font-family: monospace; - outline-style: none; - text-decoration: none; -} - -a.SelectItem { - display: block; - outline-style: none; - color: #000000; - text-decoration: none; - padding-left: 6px; - padding-right: 12px; -} - -a.SelectItem:focus, -a.SelectItem:active { - color: #000000; - outline-style: none; - text-decoration: none; -} - -a.SelectItem:hover { - color: #FFFFFF; - background-color: #3D578C; - outline-style: none; - text-decoration: none; - cursor: pointer; - display: block; -} - -/*---------------- Search results window */ - -iframe#MSearchResults { - width: 60ex; - height: 15em; -} - -#MSearchResultsWindow { - display: none; - position: absolute; - left: 0; top: 0; - border: 1px solid #000; - background-color: #EEF1F7; - z-index:10000; -} - -/* ----------------------------------- */ - - -#SRIndex { - clear:both; - padding-bottom: 15px; -} - -.SREntry { - font-size: 10pt; - padding-left: 1ex; -} - -.SRPage .SREntry { - font-size: 8pt; - padding: 1px 5px; -} - -body.SRPage { - margin: 5px 2px; -} - -.SRChildren { - padding-left: 3ex; padding-bottom: .5em -} - -.SRPage .SRChildren { - display: none; -} - -.SRSymbol { - font-weight: bold; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRScope { - display: block; - color: #425E97; - font-family: Arial, Verdana, sans-serif; - text-decoration: none; - outline: none; -} - -a.SRSymbol:focus, a.SRSymbol:active, -a.SRScope:focus, a.SRScope:active { - text-decoration: underline; -} - -span.SRScope { - padding-left: 4px; -} - -.SRPage .SRStatus { - padding: 2px 5px; - font-size: 8pt; - font-style: italic; -} - -.SRResult { - display: none; -} - -DIV.searchresults { - margin-left: 10px; - margin-right: 10px; -} - -/*---------------- External search page results */ - -.searchresult { - background-color: #F0F3F8; -} - -.pages b { - color: white; - padding: 5px 5px 3px 5px; - background-image: url("../tab_a.png"); - background-repeat: repeat-x; - text-shadow: 0 1px 1px #000000; -} - -.pages { - line-height: 17px; - margin-left: 4px; - text-decoration: none; -} - -.hl { - font-weight: bold; -} - -#searchresults { - margin-bottom: 20px; -} - -.searchpages { - margin-top: 10px; -} - diff --git a/docs/search/search.js b/docs/search/search.js deleted file mode 100644 index dedce3bf..00000000 --- a/docs/search/search.js +++ /dev/null @@ -1,791 +0,0 @@ -function convertToId(search) -{ - var result = ''; - for (i=0;i do a search - { - this.Search(); - } - } - - this.OnSearchSelectKey = function(evt) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==40 && this.searchIndex0) // Up - { - this.searchIndex--; - this.OnSelectItem(this.searchIndex); - } - else if (e.keyCode==13 || e.keyCode==27) - { - this.OnSelectItem(this.searchIndex); - this.CloseSelectionWindow(); - this.DOMSearchField().focus(); - } - return false; - } - - // --------- Actions - - // Closes the results window. - this.CloseResultsWindow = function() - { - this.DOMPopupSearchResultsWindow().style.display = 'none'; - this.DOMSearchClose().style.display = 'none'; - this.Activate(false); - } - - this.CloseSelectionWindow = function() - { - this.DOMSearchSelectWindow().style.display = 'none'; - } - - // Performs a search. - this.Search = function() - { - this.keyTimeout = 0; - - // strip leading whitespace - var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); - - var code = searchValue.toLowerCase().charCodeAt(0); - var idxChar = searchValue.substr(0, 1).toLowerCase(); - if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair - { - idxChar = searchValue.substr(0, 2); - } - - var resultsPage; - var resultsPageWithSearch; - var hasResultsPage; - - var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); - if (idx!=-1) - { - var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; - resultsPageWithSearch = resultsPage+'?'+escape(searchValue); - hasResultsPage = true; - } - else // nothing available for this search term - { - resultsPage = this.resultsPath + '/nomatches.html'; - resultsPageWithSearch = resultsPage; - hasResultsPage = false; - } - - window.frames.MSearchResults.location = resultsPageWithSearch; - var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); - - if (domPopupSearchResultsWindow.style.display!='block') - { - var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; - if (this.insideFrame) - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - domPopupSearchResultsWindow.style.position = 'relative'; - domPopupSearchResultsWindow.style.display = 'block'; - var width = document.body.clientWidth - 8; // the -8 is for IE :-( - domPopupSearchResultsWindow.style.width = width + 'px'; - domPopupSearchResults.style.width = width + 'px'; - } - else - { - var domPopupSearchResults = this.DOMPopupSearchResults(); - var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; - var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; - domPopupSearchResultsWindow.style.display = 'block'; - left -= domPopupSearchResults.offsetWidth; - domPopupSearchResultsWindow.style.top = top + 'px'; - domPopupSearchResultsWindow.style.left = left + 'px'; - } - } - - this.lastSearchValue = searchValue; - this.lastResultsPage = resultsPage; - } - - // -------- Activation Functions - - // Activates or deactivates the search panel, resetting things to - // their default values if necessary. - this.Activate = function(isActive) - { - if (isActive || // open it - this.DOMPopupSearchResultsWindow().style.display == 'block' - ) - { - this.DOMSearchBox().className = 'MSearchBoxActive'; - - var searchField = this.DOMSearchField(); - - if (searchField.value == this.searchLabel) // clear "Search" term upon entry - { - searchField.value = ''; - this.searchActive = true; - } - } - else if (!isActive) // directly remove the panel - { - this.DOMSearchBox().className = 'MSearchBoxInactive'; - this.DOMSearchField().value = this.searchLabel; - this.searchActive = false; - this.lastSearchValue = '' - this.lastResultsPage = ''; - } - } -} - -// ----------------------------------------------------------------------- - -// The class that handles everything on the search results page. -function SearchResults(name) -{ - // The number of matches from the last run of . - this.lastMatchCount = 0; - this.lastKey = 0; - this.repeatOn = false; - - // Toggles the visibility of the passed element ID. - this.FindChildElement = function(id) - { - var parentElement = document.getElementById(id); - var element = parentElement.firstChild; - - while (element && element!=parentElement) - { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') - { - return element; - } - - if (element.nodeName == 'DIV' && element.hasChildNodes()) - { - element = element.firstChild; - } - else if (element.nextSibling) - { - element = element.nextSibling; - } - else - { - do - { - element = element.parentNode; - } - while (element && element!=parentElement && !element.nextSibling); - - if (element && element!=parentElement) - { - element = element.nextSibling; - } - } - } - } - - this.Toggle = function(id) - { - var element = this.FindChildElement(id); - if (element) - { - if (element.style.display == 'block') - { - element.style.display = 'none'; - } - else - { - element.style.display = 'block'; - } - } - } - - // Searches for the passed string. If there is no parameter, - // it takes it from the URL query. - // - // Always returns true, since other documents may try to call it - // and that may or may not be possible. - this.Search = function(search) - { - if (!search) // get search word from URL - { - search = window.location.search; - search = search.substring(1); // Remove the leading '?' - search = unescape(search); - } - - search = search.replace(/^ +/, ""); // strip leading spaces - search = search.replace(/ +$/, ""); // strip trailing spaces - search = search.toLowerCase(); - search = convertToId(search); - - var resultRows = document.getElementsByTagName("div"); - var matches = 0; - - var i = 0; - while (i < resultRows.length) - { - var row = resultRows.item(i); - if (row.className == "SRResult") - { - var rowMatchName = row.id.toLowerCase(); - rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' - - if (search.length<=rowMatchName.length && - rowMatchName.substr(0, search.length)==search) - { - row.style.display = 'block'; - matches++; - } - else - { - row.style.display = 'none'; - } - } - i++; - } - document.getElementById("Searching").style.display='none'; - if (matches == 0) // no results - { - document.getElementById("NoMatches").style.display='block'; - } - else // at least one result - { - document.getElementById("NoMatches").style.display='none'; - } - this.lastMatchCount = matches; - return true; - } - - // return the first item with index index or higher that is visible - this.NavNext = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index++; - } - return focusItem; - } - - this.NavPrev = function(index) - { - var focusItem; - while (1) - { - var focusName = 'Item'+index; - focusItem = document.getElementById(focusName); - if (focusItem && focusItem.parentNode.parentNode.style.display=='block') - { - break; - } - else if (!focusItem) // last element - { - break; - } - focusItem=null; - index--; - } - return focusItem; - } - - this.ProcessKeys = function(e) - { - if (e.type == "keydown") - { - this.repeatOn = false; - this.lastKey = e.keyCode; - } - else if (e.type == "keypress") - { - if (!this.repeatOn) - { - if (this.lastKey) this.repeatOn = true; - return false; // ignore first keypress after keydown - } - } - else if (e.type == "keyup") - { - this.lastKey = 0; - this.repeatOn = false; - } - return this.lastKey!=0; - } - - this.Nav = function(evt,itemIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - var newIndex = itemIndex-1; - var focusItem = this.NavPrev(newIndex); - if (focusItem) - { - var child = this.FindChildElement(focusItem.parentNode.parentNode.id); - if (child && child.style.display == 'block') // children visible - { - var n=0; - var tmpElem; - while (1) // search for last child - { - tmpElem = document.getElementById('Item'+newIndex+'_c'+n); - if (tmpElem) - { - focusItem = tmpElem; - } - else // found it! - { - break; - } - n++; - } - } - } - if (focusItem) - { - focusItem.focus(); - } - else // return focus to search field - { - parent.document.getElementById("MSearchField").focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = itemIndex+1; - var focusItem; - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem && elem.style.display == 'block') // children visible - { - focusItem = document.getElementById('Item'+itemIndex+'_c0'); - } - if (!focusItem) focusItem = this.NavNext(newIndex); - if (focusItem) focusItem.focus(); - } - else if (this.lastKey==39) // Right - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'block'; - } - else if (this.lastKey==37) // Left - { - var item = document.getElementById('Item'+itemIndex); - var elem = this.FindChildElement(item.parentNode.parentNode.id); - if (elem) elem.style.display = 'none'; - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } - - this.NavChild = function(evt,itemIndex,childIndex) - { - var e = (evt) ? evt : window.event; // for IE - if (e.keyCode==13) return true; - if (!this.ProcessKeys(e)) return false; - - if (this.lastKey==38) // Up - { - if (childIndex>0) - { - var newIndex = childIndex-1; - document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); - } - else // already at first child, jump to parent - { - document.getElementById('Item'+itemIndex).focus(); - } - } - else if (this.lastKey==40) // Down - { - var newIndex = childIndex+1; - var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); - if (!elem) // last child, jump to parent next parent - { - elem = this.NavNext(itemIndex+1); - } - if (elem) - { - elem.focus(); - } - } - else if (this.lastKey==27) // Escape - { - parent.searchBox.CloseResultsWindow(); - parent.document.getElementById("MSearchField").focus(); - } - else if (this.lastKey==13) // Enter - { - return true; - } - return false; - } -} - -function setKeyActions(elem,action) -{ - elem.setAttribute('onkeydown',action); - elem.setAttribute('onkeypress',action); - elem.setAttribute('onkeyup',action); -} - -function setClassAttr(elem,attr) -{ - elem.setAttribute('class',attr); - elem.setAttribute('className',attr); -} - -function createResults() -{ - var results = document.getElementById("SRResults"); - for (var e=0; ek7RCwB~R6VQOP#AvB$vH7i{6H{96zot$7cZT<7246EF5Np6N}+$IbiG6W zg#87A+NFaX+=_^xM1#gCtshC=E{%9^uQX_%?YwXvo{#q&MnpJ8uh(O?ZRc&~_1%^SsPxG@rfElJg-?U zm!Cz-IOn(qJP3kDp-^~qt+FGbl=5jNli^Wj_xIBG{Rc0en{!oFvyoNC7{V~T8}b>| z=jL2WIReZzX(YN(_9fV;BBD$VXQIxNasAL8ATvEu822WQ%mvv4FO#qs` BFGc_W diff --git a/docs/search/search_r.png b/docs/search/search_r.png deleted file mode 100644 index 97ee8b439687084201b79c6f776a41f495c6392a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 612 zcmV-q0-ODbP)PbXFRCwB?)W514K@j&X?z2*SxFI6-@HT2E2K=9X9%Pb zEK*!TBw&g(DMC;|A)uGlRkOS9vd-?zNs%bR4d$w+ox_iFnE8fvIvv7^5<(>Te12Li z7C)9srCzmK{ZcNM{YIl9j{DePFgOWiS%xG@5CnnnJa4nvY<^glbz7^|-ZY!dUkAwd z{gaTC@_>b5h~;ug#R0wRL0>o5!hxm*s0VW?8dr}O#zXTRTnrQm_Z7z1Mrnx>&p zD4qifUjzLvbVVWi?l?rUzwt^sdb~d!f_LEhsRVIXZtQ=qSxuxqm zEX#tf>$?M_Y1-LSDT)HqG?`%-%ZpY!#{N!rcNIiL;G7F0`l?)mNGTD9;f9F5Up3Kg zw}a<-JylhG&;=!>B+fZaCX+?C+kHYrP%c?X2!Zu_olK|GcS4A70HEy;vn)I0>0kLH z`jc(WIaaHc7!HS@f*^R^Znx8W=_jIl2oWJoQ*h1^$FX!>*PqR1J8k|fw}w_y}TpE>7m8DqDO<3z`OzXt$ccSejbEZCg@0000 - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/typedefs_0.js b/docs/search/typedefs_0.js deleted file mode 100644 index 27e78f2a..00000000 --- a/docs/search/typedefs_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['csvwriter',['CSVWriter',['../namespacecsv.html#abe45a573801e1f10fbb1586486db9bb1',1,'csv']]] -]; diff --git a/docs/search/typedefs_1.html b/docs/search/typedefs_1.html deleted file mode 100644 index b77c5338..00000000 --- a/docs/search/typedefs_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/typedefs_1.js b/docs/search/typedefs_1.js deleted file mode 100644 index f5b2c9ae..00000000 --- a/docs/search/typedefs_1.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['reverse_5fiterator',['reverse_iterator',['../classcsv_1_1CSVRow.html#a5563065ee9b3ecb511469259ee843e3c',1,'csv::CSVRow']]], - ['rowcount',['RowCount',['../namespacecsv.html#a5ee7c8c04afbcd1f4d24046143addc29',1,'csv']]] -]; diff --git a/docs/search/typedefs_2.html b/docs/search/typedefs_2.html deleted file mode 100644 index 076311dc..00000000 --- a/docs/search/typedefs_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/typedefs_2.js b/docs/search/typedefs_2.js deleted file mode 100644 index 5ca62d71..00000000 --- a/docs/search/typedefs_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['tsvwriter',['TSVWriter',['../namespacecsv.html#a0a8b78b3e8a3e124ae9fccc889c283ca',1,'csv']]] -]; diff --git a/docs/search/variables_0.html b/docs/search/variables_0.html deleted file mode 100644 index 74ce8072..00000000 --- a/docs/search/variables_0.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_0.js b/docs/search/variables_0.js deleted file mode 100644 index 2ee07ce3..00000000 --- a/docs/search/variables_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['col_5fnames',['col_names',['../structcsv_1_1CSVFormat.html#aad626fe4984a01aeefa2c9d97d864f37',1,'csv::CSVFormat::col_names()'],['../structcsv_1_1CSVFileInfo.html#a60260fffa489d08c2173e44d47cfa00a',1,'csv::CSVFileInfo::col_names()'],['../group__csv__internal.html#gac63e71ea5f74271f366cab7af8689b48',1,'csv::CSVReader::col_names()']]], - ['correct_5frows',['correct_rows',['../classcsv_1_1CSVReader.html#abf6ee7c791d118092eab3eecf81c966a',1,'csv::CSVReader']]], - ['csv_5fnot_5ffound',['CSV_NOT_FOUND',['../namespacecsv.html#a7742b9dcd46ed5d7698106d3e523a3c8',1,'csv']]] -]; diff --git a/docs/search/variables_1.html b/docs/search/variables_1.html deleted file mode 100644 index 84237b6e..00000000 --- a/docs/search/variables_1.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_1.js b/docs/search/variables_1.js deleted file mode 100644 index a4f542a6..00000000 --- a/docs/search/variables_1.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['default_5fcsv',['DEFAULT_CSV',['../namespacecsv.html#ae5efeba17998ae0b741f10201c77a9cb',1,'csv']]], - ['default_5fcsv_5fstrict',['DEFAULT_CSV_STRICT',['../namespacecsv.html#a2aef42e5fa96f1eb42968856f7348901',1,'csv']]], - ['delim',['delim',['../structcsv_1_1CSVFileInfo.html#ab4498493fafd150c9f658ff94c3cb099',1,'csv::CSVFileInfo']]], - ['delimiter',['delimiter',['../group__csv__internal.html#gaf3cd9076878b66ce3a173d1d781ba9f6',1,'csv::CSVReader']]] -]; diff --git a/docs/search/variables_2.html b/docs/search/variables_2.html deleted file mode 100644 index 5c9de1aa..00000000 --- a/docs/search/variables_2.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_2.js b/docs/search/variables_2.js deleted file mode 100644 index 8551078f..00000000 --- a/docs/search/variables_2.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['feed_5fbuffer',['feed_buffer',['../group__csv__internal.html#ga0b727379853c20bb8a6fb2af78fce314',1,'csv::CSVReader']]], - ['feed_5fcond',['feed_cond',['../group__csv__internal.html#ga77144227a1cdf5ef728a68a1f2bfc9e4',1,'csv::CSVReader']]], - ['feed_5flock',['feed_lock',['../group__csv__internal.html#ga9a8b06d3470032217b592070866e315f',1,'csv::CSVReader']]], - ['filename',['filename',['../structcsv_1_1CSVFileInfo.html#af5efb1adbf817734620564b12ed895e1',1,'csv::CSVFileInfo']]] -]; diff --git a/docs/search/variables_3.html b/docs/search/variables_3.html deleted file mode 100644 index f95e34c6..00000000 --- a/docs/search/variables_3.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_3.js b/docs/search/variables_3.js deleted file mode 100644 index b7534533..00000000 --- a/docs/search/variables_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['guess_5fcsv',['GUESS_CSV',['../namespacecsv.html#a934424955c1b950cd80a5f0a1e7faaf1',1,'csv']]] -]; diff --git a/docs/search/variables_4.html b/docs/search/variables_4.html deleted file mode 100644 index d7db285e..00000000 --- a/docs/search/variables_4.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_4.js b/docs/search/variables_4.js deleted file mode 100644 index 52cfbae7..00000000 --- a/docs/search/variables_4.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['header',['header',['../structcsv_1_1CSVFormat.html#ab729b1e62b62e91cb4023fb51ca5344d',1,'csv::CSVFormat']]], - ['header_5frow',['header_row',['../group__csv__internal.html#gaee0d4c8865e2abaae5bcfae76702eb8d',1,'csv::CSVReader']]] -]; diff --git a/docs/search/variables_5.html b/docs/search/variables_5.html deleted file mode 100644 index 7bbceeb0..00000000 --- a/docs/search/variables_5.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_5.js b/docs/search/variables_5.js deleted file mode 100644 index d810308b..00000000 --- a/docs/search/variables_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['infile',['infile',['../group__csv__internal.html#gaa823a7be2b314559dcf0f9efd7ef4e57',1,'csv::CSVReader']]], - ['iteration_5fchunk_5fsize',['ITERATION_CHUNK_SIZE',['../namespacecsv.html#a82452d316c535c04ad187c1863b1e228',1,'csv']]] -]; diff --git a/docs/search/variables_6.html b/docs/search/variables_6.html deleted file mode 100644 index 4eb162d6..00000000 --- a/docs/search/variables_6.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_6.js b/docs/search/variables_6.js deleted file mode 100644 index b027e518..00000000 --- a/docs/search/variables_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['min_5frow_5flen',['min_row_len',['../group__csv__internal.html#gae59eb9a27868a8ccc4e86901051fb9b6',1,'csv::CSVReader']]] -]; diff --git a/docs/search/variables_7.html b/docs/search/variables_7.html deleted file mode 100644 index 04088295..00000000 --- a/docs/search/variables_7.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_7.js b/docs/search/variables_7.js deleted file mode 100644 index e34098a3..00000000 --- a/docs/search/variables_7.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['n_5fcols',['n_cols',['../structcsv_1_1CSVFileInfo.html#a07230a749c9a9e38a0ddcbd47a3e98e3',1,'csv::CSVFileInfo']]], - ['n_5frows',['n_rows',['../structcsv_1_1CSVFileInfo.html#a5cc2f778eeb60b29acdc88662985695c',1,'csv::CSVFileInfo']]] -]; diff --git a/docs/search/variables_8.html b/docs/search/variables_8.html deleted file mode 100644 index d54d0966..00000000 --- a/docs/search/variables_8.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_8.js b/docs/search/variables_8.js deleted file mode 100644 index 4c8ad522..00000000 --- a/docs/search/variables_8.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['parse_5fflags',['parse_flags',['../group__csv__internal.html#gae73cb1981c9866e1ea73a54ee6ac6002',1,'csv::CSVReader']]] -]; diff --git a/docs/search/variables_9.html b/docs/search/variables_9.html deleted file mode 100644 index 234dc60a..00000000 --- a/docs/search/variables_9.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_9.js b/docs/search/variables_9.js deleted file mode 100644 index 32b66999..00000000 --- a/docs/search/variables_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['quote_5fchar',['quote_char',['../structcsv_1_1CSVFormat.html#a3b158c25f4e353fd855491c50ee47b89',1,'csv::CSVFormat::quote_char()'],['../group__csv__internal.html#gae928205d7834e243ff41aaf74bd70735',1,'csv::CSVReader::quote_char()']]] -]; diff --git a/docs/search/variables_a.html b/docs/search/variables_a.html deleted file mode 100644 index 08924881..00000000 --- a/docs/search/variables_a.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_a.js b/docs/search/variables_a.js deleted file mode 100644 index 98cd0aa1..00000000 --- a/docs/search/variables_a.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['record_5fbuffer',['record_buffer',['../group__csv__internal.html#gabee3f8a985267182e9ffd289012f042f',1,'csv::CSVReader']]], - ['records',['records',['../group__csv__internal.html#ga309c7035f6b7fe25ca9b1c2d8df30e59',1,'csv::CSVReader']]], - ['row_5fnum',['row_num',['../classcsv_1_1CSVReader.html#a189e31dc240dc4f0bf7776b437d5c517',1,'csv::CSVReader']]] -]; diff --git a/docs/search/variables_b.html b/docs/search/variables_b.html deleted file mode 100644 index ea46965c..00000000 --- a/docs/search/variables_b.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/docs/search/variables_b.js b/docs/search/variables_b.js deleted file mode 100644 index 4dec16b2..00000000 --- a/docs/search/variables_b.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['split_5fbuffer',['split_buffer',['../group__csv__internal.html#ga98792115fd80e24782a6816c73f94148',1,'csv::CSVReader']]], - ['strict',['strict',['../group__csv__internal.html#gab5b7ac71d40acf632e031f2059c0cb9b',1,'csv::CSVReader']]] -]; diff --git a/docs/source/Doxy.md b/docs/source/Doxy.md new file mode 100644 index 00000000..1132539e --- /dev/null +++ b/docs/source/Doxy.md @@ -0,0 +1,164 @@ +# Introduction + +https://github.com/vincentlaucsb/csv-parser + +## Main Features +### Reading a Large File (with Iterators) +With this library, you can easily stream over a large file without reading its entirety into memory. + +**C++ Style** +```cpp +# include "csv_parser.hpp" + +using namespace csv; + +... + +CSVReader reader("very_big_file.csv"); + +for (CSVRow& row: reader) { // Input iterator + for (CSVField& field: row) { + // For efficiency, get<>() produces a string_view + std::cout << field.get<>() << ... + } +} + +... +``` + +**Old-Fashioned C Style Loop** +```cpp +... + +CSVReader reader("very_big_file.csv"); +CSVRow row; + +while (reader.read_row(row)) { + // Do stuff with row here +} + +... +``` + +### Indexing by Column Names +Retrieving values using a column name string is a cheap, constant time operation. + +```cpp +# include "csv_parser.hpp" + +using namespace csv; + +... + +CSVReader reader("very_big_file.csv"); +double sum = 0; + +for (auto& row: reader) { + // Note: Can also use index of column with [] operator + sum += row["Total Salary"].get(); +} + +... +``` + +### Type Conversions +If your CSV has lots of numeric values, you can also have this parser (lazily) +convert them to the proper data type. Type checking is performed on conversions +to prevent undefined behavior. + +```cpp +# include "csv_parser.hpp" + +using namespace csv; + +... + +CSVReader reader("very_big_file.csv"); + +for (auto& row: reader) { + if (row["timestamp"].is_int()) { + row["timestamp"].get(); + + // .. + } +} + +``` + +### Specifying a Specific Delimiter, Quoting Character, etc. +Although the CSV parser has a decent guessing mechanism, in some cases it is preferrable to specify the exact parameters of a file. + +```cpp +# include "csv_parser.hpp" +# include ... + +using namespace csv; + +CSVFormat format = { + '\t', // Delimiter + '~', // Quote-character + '2', // Line number of header + {} // Column names -- if empty, then filled by reading header row +}; + +CSVReader reader("wierd_csv_dialect.csv", {}, format); + +for (auto& row: reader) { + // Do stuff with rows here +} + +``` + +### Parsing an In-Memory String + +```cpp +# include "csv_parser.hpp" + +using namespace csv; + +... + +// Method 1: Using parse() +std::string csv_string = "Actor,Character\r\n" + "Will Ferrell,Ricky Bobby\r\n" + "John C. Reilly,Cal Naughton Jr.\r\n" + "Sacha Baron Cohen,Jean Giard\r\n"; + +auto rows = parse(csv_string); +for (auto& r: rows) { + // Do stuff with row here +} + +// Method 2: Using _csv operator +auto rows = "Actor,Character\r\n" + "Will Ferrell,Ricky Bobby\r\n" + "John C. Reilly,Cal Naughton Jr.\r\n" + "Sacha Baron Cohen,Jean Giard\r\n"_csv; + +for (auto& r: rows) { + // Do stuff with row here +} + +``` + +### Writing CSV Files + +```cpp +# include "csv_writer.hpp" +# include ... + +using namespace csv; +using vector; +using string; + +... + +std::stringstream ss; // Can also use ifstream, etc. +auto writer = make_csv_writer(ss); +writer << vector({ "A", "B", "C" }) + << vector({ "I'm", "too", "tired" }) + << vector({ "to", "write", "documentation" }); + +... + +``` \ No newline at end of file diff --git a/docs/source/faq.md b/docs/source/faq.md new file mode 100644 index 00000000..e485b64c --- /dev/null +++ b/docs/source/faq.md @@ -0,0 +1,29 @@ +# Frequently Asked Questions + +## How does automatic starting row detection work? +See "How does automatic delimiter detection work?" + +## How does automatic delimiter detection work? +First, the CSV reader attempts to parse the first 100 lines of a CSV file as if the delimiter were a pipe, tab, comma, etc. +Out of all the possible delimiter choices, the delimiter which produces the highest number of `rows * columns` (where all rows +are of a consistent length) is chosen as the winner. + +However, if the CSV file has leading comments, or has less than 100 lines, a second heuristic will be used. The CSV reader again +parses the first 100 lines using each candidate delimiter, but tallies up the length of each row parsed. Then, the delimiter with +the largest most common row length `n` is chosen as the winner, and the line number where the first row of length `n` occurs +is chosen as the starting row. + +Because you can subclass csv::CSVReader, you can implement your own guessing hueristic. csv::internals::CSVGuesser may be used as a helpful guide in doing so. + +## Are there any limits to parsing numbers? +When parsing numeric values from strings, the results are saved in long doubles. Thus the accuracy of parsing is limited by how many +significant digits can be stored in a long double. + +For the curious, data_type.cpp contains the numeric parsing logic. + +## Is the CSV parser thread-safe? +The csv::CSVReader iterators are intended to be used from one thread at a time. However, csv::CSVRow and csv::CSVField objects should be +thread-safe (since they mainly involve reading data). If you want to perform computations on multiple columns in parallel, +you may want to avoid using the iterators and +use csv::CSVReader::read_row() to manually chunk your data. csv::CSVStat provides an example of how parallel computations +may be performed. (Specifically, look at csv::CSVStat::calc() and csv::CSVStat::calc_worker() in csv_stat.cpp). \ No newline at end of file diff --git a/docs/splitbar.png b/docs/splitbar.png deleted file mode 100644 index fe895f2c58179b471a22d8320b39a4bd7312ec8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T diff --git a/docs/structcsv_1_1CSVFileInfo-members.html b/docs/structcsv_1_1CSVFileInfo-members.html deleted file mode 100644 index 066175ec..00000000 --- a/docs/structcsv_1_1CSVFileInfo-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    csv::CSVFileInfo Member List
    -
    -
    - -

    This is the complete list of members for csv::CSVFileInfo, including all inherited members.

    - - - - - - -
    col_namescsv::CSVFileInfo
    delimcsv::CSVFileInfo
    filenamecsv::CSVFileInfo
    n_colscsv::CSVFileInfo
    n_rowscsv::CSVFileInfo
    -
    - - - - diff --git a/docs/structcsv_1_1CSVFileInfo.html b/docs/structcsv_1_1CSVFileInfo.html deleted file mode 100644 index 85505cb6..00000000 --- a/docs/structcsv_1_1CSVFileInfo.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVFileInfo Struct Reference - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    csv::CSVFileInfo Struct Reference
    -
    -
    - -

    #include <csv_parser.hpp>

    - - - - - - - - - - - - -

    -Public Attributes

    std::string filename
     
    std::vector< std::string > col_names
     
    char delim
     
    RowCount n_rows
     
    int n_cols
     
    -

    Detailed Description

    -

    Returned by get_file_info()

    - -

    Definition at line 62 of file csv_parser.hpp.

    -

    Member Data Documentation

    - -

    ◆ col_names

    - -
    -
    - - - - -
    std::vector<std::string> csv::CSVFileInfo::col_names
    -
    -

    CSV column names

    - -

    Definition at line 64 of file csv_parser.hpp.

    - -
    -
    - -

    ◆ delim

    - -
    -
    - - - - -
    char csv::CSVFileInfo::delim
    -
    -

    Delimiting character

    - -

    Definition at line 65 of file csv_parser.hpp.

    - -
    -
    - -

    ◆ filename

    - -
    -
    - - - - -
    std::string csv::CSVFileInfo::filename
    -
    -

    Filename

    - -

    Definition at line 63 of file csv_parser.hpp.

    - -
    -
    - -

    ◆ n_cols

    - -
    -
    - - - - -
    int csv::CSVFileInfo::n_cols
    -
    -

    Number of columns in a CSV

    - -

    Definition at line 67 of file csv_parser.hpp.

    - -
    -
    - -

    ◆ n_rows

    - -
    -
    - - - - -
    RowCount csv::CSVFileInfo::n_rows
    -
    -

    Number of rows in a file

    - -

    Definition at line 66 of file csv_parser.hpp.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    -
    - - - - diff --git a/docs/structcsv_1_1CSVFileInfo.js b/docs/structcsv_1_1CSVFileInfo.js deleted file mode 100644 index e8ee5ed8..00000000 --- a/docs/structcsv_1_1CSVFileInfo.js +++ /dev/null @@ -1,8 +0,0 @@ -var structcsv_1_1CSVFileInfo = -[ - [ "col_names", "structcsv_1_1CSVFileInfo.html#a60260fffa489d08c2173e44d47cfa00a", null ], - [ "delim", "structcsv_1_1CSVFileInfo.html#ab4498493fafd150c9f658ff94c3cb099", null ], - [ "filename", "structcsv_1_1CSVFileInfo.html#af5efb1adbf817734620564b12ed895e1", null ], - [ "n_cols", "structcsv_1_1CSVFileInfo.html#a07230a749c9a9e38a0ddcbd47a3e98e3", null ], - [ "n_rows", "structcsv_1_1CSVFileInfo.html#a5cc2f778eeb60b29acdc88662985695c", null ] -]; \ No newline at end of file diff --git a/docs/structcsv_1_1CSVFormat-members.html b/docs/structcsv_1_1CSVFormat-members.html deleted file mode 100644 index 1737c8b0..00000000 --- a/docs/structcsv_1_1CSVFormat-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    csv::CSVFormat Member List
    -
    -
    - -

    This is the complete list of members for csv::CSVFormat, including all inherited members.

    - - - - - - -
    col_namescsv::CSVFormat
    delim (defined in csv::CSVFormat)csv::CSVFormat
    headercsv::CSVFormat
    quote_charcsv::CSVFormat
    strict (defined in csv::CSVFormat)csv::CSVFormat
    -
    - - - - diff --git a/docs/structcsv_1_1CSVFormat.html b/docs/structcsv_1_1CSVFormat.html deleted file mode 100644 index e905aa2b..00000000 --- a/docs/structcsv_1_1CSVFormat.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::CSVFormat Struct Reference - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    csv::CSVFormat Struct Reference
    -
    -
    - -

    Stores information about how to parse a CSV file. - More...

    - -

    #include <csv_parser.hpp>

    - - - - - - - - - - - - - - - -

    -Public Attributes

    -char delim
     
    -char quote_char
     Row number with columns (ignored if col_names is non-empty)
     
    -int header
     Should be left empty unless file doesn't include header.
     
    -std::vector< std::string > col_names
     RFC 4180 non-compliance -> throw an error.
     
    -bool strict
     
    -

    Detailed Description

    -

    Stores information about how to parse a CSV file.

    -
      -
    • Can be used to initialize a csv::CSVReader() object
    • -
    • The preferred way to pass CSV format information between functions
    • -
    -
    See also
    csv::DEFAULT_CSV, csv::GUESS_CSV
    - -

    Definition at line 47 of file csv_parser.hpp.

    -

    The documentation for this struct was generated from the following file: -
    -
    - - - - diff --git a/docs/structcsv_1_1CSVFormat.js b/docs/structcsv_1_1CSVFormat.js deleted file mode 100644 index f7761ee8..00000000 --- a/docs/structcsv_1_1CSVFormat.js +++ /dev/null @@ -1,8 +0,0 @@ -var structcsv_1_1CSVFormat = -[ - [ "col_names", "structcsv_1_1CSVFormat.html#aad626fe4984a01aeefa2c9d97d864f37", null ], - [ "delim", "structcsv_1_1CSVFormat.html#a46058919b59795c15093f57a9abf7569", null ], - [ "header", "structcsv_1_1CSVFormat.html#ab729b1e62b62e91cb4023fb51ca5344d", null ], - [ "quote_char", "structcsv_1_1CSVFormat.html#a3b158c25f4e353fd855491c50ee47b89", null ], - [ "strict", "structcsv_1_1CSVFormat.html#a06818248f2b3d64e5d578e8557b4477f", null ] -]; \ No newline at end of file diff --git a/docs/structcsv_1_1internals_1_1ColNames-members.html b/docs/structcsv_1_1internals_1_1ColNames-members.html deleted file mode 100644 index 370ad647..00000000 --- a/docs/structcsv_1_1internals_1_1ColNames-members.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -Vince's CSV Parser: Member List - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    -
    -
    csv::internals::ColNames Member List
    -
    -
    - -

    This is the complete list of members for csv::internals::ColNames, including all inherited members.

    - - - - - - -
    col_names (defined in csv::internals::ColNames)csv::internals::ColNames
    col_pos (defined in csv::internals::ColNames)csv::internals::ColNames
    ColNames(const std::vector< std::string > &) (defined in csv::internals::ColNames)csv::internals::ColNames
    get_col_names() const (defined in csv::internals::ColNames)csv::internals::ColNames
    size() const (defined in csv::internals::ColNames)csv::internals::ColNames
    -
    - - - - diff --git a/docs/structcsv_1_1internals_1_1ColNames.html b/docs/structcsv_1_1internals_1_1ColNames.html deleted file mode 100644 index 5850abfd..00000000 --- a/docs/structcsv_1_1internals_1_1ColNames.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - -Vince's CSV Parser: csv::internals::ColNames Struct Reference - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -
    Vince's CSV Parser -
    -
    -
    - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    csv::internals::ColNames Struct Reference
    -
    -
    - -

    A data structure for handling column name information. - More...

    - -

    #include <csv_row.hpp>

    - - - - - - - - -

    -Public Member Functions

    ColNames (const std::vector< std::string > &)
     
    -std::vector< std::string > get_col_names () const
     
    -size_t size () const
     
    - - - - - -

    -Public Attributes

    -std::vector< std::string > col_names
     
    -std::unordered_map< std::string, size_t > col_pos
     
    -

    Detailed Description

    -

    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 23 of file csv_row.hpp.

    -

    The documentation for this struct was generated from the following files: -
    -
    - - - - diff --git a/docs/structcsv_1_1internals_1_1ColNames.js b/docs/structcsv_1_1internals_1_1ColNames.js deleted file mode 100644 index 8024da16..00000000 --- a/docs/structcsv_1_1internals_1_1ColNames.js +++ /dev/null @@ -1,8 +0,0 @@ -var structcsv_1_1internals_1_1ColNames = -[ - [ "ColNames", "structcsv_1_1internals_1_1ColNames.html#a06f198b6d6d308a48859aa0ef609cdea", null ], - [ "get_col_names", "structcsv_1_1internals_1_1ColNames.html#a3bc56cd12f9adea9c0cb289b81fdb030", null ], - [ "size", "structcsv_1_1internals_1_1ColNames.html#a4ddd4bd7b4656e6076c672f3d1411e52", null ], - [ "col_names", "structcsv_1_1internals_1_1ColNames.html#aef261e282562b35a750d4d647d65b010", null ], - [ "col_pos", "structcsv_1_1internals_1_1ColNames.html#a1b753c8575c994c1e2cb1b2d39f28765", null ] -]; \ No newline at end of file diff --git a/docs/sync_off.png b/docs/sync_off.png deleted file mode 100644 index 3b443fc62892114406e3d399421b2a881b897acc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 853 zcmV-b1FHOqP)oT|#XixUYy%lpuf3i8{fX!o zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py; zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK& z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sTxLGlJY5nc&Re zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j* diff --git a/docs/sync_on.png b/docs/sync_on.png deleted file mode 100644 index e08320fb64e6fa33b573005ed6d8fe294e19db76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 845 zcmV-T1G4;yP)Y;xxyHF2B5Wzm| zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I_))aP?*T)ow&n59{}X4$3Goat zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F={P0Y^?$4t z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU# z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+ z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$Mj4Uq05 X8=0q~qBNan00000NkvXXu0mjfptF>5 diff --git a/docs/tab_a.png b/docs/tab_a.png deleted file mode 100644 index 3b725c41c5a527a3a3e40097077d0e206a681247..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD# z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4 diff --git a/docs/tab_b.png b/docs/tab_b.png deleted file mode 100644 index e2b4a8638cb3496a016eaed9e16ffc12846dea18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^ diff --git a/docs/tabs.css b/docs/tabs.css deleted file mode 100644 index a28614b8..00000000 --- a/docs/tabs.css +++ /dev/null @@ -1 +0,0 @@ -.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#doc-content{overflow:auto;display:block;padding:0;margin:0;-webkit-overflow-scrolling:touch}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/include/csv.hpp b/include/csv.hpp index 4055e667..d396c3c9 100644 --- a/include/csv.hpp +++ b/include/csv.hpp @@ -1,3 +1,30 @@ +/* +CSV for C++, version 1.1.3 +https://github.com/vincentlaucsb/csv-parser + +MIT License + +Copyright (c) 2017-2019 Vincent La + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + #pragma once #ifndef CSV_HPP #define CSV_HPP diff --git a/include/internal/compatibility.hpp b/include/internal/compatibility.hpp index d5ed3f29..e77b632a 100644 --- a/include/internal/compatibility.hpp +++ b/include/internal/compatibility.hpp @@ -1,7 +1,7 @@ #pragma once #include "../external/string_view.hpp" -#define SUPPRESS_UNUSED_WARNING(x) x +#define SUPPRESS_UNUSED_WARNING(x) (void)x namespace csv { using namespace nonstd; diff --git a/include/internal/csv_reader.cpp b/include/internal/csv_reader.cpp index 8d6d3367..d2298d3c 100644 --- a/include/internal/csv_reader.cpp +++ b/include/internal/csv_reader.cpp @@ -24,51 +24,6 @@ namespace csv { return ret.str(); } - // - // GiantStringBuffer - // - csv::string_view GiantStringBuffer::get_row() { - /** - * Return a string_view over the current_row - */ - - csv::string_view ret( - this->buffer->c_str() + this->current_end, // Beginning of string - (this->buffer->size() - this->current_end) // Count - ); - - this->current_end = this->buffer->size(); - return ret; - } - - size_t GiantStringBuffer::size() const { - // Return size of current row - return (this->buffer->size() - this->current_end); - } - - std::string* GiantStringBuffer::get() { - return this->buffer.get(); - } - - std::string* GiantStringBuffer::operator->() { - if (!this->buffer) - this->buffer = std::make_shared(); - - return this->buffer.operator->(); - } - - void GiantStringBuffer::reset() { - auto temp_str = this->buffer->substr( - this->current_end, // Position - (this->buffer->size() - this->current_end) // Count - ); - - this->current_end = 0; - this->buffer = std::make_shared( - temp_str - ); - } - // // CSVGuesser // @@ -92,15 +47,15 @@ namespace csv { bool CSVGuesser::first_guess() { /** Guess the delimiter of a delimiter separated values file - * by scanning the first 100 lines - * - * - "Winner" is based on which delimiter has the most number - * of correctly parsed rows + largest number of columns - * - **Note:** Assumes that whatever the dialect, all records - * are newline separated - * - * Returns True if guess was a good one and second guess isn't needed - */ + * by scanning the first 100 lines + * + * - "Winner" is based on which delimiter has the most number + * of correctly parsed rows + largest number of columns + * - **Note:** Assumes that whatever the dialect, all records + * are newline separated + * + * Returns True if guess was a good one and second guess isn't needed + */ CSVFormat format = DEFAULT_CSV; char current_delim{ ',' }; @@ -132,10 +87,10 @@ namespace csv { void CSVGuesser::second_guess() { /** For each delimiter, find out which row length was most common. - * The delimiter with the longest mode row length wins. - * Then, the line number of the header row is the first row with - * the mode row length. - */ + * The delimiter with the longest mode row length wins. + * Then, the line number of the header row is the first row with + * the mode row length. + */ CSVFormat format = DEFAULT_CSV; size_t max_rlen = 0; @@ -373,8 +328,8 @@ namespace csv { void CSVReader::end_feed() { /** Indicate that there is no more data to receive, - * and handle the last row - */ + * and handle the last row + */ this->write_record(); } @@ -466,6 +421,8 @@ namespace csv { const size_t BUFFER_UPPER_LIMIT = std::min(bytes, (size_t)1000000); std::unique_ptr buffer(new char[BUFFER_UPPER_LIMIT]); auto line_buffer = buffer.get(); + line_buffer[0] = '\0'; + std::thread worker(&CSVReader::read_csv_worker, this); for (size_t processed = 0; processed < bytes; ) { @@ -481,6 +438,7 @@ namespace csv { buffer = std::unique_ptr(new char[BUFFER_UPPER_LIMIT]); // New pointer line_buffer = buffer.get(); + line_buffer[0] = '\0'; } } diff --git a/include/internal/csv_reader.hpp b/include/internal/csv_reader.hpp index ecae8311..c6174a6e 100644 --- a/include/internal/csv_reader.hpp +++ b/include/internal/csv_reader.hpp @@ -13,7 +13,11 @@ #include "csv_format.hpp" #include "csv_row.hpp" #include "compatibility.hpp" +#include "giant_string_buffer.hpp" +/** @namespace csv + * @brief The all encompassing namespace + */ namespace csv { /** @brief Integer indicating a requested column wasn't found. */ const int CSV_NOT_FOUND = -1; @@ -24,18 +28,6 @@ namespace csv { namespace internals { std::string type_name(const DataType& dtype); std::string format_row(const std::vector& row, const std::string& delim = ", "); - - /** Class for reducing number of new string malloc() calls */ - struct GiantStringBuffer { - csv::string_view get_row(); - size_t size() const; - std::string* get(); - std::string* operator->(); - - std::shared_ptr buffer = nullptr; - size_t current_end = 0; - void reset(); - }; } /** @class CSVReader @@ -213,15 +205,15 @@ namespace csv { /** @name Multi-Threaded File Reading: Flags and State */ ///@{ - std::FILE* infile = nullptr; /**< @brief Current file handle. - Destroyed by ~CSVReader(). */ + std::FILE* infile = nullptr; /**< @brief Current file handle. + Destroyed by ~CSVReader(). */ std::deque> - feed_buffer; /**< @brief Message queue for worker */ + feed_buffer; /**< @brief Message queue for worker */ - std::mutex feed_lock; /**< @brief Allow only one worker to write */ - std::condition_variable feed_cond; /**< @brief Wake up worker */ - ///@} + std::mutex feed_lock; /**< @brief Allow only one worker to write */ + std::condition_variable feed_cond; /**< @brief Wake up worker */ + ///@} /**@}*/ // End of parser internals }; diff --git a/include/internal/csv_row.cpp b/include/internal/csv_row.cpp index 6773b136..b8614d25 100644 --- a/include/internal/csv_row.cpp +++ b/include/internal/csv_row.cpp @@ -161,7 +161,7 @@ namespace csv { CSVRow::iterator::iterator(const CSVRow* _reader, int _i) : daddy(_reader), i(_i) { - if (_i < this->daddy->size()) + if (_i < (int)this->daddy->size()) this->field = std::make_shared( this->daddy->operator[](_i)); else @@ -173,13 +173,18 @@ namespace csv { } CSVRow::iterator::pointer CSVRow::iterator::operator->() const { + // Using CSVField * as pointer type causes segfaults in MSVC debug builds + #ifdef _MSC_BUILD + return this->field; + #else return this->field.get(); + #endif } CSVRow::iterator& CSVRow::iterator::operator++() { // Pre-increment operator this->i++; - if (this->i < this->daddy->size()) + if (this->i < (int)this->daddy->size()) this->field = std::make_shared( this->daddy->operator[](i)); else // Reached the end of row diff --git a/include/internal/csv_row.hpp b/include/internal/csv_row.hpp index 98ec14ad..fc169138 100644 --- a/include/internal/csv_row.hpp +++ b/include/internal/csv_row.hpp @@ -141,7 +141,15 @@ namespace csv { public: using value_type = CSVField; using difference_type = int; + + // Using CSVField * as pointer type causes segfaults in MSVC debug builds + // but using shared_ptr as pointer type won't compile in g++ + #ifdef _MSC_BUILD + using pointer = std::shared_ptr ; + #else using pointer = CSVField * ; + #endif + using reference = CSVField & ; using iterator_category = std::random_access_iterator_tag; @@ -184,10 +192,10 @@ namespace csv { ///@} private: + std::shared_ptr str = nullptr; + csv::string_view row_str = ""; + std::vector splits = {}; std::shared_ptr col_names = nullptr; - std::shared_ptr str = nullptr; - csv::string_view row_str; - std::vector splits; }; // get() specializations diff --git a/include/internal/data_type.cpp b/include/internal/data_type.cpp index 7aa1514d..98cc0e92 100644 --- a/include/internal/data_type.cpp +++ b/include/internal/data_type.cpp @@ -1,6 +1,10 @@ #include "data_type.h" #include "compatibility.hpp" +/** @file + * @brief Provides numeric parsing functionality + */ + namespace csv { namespace internals { #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/include/internal/giant_string_buffer.cpp b/include/internal/giant_string_buffer.cpp new file mode 100644 index 00000000..d93d0051 --- /dev/null +++ b/include/internal/giant_string_buffer.cpp @@ -0,0 +1,43 @@ +#include "giant_string_buffer.hpp" + +namespace csv { + namespace internals { + /** + * Return a string_view over the current_row + */ + csv::string_view GiantStringBuffer::get_row() { + csv::string_view ret( + this->buffer->c_str() + this->current_end, // Beginning of string + (this->buffer->size() - this->current_end) // Count + ); + + this->current_end = this->buffer->size(); + return ret; + } + + /** Return size of current row */ + size_t GiantStringBuffer::size() const { + return (this->buffer->size() - this->current_end); + } + + std::string* GiantStringBuffer::get() const { + return this->buffer.get(); + } + + std::string* GiantStringBuffer::operator->() const { + return this->buffer.operator->(); + } + + /** Clear out the buffer, but save current row in progress */ + void GiantStringBuffer::reset() { + // Save current row in progress + auto temp_str = this->buffer->substr( + this->current_end, // Position + (this->buffer->size() - this->current_end) // Count + ); + + this->current_end = 0; + this->buffer = std::make_shared(temp_str); + } + } +} \ No newline at end of file diff --git a/include/internal/giant_string_buffer.hpp b/include/internal/giant_string_buffer.hpp new file mode 100644 index 00000000..46ea52fb --- /dev/null +++ b/include/internal/giant_string_buffer.hpp @@ -0,0 +1,22 @@ +#pragma once +#include + +#include "compatibility.hpp" // For string view + +namespace csv { + namespace internals { + /** Class for reducing number of new string malloc() calls */ + class GiantStringBuffer { + public: + csv::string_view get_row(); + size_t size() const; + std::string* get() const; + std::string* operator->() const; + std::shared_ptr buffer = std::make_shared(); + void reset(); + + private: + size_t current_end = 0; + }; + } +} \ No newline at end of file diff --git a/tests/test_csv_row.cpp b/tests/test_csv_row.cpp index 11b60a49..c0031146 100644 --- a/tests/test_csv_row.cpp +++ b/tests/test_csv_row.cpp @@ -40,7 +40,7 @@ TEST_CASE("CSVRow Test", "[test_csv_row]") { SECTION("operator[] Out of Bounds") { try { - auto dne = row[4].get<>(); + row[4].get<>(); } catch (std::runtime_error&) { error_caught = true;