From c3f4cffa3f022d8550e4ee7718eecfa55f25860f Mon Sep 17 00:00:00 2001 From: Bart Joy Date: Tue, 13 Nov 2018 15:44:17 +1300 Subject: [PATCH] Initial commit --- .editorconfig | 6 + .gitattributes | 1 + .gitignore | 4 + ThirdParty/CLI11/CLI11.hpp | 4043 ++++++ ThirdParty/soci/.circleci/config.yml | 59 + ThirdParty/soci/.editorconfig | 32 + ThirdParty/soci/.gitattributes | 30 + ThirdParty/soci/.gitignore | 40 + ThirdParty/soci/.markdownlint.json | 7 + ThirdParty/soci/.travis.yml | 58 + ThirdParty/soci/AUTHORS | 78 + ThirdParty/soci/Build.ps1 | 13 + ThirdParty/soci/CHANGELOG.md | 456 + ThirdParty/soci/CHANGES | 384 + ThirdParty/soci/CMakeLists.txt | 207 + ThirdParty/soci/LICENSE_1_0.txt | 23 + ThirdParty/soci/README.md | 59 + ThirdParty/soci/TODO | 110 + ThirdParty/soci/Vagrantfile | 56 + ThirdParty/soci/appveyor.yml | 106 + .../soci/build/include/soci/soci-config.h | 49 + .../soci/build/lib/Debug/libsoci_core_4_0.lib | Bin 0 -> 24503270 bytes .../build/lib/Debug/libsoci_empty_4_0.lib | Bin 0 -> 1126080 bytes .../soci/build/lib/Debug/libsoci_odbc_4_0.lib | Bin 0 -> 4168736 bytes .../build/lib/Release/libsoci_core_4_0.lib | Bin 0 -> 4312920 bytes .../build/lib/Release/libsoci_empty_4_0.lib | Bin 0 -> 265614 bytes .../build/lib/Release/libsoci_odbc_4_0.lib | Bin 0 -> 856074 bytes ThirdParty/soci/cmake/.gitignore | 21 + ThirdParty/soci/cmake/CMakeLists.txt | 13 + ThirdParty/soci/cmake/SociBackend.cmake | 394 + ThirdParty/soci/cmake/SociConfig.cmake | 106 + ThirdParty/soci/cmake/SociDependencies.cmake | 84 + ThirdParty/soci/cmake/SociUtilities.cmake | 426 + ThirdParty/soci/cmake/SociVersion.cmake | 62 + .../soci/cmake/configs/test-access.cmake | 13 + .../soci/cmake/configs/test-mysql.cmake | 4 + .../soci/cmake/dependencies/Boost.cmake | 13 + ThirdParty/soci/cmake/dependencies/DB2.cmake | 5 + .../soci/cmake/dependencies/Firebird.cmake | 9 + .../soci/cmake/dependencies/MySQL.cmake | 5 + ThirdParty/soci/cmake/dependencies/ODBC.cmake | 5 + .../soci/cmake/dependencies/Oracle.cmake | 5 + .../soci/cmake/dependencies/PostgreSQL.cmake | 5 + .../soci/cmake/dependencies/SQLite3.cmake | 5 + .../soci/cmake/dependencies/Threads.cmake | 4 + ThirdParty/soci/cmake/modules/FindDB2.cmake | 105 + ThirdParty/soci/cmake/modules/FindDL.cmake | 21 + .../soci/cmake/modules/FindFirebird.cmake | 38 + ThirdParty/soci/cmake/modules/FindMySQL.cmake | 129 + ThirdParty/soci/cmake/modules/FindODBC.cmake | 242 + .../soci/cmake/modules/FindOracle.cmake | 81 + .../soci/cmake/modules/FindPostgreSQL.cmake | 176 + .../soci/cmake/modules/FindSQLite3.cmake | 62 + ThirdParty/soci/cmake/modules/FindSoci.cmake | 98 + .../vs2010-test-cmd-args.vcxproj.user.in | 7 + ThirdParty/soci/docs/api/backend.md | 313 + ThirdParty/soci/docs/api/client.md | 753 + ThirdParty/soci/docs/backends/db2.md | 94 + ThirdParty/soci/docs/backends/firebird.md | 155 + ThirdParty/soci/docs/backends/index.md | 14 + ThirdParty/soci/docs/backends/mysql.md | 135 + ThirdParty/soci/docs/backends/odbc.md | 174 + ThirdParty/soci/docs/backends/oracle.md | 172 + ThirdParty/soci/docs/backends/postgresql.md | 159 + ThirdParty/soci/docs/backends/sqlite3.md | 148 + ThirdParty/soci/docs/beyond.md | 89 + ThirdParty/soci/docs/binding.md | 168 + ThirdParty/soci/docs/boost.md | 83 + ThirdParty/soci/docs/connections.md | 163 + ThirdParty/soci/docs/errors.md | 99 + ThirdParty/soci/docs/faq.md | 129 + ThirdParty/soci/docs/images/structure.png | Bin 0 -> 26919 bytes ThirdParty/soci/docs/index.md | 68 + ThirdParty/soci/docs/indicators.md | 102 + ThirdParty/soci/docs/installation.md | 222 + ThirdParty/soci/docs/interfaces.md | 84 + .../soci/docs/languages/ada/concepts.md | 29 + ThirdParty/soci/docs/languages/ada/idioms.md | 242 + ThirdParty/soci/docs/languages/ada/index.md | 37 + .../soci/docs/languages/ada/reference.md | 522 + ThirdParty/soci/docs/languages/index.md | 3 + ThirdParty/soci/docs/license.md | 29 + ThirdParty/soci/docs/lobs.md | 71 + ThirdParty/soci/docs/logging.md | 59 + ThirdParty/soci/docs/multithreading.md | 47 + ThirdParty/soci/docs/procedures.md | 20 + ThirdParty/soci/docs/queries.md | 94 + ThirdParty/soci/docs/quickstart.md | 56 + ThirdParty/soci/docs/statements.md | 268 + ThirdParty/soci/docs/structure.md | 27 + ThirdParty/soci/docs/transactions.md | 45 + ThirdParty/soci/docs/types.md | 292 + ThirdParty/soci/docs/utilities.md | 151 + ThirdParty/soci/docs/vagrant.md | 125 + ThirdParty/soci/include/private/README.md | 5 + .../soci/include/private/firebird/common.h | 271 + .../include/private/firebird/error-firebird.h | 35 + .../soci/include/private/soci-compiler.h | 39 + ThirdParty/soci/include/private/soci-cpp.h | 30 + .../soci/include/private/soci-cstrtod.h | 80 + .../soci/include/private/soci-dtocstr.h | 58 + .../soci/include/private/soci-exchange-cast.h | 97 + ThirdParty/soci/include/private/soci-mktime.h | 51 + .../soci/include/private/soci-static-assert.h | 19 + ThirdParty/soci/include/soci/backend-loader.h | 37 + ThirdParty/soci/include/soci/bind-values.h | 197 + ThirdParty/soci/include/soci/blob-exchange.h | 59 + ThirdParty/soci/include/soci/blob.h | 61 + ThirdParty/soci/include/soci/boost-fusion.h | 28 + .../soci/include/soci/boost-gregorian-date.h | 47 + ThirdParty/soci/include/soci/boost-optional.h | 56 + ThirdParty/soci/include/soci/boost-tuple.h | 18 + ThirdParty/soci/include/soci/callbacks.h | 47 + ThirdParty/soci/include/soci/column-info.h | 123 + .../soci/include/soci/connection-parameters.h | 69 + .../soci/include/soci/connection-pool.h | 41 + ThirdParty/soci/include/soci/db2/soci-db2.h | 300 + .../soci/include/soci/empty/soci-empty.h | 196 + ThirdParty/soci/include/soci/error.h | 66 + .../soci/include/soci/exchange-traits.h | 155 + .../include/soci/firebird/soci-firebird.h | 365 + ThirdParty/soci/include/soci/into-type.h | 207 + ThirdParty/soci/include/soci/into.h | 90 + ThirdParty/soci/include/soci/logger.h | 82 + .../soci/include/soci/mysql/soci-mysql.h | 280 + ThirdParty/soci/include/soci/noreturn.h | 22 + ThirdParty/soci/include/soci/odbc/soci-odbc.h | 578 + ThirdParty/soci/include/soci/once-temp-type.h | 160 + .../soci/include/soci/oracle/soci-oracle.h | 481 + .../include/soci/postgresql/soci-postgresql.h | 421 + .../soci/include/soci/prepare-temp-type.h | 65 + ThirdParty/soci/include/soci/procedure.h | 90 + .../soci/include/soci/query_transformation.h | 57 + .../include/soci/ref-counted-prepare-info.h | 66 + .../soci/include/soci/ref-counted-statement.h | 102 + ThirdParty/soci/include/soci/row-exchange.h | 80 + ThirdParty/soci/include/soci/row.h | 140 + ThirdParty/soci/include/soci/rowid-exchange.h | 59 + ThirdParty/soci/include/soci/rowid.h | 41 + ThirdParty/soci/include/soci/rowset.h | 220 + ThirdParty/soci/include/soci/session.h | 213 + ThirdParty/soci/include/soci/soci-backend.h | 483 + ThirdParty/soci/include/soci/soci-config.h.in | 16 + ThirdParty/soci/include/soci/soci-platform.h | 143 + ThirdParty/soci/include/soci/soci-simple.h | 159 + ThirdParty/soci/include/soci/soci.h | 58 + .../soci/include/soci/sqlite3/soci-sqlite3.h | 358 + ThirdParty/soci/include/soci/statement.h | 324 + ThirdParty/soci/include/soci/transaction.h | 36 + .../include/soci/type-conversion-traits.h | 41 + .../soci/include/soci/type-conversion.h | 507 + ThirdParty/soci/include/soci/type-holder.h | 70 + ThirdParty/soci/include/soci/type-ptr.h | 30 + ThirdParty/soci/include/soci/type-wrappers.h | 33 + ThirdParty/soci/include/soci/unsigned-types.h | 114 + ThirdParty/soci/include/soci/use-type.h | 340 + ThirdParty/soci/include/soci/use.h | 116 + .../soci/include/soci/values-exchange.h | 150 + ThirdParty/soci/include/soci/values.h | 351 + ThirdParty/soci/include/soci/version.h | 34 + .../soci/languages/ada/postgresql_client.gpr | 8 + ThirdParty/soci/languages/ada/soci-mysql.ads | 16 + ThirdParty/soci/languages/ada/soci-oracle.ads | 16 + .../soci/languages/ada/soci-postgresql.ads | 16 + ThirdParty/soci/languages/ada/soci.adb | 1465 ++ ThirdParty/soci/languages/ada/soci.ads | 486 + ThirdParty/soci/languages/ada/soci_ada.gpr | 14 + ThirdParty/soci/languages/ada/soci_core.gpr | 7 + .../soci/languages/ada/soci_postgresql.gpr | 8 + ThirdParty/soci/languages/ada/std_cpp.gpr | 7 + .../languages/ada/test/postgresql_test.adb | 609 + .../languages/ada/test/postgresql_test.gpr | 12 + ThirdParty/soci/mkdocs.yml | 51 + ThirdParty/soci/scripts/build.bat | 79 + ThirdParty/soci/scripts/changelog.sh | 24 + .../soci/scripts/travis/before_install.sh | 22 + .../soci/scripts/travis/before_install_db2.sh | 37 + .../scripts/travis/before_install_firebird.sh | 16 + .../scripts/travis/before_install_odbc.sh | 13 + .../scripts/travis/before_install_oracle.sh | 27 + .../soci/scripts/travis/before_script.sh | 12 + .../soci/scripts/travis/before_script_db2.sh | 10 + .../scripts/travis/before_script_firebird.sh | 11 + .../scripts/travis/before_script_mysql.sh | 9 + .../soci/scripts/travis/before_script_odbc.sh | 11 + .../scripts/travis/before_script_oracle.sh | 41 + .../travis/before_script_postgresql.sh | 9 + .../scripts/travis/before_script_valgrind.sh | 12 + ThirdParty/soci/scripts/travis/common.sh | 39 + .../soci/scripts/travis/install_cmake.sh | 6 + ThirdParty/soci/scripts/travis/oracle.sh | 12 + ThirdParty/soci/scripts/travis/script.sh | 16 + ThirdParty/soci/scripts/travis/script_db2.sh | 27 + .../soci/scripts/travis/script_empty.sh | 25 + .../soci/scripts/travis/script_firebird.sh | 26 + .../soci/scripts/travis/script_mysql.sh | 26 + ThirdParty/soci/scripts/travis/script_odbc.sh | 33 + .../soci/scripts/travis/script_oracle.sh | 28 + .../soci/scripts/travis/script_postgresql.sh | 26 + .../soci/scripts/travis/script_sqlite3.sh | 26 + .../soci/scripts/travis/script_valgrind.sh | 17 + ThirdParty/soci/scripts/vagrant/bootstrap.sh | 18 + ThirdParty/soci/scripts/vagrant/build.sh | 42 + ThirdParty/soci/scripts/vagrant/common.env | 11 + ThirdParty/soci/scripts/vagrant/db2.sh | 25 + ThirdParty/soci/scripts/vagrant/db2cli.sh | 55 + ThirdParty/soci/scripts/vagrant/devel.sh | 27 + ThirdParty/soci/scripts/vagrant/firebird.sh | 49 + ThirdParty/soci/scripts/vagrant/mysql.sh | 27 + ThirdParty/soci/scripts/vagrant/postgresql.sh | 27 + .../scripts/vm/debian-oracle10g-install.sh | 89 + .../soci/scripts/windows/Get-ODBCList.ps1 | 105 + .../soci/scripts/windows/mssql_db_create.sql | 1 + ThirdParty/soci/src/.gitignore | 20 + ThirdParty/soci/src/CMakeLists.txt | 14 + ThirdParty/soci/src/backends/.gitignore | 5 + ThirdParty/soci/src/backends/CMakeLists.txt | 50 + .../soci/src/backends/db2/CMakeLists.txt | 14 + ThirdParty/soci/src/backends/db2/blob.cpp | 62 + ThirdParty/soci/src/backends/db2/common.h | 21 + ThirdParty/soci/src/backends/db2/factory.cpp | 40 + ThirdParty/soci/src/backends/db2/row-id.cpp | 28 + ThirdParty/soci/src/backends/db2/session.cpp | 248 + .../src/backends/db2/standard-into-type.cpp | 163 + .../src/backends/db2/standard-use-type.cpp | 204 + .../soci/src/backends/db2/statement.cpp | 322 + .../src/backends/db2/vector-into-type.cpp | 427 + .../soci/src/backends/db2/vector-use-type.cpp | 402 + .../soci/src/backends/empty/CMakeLists.txt | 14 + .../soci/src/backends/empty/Makefile.basic | 88 + ThirdParty/soci/src/backends/empty/blob.cpp | 61 + .../soci/src/backends/empty/factory.cpp | 42 + ThirdParty/soci/src/backends/empty/row-id.cpp | 27 + .../soci/src/backends/empty/session.cpp | 63 + .../src/backends/empty/standard-into-type.cpp | 39 + .../src/backends/empty/standard-use-type.cpp | 47 + .../soci/src/backends/empty/statement.cpp | 109 + .../src/backends/empty/vector-into-type.cpp | 46 + .../src/backends/empty/vector-use-type.cpp | 46 + .../soci/src/backends/firebird/CMakeLists.txt | 16 + .../soci/src/backends/firebird/Makefile.basic | 101 + .../soci/src/backends/firebird/blob.cpp | 314 + .../soci/src/backends/firebird/common.cpp | 221 + .../src/backends/firebird/error-firebird.cpp | 87 + .../soci/src/backends/firebird/factory.cpp | 36 + .../soci/src/backends/firebird/session.cpp | 369 + .../backends/firebird/standard-into-type.cpp | 167 + .../backends/firebird/standard-use-type.cpp | 206 + .../soci/src/backends/firebird/statement.cpp | 738 + .../backends/firebird/vector-into-type.cpp | 208 + .../src/backends/firebird/vector-use-type.cpp | 207 + .../soci/src/backends/mysql/CMakeLists.txt | 15 + .../soci/src/backends/mysql/Makefile.basic | 97 + ThirdParty/soci/src/backends/mysql/blob.cpp | 62 + ThirdParty/soci/src/backends/mysql/common.cpp | 23 + ThirdParty/soci/src/backends/mysql/common.h | 90 + .../soci/src/backends/mysql/factory.cpp | 45 + ThirdParty/soci/src/backends/mysql/row-id.cpp | 32 + .../soci/src/backends/mysql/session.cpp | 426 + .../src/backends/mysql/standard-into-type.cpp | 120 + .../src/backends/mysql/standard-use-type.cpp | 170 + .../soci/src/backends/mysql/statement.cpp | 484 + .../src/backends/mysql/vector-into-type.cpp | 227 + .../src/backends/mysql/vector-use-type.cpp | 217 + .../soci/src/backends/odbc/CMakeLists.txt | 15 + .../soci/src/backends/odbc/Makefile.basic | 89 + ThirdParty/soci/src/backends/odbc/blob.cpp | 57 + ThirdParty/soci/src/backends/odbc/factory.cpp | 39 + .../soci/src/backends/odbc/makefile.msvc | 48 + ThirdParty/soci/src/backends/odbc/row-id.cpp | 23 + ThirdParty/soci/src/backends/odbc/session.cpp | 408 + .../src/backends/odbc/standard-into-type.cpp | 208 + .../src/backends/odbc/standard-use-type.cpp | 265 + .../soci/src/backends/odbc/statement.cpp | 366 + ThirdParty/soci/src/backends/odbc/utility.h | 62 + .../src/backends/odbc/vector-into-type.cpp | 493 + .../src/backends/odbc/vector-use-type.cpp | 495 + .../soci/src/backends/oracle/CMakeLists.txt | 15 + .../soci/src/backends/oracle/Makefile.basic | 95 + ThirdParty/soci/src/backends/oracle/blob.cpp | 112 + ThirdParty/soci/src/backends/oracle/error.cpp | 82 + ThirdParty/soci/src/backends/oracle/error.h | 33 + .../soci/src/backends/oracle/factory.cpp | 207 + .../soci/src/backends/oracle/row-id.cpp | 32 + .../soci/src/backends/oracle/session.cpp | 441 + .../backends/oracle/standard-into-type.cpp | 372 + .../src/backends/oracle/standard-use-type.cpp | 609 + .../soci/src/backends/oracle/statement.cpp | 352 + .../src/backends/oracle/vector-into-type.cpp | 504 + .../src/backends/oracle/vector-use-type.cpp | 426 + .../src/backends/postgresql/CMakeLists.txt | 32 + .../src/backends/postgresql/Makefile.basic | 114 + .../soci/src/backends/postgresql/blob.cpp | 113 + .../soci/src/backends/postgresql/common.h | 129 + .../soci/src/backends/postgresql/error.cpp | 157 + .../soci/src/backends/postgresql/factory.cpp | 136 + .../soci/src/backends/postgresql/row-id.cpp | 34 + .../soci/src/backends/postgresql/session.cpp | 140 + .../postgresql/standard-into-type.cpp | 165 + .../backends/postgresql/standard-use-type.cpp | 198 + .../src/backends/postgresql/statement.cpp | 812 ++ .../backends/postgresql/vector-into-type.cpp | 307 + .../backends/postgresql/vector-use-type.cpp | 288 + .../soci/src/backends/sqlite3/CMakeLists.txt | 16 + .../soci/src/backends/sqlite3/Makefile.basic | 114 + ThirdParty/soci/src/backends/sqlite3/blob.cpp | 118 + ThirdParty/soci/src/backends/sqlite3/common.h | 84 + .../soci/src/backends/sqlite3/error.cpp | 23 + .../soci/src/backends/sqlite3/factory.cpp | 42 + .../soci/src/backends/sqlite3/row-id.cpp | 27 + .../soci/src/backends/sqlite3/session.cpp | 170 + .../backends/sqlite3/standard-into-type.cpp | 177 + .../backends/sqlite3/standard-use-type.cpp | 213 + .../soci/src/backends/sqlite3/statement.cpp | 558 + .../src/backends/sqlite3/vector-into-type.cpp | 354 + .../src/backends/sqlite3/vector-use-type.cpp | 215 + ThirdParty/soci/src/core/.gitignore | 5 + ThirdParty/soci/src/core/CMakeLists.txt | 139 + ThirdParty/soci/src/core/Makefile.basic | 94 + ThirdParty/soci/src/core/backend-loader.cpp | 349 + ThirdParty/soci/src/core/blob.cpp | 62 + ThirdParty/soci/src/core/common.cpp | 93 + .../soci/src/core/connection-parameters.cpp | 62 + ThirdParty/soci/src/core/connection-pool.cpp | 326 + ThirdParty/soci/src/core/error.cpp | 147 + ThirdParty/soci/src/core/into-type.cpp | 129 + ThirdParty/soci/src/core/logger.cpp | 88 + ThirdParty/soci/src/core/once-temp-type.cpp | 188 + .../soci/src/core/prepare-temp-type.cpp | 47 + ThirdParty/soci/src/core/procedure.cpp | 33 + .../src/core/ref-counted-prepare-info.cpp | 34 + .../soci/src/core/ref-counted-statement.cpp | 43 + ThirdParty/soci/src/core/row.cpp | 111 + ThirdParty/soci/src/core/rowid.cpp | 23 + ThirdParty/soci/src/core/session.cpp | 572 + ThirdParty/soci/src/core/soci-simple.cpp | 2138 +++ .../soci/src/core/soci_backends_config.h.in | 12 + ThirdParty/soci/src/core/statement.cpp | 820 ++ ThirdParty/soci/src/core/transaction.cpp | 53 + ThirdParty/soci/src/core/use-type.cpp | 219 + ThirdParty/soci/src/core/values.cpp | 69 + ThirdParty/soci/tests/CMakeLists.txt | 32 + ThirdParty/soci/tests/README.md | 10 + ThirdParty/soci/tests/catch.hpp | 11545 ++++++++++++++++ ThirdParty/soci/tests/common-tests.h | 4469 ++++++ ThirdParty/soci/tests/db2/CMakeLists.txt | 16 + ThirdParty/soci/tests/db2/test-db2.cpp | 424 + ThirdParty/soci/tests/empty/CMakeLists.txt | 15 + ThirdParty/soci/tests/empty/test-empty.cpp | 178 + ThirdParty/soci/tests/firebird/CMakeLists.txt | 16 + .../soci/tests/firebird/test-firebird.cpp | 1389 ++ ThirdParty/soci/tests/mysql/CMakeLists.txt | 16 + ThirdParty/soci/tests/mysql/test-mysql.cpp | 867 ++ ThirdParty/soci/tests/mysql/test-mysql.h | 137 + ThirdParty/soci/tests/odbc/CMakeLists.txt | 62 + ThirdParty/soci/tests/odbc/soci_test.mdb | Bin 0 -> 77824 bytes ThirdParty/soci/tests/odbc/test-mssql.dsn | 10 + .../soci/tests/odbc/test-odbc-access.cpp | 148 + ThirdParty/soci/tests/odbc/test-odbc-db2.cpp | 287 + .../soci/tests/odbc/test-odbc-mssql.cpp | 235 + .../soci/tests/odbc/test-odbc-mysql.cpp | 49 + .../soci/tests/odbc/test-odbc-postgresql.cpp | 295 + .../soci/tests/odbc/test-postgresql-win64.dsn | 9 + .../soci/tests/odbc/test-postgresql.dsn | 9 + ThirdParty/soci/tests/oracle/CMakeLists.txt | 16 + ThirdParty/soci/tests/oracle/Makefile.basic | 13 + ThirdParty/soci/tests/oracle/test-oracle.cpp | 1589 +++ .../soci/tests/postgresql/CMakeLists.txt | 16 + .../soci/tests/postgresql/Makefile.basic | 12 + .../soci/tests/postgresql/test-postgresql.cpp | 1152 ++ ThirdParty/soci/tests/sqlite3/CMakeLists.txt | 16 + ThirdParty/soci/tests/sqlite3/Makefile.basic | 12 + .../soci/tests/sqlite3/test-sqlite3.cpp | 421 + ThirdParty/soci/valgrind.suppress | 9 + ThirdParty/soci/www/articles.html | 47 + ThirdParty/soci/www/doc.html | 46 + ThirdParty/soci/www/doc/README.md | 11 + ThirdParty/soci/www/doc/index.html | 46 + ThirdParty/soci/www/events.html | 101 + ThirdParty/soci/www/forkus_github.png | Bin 0 -> 5735 bytes ThirdParty/soci/www/index.html | 134 + ThirdParty/soci/www/links.html | 78 + ThirdParty/soci/www/people.html | 122 + ThirdParty/soci/www/style.css | 87 + ThirdParty/termcolor/termcolor.hpp | 557 + sqlgrep.sln | 25 + sqlgrep/.gitignore | 3 + sqlgrep/pch.cpp | Bin 0 -> 430 bytes sqlgrep/pch.h | 15 + sqlgrep/sqlgrep.cpp | 237 + sqlgrep/sqlgrep.vcxproj | 109 + sqlgrep/sqlgrep.vcxproj.filters | 30 + 392 files changed, 75440 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ThirdParty/CLI11/CLI11.hpp create mode 100644 ThirdParty/soci/.circleci/config.yml create mode 100644 ThirdParty/soci/.editorconfig create mode 100644 ThirdParty/soci/.gitattributes create mode 100644 ThirdParty/soci/.gitignore create mode 100644 ThirdParty/soci/.markdownlint.json create mode 100644 ThirdParty/soci/.travis.yml create mode 100644 ThirdParty/soci/AUTHORS create mode 100644 ThirdParty/soci/Build.ps1 create mode 100644 ThirdParty/soci/CHANGELOG.md create mode 100644 ThirdParty/soci/CHANGES create mode 100644 ThirdParty/soci/CMakeLists.txt create mode 100644 ThirdParty/soci/LICENSE_1_0.txt create mode 100644 ThirdParty/soci/README.md create mode 100644 ThirdParty/soci/TODO create mode 100644 ThirdParty/soci/Vagrantfile create mode 100644 ThirdParty/soci/appveyor.yml create mode 100644 ThirdParty/soci/build/include/soci/soci-config.h create mode 100644 ThirdParty/soci/build/lib/Debug/libsoci_core_4_0.lib create mode 100644 ThirdParty/soci/build/lib/Debug/libsoci_empty_4_0.lib create mode 100644 ThirdParty/soci/build/lib/Debug/libsoci_odbc_4_0.lib create mode 100644 ThirdParty/soci/build/lib/Release/libsoci_core_4_0.lib create mode 100644 ThirdParty/soci/build/lib/Release/libsoci_empty_4_0.lib create mode 100644 ThirdParty/soci/build/lib/Release/libsoci_odbc_4_0.lib create mode 100644 ThirdParty/soci/cmake/.gitignore create mode 100644 ThirdParty/soci/cmake/CMakeLists.txt create mode 100644 ThirdParty/soci/cmake/SociBackend.cmake create mode 100644 ThirdParty/soci/cmake/SociConfig.cmake create mode 100644 ThirdParty/soci/cmake/SociDependencies.cmake create mode 100644 ThirdParty/soci/cmake/SociUtilities.cmake create mode 100644 ThirdParty/soci/cmake/SociVersion.cmake create mode 100644 ThirdParty/soci/cmake/configs/test-access.cmake create mode 100644 ThirdParty/soci/cmake/configs/test-mysql.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/Boost.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/DB2.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/Firebird.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/MySQL.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/ODBC.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/Oracle.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/PostgreSQL.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/SQLite3.cmake create mode 100644 ThirdParty/soci/cmake/dependencies/Threads.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindDB2.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindDL.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindFirebird.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindMySQL.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindODBC.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindOracle.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindPostgreSQL.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindSQLite3.cmake create mode 100644 ThirdParty/soci/cmake/modules/FindSoci.cmake create mode 100644 ThirdParty/soci/cmake/resources/vs2010-test-cmd-args.vcxproj.user.in create mode 100644 ThirdParty/soci/docs/api/backend.md create mode 100644 ThirdParty/soci/docs/api/client.md create mode 100644 ThirdParty/soci/docs/backends/db2.md create mode 100644 ThirdParty/soci/docs/backends/firebird.md create mode 100644 ThirdParty/soci/docs/backends/index.md create mode 100644 ThirdParty/soci/docs/backends/mysql.md create mode 100644 ThirdParty/soci/docs/backends/odbc.md create mode 100644 ThirdParty/soci/docs/backends/oracle.md create mode 100644 ThirdParty/soci/docs/backends/postgresql.md create mode 100644 ThirdParty/soci/docs/backends/sqlite3.md create mode 100644 ThirdParty/soci/docs/beyond.md create mode 100644 ThirdParty/soci/docs/binding.md create mode 100644 ThirdParty/soci/docs/boost.md create mode 100644 ThirdParty/soci/docs/connections.md create mode 100644 ThirdParty/soci/docs/errors.md create mode 100644 ThirdParty/soci/docs/faq.md create mode 100644 ThirdParty/soci/docs/images/structure.png create mode 100644 ThirdParty/soci/docs/index.md create mode 100644 ThirdParty/soci/docs/indicators.md create mode 100644 ThirdParty/soci/docs/installation.md create mode 100644 ThirdParty/soci/docs/interfaces.md create mode 100644 ThirdParty/soci/docs/languages/ada/concepts.md create mode 100644 ThirdParty/soci/docs/languages/ada/idioms.md create mode 100644 ThirdParty/soci/docs/languages/ada/index.md create mode 100644 ThirdParty/soci/docs/languages/ada/reference.md create mode 100644 ThirdParty/soci/docs/languages/index.md create mode 100644 ThirdParty/soci/docs/license.md create mode 100644 ThirdParty/soci/docs/lobs.md create mode 100644 ThirdParty/soci/docs/logging.md create mode 100644 ThirdParty/soci/docs/multithreading.md create mode 100644 ThirdParty/soci/docs/procedures.md create mode 100644 ThirdParty/soci/docs/queries.md create mode 100644 ThirdParty/soci/docs/quickstart.md create mode 100644 ThirdParty/soci/docs/statements.md create mode 100644 ThirdParty/soci/docs/structure.md create mode 100644 ThirdParty/soci/docs/transactions.md create mode 100644 ThirdParty/soci/docs/types.md create mode 100644 ThirdParty/soci/docs/utilities.md create mode 100644 ThirdParty/soci/docs/vagrant.md create mode 100644 ThirdParty/soci/include/private/README.md create mode 100644 ThirdParty/soci/include/private/firebird/common.h create mode 100644 ThirdParty/soci/include/private/firebird/error-firebird.h create mode 100644 ThirdParty/soci/include/private/soci-compiler.h create mode 100644 ThirdParty/soci/include/private/soci-cpp.h create mode 100644 ThirdParty/soci/include/private/soci-cstrtod.h create mode 100644 ThirdParty/soci/include/private/soci-dtocstr.h create mode 100644 ThirdParty/soci/include/private/soci-exchange-cast.h create mode 100644 ThirdParty/soci/include/private/soci-mktime.h create mode 100644 ThirdParty/soci/include/private/soci-static-assert.h create mode 100644 ThirdParty/soci/include/soci/backend-loader.h create mode 100644 ThirdParty/soci/include/soci/bind-values.h create mode 100644 ThirdParty/soci/include/soci/blob-exchange.h create mode 100644 ThirdParty/soci/include/soci/blob.h create mode 100644 ThirdParty/soci/include/soci/boost-fusion.h create mode 100644 ThirdParty/soci/include/soci/boost-gregorian-date.h create mode 100644 ThirdParty/soci/include/soci/boost-optional.h create mode 100644 ThirdParty/soci/include/soci/boost-tuple.h create mode 100644 ThirdParty/soci/include/soci/callbacks.h create mode 100644 ThirdParty/soci/include/soci/column-info.h create mode 100644 ThirdParty/soci/include/soci/connection-parameters.h create mode 100644 ThirdParty/soci/include/soci/connection-pool.h create mode 100644 ThirdParty/soci/include/soci/db2/soci-db2.h create mode 100644 ThirdParty/soci/include/soci/empty/soci-empty.h create mode 100644 ThirdParty/soci/include/soci/error.h create mode 100644 ThirdParty/soci/include/soci/exchange-traits.h create mode 100644 ThirdParty/soci/include/soci/firebird/soci-firebird.h create mode 100644 ThirdParty/soci/include/soci/into-type.h create mode 100644 ThirdParty/soci/include/soci/into.h create mode 100644 ThirdParty/soci/include/soci/logger.h create mode 100644 ThirdParty/soci/include/soci/mysql/soci-mysql.h create mode 100644 ThirdParty/soci/include/soci/noreturn.h create mode 100644 ThirdParty/soci/include/soci/odbc/soci-odbc.h create mode 100644 ThirdParty/soci/include/soci/once-temp-type.h create mode 100644 ThirdParty/soci/include/soci/oracle/soci-oracle.h create mode 100644 ThirdParty/soci/include/soci/postgresql/soci-postgresql.h create mode 100644 ThirdParty/soci/include/soci/prepare-temp-type.h create mode 100644 ThirdParty/soci/include/soci/procedure.h create mode 100644 ThirdParty/soci/include/soci/query_transformation.h create mode 100644 ThirdParty/soci/include/soci/ref-counted-prepare-info.h create mode 100644 ThirdParty/soci/include/soci/ref-counted-statement.h create mode 100644 ThirdParty/soci/include/soci/row-exchange.h create mode 100644 ThirdParty/soci/include/soci/row.h create mode 100644 ThirdParty/soci/include/soci/rowid-exchange.h create mode 100644 ThirdParty/soci/include/soci/rowid.h create mode 100644 ThirdParty/soci/include/soci/rowset.h create mode 100644 ThirdParty/soci/include/soci/session.h create mode 100644 ThirdParty/soci/include/soci/soci-backend.h create mode 100644 ThirdParty/soci/include/soci/soci-config.h.in create mode 100644 ThirdParty/soci/include/soci/soci-platform.h create mode 100644 ThirdParty/soci/include/soci/soci-simple.h create mode 100644 ThirdParty/soci/include/soci/soci.h create mode 100644 ThirdParty/soci/include/soci/sqlite3/soci-sqlite3.h create mode 100644 ThirdParty/soci/include/soci/statement.h create mode 100644 ThirdParty/soci/include/soci/transaction.h create mode 100644 ThirdParty/soci/include/soci/type-conversion-traits.h create mode 100644 ThirdParty/soci/include/soci/type-conversion.h create mode 100644 ThirdParty/soci/include/soci/type-holder.h create mode 100644 ThirdParty/soci/include/soci/type-ptr.h create mode 100644 ThirdParty/soci/include/soci/type-wrappers.h create mode 100644 ThirdParty/soci/include/soci/unsigned-types.h create mode 100644 ThirdParty/soci/include/soci/use-type.h create mode 100644 ThirdParty/soci/include/soci/use.h create mode 100644 ThirdParty/soci/include/soci/values-exchange.h create mode 100644 ThirdParty/soci/include/soci/values.h create mode 100644 ThirdParty/soci/include/soci/version.h create mode 100644 ThirdParty/soci/languages/ada/postgresql_client.gpr create mode 100644 ThirdParty/soci/languages/ada/soci-mysql.ads create mode 100644 ThirdParty/soci/languages/ada/soci-oracle.ads create mode 100644 ThirdParty/soci/languages/ada/soci-postgresql.ads create mode 100644 ThirdParty/soci/languages/ada/soci.adb create mode 100644 ThirdParty/soci/languages/ada/soci.ads create mode 100644 ThirdParty/soci/languages/ada/soci_ada.gpr create mode 100644 ThirdParty/soci/languages/ada/soci_core.gpr create mode 100644 ThirdParty/soci/languages/ada/soci_postgresql.gpr create mode 100644 ThirdParty/soci/languages/ada/std_cpp.gpr create mode 100644 ThirdParty/soci/languages/ada/test/postgresql_test.adb create mode 100644 ThirdParty/soci/languages/ada/test/postgresql_test.gpr create mode 100644 ThirdParty/soci/mkdocs.yml create mode 100644 ThirdParty/soci/scripts/build.bat create mode 100644 ThirdParty/soci/scripts/changelog.sh create mode 100644 ThirdParty/soci/scripts/travis/before_install.sh create mode 100644 ThirdParty/soci/scripts/travis/before_install_db2.sh create mode 100644 ThirdParty/soci/scripts/travis/before_install_firebird.sh create mode 100644 ThirdParty/soci/scripts/travis/before_install_odbc.sh create mode 100644 ThirdParty/soci/scripts/travis/before_install_oracle.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_db2.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_firebird.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_mysql.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_odbc.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_oracle.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_postgresql.sh create mode 100644 ThirdParty/soci/scripts/travis/before_script_valgrind.sh create mode 100644 ThirdParty/soci/scripts/travis/common.sh create mode 100644 ThirdParty/soci/scripts/travis/install_cmake.sh create mode 100644 ThirdParty/soci/scripts/travis/oracle.sh create mode 100644 ThirdParty/soci/scripts/travis/script.sh create mode 100644 ThirdParty/soci/scripts/travis/script_db2.sh create mode 100644 ThirdParty/soci/scripts/travis/script_empty.sh create mode 100644 ThirdParty/soci/scripts/travis/script_firebird.sh create mode 100644 ThirdParty/soci/scripts/travis/script_mysql.sh create mode 100644 ThirdParty/soci/scripts/travis/script_odbc.sh create mode 100644 ThirdParty/soci/scripts/travis/script_oracle.sh create mode 100644 ThirdParty/soci/scripts/travis/script_postgresql.sh create mode 100644 ThirdParty/soci/scripts/travis/script_sqlite3.sh create mode 100644 ThirdParty/soci/scripts/travis/script_valgrind.sh create mode 100644 ThirdParty/soci/scripts/vagrant/bootstrap.sh create mode 100644 ThirdParty/soci/scripts/vagrant/build.sh create mode 100644 ThirdParty/soci/scripts/vagrant/common.env create mode 100644 ThirdParty/soci/scripts/vagrant/db2.sh create mode 100644 ThirdParty/soci/scripts/vagrant/db2cli.sh create mode 100644 ThirdParty/soci/scripts/vagrant/devel.sh create mode 100644 ThirdParty/soci/scripts/vagrant/firebird.sh create mode 100644 ThirdParty/soci/scripts/vagrant/mysql.sh create mode 100644 ThirdParty/soci/scripts/vagrant/postgresql.sh create mode 100644 ThirdParty/soci/scripts/vm/debian-oracle10g-install.sh create mode 100644 ThirdParty/soci/scripts/windows/Get-ODBCList.ps1 create mode 100644 ThirdParty/soci/scripts/windows/mssql_db_create.sql create mode 100644 ThirdParty/soci/src/.gitignore create mode 100644 ThirdParty/soci/src/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/.gitignore create mode 100644 ThirdParty/soci/src/backends/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/db2/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/db2/blob.cpp create mode 100644 ThirdParty/soci/src/backends/db2/common.h create mode 100644 ThirdParty/soci/src/backends/db2/factory.cpp create mode 100644 ThirdParty/soci/src/backends/db2/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/db2/session.cpp create mode 100644 ThirdParty/soci/src/backends/db2/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/db2/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/db2/statement.cpp create mode 100644 ThirdParty/soci/src/backends/db2/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/db2/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/empty/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/empty/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/empty/blob.cpp create mode 100644 ThirdParty/soci/src/backends/empty/factory.cpp create mode 100644 ThirdParty/soci/src/backends/empty/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/empty/session.cpp create mode 100644 ThirdParty/soci/src/backends/empty/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/empty/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/empty/statement.cpp create mode 100644 ThirdParty/soci/src/backends/empty/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/empty/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/firebird/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/firebird/blob.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/common.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/error-firebird.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/factory.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/session.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/statement.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/firebird/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/mysql/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/mysql/blob.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/common.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/common.h create mode 100644 ThirdParty/soci/src/backends/mysql/factory.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/session.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/statement.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/mysql/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/odbc/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/odbc/blob.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/factory.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/makefile.msvc create mode 100644 ThirdParty/soci/src/backends/odbc/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/session.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/statement.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/utility.h create mode 100644 ThirdParty/soci/src/backends/odbc/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/odbc/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/oracle/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/oracle/blob.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/error.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/error.h create mode 100644 ThirdParty/soci/src/backends/oracle/factory.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/session.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/statement.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/oracle/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/postgresql/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/postgresql/blob.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/common.h create mode 100644 ThirdParty/soci/src/backends/postgresql/error.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/factory.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/session.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/statement.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/postgresql/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/CMakeLists.txt create mode 100644 ThirdParty/soci/src/backends/sqlite3/Makefile.basic create mode 100644 ThirdParty/soci/src/backends/sqlite3/blob.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/common.h create mode 100644 ThirdParty/soci/src/backends/sqlite3/error.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/factory.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/row-id.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/session.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/standard-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/standard-use-type.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/statement.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/vector-into-type.cpp create mode 100644 ThirdParty/soci/src/backends/sqlite3/vector-use-type.cpp create mode 100644 ThirdParty/soci/src/core/.gitignore create mode 100644 ThirdParty/soci/src/core/CMakeLists.txt create mode 100644 ThirdParty/soci/src/core/Makefile.basic create mode 100644 ThirdParty/soci/src/core/backend-loader.cpp create mode 100644 ThirdParty/soci/src/core/blob.cpp create mode 100644 ThirdParty/soci/src/core/common.cpp create mode 100644 ThirdParty/soci/src/core/connection-parameters.cpp create mode 100644 ThirdParty/soci/src/core/connection-pool.cpp create mode 100644 ThirdParty/soci/src/core/error.cpp create mode 100644 ThirdParty/soci/src/core/into-type.cpp create mode 100644 ThirdParty/soci/src/core/logger.cpp create mode 100644 ThirdParty/soci/src/core/once-temp-type.cpp create mode 100644 ThirdParty/soci/src/core/prepare-temp-type.cpp create mode 100644 ThirdParty/soci/src/core/procedure.cpp create mode 100644 ThirdParty/soci/src/core/ref-counted-prepare-info.cpp create mode 100644 ThirdParty/soci/src/core/ref-counted-statement.cpp create mode 100644 ThirdParty/soci/src/core/row.cpp create mode 100644 ThirdParty/soci/src/core/rowid.cpp create mode 100644 ThirdParty/soci/src/core/session.cpp create mode 100644 ThirdParty/soci/src/core/soci-simple.cpp create mode 100644 ThirdParty/soci/src/core/soci_backends_config.h.in create mode 100644 ThirdParty/soci/src/core/statement.cpp create mode 100644 ThirdParty/soci/src/core/transaction.cpp create mode 100644 ThirdParty/soci/src/core/use-type.cpp create mode 100644 ThirdParty/soci/src/core/values.cpp create mode 100644 ThirdParty/soci/tests/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/README.md create mode 100644 ThirdParty/soci/tests/catch.hpp create mode 100644 ThirdParty/soci/tests/common-tests.h create mode 100644 ThirdParty/soci/tests/db2/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/db2/test-db2.cpp create mode 100644 ThirdParty/soci/tests/empty/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/empty/test-empty.cpp create mode 100644 ThirdParty/soci/tests/firebird/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/firebird/test-firebird.cpp create mode 100644 ThirdParty/soci/tests/mysql/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/mysql/test-mysql.cpp create mode 100644 ThirdParty/soci/tests/mysql/test-mysql.h create mode 100644 ThirdParty/soci/tests/odbc/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/odbc/soci_test.mdb create mode 100644 ThirdParty/soci/tests/odbc/test-mssql.dsn create mode 100644 ThirdParty/soci/tests/odbc/test-odbc-access.cpp create mode 100644 ThirdParty/soci/tests/odbc/test-odbc-db2.cpp create mode 100644 ThirdParty/soci/tests/odbc/test-odbc-mssql.cpp create mode 100644 ThirdParty/soci/tests/odbc/test-odbc-mysql.cpp create mode 100644 ThirdParty/soci/tests/odbc/test-odbc-postgresql.cpp create mode 100644 ThirdParty/soci/tests/odbc/test-postgresql-win64.dsn create mode 100644 ThirdParty/soci/tests/odbc/test-postgresql.dsn create mode 100644 ThirdParty/soci/tests/oracle/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/oracle/Makefile.basic create mode 100644 ThirdParty/soci/tests/oracle/test-oracle.cpp create mode 100644 ThirdParty/soci/tests/postgresql/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/postgresql/Makefile.basic create mode 100644 ThirdParty/soci/tests/postgresql/test-postgresql.cpp create mode 100644 ThirdParty/soci/tests/sqlite3/CMakeLists.txt create mode 100644 ThirdParty/soci/tests/sqlite3/Makefile.basic create mode 100644 ThirdParty/soci/tests/sqlite3/test-sqlite3.cpp create mode 100644 ThirdParty/soci/valgrind.suppress create mode 100644 ThirdParty/soci/www/articles.html create mode 100644 ThirdParty/soci/www/doc.html create mode 100644 ThirdParty/soci/www/doc/README.md create mode 100644 ThirdParty/soci/www/doc/index.html create mode 100644 ThirdParty/soci/www/events.html create mode 100644 ThirdParty/soci/www/forkus_github.png create mode 100644 ThirdParty/soci/www/index.html create mode 100644 ThirdParty/soci/www/links.html create mode 100644 ThirdParty/soci/www/people.html create mode 100644 ThirdParty/soci/www/style.css create mode 100644 ThirdParty/termcolor/termcolor.hpp create mode 100644 sqlgrep.sln create mode 100644 sqlgrep/.gitignore create mode 100644 sqlgrep/pch.cpp create mode 100644 sqlgrep/pch.h create mode 100644 sqlgrep/sqlgrep.cpp create mode 100644 sqlgrep/sqlgrep.vcxproj create mode 100644 sqlgrep/sqlgrep.vcxproj.filters diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9a6ca41 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..756b5d9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e340b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/x64/ +/*.user +/Debug/ +/.vs/ diff --git a/ThirdParty/CLI11/CLI11.hpp b/ThirdParty/CLI11/CLI11.hpp new file mode 100644 index 0000000..bf3f813 --- /dev/null +++ b/ThirdParty/CLI11/CLI11.hpp @@ -0,0 +1,4043 @@ +#pragma once + +// CLI11: Version 1.6.1 +// Originally designed by Henry Schreiner +// https://github.com/CLIUtils/CLI11 +// +// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts +// from: v1.6.1 +// +// From LICENSE: +// +// CLI11 1.6 Copyright (c) 2017-2018 University of Cincinnati, developed by Henry +// Schreiner under NSF AWARD 1414736. All rights reserved. +// +// Redistribution and use in source and binary forms of CLI11, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// 3. Neither the name of the copyright holder nor the names of its contributors +// may be used to endorse or promote products derived from this software without +// specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// Standard combined includes: + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// Verbatim copy from CLI/Version.hpp: + + +#define CLI11_VERSION_MAJOR 1 +#define CLI11_VERSION_MINOR 6 +#define CLI11_VERSION_PATCH 1 +#define CLI11_VERSION "1.6.1" + + + + +// Verbatim copy from CLI/Macros.hpp: + + +// The following version macro is very similar to the one in PyBind11 +#if !(defined(_MSC_VER) && __cplusplus == 199711L) && !defined(__INTEL_COMPILER) +#if __cplusplus >= 201402L +#define CLI11_CPP14 +#if __cplusplus >= 201703L +#define CLI11_CPP17 +#if __cplusplus > 201703L +#define CLI11_CPP20 +#endif +#endif +#endif +#elif defined(_MSC_VER) && __cplusplus == 199711L +// MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully implemented) +// Unless you use the /Zc:__cplusplus flag on Visual Studio 2017 15.7 Preview 3 or newer +#if _MSVC_LANG >= 201402L +#define CLI11_CPP14 +#if _MSVC_LANG > 201402L && _MSC_VER >= 1910 +#define CLI11_CPP17 +#if __MSVC_LANG > 201703L && _MSC_VER >= 1910 +#define CLI11_CPP20 +#endif +#endif +#endif +#endif + +#if defined(CLI11_CPP14) +#define CLI11_DEPRECATED(reason) [[deprecated(reason)]] +#elif defined(_MSC_VER) +#define CLI11_DEPRECATED(reason) __declspec(deprecated(reason)) +#else +#define CLI11_DEPRECATED(reason) __attribute__((deprecated(reason))) +#endif + + + + +// Verbatim copy from CLI/Optional.hpp: + +#ifdef __has_include + +#if defined(CLI11_CPP17) && __has_include() && \ + !defined(CLI11_STD_OPTIONAL) +#define CLI11_STD_OPTIONAL 1 +#endif + +#if defined(CLI11_CPP14) && __has_include() && \ + !defined(CLI11_EXPERIMENTAL_OPTIONAL) +#define CLI11_EXPERIMENTAL_OPTIONAL 1 +#endif + +#if __has_include() && !defined(CLI11_BOOST_OPTIONAL) +#include +#if BOOST_VERSION >= 105800 +#define CLI11_BOOST_OPTIONAL 1 +#endif +#endif + +#endif + +#if CLI11_STD_OPTIONAL +#include +#endif +#if CLI11_EXPERIMENTAL_OPTIONAL +#include +#endif +#if CLI11_BOOST_OPTIONAL +#include +#endif + + +// From CLI/Version.hpp: + + + +// From CLI/Macros.hpp: + + + +// From CLI/Optional.hpp: + +namespace CLI { + +#if CLI11_STD_OPTIONAL +template std::istream &operator>>(std::istream &in, std::optional &val) { + T v; + in >> v; + val = v; + return in; +} +#endif + +#if CLI11_EXPERIMENTAL_OPTIONAL +template std::istream &operator>>(std::istream &in, std::experimental::optional &val) { + T v; + in >> v; + val = v; + return in; +} +#endif + +#if CLI11_BOOST_OPTIONAL +template std::istream &operator>>(std::istream &in, boost::optional &val) { + T v; + in >> v; + val = v; + return in; +} +#endif + +// Export the best optional to the CLI namespace +#if CLI11_STD_OPTIONAL +using std::optional; +#elif CLI11_EXPERIMENTAL_OPTIONAL +using std::experimental::optional; +#elif CLI11_BOOST_OPTIONAL +using boost::optional; +#endif + +// This is true if any optional is found +#if CLI11_STD_OPTIONAL || CLI11_EXPERIMENTAL_OPTIONAL || CLI11_BOOST_OPTIONAL +#define CLI11_OPTIONAL 1 +#endif + +} // namespace CLI + +// From CLI/StringTools.hpp: + +namespace CLI { +namespace detail { + +// Based on http://stackoverflow.com/questions/236129/split-a-string-in-c +/// Split a string by a delim +inline std::vector split(const std::string &s, char delim) { + std::vector elems; + // Check to see if empty string, give consistent result + if(s.empty()) + elems.emplace_back(""); + else { + std::stringstream ss; + ss.str(s); + std::string item; + while(std::getline(ss, item, delim)) { + elems.push_back(item); + } + } + return elems; +} + +/// Simple function to join a string +template std::string join(const T &v, std::string delim = ",") { + std::ostringstream s; + size_t start = 0; + for(const auto &i : v) { + if(start++ > 0) + s << delim; + s << i; + } + return s.str(); +} + +/// Join a string in reverse order +template std::string rjoin(const T &v, std::string delim = ",") { + std::ostringstream s; + for(size_t start = 0; start < v.size(); start++) { + if(start > 0) + s << delim; + s << v[v.size() - start - 1]; + } + return s.str(); +} + +// Based roughly on http://stackoverflow.com/questions/25829143/c-trim-whitespace-from-a-string + +/// Trim whitespace from left of string +inline std::string <rim(std::string &str) { + auto it = std::find_if(str.begin(), str.end(), [](char ch) { return !std::isspace(ch, std::locale()); }); + str.erase(str.begin(), it); + return str; +} + +/// Trim anything from left of string +inline std::string <rim(std::string &str, const std::string &filter) { + auto it = std::find_if(str.begin(), str.end(), [&filter](char ch) { return filter.find(ch) == std::string::npos; }); + str.erase(str.begin(), it); + return str; +} + +/// Trim whitespace from right of string +inline std::string &rtrim(std::string &str) { + auto it = std::find_if(str.rbegin(), str.rend(), [](char ch) { return !std::isspace(ch, std::locale()); }); + str.erase(it.base(), str.end()); + return str; +} + +/// Trim anything from right of string +inline std::string &rtrim(std::string &str, const std::string &filter) { + auto it = + std::find_if(str.rbegin(), str.rend(), [&filter](char ch) { return filter.find(ch) == std::string::npos; }); + str.erase(it.base(), str.end()); + return str; +} + +/// Trim whitespace from string +inline std::string &trim(std::string &str) { return ltrim(rtrim(str)); } + +/// Trim anything from string +inline std::string &trim(std::string &str, const std::string filter) { return ltrim(rtrim(str, filter), filter); } + +/// Make a copy of the string and then trim it +inline std::string trim_copy(const std::string &str) { + std::string s = str; + return trim(s); +} + +/// Make a copy of the string and then trim it, any filter string can be used (any char in string is filtered) +inline std::string trim_copy(const std::string &str, const std::string &filter) { + std::string s = str; + return trim(s, filter); +} +/// Print a two part "help" string +inline std::ostream &format_help(std::ostream &out, std::string name, std::string description, size_t wid) { + name = " " + name; + out << std::setw(static_cast(wid)) << std::left << name; + if(!description.empty()) { + if(name.length() >= wid) + out << "\n" << std::setw(static_cast(wid)) << ""; + out << description; + } + out << "\n"; + return out; +} + +/// Verify the first character of an option +template bool valid_first_char(T c) { return std::isalpha(c, std::locale()) || c == '_'; } + +/// Verify following characters of an option +template bool valid_later_char(T c) { + return std::isalnum(c, std::locale()) || c == '_' || c == '.' || c == '-'; +} + +/// Verify an option name +inline bool valid_name_string(const std::string &str) { + if(str.empty() || !valid_first_char(str[0])) + return false; + for(auto c : str.substr(1)) + if(!valid_later_char(c)) + return false; + return true; +} + +/// Return a lower case version of a string +inline std::string to_lower(std::string str) { + std::transform(std::begin(str), std::end(str), std::begin(str), [](const std::string::value_type &x) { + return std::tolower(x, std::locale()); + }); + return str; +} + +/// Split a string '"one two" "three"' into 'one two', 'three' +inline std::vector split_up(std::string str) { + + std::vector delims = {'\'', '\"'}; + auto find_ws = [](char ch) { return std::isspace(ch, std::locale()); }; + trim(str); + + std::vector output; + + while(!str.empty()) { + if(str[0] == '\'') { + auto end = str.find('\'', 1); + if(end != std::string::npos) { + output.push_back(str.substr(1, end - 1)); + str = str.substr(end + 1); + } else { + output.push_back(str.substr(1)); + str = ""; + } + } else if(str[0] == '\"') { + auto end = str.find('\"', 1); + if(end != std::string::npos) { + output.push_back(str.substr(1, end - 1)); + str = str.substr(end + 1); + } else { + output.push_back(str.substr(1)); + str = ""; + } + + } else { + auto it = std::find_if(std::begin(str), std::end(str), find_ws); + if(it != std::end(str)) { + std::string value = std::string(str.begin(), it); + output.push_back(value); + str = std::string(it, str.end()); + } else { + output.push_back(str); + str = ""; + } + } + trim(str); + } + + return output; +} + +/// Add a leader to the beginning of all new lines (nothing is added +/// at the start of the first line). `"; "` would be for ini files +/// +/// Can't use Regex, or this would be a subs. +inline std::string fix_newlines(std::string leader, std::string input) { + std::string::size_type n = 0; + while(n != std::string::npos && n < input.size()) { + n = input.find('\n', n); + if(n != std::string::npos) { + input = input.substr(0, n + 1) + leader + input.substr(n + 1); + n += leader.size(); + } + } + return input; +} + +} // namespace detail +} // namespace CLI + +// From CLI/Error.hpp: + +namespace CLI { + +// Use one of these on all error classes. +// These are temporary and are undef'd at the end of this file. +#define CLI11_ERROR_DEF(parent, name) \ + protected: \ + name(std::string name, std::string msg, int exit_code) : parent(std::move(name), std::move(msg), exit_code) {} \ + name(std::string name, std::string msg, ExitCodes exit_code) \ + : parent(std::move(name), std::move(msg), exit_code) {} \ + \ + public: \ + name(std::string msg, ExitCodes exit_code) : parent(#name, std::move(msg), exit_code) {} \ + name(std::string msg, int exit_code) : parent(#name, std::move(msg), exit_code) {} + +// This is added after the one above if a class is used directly and builds its own message +#define CLI11_ERROR_SIMPLE(name) \ + explicit name(std::string msg) : name(#name, msg, ExitCodes::name) {} + +/// These codes are part of every error in CLI. They can be obtained from e using e.exit_code or as a quick shortcut, +/// int values from e.get_error_code(). +enum class ExitCodes { + Success = 0, + IncorrectConstruction = 100, + BadNameString, + OptionAlreadyAdded, + FileError, + ConversionError, + ValidationError, + RequiredError, + RequiresError, + ExcludesError, + ExtrasError, + ConfigError, + InvalidError, + HorribleError, + OptionNotFound, + ArgumentMismatch, + BaseClass = 127 +}; + +// Error definitions + +/// @defgroup error_group Errors +/// @brief Errors thrown by CLI11 +/// +/// These are the errors that can be thrown. Some of them, like CLI::Success, are not really errors. +/// @{ + +/// All errors derive from this one +class Error : public std::runtime_error { + int exit_code; + std::string name{"Error"}; + + public: + int get_exit_code() const { return exit_code; } + + std::string get_name() const { return name; } + + Error(std::string name, std::string msg, int exit_code = static_cast(ExitCodes::BaseClass)) + : runtime_error(msg), exit_code(exit_code), name(std::move(name)) {} + + Error(std::string name, std::string msg, ExitCodes exit_code) : Error(name, msg, static_cast(exit_code)) {} +}; + +// Note: Using Error::Error constructors does not work on GCC 4.7 + +/// Construction errors (not in parsing) +class ConstructionError : public Error { + CLI11_ERROR_DEF(Error, ConstructionError) +}; + +/// Thrown when an option is set to conflicting values (non-vector and multi args, for example) +class IncorrectConstruction : public ConstructionError { + CLI11_ERROR_DEF(ConstructionError, IncorrectConstruction) + CLI11_ERROR_SIMPLE(IncorrectConstruction) + static IncorrectConstruction PositionalFlag(std::string name) { + return IncorrectConstruction(name + ": Flags cannot be positional"); + } + static IncorrectConstruction Set0Opt(std::string name) { + return IncorrectConstruction(name + ": Cannot set 0 expected, use a flag instead"); + } + static IncorrectConstruction SetFlag(std::string name) { + return IncorrectConstruction(name + ": Cannot set an expected number for flags"); + } + static IncorrectConstruction ChangeNotVector(std::string name) { + return IncorrectConstruction(name + ": You can only change the expected arguments for vectors"); + } + static IncorrectConstruction AfterMultiOpt(std::string name) { + return IncorrectConstruction( + name + ": You can't change expected arguments after you've changed the multi option policy!"); + } + static IncorrectConstruction MissingOption(std::string name) { + return IncorrectConstruction("Option " + name + " is not defined"); + } + static IncorrectConstruction MultiOptionPolicy(std::string name) { + return IncorrectConstruction(name + ": multi_option_policy only works for flags and exact value options"); + } +}; + +/// Thrown on construction of a bad name +class BadNameString : public ConstructionError { + CLI11_ERROR_DEF(ConstructionError, BadNameString) + CLI11_ERROR_SIMPLE(BadNameString) + static BadNameString OneCharName(std::string name) { return BadNameString("Invalid one char name: " + name); } + static BadNameString BadLongName(std::string name) { return BadNameString("Bad long name: " + name); } + static BadNameString DashesOnly(std::string name) { + return BadNameString("Must have a name, not just dashes: " + name); + } + static BadNameString MultiPositionalNames(std::string name) { + return BadNameString("Only one positional name allowed, remove: " + name); + } +}; + +/// Thrown when an option already exists +class OptionAlreadyAdded : public ConstructionError { + CLI11_ERROR_DEF(ConstructionError, OptionAlreadyAdded) + explicit OptionAlreadyAdded(std::string name) + : OptionAlreadyAdded(name + " is already added", ExitCodes::OptionAlreadyAdded) {} + static OptionAlreadyAdded Requires(std::string name, std::string other) { + return OptionAlreadyAdded(name + " requires " + other, ExitCodes::OptionAlreadyAdded); + } + static OptionAlreadyAdded Excludes(std::string name, std::string other) { + return OptionAlreadyAdded(name + " excludes " + other, ExitCodes::OptionAlreadyAdded); + } +}; + +// Parsing errors + +/// Anything that can error in Parse +class ParseError : public Error { + CLI11_ERROR_DEF(Error, ParseError) +}; + +// Not really "errors" + +/// This is a successful completion on parsing, supposed to exit +class Success : public ParseError { + CLI11_ERROR_DEF(ParseError, Success) + Success() : Success("Successfully completed, should be caught and quit", ExitCodes::Success) {} +}; + +/// -h or --help on command line +class CallForHelp : public ParseError { + CLI11_ERROR_DEF(ParseError, CallForHelp) + CallForHelp() : CallForHelp("This should be caught in your main function, see examples", ExitCodes::Success) {} +}; + +/// Usually somethign like --help-all on command line +class CallForAllHelp : public ParseError { + CLI11_ERROR_DEF(ParseError, CallForAllHelp) + CallForAllHelp() + : CallForAllHelp("This should be caught in your main function, see examples", ExitCodes::Success) {} +}; + +/// Does not output a diagnostic in CLI11_PARSE, but allows to return from main() with a specific error code. +class RuntimeError : public ParseError { + CLI11_ERROR_DEF(ParseError, RuntimeError) + explicit RuntimeError(int exit_code = 1) : RuntimeError("Runtime error", exit_code) {} +}; + +/// Thrown when parsing an INI file and it is missing +class FileError : public ParseError { + CLI11_ERROR_DEF(ParseError, FileError) + CLI11_ERROR_SIMPLE(FileError) + static FileError Missing(std::string name) { return FileError(name + " was not readable (missing?)"); } +}; + +/// Thrown when conversion call back fails, such as when an int fails to coerce to a string +class ConversionError : public ParseError { + CLI11_ERROR_DEF(ParseError, ConversionError) + CLI11_ERROR_SIMPLE(ConversionError) + ConversionError(std::string member, std::string name) + : ConversionError("The value " + member + " is not an allowed value for " + name) {} + ConversionError(std::string name, std::vector results) + : ConversionError("Could not convert: " + name + " = " + detail::join(results)) {} + static ConversionError TooManyInputsFlag(std::string name) { + return ConversionError(name + ": too many inputs for a flag"); + } + static ConversionError TrueFalse(std::string name) { + return ConversionError(name + ": Should be true/false or a number"); + } +}; + +/// Thrown when validation of results fails +class ValidationError : public ParseError { + CLI11_ERROR_DEF(ParseError, ValidationError) + CLI11_ERROR_SIMPLE(ValidationError) + explicit ValidationError(std::string name, std::string msg) : ValidationError(name + ": " + msg) {} +}; + +/// Thrown when a required option is missing +class RequiredError : public ParseError { + CLI11_ERROR_DEF(ParseError, RequiredError) + explicit RequiredError(std::string name) : RequiredError(name + " is required", ExitCodes::RequiredError) {} + static RequiredError Subcommand(size_t min_subcom) { + if(min_subcom == 1) + return RequiredError("A subcommand"); + else + return RequiredError("Requires at least " + std::to_string(min_subcom) + " subcommands", + ExitCodes::RequiredError); + } +}; + +/// Thrown when the wrong number of arguments has been received +class ArgumentMismatch : public ParseError { + CLI11_ERROR_DEF(ParseError, ArgumentMismatch) + CLI11_ERROR_SIMPLE(ArgumentMismatch) + ArgumentMismatch(std::string name, int expected, size_t recieved) + : ArgumentMismatch(expected > 0 ? ("Expected exactly " + std::to_string(expected) + " arguments to " + name + + ", got " + std::to_string(recieved)) + : ("Expected at least " + std::to_string(-expected) + " arguments to " + name + + ", got " + std::to_string(recieved)), + ExitCodes::ArgumentMismatch) {} + + static ArgumentMismatch AtLeast(std::string name, int num) { + return ArgumentMismatch(name + ": At least " + std::to_string(num) + " required"); + } + static ArgumentMismatch TypedAtLeast(std::string name, int num, std::string type) { + return ArgumentMismatch(name + ": " + std::to_string(num) + " required " + type + " missing"); + } +}; + +/// Thrown when a requires option is missing +class RequiresError : public ParseError { + CLI11_ERROR_DEF(ParseError, RequiresError) + RequiresError(std::string curname, std::string subname) + : RequiresError(curname + " requires " + subname, ExitCodes::RequiresError) {} +}; + +/// Thrown when an excludes option is present +class ExcludesError : public ParseError { + CLI11_ERROR_DEF(ParseError, ExcludesError) + ExcludesError(std::string curname, std::string subname) + : ExcludesError(curname + " excludes " + subname, ExitCodes::ExcludesError) {} +}; + +/// Thrown when too many positionals or options are found +class ExtrasError : public ParseError { + CLI11_ERROR_DEF(ParseError, ExtrasError) + explicit ExtrasError(std::vector args) + : ExtrasError((args.size() > 1 ? "The following arguments were not expected: " + : "The following argument was not expected: ") + + detail::rjoin(args, " "), + ExitCodes::ExtrasError) {} +}; + +/// Thrown when extra values are found in an INI file +class ConfigError : public ParseError { + CLI11_ERROR_DEF(ParseError, ConfigError) + CLI11_ERROR_SIMPLE(ConfigError) + static ConfigError Extras(std::string item) { return ConfigError("INI was not able to parse " + item); } + static ConfigError NotConfigurable(std::string item) { + return ConfigError(item + ": This option is not allowed in a configuration file"); + } +}; + +/// Thrown when validation fails before parsing +class InvalidError : public ParseError { + CLI11_ERROR_DEF(ParseError, InvalidError) + explicit InvalidError(std::string name) + : InvalidError(name + ": Too many positional arguments with unlimited expected args", ExitCodes::InvalidError) { + } +}; + +/// This is just a safety check to verify selection and parsing match - you should not ever see it +/// Strings are directly added to this error, but again, it should never be seen. +class HorribleError : public ParseError { + CLI11_ERROR_DEF(ParseError, HorribleError) + CLI11_ERROR_SIMPLE(HorribleError) +}; + +// After parsing + +/// Thrown when counting a non-existent option +class OptionNotFound : public Error { + CLI11_ERROR_DEF(Error, OptionNotFound) + explicit OptionNotFound(std::string name) : OptionNotFound(name + " not found", ExitCodes::OptionNotFound) {} +}; + +#undef CLI11_ERROR_DEF +#undef CLI11_ERROR_SIMPLE + +/// @} + +} // namespace CLI + +// From CLI/TypeTools.hpp: + +namespace CLI { + +// Type tools + +/// A copy of enable_if_t from C++14, compatible with C++11. +/// +/// We could check to see if C++14 is being used, but it does not hurt to redefine this +/// (even Google does this: https://github.com/google/skia/blob/master/include/private/SkTLogic.h) +/// It is not in the std namespace anyway, so no harm done. + +template using enable_if_t = typename std::enable_if::type; + +/// Check to see if something is a vector (fail check by default) +template struct is_vector { static const bool value = false; }; + +/// Check to see if something is a vector (true if actually a vector) +template struct is_vector> { static bool const value = true; }; + +/// Check to see if something is bool (fail check by default) +template struct is_bool { static const bool value = false; }; + +/// Check to see if something is bool (true if actually a bool) +template <> struct is_bool { static bool const value = true; }; + +namespace detail { +// Based generally on https://rmf.io/cxx11/almost-static-if +/// Simple empty scoped class +enum class enabler {}; + +/// An instance to use in EnableIf +constexpr enabler dummy = {}; + +// Type name print + +/// Was going to be based on +/// http://stackoverflow.com/questions/1055452/c-get-name-of-type-in-template +/// But this is cleaner and works better in this case + +template ::value && std::is_signed::value, detail::enabler> = detail::dummy> +constexpr const char *type_name() { + return "INT"; +} + +template ::value && std::is_unsigned::value, detail::enabler> = detail::dummy> +constexpr const char *type_name() { + return "UINT"; +} + +template ::value, detail::enabler> = detail::dummy> +constexpr const char *type_name() { + return "FLOAT"; +} + +/// This one should not be used, since vector types print the internal type +template ::value, detail::enabler> = detail::dummy> +constexpr const char *type_name() { + return "VECTOR"; +} + +template ::value && !std::is_integral::value && !is_vector::value, + detail::enabler> = detail::dummy> +constexpr const char *type_name() { + return "TEXT"; +} + +// Lexical cast + +/// Signed integers / enums +template ::value && std::is_signed::value), detail::enabler> = detail::dummy> +bool lexical_cast(std::string input, T &output) { + try { + size_t n = 0; + long long output_ll = std::stoll(input, &n, 0); + output = static_cast(output_ll); + return n == input.size() && static_cast(output) == output_ll; + } catch(const std::invalid_argument &) { + return false; + } catch(const std::out_of_range &) { + return false; + } +} + +/// Unsigned integers +template ::value && std::is_unsigned::value, detail::enabler> = detail::dummy> +bool lexical_cast(std::string input, T &output) { + if(!input.empty() && input.front() == '-') + return false; // std::stoull happily converts negative values to junk without any errors. + + try { + size_t n = 0; + unsigned long long output_ll = std::stoull(input, &n, 0); + output = static_cast(output_ll); + return n == input.size() && static_cast(output) == output_ll; + } catch(const std::invalid_argument &) { + return false; + } catch(const std::out_of_range &) { + return false; + } +} + +/// Floats +template ::value, detail::enabler> = detail::dummy> +bool lexical_cast(std::string input, T &output) { + try { + size_t n = 0; + output = static_cast(std::stold(input, &n)); + return n == input.size(); + } catch(const std::invalid_argument &) { + return false; + } catch(const std::out_of_range &) { + return false; + } +} + +/// String and similar +template ::value && !std::is_integral::value && + std::is_assignable::value, + detail::enabler> = detail::dummy> +bool lexical_cast(std::string input, T &output) { + output = input; + return true; +} + +/// Non-string parsable +template ::value && !std::is_integral::value && + !std::is_assignable::value, + detail::enabler> = detail::dummy> +bool lexical_cast(std::string input, T &output) { + std::istringstream is; + + is.str(input); + is >> output; + return !is.fail() && !is.rdbuf()->in_avail(); +} + +} // namespace detail +} // namespace CLI + +// From CLI/Split.hpp: + +namespace CLI { +namespace detail { + +// Returns false if not a short option. Otherwise, sets opt name and rest and returns true +inline bool split_short(const std::string ¤t, std::string &name, std::string &rest) { + if(current.size() > 1 && current[0] == '-' && valid_first_char(current[1])) { + name = current.substr(1, 1); + rest = current.substr(2); + return true; + } else + return false; +} + +// Returns false if not a long option. Otherwise, sets opt name and other side of = and returns true +inline bool split_long(const std::string ¤t, std::string &name, std::string &value) { + if(current.size() > 2 && current.substr(0, 2) == "--" && valid_first_char(current[2])) { + auto loc = current.find("="); + if(loc != std::string::npos) { + name = current.substr(2, loc - 2); + value = current.substr(loc + 1); + } else { + name = current.substr(2); + value = ""; + } + return true; + } else + return false; +} + +// Splits a string into multiple long and short names +inline std::vector split_names(std::string current) { + std::vector output; + size_t val; + while((val = current.find(",")) != std::string::npos) { + output.push_back(trim_copy(current.substr(0, val))); + current = current.substr(val + 1); + } + output.push_back(trim_copy(current)); + return output; +} + +/// Get a vector of short names, one of long names, and a single name +inline std::tuple, std::vector, std::string> +get_names(const std::vector &input) { + + std::vector short_names; + std::vector long_names; + std::string pos_name; + + for(std::string name : input) { + if(name.length() == 0) + continue; + else if(name.length() > 1 && name[0] == '-' && name[1] != '-') { + if(name.length() == 2 && valid_first_char(name[1])) + short_names.emplace_back(1, name[1]); + else + throw BadNameString::OneCharName(name); + } else if(name.length() > 2 && name.substr(0, 2) == "--") { + name = name.substr(2); + if(valid_name_string(name)) + long_names.push_back(name); + else + throw BadNameString::BadLongName(name); + } else if(name == "-" || name == "--") { + throw BadNameString::DashesOnly(name); + } else { + if(pos_name.length() > 0) + throw BadNameString::MultiPositionalNames(name); + pos_name = name; + } + } + + return std::tuple, std::vector, std::string>( + short_names, long_names, pos_name); +} + +} // namespace detail +} // namespace CLI + +// From CLI/ConfigFwd.hpp: + +namespace CLI { + +class App; + +namespace detail { + +/// Comma separated join, adds quotes if needed +inline std::string ini_join(std::vector args) { + std::ostringstream s; + size_t start = 0; + for(const auto &arg : args) { + if(start++ > 0) + s << " "; + + auto it = std::find_if(arg.begin(), arg.end(), [](char ch) { return std::isspace(ch, std::locale()); }); + if(it == arg.end()) + s << arg; + else if(arg.find(R"(")") == std::string::npos) + s << R"(")" << arg << R"(")"; + else + s << R"(')" << arg << R"(')"; + } + + return s.str(); +} + +} // namespace detail + +/// Holds values to load into Options +struct ConfigItem { + /// This is the list of parents + std::vector parents; + + /// This is the name + std::string name; + + /// Listing of inputs + std::vector inputs; + + /// The list of parents and name joined by "." + std::string fullname() const { + std::vector tmp = parents; + tmp.emplace_back(name); + return detail::join(tmp, "."); + } +}; + +/// This class provides a converter for configuration files. +class Config { + protected: + std::vector items; + + public: + /// Convert an app into a configuration + virtual std::string to_config(const App *, bool, bool, std::string) const = 0; + + /// Convert a configuration into an app + virtual std::vector from_config(std::istream &) const = 0; + + /// Convert a flag to a bool + virtual std::vector to_flag(const ConfigItem &item) const { + if(item.inputs.size() == 1) { + std::string val = item.inputs.at(0); + val = detail::to_lower(val); + + if(val == "true" || val == "on" || val == "yes") { + return std::vector(1); + } else if(val == "false" || val == "off" || val == "no") { + return std::vector(); + } else { + try { + size_t ui = std::stoul(val); + return std::vector(ui); + } catch(const std::invalid_argument &) { + throw ConversionError::TrueFalse(item.fullname()); + } + } + } else { + throw ConversionError::TooManyInputsFlag(item.fullname()); + } + } + + /// Parse a config file, throw an error (ParseError:ConfigParseError or FileError) on failure + std::vector from_file(const std::string &name) { + std::ifstream input{name}; + if(!input.good()) + throw FileError::Missing(name); + + return from_config(input); + } + + /// virtual destructor + virtual ~Config() = default; +}; + +/// This converter works with INI files +class ConfigINI : public Config { + public: + std::string to_config(const App *, bool default_also, bool write_description, std::string prefix) const override; + + std::vector from_config(std::istream &input) const override { + std::string line; + std::string section = "default"; + + std::vector output; + + while(getline(input, line)) { + std::vector items; + + detail::trim(line); + size_t len = line.length(); + if(len > 1 && line[0] == '[' && line[len - 1] == ']') { + section = line.substr(1, len - 2); + } else if(len > 0 && line[0] != ';') { + output.emplace_back(); + ConfigItem &out = output.back(); + + // Find = in string, split and recombine + auto pos = line.find('='); + if(pos != std::string::npos) { + out.name = detail::trim_copy(line.substr(0, pos)); + std::string item = detail::trim_copy(line.substr(pos + 1)); + items = detail::split_up(item); + } else { + out.name = detail::trim_copy(line); + items = {"ON"}; + } + + if(detail::to_lower(section) != "default") { + out.parents = {section}; + } + + if(out.name.find('.') != std::string::npos) { + std::vector plist = detail::split(out.name, '.'); + out.name = plist.back(); + plist.pop_back(); + out.parents.insert(out.parents.end(), plist.begin(), plist.end()); + } + + out.inputs.insert(std::end(out.inputs), std::begin(items), std::end(items)); + } + } + return output; + } +}; + +} // namespace CLI + +// From CLI/Validators.hpp: + +namespace CLI { + +/// @defgroup validator_group Validators + +/// @brief Some validators that are provided +/// +/// These are simple `std::string(const std::string&)` validators that are useful. They return +/// a string if the validation fails. A custom struct is provided, as well, with the same user +/// semantics, but with the ability to provide a new type name. +/// @{ + +/// +struct Validator { + /// This is the type name, if empty the type name will not be changed + std::string tname; + + /// This it the base function that is to be called. + /// Returns a string error message if validation fails. + std::function func; + + /// This is the required operator for a validator - provided to help + /// users (CLI11 uses the member `func` directly) + std::string operator()(const std::string &str) const { return func(str); }; + + /// Combining validators is a new validator + Validator operator&(const Validator &other) const { + Validator newval; + newval.tname = (tname == other.tname ? tname : ""); + + // Give references (will make a copy in lambda function) + const std::function &f1 = func; + const std::function &f2 = other.func; + + newval.func = [f1, f2](const std::string &filename) { + std::string s1 = f1(filename); + std::string s2 = f2(filename); + if(!s1.empty() && !s2.empty()) + return s1 + " & " + s2; + else + return s1 + s2; + }; + return newval; + } + + /// Combining validators is a new validator + Validator operator|(const Validator &other) const { + Validator newval; + newval.tname = (tname == other.tname ? tname : ""); + + // Give references (will make a copy in lambda function) + const std::function &f1 = func; + const std::function &f2 = other.func; + + newval.func = [f1, f2](const std::string &filename) { + std::string s1 = f1(filename); + std::string s2 = f2(filename); + if(s1.empty() || s2.empty()) + return std::string(); + else + return s1 + " & " + s2; + }; + return newval; + } +}; + +// The implementation of the built in validators is using the Validator class; +// the user is only expected to use the const (static) versions (since there's no setup). +// Therefore, this is in detail. +namespace detail { + +/// Check for an existing file (returns error message if check fails) +struct ExistingFileValidator : public Validator { + ExistingFileValidator() { + tname = "FILE"; + func = [](const std::string &filename) { + struct stat buffer; + bool exist = stat(filename.c_str(), &buffer) == 0; + bool is_dir = (buffer.st_mode & S_IFDIR) != 0; + if(!exist) { + return "File does not exist: " + filename; + } else if(is_dir) { + return "File is actually a directory: " + filename; + } + return std::string(); + }; + } +}; + +/// Check for an existing directory (returns error message if check fails) +struct ExistingDirectoryValidator : public Validator { + ExistingDirectoryValidator() { + tname = "DIR"; + func = [](const std::string &filename) { + struct stat buffer; + bool exist = stat(filename.c_str(), &buffer) == 0; + bool is_dir = (buffer.st_mode & S_IFDIR) != 0; + if(!exist) { + return "Directory does not exist: " + filename; + } else if(!is_dir) { + return "Directory is actually a file: " + filename; + } + return std::string(); + }; + } +}; + +/// Check for an existing path +struct ExistingPathValidator : public Validator { + ExistingPathValidator() { + tname = "PATH"; + func = [](const std::string &filename) { + struct stat buffer; + bool const exist = stat(filename.c_str(), &buffer) == 0; + if(!exist) { + return "Path does not exist: " + filename; + } + return std::string(); + }; + } +}; + +/// Check for an non-existing path +struct NonexistentPathValidator : public Validator { + NonexistentPathValidator() { + tname = "PATH"; + func = [](const std::string &filename) { + struct stat buffer; + bool exist = stat(filename.c_str(), &buffer) == 0; + if(exist) { + return "Path already exists: " + filename; + } + return std::string(); + }; + } +}; +} // namespace detail + +// Static is not needed here, because global const implies static. + +/// Check for existing file (returns error message if check fails) +const detail::ExistingFileValidator ExistingFile; + +/// Check for an existing directory (returns error message if check fails) +const detail::ExistingDirectoryValidator ExistingDirectory; + +/// Check for an existing path +const detail::ExistingPathValidator ExistingPath; + +/// Check for an non-existing path +const detail::NonexistentPathValidator NonexistentPath; + +/// Produce a range (factory). Min and max are inclusive. +struct Range : public Validator { + /// This produces a range with min and max inclusive. + /// + /// Note that the constructor is templated, but the struct is not, so C++17 is not + /// needed to provide nice syntax for Range(a,b). + template Range(T min, T max) { + std::stringstream out; + out << detail::type_name() << " in [" << min << " - " << max << "]"; + + tname = out.str(); + func = [min, max](std::string input) { + T val; + detail::lexical_cast(input, val); + if(val < min || val > max) + return "Value " + input + " not in range " + std::to_string(min) + " to " + std::to_string(max); + + return std::string(); + }; + } + + /// Range of one value is 0 to value + template explicit Range(T max) : Range(static_cast(0), max) {} +}; + +/// @} + +} // namespace CLI + +// From CLI/FormatterFwd.hpp: + +namespace CLI { + +class Option; +class App; + +/// This enum signifies the type of help requested +/// +/// This is passed in by App; all user classes must accept this as +/// the second argument. + +enum class AppFormatMode { + Normal, //< The normal, detailed help + All, //< A fully expanded help + Sub, //< Used when printed as part of expanded subcommand +}; + +/// This is the minimum requirements to run a formatter. +/// +/// A user can subclass this is if they do not care at all +/// about the structure in CLI::Formatter. +class FormatterBase { + protected: + /// @name Options + ///@{ + + /// The width of the first column + size_t column_width_{30}; + + /// @brief The required help printout labels (user changeable) + /// Values are Needs, Excludes, etc. + std::map labels_; + + ///@} + /// @name Basic + ///@{ + + public: + FormatterBase() = default; + FormatterBase(const FormatterBase &) = default; + FormatterBase(FormatterBase &&) = default; + virtual ~FormatterBase() = default; + + /// This is the key method that puts together help + virtual std::string make_help(const App *, std::string, AppFormatMode) const = 0; + + ///@} + /// @name Setters + ///@{ + + /// Set the "REQUIRED" label + void label(std::string key, std::string val) { labels_[key] = val; } + + /// Set the column width + void column_width(size_t val) { column_width_ = val; } + + ///@} + /// @name Getters + ///@{ + + /// Get the current value of a name (REQUIRED, etc.) + std::string get_label(std::string key) const { + if(labels_.find(key) == labels_.end()) + return key; + else + return labels_.at(key); + } + + /// Get the current column width + size_t get_column_width() const { return column_width_; } + + ///@} +}; + +/// This is a specialty override for lambda functions +class FormatterLambda final : public FormatterBase { + using funct_t = std::function; + + /// The lambda to hold and run + funct_t lambda_; + + public: + /// Create a FormatterLambda with a lambda function + explicit FormatterLambda(funct_t funct) : lambda_(std::move(funct)) {} + + /// This will simply call the lambda function + std::string make_help(const App *app, std::string name, AppFormatMode mode) const override { + return lambda_(app, name, mode); + } +}; + +/// This is the default Formatter for CLI11. It pretty prints help output, and is broken into quite a few +/// overridable methods, to be highly customizable with minimal effort. +class Formatter : public FormatterBase { + public: + Formatter() = default; + Formatter(const Formatter &) = default; + Formatter(Formatter &&) = default; + + /// @name Overridables + ///@{ + + /// This prints out a group of options with title + /// + virtual std::string make_group(std::string group, bool is_positional, std::vector opts) const; + + /// This prints out just the positionals "group" + virtual std::string make_positionals(const App *app) const; + + /// This prints out all the groups of options + std::string make_groups(const App *app, AppFormatMode mode) const; + + /// This prints out all the subcommands + virtual std::string make_subcommands(const App *app, AppFormatMode mode) const; + + /// This prints out a subcommand + virtual std::string make_subcommand(const App *sub) const; + + /// This prints out a subcommand in help-all + virtual std::string make_expanded(const App *sub) const; + + /// This prints out all the groups of options + virtual std::string make_footer(const App *app) const; + + /// This displays the description line + virtual std::string make_description(const App *app) const; + + /// This displays the usage line + virtual std::string make_usage(const App *app, std::string name) const; + + /// This puts everything together + std::string make_help(const App *, std::string, AppFormatMode) const override; + + ///@} + /// @name Options + ///@{ + + /// This prints out an option help line, either positional or optional form + virtual std::string make_option(const Option *opt, bool is_positional) const { + std::stringstream out; + detail::format_help( + out, make_option_name(opt, is_positional) + make_option_opts(opt), make_option_desc(opt), column_width_); + return out.str(); + } + + /// @brief This is the name part of an option, Default: left column + virtual std::string make_option_name(const Option *, bool) const; + + /// @brief This is the options part of the name, Default: combined into left column + virtual std::string make_option_opts(const Option *) const; + + /// @brief This is the description. Default: Right column, on new line if left column too large + virtual std::string make_option_desc(const Option *) const; + + /// @brief This is used to print the name on the USAGE line + virtual std::string make_option_usage(const Option *opt) const; + + ///@} +}; + +} // namespace CLI + +// From CLI/Option.hpp: + +namespace CLI { + +using results_t = std::vector; +using callback_t = std::function; + +class Option; +class App; + +using Option_p = std::unique_ptr