├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── Switch ├── Makefile ├── README.md ├── ansifmt.h ├── base64.cpp ├── base64.h ├── buffer.h ├── compress.h ├── crypto.cpp ├── crypto.h ├── data.cpp ├── data.h ├── date.h ├── ext │ ├── FastPFor │ │ ├── CHANGELOG │ │ ├── CMakeCache.txt │ │ ├── CMakeFiles │ │ │ ├── 3.10.2 │ │ │ │ ├── CMakeCCompiler.cmake │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ ├── CompilerIdC │ │ │ │ │ └── CMakeCCompilerId.c │ │ │ │ └── CompilerIdCXX │ │ │ │ │ └── CMakeCXXCompilerId.cpp │ │ │ ├── 3.5.1 │ │ │ │ ├── CMakeCCompiler.cmake │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ ├── CompilerIdC │ │ │ │ │ └── CMakeCCompilerId.c │ │ │ │ └── CompilerIdCXX │ │ │ │ │ └── CMakeCXXCompilerId.cpp │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── CMakeOutput.log │ │ │ ├── CMakeRuleHashes.txt │ │ │ ├── FastPFor.dir │ │ │ │ ├── C.includecache │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── cmake_clean_target.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── Makefile.cmake │ │ │ ├── Makefile2 │ │ │ ├── TargetDirectories.txt │ │ │ ├── benchbitpacking.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── check.dir │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ └── progress.make │ │ │ ├── cmake.check_cache │ │ │ ├── codecs.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── codecssnappy.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── csv2maropu.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── entropy.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── example.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── feature_tests.bin │ │ │ ├── feature_tests.c │ │ │ ├── feature_tests.cxx │ │ │ ├── gapstats.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── inmemorybenchmark.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── inmemorybenchmarksnappy.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── partitionbylength.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ │ ├── progress.marks │ │ │ └── unit.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ └── progress.make │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── benchbitpacking │ │ ├── cmake_install.cmake │ │ ├── cmake_modules │ │ │ ├── AppendCompilerFlags.cmake │ │ │ ├── DetectCPUFeatures.cmake │ │ │ └── Findsnappy.cmake │ │ ├── codecs │ │ ├── codecssnappy │ │ ├── csv2maropu │ │ ├── data │ │ │ ├── ClueWeb09LogSizeFreqs.1 │ │ │ └── README │ │ ├── entropy │ │ ├── example │ │ ├── example.cpp │ │ ├── gapstats │ │ ├── headers │ │ │ ├── VarIntG8IU.h │ │ │ ├── bitpacking.h │ │ │ ├── bitpackingaligned.h │ │ │ ├── bitpackinghelpers.h │ │ │ ├── bitpackingunaligned.h │ │ │ ├── blockpacking.h │ │ │ ├── codecfactory.h │ │ │ ├── codecs.h │ │ │ ├── common.h │ │ │ ├── compositecodec.h │ │ │ ├── cpubenchmark.h │ │ │ ├── csv.h │ │ │ ├── deltautil.h │ │ │ ├── entropy.h │ │ │ ├── externalvector.h │ │ │ ├── fastpfor.h │ │ │ ├── horizontalbitpacking.h │ │ │ ├── maropuparser.h │ │ │ ├── memutil.h │ │ │ ├── mersenne.h │ │ │ ├── newpfor.h │ │ │ ├── optpfor.h │ │ │ ├── packingvectors.h │ │ │ ├── pfor.h │ │ │ ├── pfor2008.h │ │ │ ├── rolledbitpacking.h │ │ │ ├── simdbinarypacking.h │ │ │ ├── simdbitpacking.h │ │ │ ├── simdfastpfor.h │ │ │ ├── simdnewpfor.h │ │ │ ├── simdoptpfor.h │ │ │ ├── simdpfor.h │ │ │ ├── simdvariablebyte.h │ │ │ ├── simple16.h │ │ │ ├── simple8b.h │ │ │ ├── simple8b_rle.h │ │ │ ├── simple9.h │ │ │ ├── simple9_rle.h │ │ │ ├── snappydelta.h │ │ │ ├── streamvariablebyte.h │ │ │ ├── stringutil.h │ │ │ ├── synthetic.h │ │ │ ├── usimdbitpacking.h │ │ │ ├── util.h │ │ │ ├── variablebyte.h │ │ │ ├── varintgb.h │ │ │ ├── vsencoding.h │ │ │ └── ztimer.h │ │ ├── inmemorybenchmark │ │ ├── inmemorybenchmarksnappy │ │ ├── msvc │ │ │ ├── FastPFor.sln │ │ │ ├── FastPFor.vcxproj │ │ │ ├── benchbitpacking.vcxproj │ │ │ ├── codecs.vcxproj │ │ │ ├── csv2maropu.vcxproj │ │ │ ├── entropy.vcxproj │ │ │ ├── example.vcxproj │ │ │ ├── gapstats.vcxproj │ │ │ ├── getopt.vcxproj │ │ │ ├── getopt │ │ │ │ ├── getopt.c │ │ │ │ └── getopt.h │ │ │ ├── inmemorybenchmark.vcxproj │ │ │ └── unit.vcxproj │ │ ├── partitionbylength │ │ ├── src │ │ │ ├── benchbitpacking.cpp │ │ │ ├── bitpacking.cpp │ │ │ ├── bitpackingaligned.cpp │ │ │ ├── bitpackingunaligned.cpp │ │ │ ├── codecs.cpp │ │ │ ├── csv2maropu.cpp │ │ │ ├── entropy.cpp │ │ │ ├── gapstats.cpp │ │ │ ├── horizontalbitpacking.cpp │ │ │ ├── inmemorybenchmark.cpp │ │ │ ├── partitionbylength.cpp │ │ │ ├── simdbitpacking.cpp │ │ │ ├── simdunalignedbitpacking.cpp │ │ │ ├── streamvbyte.c │ │ │ ├── unit.cpp │ │ │ └── varintdecode.c │ │ ├── tools │ │ │ └── clang-format.sh │ │ └── unit │ ├── ebtree │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── common │ │ │ ├── accept4.h │ │ │ ├── appsession.h │ │ │ ├── base64.h │ │ │ ├── buffer.h │ │ │ ├── cfgparse.h │ │ │ ├── chunk.h │ │ │ ├── compat.h │ │ │ ├── compiler.h │ │ │ ├── config.h │ │ │ ├── debug.h │ │ │ ├── defaults.h │ │ │ ├── epoll.h │ │ │ ├── errors.h │ │ │ ├── hash.h │ │ │ ├── memory.h │ │ │ ├── mini-clist.h │ │ │ ├── rbtree.h │ │ │ ├── regex.h │ │ │ ├── sessionhash.h │ │ │ ├── splice.h │ │ │ ├── standard.h │ │ │ ├── syscall.h │ │ │ ├── template.h │ │ │ ├── ticks.h │ │ │ ├── time.h │ │ │ ├── tools.h │ │ │ ├── uri_auth.h │ │ │ └── version.h │ │ ├── compiler.h │ │ ├── eb32tree.c │ │ ├── eb32tree.h │ │ ├── eb64tree.c │ │ ├── eb64tree.h │ │ ├── ebimtree.c │ │ ├── ebimtree.h │ │ ├── ebistree.c │ │ ├── ebistree.h │ │ ├── ebmbtree.c │ │ ├── ebmbtree.h │ │ ├── ebpttree.c │ │ ├── ebpttree.h │ │ ├── ebsttree.c │ │ ├── ebsttree.h │ │ ├── ebtree.c │ │ ├── ebtree.h │ │ └── ebtree │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── common │ │ │ ├── accept4.h │ │ │ ├── appsession.h │ │ │ ├── base64.h │ │ │ ├── buffer.h │ │ │ ├── cfgparse.h │ │ │ ├── chunk.h │ │ │ ├── compat.h │ │ │ ├── compiler.h │ │ │ ├── config.h │ │ │ ├── debug.h │ │ │ ├── defaults.h │ │ │ ├── epoll.h │ │ │ ├── errors.h │ │ │ ├── hash.h │ │ │ ├── memory.h │ │ │ ├── mini-clist.h │ │ │ ├── rbtree.h │ │ │ ├── regex.h │ │ │ ├── sessionhash.h │ │ │ ├── splice.h │ │ │ ├── standard.h │ │ │ ├── syscall.h │ │ │ ├── template.h │ │ │ ├── ticks.h │ │ │ ├── time.h │ │ │ ├── tools.h │ │ │ ├── uri_auth.h │ │ │ └── version.h │ │ │ ├── compiler.h │ │ │ ├── eb32tree.c │ │ │ ├── eb32tree.h │ │ │ ├── eb64tree.c │ │ │ ├── eb64tree.h │ │ │ ├── ebimtree.c │ │ │ ├── ebimtree.h │ │ │ ├── ebistree.c │ │ │ ├── ebistree.h │ │ │ ├── ebmbtree.c │ │ │ ├── ebmbtree.h │ │ │ ├── ebpttree.c │ │ │ ├── ebpttree.h │ │ │ ├── ebsttree.c │ │ │ ├── ebsttree.h │ │ │ ├── ebtree.c │ │ │ └── ebtree.h │ ├── ext_xxhash.c │ ├── flat_hash_map.h │ ├── json.hpp │ ├── json │ │ ├── .github │ │ │ ├── CONTRIBUTING.md │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── Bug_report.md │ │ │ │ └── Feature_request.md │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ ├── CMakeLists.txt │ │ ├── CODE_OF_CONDUCT.md │ │ ├── ChangeLog.md │ │ ├── LICENSE.MIT │ │ ├── Makefile │ │ ├── README.md │ │ ├── cmake │ │ │ └── config.cmake.in │ │ ├── doc │ │ │ ├── Doxyfile │ │ │ ├── Makefile │ │ │ ├── avatars.png │ │ │ ├── binary_formats.md │ │ │ ├── css │ │ │ │ ├── mylayout.css │ │ │ │ └── mylayout_docset.css │ │ │ ├── examples │ │ │ │ ├── README.cpp │ │ │ │ ├── README.link │ │ │ │ ├── README.output │ │ │ │ ├── array.cpp │ │ │ │ ├── array.link │ │ │ │ ├── array.output │ │ │ │ ├── at__object_t_key_type.cpp │ │ │ │ ├── at__object_t_key_type.link │ │ │ │ ├── at__object_t_key_type.output │ │ │ │ ├── at__object_t_key_type_const.cpp │ │ │ │ ├── at__object_t_key_type_const.link │ │ │ │ ├── at__object_t_key_type_const.output │ │ │ │ ├── at__size_type.cpp │ │ │ │ ├── at__size_type.link │ │ │ │ ├── at__size_type.output │ │ │ │ ├── at__size_type_const.cpp │ │ │ │ ├── at__size_type_const.link │ │ │ │ ├── at__size_type_const.output │ │ │ │ ├── at_json_pointer.cpp │ │ │ │ ├── at_json_pointer.link │ │ │ │ ├── at_json_pointer.output │ │ │ │ ├── at_json_pointer_const.cpp │ │ │ │ ├── at_json_pointer_const.link │ │ │ │ ├── at_json_pointer_const.output │ │ │ │ ├── back.cpp │ │ │ │ ├── back.link │ │ │ │ ├── back.output │ │ │ │ ├── basic_json__CompatibleType.cpp │ │ │ │ ├── basic_json__CompatibleType.link │ │ │ │ ├── basic_json__CompatibleType.output │ │ │ │ ├── basic_json__InputIt_InputIt.cpp │ │ │ │ ├── basic_json__InputIt_InputIt.link │ │ │ │ ├── basic_json__InputIt_InputIt.output │ │ │ │ ├── basic_json__basic_json.cpp │ │ │ │ ├── basic_json__basic_json.link │ │ │ │ ├── basic_json__basic_json.output │ │ │ │ ├── basic_json__copyassignment.cpp │ │ │ │ ├── basic_json__copyassignment.link │ │ │ │ ├── basic_json__copyassignment.output │ │ │ │ ├── basic_json__list_init_t.cpp │ │ │ │ ├── basic_json__list_init_t.link │ │ │ │ ├── basic_json__list_init_t.output │ │ │ │ ├── basic_json__moveconstructor.cpp │ │ │ │ ├── basic_json__moveconstructor.link │ │ │ │ ├── basic_json__moveconstructor.output │ │ │ │ ├── basic_json__nullptr_t.cpp │ │ │ │ ├── basic_json__nullptr_t.link │ │ │ │ ├── basic_json__nullptr_t.output │ │ │ │ ├── basic_json__size_type_basic_json.cpp │ │ │ │ ├── basic_json__size_type_basic_json.link │ │ │ │ ├── basic_json__size_type_basic_json.output │ │ │ │ ├── basic_json__value.cpp │ │ │ │ ├── basic_json__value.link │ │ │ │ ├── basic_json__value.output │ │ │ │ ├── basic_json__value_ptr.cpp │ │ │ │ ├── basic_json__value_ptr.link │ │ │ │ ├── basic_json__value_ptr.output │ │ │ │ ├── basic_json__value_t.cpp │ │ │ │ ├── basic_json__value_t.link │ │ │ │ ├── basic_json__value_t.output │ │ │ │ ├── begin.cpp │ │ │ │ ├── begin.link │ │ │ │ ├── begin.output │ │ │ │ ├── cbegin.cpp │ │ │ │ ├── cbegin.link │ │ │ │ ├── cbegin.output │ │ │ │ ├── cend.cpp │ │ │ │ ├── cend.link │ │ │ │ ├── cend.output │ │ │ │ ├── clear.cpp │ │ │ │ ├── clear.link │ │ │ │ ├── clear.output │ │ │ │ ├── count.cpp │ │ │ │ ├── count.link │ │ │ │ ├── count.output │ │ │ │ ├── crbegin.cpp │ │ │ │ ├── crbegin.link │ │ │ │ ├── crbegin.output │ │ │ │ ├── crend.cpp │ │ │ │ ├── crend.link │ │ │ │ ├── crend.output │ │ │ │ ├── diff.cpp │ │ │ │ ├── diff.link │ │ │ │ ├── diff.output │ │ │ │ ├── dump.cpp │ │ │ │ ├── dump.link │ │ │ │ ├── dump.output │ │ │ │ ├── emplace.cpp │ │ │ │ ├── emplace.link │ │ │ │ ├── emplace.output │ │ │ │ ├── emplace_back.cpp │ │ │ │ ├── emplace_back.link │ │ │ │ ├── emplace_back.output │ │ │ │ ├── empty.cpp │ │ │ │ ├── empty.link │ │ │ │ ├── empty.output │ │ │ │ ├── end.cpp │ │ │ │ ├── end.link │ │ │ │ ├── end.output │ │ │ │ ├── erase__IteratorType.cpp │ │ │ │ ├── erase__IteratorType.link │ │ │ │ ├── erase__IteratorType.output │ │ │ │ ├── erase__IteratorType_IteratorType.cpp │ │ │ │ ├── erase__IteratorType_IteratorType.link │ │ │ │ ├── erase__IteratorType_IteratorType.output │ │ │ │ ├── erase__key_type.cpp │ │ │ │ ├── erase__key_type.link │ │ │ │ ├── erase__key_type.output │ │ │ │ ├── erase__size_type.cpp │ │ │ │ ├── erase__size_type.link │ │ │ │ ├── erase__size_type.output │ │ │ │ ├── exception.cpp │ │ │ │ ├── exception.link │ │ │ │ ├── exception.output │ │ │ │ ├── find__key_type.cpp │ │ │ │ ├── find__key_type.link │ │ │ │ ├── find__key_type.output │ │ │ │ ├── flatten.cpp │ │ │ │ ├── flatten.link │ │ │ │ ├── flatten.output │ │ │ │ ├── from_cbor.cpp │ │ │ │ ├── from_cbor.link │ │ │ │ ├── from_cbor.output │ │ │ │ ├── from_msgpack.cpp │ │ │ │ ├── from_msgpack.link │ │ │ │ ├── from_msgpack.output │ │ │ │ ├── from_ubjson.cpp │ │ │ │ ├── from_ubjson.link │ │ │ │ ├── from_ubjson.output │ │ │ │ ├── front.cpp │ │ │ │ ├── front.link │ │ │ │ ├── front.output │ │ │ │ ├── get__PointerType.cpp │ │ │ │ ├── get__PointerType.link │ │ │ │ ├── get__PointerType.output │ │ │ │ ├── get__ValueType_const.cpp │ │ │ │ ├── get__ValueType_const.link │ │ │ │ ├── get__ValueType_const.output │ │ │ │ ├── get_ptr.cpp │ │ │ │ ├── get_ptr.link │ │ │ │ ├── get_ptr.output │ │ │ │ ├── get_ref.cpp │ │ │ │ ├── get_ref.link │ │ │ │ ├── get_ref.output │ │ │ │ ├── insert.cpp │ │ │ │ ├── insert.link │ │ │ │ ├── insert.output │ │ │ │ ├── insert__count.cpp │ │ │ │ ├── insert__count.link │ │ │ │ ├── insert__count.output │ │ │ │ ├── insert__ilist.cpp │ │ │ │ ├── insert__ilist.link │ │ │ │ ├── insert__ilist.output │ │ │ │ ├── insert__range.cpp │ │ │ │ ├── insert__range.link │ │ │ │ ├── insert__range.output │ │ │ │ ├── insert__range_object.cpp │ │ │ │ ├── insert__range_object.link │ │ │ │ ├── insert__range_object.output │ │ │ │ ├── invalid_iterator.cpp │ │ │ │ ├── invalid_iterator.link │ │ │ │ ├── invalid_iterator.output │ │ │ │ ├── is_array.cpp │ │ │ │ ├── is_array.link │ │ │ │ ├── is_array.output │ │ │ │ ├── is_boolean.cpp │ │ │ │ ├── is_boolean.link │ │ │ │ ├── is_boolean.output │ │ │ │ ├── is_discarded.cpp │ │ │ │ ├── is_discarded.link │ │ │ │ ├── is_discarded.output │ │ │ │ ├── is_null.cpp │ │ │ │ ├── is_null.link │ │ │ │ ├── is_null.output │ │ │ │ ├── is_number.cpp │ │ │ │ ├── is_number.link │ │ │ │ ├── is_number.output │ │ │ │ ├── is_number_float.cpp │ │ │ │ ├── is_number_float.link │ │ │ │ ├── is_number_float.output │ │ │ │ ├── is_number_integer.cpp │ │ │ │ ├── is_number_integer.link │ │ │ │ ├── is_number_integer.output │ │ │ │ ├── is_number_unsigned.cpp │ │ │ │ ├── is_number_unsigned.link │ │ │ │ ├── is_number_unsigned.output │ │ │ │ ├── is_object.cpp │ │ │ │ ├── is_object.link │ │ │ │ ├── is_object.output │ │ │ │ ├── is_primitive.cpp │ │ │ │ ├── is_primitive.link │ │ │ │ ├── is_primitive.output │ │ │ │ ├── is_string.cpp │ │ │ │ ├── is_string.link │ │ │ │ ├── is_string.output │ │ │ │ ├── is_structured.cpp │ │ │ │ ├── is_structured.link │ │ │ │ ├── is_structured.output │ │ │ │ ├── items.cpp │ │ │ │ ├── items.link │ │ │ │ ├── items.output │ │ │ │ ├── iterator_wrapper.cpp │ │ │ │ ├── iterator_wrapper.link │ │ │ │ ├── iterator_wrapper.output │ │ │ │ ├── json_pointer.cpp │ │ │ │ ├── json_pointer.link │ │ │ │ ├── json_pointer.output │ │ │ │ ├── json_pointer__to_string.cpp │ │ │ │ ├── json_pointer__to_string.link │ │ │ │ ├── json_pointer__to_string.output │ │ │ │ ├── max_size.cpp │ │ │ │ ├── max_size.link │ │ │ │ ├── max_size.output │ │ │ │ ├── merge_patch.cpp │ │ │ │ ├── merge_patch.link │ │ │ │ ├── merge_patch.output │ │ │ │ ├── meta.cpp │ │ │ │ ├── meta.link │ │ │ │ ├── meta.output │ │ │ │ ├── object.cpp │ │ │ │ ├── object.link │ │ │ │ ├── object.output │ │ │ │ ├── operator__ValueType.cpp │ │ │ │ ├── operator__ValueType.link │ │ │ │ ├── operator__ValueType.output │ │ │ │ ├── operator__equal.cpp │ │ │ │ ├── operator__equal.link │ │ │ │ ├── operator__equal.output │ │ │ │ ├── operator__equal__nullptr_t.cpp │ │ │ │ ├── operator__equal__nullptr_t.link │ │ │ │ ├── operator__equal__nullptr_t.output │ │ │ │ ├── operator__greater.cpp │ │ │ │ ├── operator__greater.link │ │ │ │ ├── operator__greater.output │ │ │ │ ├── operator__greaterequal.cpp │ │ │ │ ├── operator__greaterequal.link │ │ │ │ ├── operator__greaterequal.output │ │ │ │ ├── operator__less.cpp │ │ │ │ ├── operator__less.link │ │ │ │ ├── operator__less.output │ │ │ │ ├── operator__lessequal.cpp │ │ │ │ ├── operator__lessequal.link │ │ │ │ ├── operator__lessequal.output │ │ │ │ ├── operator__notequal.cpp │ │ │ │ ├── operator__notequal.link │ │ │ │ ├── operator__notequal.output │ │ │ │ ├── operator__notequal__nullptr_t.cpp │ │ │ │ ├── operator__notequal__nullptr_t.link │ │ │ │ ├── operator__notequal__nullptr_t.output │ │ │ │ ├── operator__value_t.cpp │ │ │ │ ├── operator__value_t.link │ │ │ │ ├── operator__value_t.output │ │ │ │ ├── operator_deserialize.cpp │ │ │ │ ├── operator_deserialize.link │ │ │ │ ├── operator_deserialize.output │ │ │ │ ├── operator_serialize.cpp │ │ │ │ ├── operator_serialize.link │ │ │ │ ├── operator_serialize.output │ │ │ │ ├── operatorarray__key_type.cpp │ │ │ │ ├── operatorarray__key_type.link │ │ │ │ ├── operatorarray__key_type.output │ │ │ │ ├── operatorarray__key_type_const.cpp │ │ │ │ ├── operatorarray__key_type_const.link │ │ │ │ ├── operatorarray__key_type_const.output │ │ │ │ ├── operatorarray__size_type.cpp │ │ │ │ ├── operatorarray__size_type.link │ │ │ │ ├── operatorarray__size_type.output │ │ │ │ ├── operatorarray__size_type_const.cpp │ │ │ │ ├── operatorarray__size_type_const.link │ │ │ │ ├── operatorarray__size_type_const.output │ │ │ │ ├── operatorjson_pointer.cpp │ │ │ │ ├── operatorjson_pointer.link │ │ │ │ ├── operatorjson_pointer.output │ │ │ │ ├── operatorjson_pointer_const.cpp │ │ │ │ ├── operatorjson_pointer_const.link │ │ │ │ ├── operatorjson_pointer_const.output │ │ │ │ ├── other_error.cpp │ │ │ │ ├── other_error.link │ │ │ │ ├── other_error.output │ │ │ │ ├── out_of_range.cpp │ │ │ │ ├── out_of_range.link │ │ │ │ ├── out_of_range.output │ │ │ │ ├── parse__array__parser_callback_t.cpp │ │ │ │ ├── parse__array__parser_callback_t.link │ │ │ │ ├── parse__array__parser_callback_t.output │ │ │ │ ├── parse__contiguouscontainer__parser_callback_t.cpp │ │ │ │ ├── parse__contiguouscontainer__parser_callback_t.link │ │ │ │ ├── parse__contiguouscontainer__parser_callback_t.output │ │ │ │ ├── parse__istream__parser_callback_t.cpp │ │ │ │ ├── parse__istream__parser_callback_t.link │ │ │ │ ├── parse__istream__parser_callback_t.output │ │ │ │ ├── parse__iteratortype__parser_callback_t.cpp │ │ │ │ ├── parse__iteratortype__parser_callback_t.link │ │ │ │ ├── parse__iteratortype__parser_callback_t.output │ │ │ │ ├── parse__string__parser_callback_t.cpp │ │ │ │ ├── parse__string__parser_callback_t.link │ │ │ │ ├── parse__string__parser_callback_t.output │ │ │ │ ├── parse_error.cpp │ │ │ │ ├── parse_error.link │ │ │ │ ├── parse_error.output │ │ │ │ ├── patch.cpp │ │ │ │ ├── patch.link │ │ │ │ ├── patch.output │ │ │ │ ├── push_back.cpp │ │ │ │ ├── push_back.link │ │ │ │ ├── push_back.output │ │ │ │ ├── push_back__initializer_list.cpp │ │ │ │ ├── push_back__initializer_list.link │ │ │ │ ├── push_back__initializer_list.output │ │ │ │ ├── push_back__object_t__value.cpp │ │ │ │ ├── push_back__object_t__value.link │ │ │ │ ├── push_back__object_t__value.output │ │ │ │ ├── rbegin.cpp │ │ │ │ ├── rbegin.link │ │ │ │ ├── rbegin.output │ │ │ │ ├── rend.cpp │ │ │ │ ├── rend.link │ │ │ │ ├── rend.output │ │ │ │ ├── sax_parse.cpp │ │ │ │ ├── sax_parse.link │ │ │ │ ├── sax_parse.output │ │ │ │ ├── size.cpp │ │ │ │ ├── size.link │ │ │ │ ├── size.output │ │ │ │ ├── swap__array_t.cpp │ │ │ │ ├── swap__array_t.link │ │ │ │ ├── swap__array_t.output │ │ │ │ ├── swap__object_t.cpp │ │ │ │ ├── swap__object_t.link │ │ │ │ ├── swap__object_t.output │ │ │ │ ├── swap__reference.cpp │ │ │ │ ├── swap__reference.link │ │ │ │ ├── swap__reference.output │ │ │ │ ├── swap__string_t.cpp │ │ │ │ ├── swap__string_t.link │ │ │ │ ├── swap__string_t.output │ │ │ │ ├── to_cbor.cpp │ │ │ │ ├── to_cbor.link │ │ │ │ ├── to_cbor.output │ │ │ │ ├── to_msgpack.cpp │ │ │ │ ├── to_msgpack.link │ │ │ │ ├── to_msgpack.output │ │ │ │ ├── to_ubjson.cpp │ │ │ │ ├── to_ubjson.link │ │ │ │ ├── to_ubjson.output │ │ │ │ ├── type.cpp │ │ │ │ ├── type.link │ │ │ │ ├── type.output │ │ │ │ ├── type_error.cpp │ │ │ │ ├── type_error.link │ │ │ │ ├── type_error.output │ │ │ │ ├── type_name.cpp │ │ │ │ ├── type_name.link │ │ │ │ ├── type_name.output │ │ │ │ ├── unflatten.cpp │ │ │ │ ├── unflatten.link │ │ │ │ ├── unflatten.output │ │ │ │ ├── update.cpp │ │ │ │ ├── update.link │ │ │ │ ├── update.output │ │ │ │ ├── update__range.cpp │ │ │ │ ├── update__range.link │ │ │ │ └── update__range.output │ │ │ ├── faq.md │ │ │ ├── images │ │ │ │ ├── binary.png │ │ │ │ ├── callback_events.png │ │ │ │ ├── range-begin-end.svg │ │ │ │ └── range-rbegin-rend.svg │ │ │ ├── index.md │ │ │ ├── json.gif │ │ │ ├── scripts │ │ │ │ ├── git-update-ghpages │ │ │ │ └── send_to_wandbox.py │ │ │ └── usages │ │ │ │ ├── ios.png │ │ │ │ └── macos.png │ │ ├── include │ │ │ └── nlohmann │ │ │ │ ├── adl_serializer.hpp │ │ │ │ ├── detail │ │ │ │ ├── conversions │ │ │ │ │ ├── from_json.hpp │ │ │ │ │ ├── to_chars.hpp │ │ │ │ │ └── to_json.hpp │ │ │ │ ├── exceptions.hpp │ │ │ │ ├── input │ │ │ │ │ ├── binary_reader.hpp │ │ │ │ │ ├── input_adapters.hpp │ │ │ │ │ ├── json_sax.hpp │ │ │ │ │ ├── lexer.hpp │ │ │ │ │ └── parser.hpp │ │ │ │ ├── iterators │ │ │ │ │ ├── internal_iterator.hpp │ │ │ │ │ ├── iter_impl.hpp │ │ │ │ │ ├── iteration_proxy.hpp │ │ │ │ │ ├── json_reverse_iterator.hpp │ │ │ │ │ └── primitive_iterator.hpp │ │ │ │ ├── json_pointer.hpp │ │ │ │ ├── json_ref.hpp │ │ │ │ ├── macro_scope.hpp │ │ │ │ ├── macro_unscope.hpp │ │ │ │ ├── meta │ │ │ │ │ ├── cpp_future.hpp │ │ │ │ │ ├── detected.hpp │ │ │ │ │ ├── is_sax.hpp │ │ │ │ │ ├── type_traits.hpp │ │ │ │ │ └── void_t.hpp │ │ │ │ ├── output │ │ │ │ │ ├── binary_writer.hpp │ │ │ │ │ ├── output_adapters.hpp │ │ │ │ │ └── serializer.hpp │ │ │ │ └── value_t.hpp │ │ │ │ ├── json.hpp │ │ │ │ └── json_fwd.hpp │ │ ├── meson.build │ │ ├── nlohmann_json.natvis │ │ ├── single_include │ │ │ └── nlohmann │ │ │ │ └── json.hpp │ │ └── third_party │ │ │ └── amalgamate │ │ │ ├── CHANGES.md │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── amalgamate.py │ │ │ └── config.json │ ├── martinus │ │ └── robin_hood.h │ └── tl │ │ ├── expected.hpp │ │ ├── function_ref.hpp │ │ ├── make_array.hpp │ │ └── optional.hpp ├── ext_snappy │ ├── Makefile │ ├── config.h │ ├── snappy-internal.h │ ├── snappy-sinksource.cc │ ├── snappy-sinksource.h │ ├── snappy-stubs-internal.cc │ ├── snappy-stubs-internal.h │ ├── snappy-stubs-public.h │ ├── snappy-test.h │ ├── snappy.cc │ └── snappy.h ├── fs.h ├── network.h ├── portability.h ├── prioqueue.h ├── sparsefixedbitset.h ├── switch.h ├── switch_algorithms.h ├── switch_atomicops.h ├── switch_bitops.h ├── switch_common.h ├── switch_compiler_aux.h ├── switch_dictionary.h ├── switch_exceptions.h ├── switch_hash.h ├── switch_ll.h ├── switch_mallocators.h ├── switch_numops.h ├── switch_print.h ├── switch_ranges.h ├── switch_refcnt.h ├── switch_security.cpp ├── switch_security.h ├── switch_vector.h ├── text.cpp ├── text.h ├── text_table.h ├── thread.h ├── timings.h └── tl │ ├── expected.hpp │ ├── function_ref.hpp │ ├── make_array.hpp │ └── optional.hpp ├── cli.cpp ├── client.cpp ├── client_api.cpp ├── client_api_consume.cpp ├── client_api_create_topic.cpp ├── client_api_discover_partitions.cpp ├── client_api_discover_topics.cpp ├── client_api_discover_topology.cpp ├── client_api_fast_consume.cpp ├── client_api_produce.cpp ├── client_api_reload_config.cpp ├── client_api_srv_status.cpp ├── client_brokers_util.cpp ├── client_brokers_util_materialize.cpp ├── client_common.h ├── client_pragmas.h ├── client_reactor.cpp ├── client_resources.cpp ├── client_utils.cpp ├── common.h ├── service.cpp ├── service.h ├── service_api.cpp ├── service_api_consume.cpp ├── service_api_produce.cpp ├── service_bootstrap.cpp ├── service_cluster.cpp ├── service_cluster_apply_state_updates.cpp ├── service_cluster_gen_partition_nodes_updates.cpp ├── service_cluster_reconcile.cpp ├── service_cluster_util.cpp ├── service_cluster_verify.cpp ├── service_common.h ├── service_compact.cpp ├── service_consul.cpp ├── service_consul_io.cpp ├── service_hw.cpp ├── service_indices.cpp ├── service_isr.cpp ├── service_json.cpp ├── service_log.cpp ├── service_main.cpp ├── service_pragmas.h ├── service_reactor.cpp ├── service_read.cpp ├── service_rebuild_segment.cpp ├── service_replication.cpp ├── service_ro_segments.cpp ├── service_utils.cpp ├── service_verify.cpp ├── service_wait.cpp ├── service_wip.cpp ├── service_write.cpp ├── tank_client.h ├── tank_encoding.md └── tank_protocol.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 AS compiler-image 2 | MAINTAINER Phaistos Networks 3 | 4 | RUN apt-get update && apt -y --no-install-recommends install git ca-certificates make clang-12 zlib1g-dev libboost1.71-dev g++ libc++-12-dev libc++abi1-12 libc++abi-12-dev 5 | RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 100 && \ 6 | update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 100 7 | 8 | RUN mkdir -p /TANK 9 | ADD Makefile *.cpp *.h /TANK/ 10 | ADD Switch /TANK/Switch/ 11 | 12 | WORKDIR /TANK 13 | RUN make -j16 cli-tool service 14 | 15 | 16 | FROM ubuntu:20.04 17 | MAINTAINER Phaistos Networks 18 | RUN apt-get update && apt -y --no-install-recommends install libc++abi1-12 libc++1-12 19 | COPY --from=compiler-image /TANK/tank /usr/local/bin/ 20 | COPY --from=compiler-image /TANK/tank-cli /usr/local/bin/ 21 | WORKDIR /data/ 22 | CMD ["tank","-p",".","-l",":11011"] 23 | -------------------------------------------------------------------------------- /Switch/Makefile: -------------------------------------------------------------------------------- 1 | CXX=clang++ 2 | CXXFLAGS:=-std=c++1z -Wstrict-aliasing=2 -Wsequence-point -Warray-bounds -Wextra -Winit-self -Wformat=2 -Wno-format-nonliteral -Wformat-security \ 3 | -Wno-c++1z-extensions \ 4 | -Wunused-variable -Wunused-value -Wreturn-type -Wparentheses -Wmissing-braces -Wno-invalid-source-encoding -Wno-invalid-offsetof \ 5 | -Wno-unknown-pragmas -Wno-undefined-inline -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare -Wno-invalid-offsetof \ 6 | -fno-rtti -ffast-math -D_REENTRANT -DREENTRANT -g3 -ggdb -fno-omit-frame-pointer \ 7 | -fno-strict-aliasing -DLEAN_SWITCH -ISwitch/ -I./ -Wno-uninitialized -Wno-unused-function -Wno-uninitialized -funroll-loops -Ofast 8 | OBJS:=base64.o crypto.o text.o 9 | 10 | all: $(OBJS) 11 | @rm -f libswitch.a 12 | ar rcs libswitch.a $(OBJS) 13 | 14 | clean: 15 | rm -f *.o 16 | 17 | .PHONY: clean 18 | -------------------------------------------------------------------------------- /Switch/README.md: -------------------------------------------------------------------------------- 1 | This is a very lean distribution of Switch; it includes the absolute minimum code for this project. 2 | Eventually, we plan to OSS all Switch. Switch is similar in scope and goals to Facebook's Folly library. 3 | 4 | Most of the methods and datastructures here are either wrappers for STL equivalent classes/functions, or are very trimmed down constructs written so that this project can be compiled with them. 5 | -------------------------------------------------------------------------------- /Switch/base64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "switch.h" 3 | #include "buffer.h" 4 | 5 | static inline bool is_base64(const uint8_t c) noexcept { 6 | return c == '+' || c == '/' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); 7 | } 8 | 9 | namespace Base64 { 10 | size_t decoded_repr_length(const str_view32 s); 11 | 12 | uint32_t Encode(const uint8_t *in, size_t in_len, Buffer *out); 13 | 14 | int32_t Decode(const uint8_t *in, const size_t in_len, Buffer *out); 15 | } // namespace Base64 16 | -------------------------------------------------------------------------------- /Switch/crypto.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "switch.h" 3 | 4 | struct CRC32Generator final { 5 | private: 6 | uint32_t crc32; 7 | 8 | private: 9 | void update_impl(const void *, const size_t) noexcept; 10 | 11 | public: 12 | CRC32Generator(void) 13 | : crc32(~0L) { 14 | } 15 | 16 | auto &reset() { 17 | crc32 = ~0L; 18 | return *this; 19 | } 20 | 21 | template 22 | inline auto &update(const T &v) { 23 | update_impl(&v, sizeof(v)); 24 | return *this; 25 | } 26 | 27 | inline auto &update(const void *ptr, const uint32_t len) { 28 | update_impl(ptr, len); 29 | return *this; 30 | } 31 | 32 | inline auto get() const noexcept { 33 | return ~crc32; 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CHANGELOG: -------------------------------------------------------------------------------- 1 | 0.1.6 April 14th 2016 2 | FastPFOR and SIMDFastPFOR updated to use 512-int blocks (like JavaFastPFOR) 3 | Added SIMDSimplePFOR 4 | Added MaskedVByte 5 | Added StreamVByte 6 | More verbose error messages 7 | 0.1.5 August 21st 2014 8 | Added SIMD versions of OptPFD and NewPFD. 9 | Fixed buffer overrun in varintg8iu 10 | Factor out decodeBlock method from decodeArray (Matthias Petri) 11 | Renamed the FastPfor namespace FastPforLib to avoid name clash 12 | 0.1.4 May 21st 2014 13 | Added "myths" section to README file 14 | 0.1.3 January 22nd 2014 15 | Various minor fixes 16 | 0.1.2 January 22nd 2014 17 | Namespace fixes (Andrea Bedini) 18 | 0.1.1 December 29th 2013 19 | Bug fix in SimplePFOR 20 | 0.1.0 December 3rd 2013 21 | This is the first stable release. Code has been available for nearly a year ago and it has been well tested. 22 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.10.2/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-29-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-29-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-29-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-29-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/3.5.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.4.0-28-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-28-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.4.0-28-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.4.0-28-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/CMakeRuleHashes.txt: -------------------------------------------------------------------------------- 1 | # Hashes of file build rules. 2 | 89dcfb7a8ad6f50823da9a6c6d234b05 CMakeFiles/check 3 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/C.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/streamvbyte.c 10 | intrin.h 11 | - 12 | iso646.h 13 | - 14 | stdint.h 15 | - 16 | x86intrin.h 17 | - 18 | arm_neon.h 19 | - 20 | mmintrin.h 21 | - 22 | altivec.h 23 | - 24 | spe.h 25 | - 26 | stdint.h 27 | - 28 | stdio.h 29 | - 30 | stdlib.h 31 | - 32 | assert.h 33 | - 34 | string.h 35 | - 36 | /opt/intel/iaca/include/iacaMarks.h 37 | - 38 | 39 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/varintdecode.c 40 | intrin.h 41 | - 42 | x86intrin.h 43 | - 44 | arm_neon.h 45 | - 46 | mmintrin.h 47 | - 48 | altivec.h 49 | - 50 | spe.h 51 | - 52 | stdint.h 53 | - 54 | stdio.h 55 | - 56 | 57 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/FastPFor.dir/src/bitpacking.cpp.o" 3 | "CMakeFiles/FastPFor.dir/src/bitpackingaligned.cpp.o" 4 | "CMakeFiles/FastPFor.dir/src/bitpackingunaligned.cpp.o" 5 | "CMakeFiles/FastPFor.dir/src/horizontalbitpacking.cpp.o" 6 | "CMakeFiles/FastPFor.dir/src/simdunalignedbitpacking.cpp.o" 7 | "CMakeFiles/FastPFor.dir/src/simdbitpacking.cpp.o" 8 | "CMakeFiles/FastPFor.dir/src/varintdecode.c.o" 9 | "CMakeFiles/FastPFor.dir/src/streamvbyte.c.o" 10 | "libFastPFor.pdb" 11 | "libFastPFor.a" 12 | ) 13 | 14 | # Per-language clean rules from dependency scanning. 15 | foreach(lang C CXX) 16 | include(CMakeFiles/FastPFor.dir/cmake_clean_${lang}.cmake OPTIONAL) 17 | endforeach() 18 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/cmake_clean_target.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "libFastPFor.a" 3 | ) 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile C with /usr/bin/clang 5 | # compile CXX with /usr/bin/clang++ 6 | C_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c99 -msse4.1 -march=native 7 | 8 | C_DEFINES = 9 | 10 | C_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 11 | 12 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 13 | 14 | CXX_DEFINES = 15 | 16 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 17 | 18 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/ar qc libFastPFor.a CMakeFiles/FastPFor.dir/src/bitpacking.cpp.o CMakeFiles/FastPFor.dir/src/bitpackingaligned.cpp.o CMakeFiles/FastPFor.dir/src/bitpackingunaligned.cpp.o CMakeFiles/FastPFor.dir/src/horizontalbitpacking.cpp.o CMakeFiles/FastPFor.dir/src/simdunalignedbitpacking.cpp.o CMakeFiles/FastPFor.dir/src/simdbitpacking.cpp.o CMakeFiles/FastPFor.dir/src/varintdecode.c.o CMakeFiles/FastPFor.dir/src/streamvbyte.c.o 2 | /usr/bin/ranlib libFastPFor.a 3 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | CMAKE_PROGRESS_4 = 4 5 | CMAKE_PROGRESS_5 = 5 6 | CMAKE_PROGRESS_6 = 6 7 | CMAKE_PROGRESS_7 = 7 8 | CMAKE_PROGRESS_8 = 8 9 | CMAKE_PROGRESS_9 = 9 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/benchbitpacking.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/src/benchbitpacking.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/benchbitpacking.dir/src/benchbitpacking.cpp.o" 3 | "benchbitpacking.pdb" 4 | "benchbitpacking" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/benchbitpacking.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/benchbitpacking.dir/src/benchbitpacking.cpp.o 5 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/benchbitpacking.cpp 6 | headers/bitpacking.h 7 | headers/bitpackinghelpers.h 8 | headers/common.h 9 | headers/horizontalbitpacking.h 10 | headers/memutil.h 11 | headers/mersenne.h 12 | headers/rolledbitpacking.h 13 | headers/simdbitpacking.h 14 | headers/synthetic.h 15 | headers/util.h 16 | headers/ztimer.h 17 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/benchbitpacking.dir/src/benchbitpacking.cpp.o -o benchbitpacking libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/benchbitpacking.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 10 2 | CMAKE_PROGRESS_2 = 11 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/check.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | ) 4 | # The set of files for implicit dependencies of each language: 5 | 6 | # Targets to which this target links. 7 | set(CMAKE_TARGET_LINKED_INFO_FILES 8 | ) 9 | 10 | # Fortran module output directory. 11 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 12 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/check.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/check" 3 | ) 4 | 5 | # Per-language clean rules from dependency scanning. 6 | foreach(lang ) 7 | include(CMakeFiles/check.dir/cmake_clean_${lang}.cmake OPTIONAL) 8 | endforeach() 9 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/check.dir/progress.make: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecs.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/codecs.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/codecs.dir/src/codecs.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecs.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/codecs.dir/src/codecs.cpp.o" 3 | "codecs.pdb" 4 | "codecs" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/codecs.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecs.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecs.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/codecs.dir/src/codecs.cpp.o -o codecs libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecs.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 12 2 | CMAKE_PROGRESS_2 = 13 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/codecs.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/src/codecs.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/codecssnappy.dir/src/codecs.cpp.o" 3 | "codecssnappy.pdb" 4 | "codecssnappy" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/codecssnappy.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/codecssnappy.dir/src/codecs.cpp.o -o codecssnappy libFastPFor.a -lsnappy 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/codecssnappy.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 14 2 | CMAKE_PROGRESS_2 = 15 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/csv2maropu.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | ) 19 | 20 | # Fortran module output directory. 21 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 22 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o" 3 | "csv2maropu.pdb" 4 | "csv2maropu" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/csv2maropu.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o 5 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/csv2maropu.cpp 6 | headers/common.h 7 | headers/csv.h 8 | headers/externalvector.h 9 | headers/util.h 10 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o: src/csv2maropu.cpp 5 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o: headers/common.h 6 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o: headers/csv.h 7 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o: headers/externalvector.h 8 | CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o: headers/util.h 9 | 10 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/csv2maropu.dir/src/csv2maropu.cpp.o -o csv2maropu 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/csv2maropu.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 16 2 | CMAKE_PROGRESS_2 = 17 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/entropy.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/entropy.dir/src/entropy.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/entropy.dir/src/entropy.cpp.o" 3 | "entropy.pdb" 4 | "entropy" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/entropy.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/entropy.dir/src/entropy.cpp.o 5 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/entropy.cpp 6 | headers/bitpacking.h 7 | headers/bitpackinghelpers.h 8 | headers/codecs.h 9 | headers/common.h 10 | headers/deltautil.h 11 | headers/entropy.h 12 | headers/maropuparser.h 13 | headers/memutil.h 14 | headers/util.h 15 | headers/ztimer.h 16 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/entropy.dir/src/entropy.cpp.o: src/entropy.cpp 5 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/bitpacking.h 6 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/bitpackinghelpers.h 7 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/codecs.h 8 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/common.h 9 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/deltautil.h 10 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/entropy.h 11 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/maropuparser.h 12 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/memutil.h 13 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/util.h 14 | CMakeFiles/entropy.dir/src/entropy.cpp.o: headers/ztimer.h 15 | 16 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/entropy.dir/src/entropy.cpp.o -o entropy libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/entropy.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 18 2 | CMAKE_PROGRESS_2 = 19 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/example.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/example.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/example.dir/example.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/example.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/example.dir/example.cpp.o" 3 | "example.pdb" 4 | "example" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/example.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/example.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/example.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/example.dir/example.cpp.o -o example libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/example.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 20 2 | CMAKE_PROGRESS_2 = 21 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/gapstats.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/gapstats.dir/src/gapstats.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | ) 19 | 20 | # Fortran module output directory. 21 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 22 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/gapstats.dir/src/gapstats.cpp.o" 3 | "gapstats.pdb" 4 | "gapstats" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/gapstats.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/gapstats.dir/src/gapstats.cpp.o 5 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/gapstats.cpp 6 | headers/common.h 7 | headers/maropuparser.h 8 | headers/util.h 9 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/gapstats.dir/src/gapstats.cpp.o: src/gapstats.cpp 5 | CMakeFiles/gapstats.dir/src/gapstats.cpp.o: headers/common.h 6 | CMakeFiles/gapstats.dir/src/gapstats.cpp.o: headers/maropuparser.h 7 | CMakeFiles/gapstats.dir/src/gapstats.cpp.o: headers/util.h 8 | 9 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/gapstats.dir/src/gapstats.cpp.o -o gapstats 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/gapstats.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 22 2 | CMAKE_PROGRESS_2 = 23 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/inmemorybenchmark.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/src/inmemorybenchmark.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/inmemorybenchmark.dir/src/inmemorybenchmark.cpp.o" 3 | "inmemorybenchmark.pdb" 4 | "inmemorybenchmark" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/inmemorybenchmark.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/inmemorybenchmark.dir/src/inmemorybenchmark.cpp.o -o inmemorybenchmark libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmark.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 24 2 | CMAKE_PROGRESS_2 = 25 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/inmemorybenchmark.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/src/inmemorybenchmark.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/inmemorybenchmarksnappy.dir/src/inmemorybenchmark.cpp.o" 3 | "inmemorybenchmarksnappy.pdb" 4 | "inmemorybenchmarksnappy" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/inmemorybenchmarksnappy.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/inmemorybenchmarksnappy.dir/src/inmemorybenchmark.cpp.o -o inmemorybenchmarksnappy libFastPFor.a -lsnappy 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/inmemorybenchmarksnappy.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 26 2 | CMAKE_PROGRESS_2 = 27 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/partitionbylength.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | ) 19 | 20 | # Fortran module output directory. 21 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 22 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o" 3 | "partitionbylength.pdb" 4 | "partitionbylength" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/partitionbylength.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o 5 | /db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/partitionbylength.cpp 6 | headers/common.h 7 | headers/maropuparser.h 8 | headers/util.h 9 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o: src/partitionbylength.cpp 5 | CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o: headers/common.h 6 | CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o: headers/maropuparser.h 7 | CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o: headers/util.h 8 | 9 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/partitionbylength.dir/src/partitionbylength.cpp.o -o partitionbylength 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/partitionbylength.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 28 2 | CMAKE_PROGRESS_2 = 29 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 31 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/unit.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/src/unit.cpp" "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/unit.dir/src/unit.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "Clang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "headers" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | "/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/CMakeFiles/FastPFor.dir/DependInfo.cmake" 19 | ) 20 | 21 | # Fortran module output directory. 22 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/unit.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/unit.dir/src/unit.cpp.o" 3 | "unit.pdb" 4 | "unit" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/unit.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/unit.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.10 3 | 4 | # compile CXX with /usr/bin/clang++ 5 | CXX_FLAGS = -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/db/storage/Development/Projects/Trinity/Switch/ext/FastPFor/headers 10 | 11 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/unit.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/clang++ -Wall -Wcast-align -O3 -DNDEBUG -std=c++11 -DHAVE_CXX0X -msse4.1 -march=native -rdynamic CMakeFiles/unit.dir/src/unit.cpp.o -o unit libFastPFor.a 2 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/CMakeFiles/unit.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 30 2 | CMAKE_PROGRESS_2 = 31 3 | 4 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/benchbitpacking: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/benchbitpacking -------------------------------------------------------------------------------- /Switch/ext/FastPFor/codecs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/codecs -------------------------------------------------------------------------------- /Switch/ext/FastPFor/codecssnappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/codecssnappy -------------------------------------------------------------------------------- /Switch/ext/FastPFor/csv2maropu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/csv2maropu -------------------------------------------------------------------------------- /Switch/ext/FastPFor/data/ClueWeb09LogSizeFreqs.1: -------------------------------------------------------------------------------- 1 | 1 2.82724e-08 2 | 2 8.19898e-07 3 | 3 1.10262e-06 4 | 4 2.71415e-06 5 | 5 9.27333e-06 6 | 6 7.31123e-05 7 | 7 0.000603756 8 | 8 0.00627974 9 | 9 0.0131751 10 | 10 0.0140863 11 | 11 0.0148443 12 | 12 0.017259 13 | 13 0.0219071 14 | 14 0.0242301 15 | 15 0.030346 16 | 16 0.0389263 17 | 17 0.0527359 18 | 18 0.0684633 19 | 19 0.0830985 20 | 20 0.120965 21 | 21 0.131029 22 | 22 0.126197 23 | 23 0.13557 24 | 24 0.0699598 25 | 25 0.0294745 26 | 26 0.000762534 27 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/data/README: -------------------------------------------------------------------------------- 1 | The file ClueWeb09LogSizeFreqs.1 corresponds to the AOL log weight vector 2 | computed for the research paper "Decoding billions of integers per second through vectorization". 3 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/entropy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/entropy -------------------------------------------------------------------------------- /Switch/ext/FastPFor/example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/example -------------------------------------------------------------------------------- /Switch/ext/FastPFor/gapstats: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/gapstats -------------------------------------------------------------------------------- /Switch/ext/FastPFor/headers/stringutil.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This code is released under the 3 | * Apache License Version 2.0 http://www.apache.org/licenses/. 4 | * 5 | * (c) Daniel Lemire, http://lemire.me/en/ 6 | */ 7 | 8 | #ifndef STRINGUTIL_H_ 9 | #define STRINGUTIL_H_ 10 | 11 | #include "common.h" 12 | #include "util.h" 13 | 14 | namespace FastPForLib { 15 | 16 | using namespace std; 17 | 18 | std::vector split(const std::string &str, const std::string &del) { 19 | std::vector tokens; 20 | size_t lastPos = str.find_first_not_of(del, 0); 21 | size_t pos = str.find_first_of(del, lastPos); 22 | while (std::string::npos != pos || std::string::npos != lastPos) { 23 | tokens.push_back(str.substr(lastPos, pos - lastPos)); 24 | lastPos = str.find_first_not_of(del, pos); 25 | pos = str.find_first_of(del, lastPos); 26 | } 27 | return tokens; 28 | } 29 | 30 | } // namespace FastPFor 31 | 32 | #endif /* STRINGUTIL_H_ */ 33 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/headers/usimdbitpacking.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This code is released under the 3 | * Apache License Version 2.0 http://www.apache.org/licenses/. 4 | * 5 | * (c) Daniel Lemire 6 | */ 7 | #ifndef USIMDBITPACKING_H_ 8 | #define USIMDBITPACKING_H_ 9 | 10 | #include "common.h" 11 | 12 | namespace FastPForLib { 13 | 14 | void usimdpack(const uint32_t *__restrict__ in, __m128i *__restrict__ out, 15 | uint32_t bit); 16 | void usimdpackwithoutmask(const uint32_t *__restrict__ in, 17 | __m128i *__restrict__ out, uint32_t bit); 18 | void usimdunpack(const __m128i *__restrict__ in, uint32_t *__restrict__ out, 19 | uint32_t bit); 20 | 21 | } // namespace FastPFor 22 | 23 | #endif /* SIMDBITPACKING_H_ */ 24 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/inmemorybenchmark: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/inmemorybenchmark -------------------------------------------------------------------------------- /Switch/ext/FastPFor/inmemorybenchmarksnappy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/inmemorybenchmarksnappy -------------------------------------------------------------------------------- /Switch/ext/FastPFor/partitionbylength: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/partitionbylength -------------------------------------------------------------------------------- /Switch/ext/FastPFor/src/horizontalbitpacking.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/src/horizontalbitpacking.cpp -------------------------------------------------------------------------------- /Switch/ext/FastPFor/tools/clang-format.sh: -------------------------------------------------------------------------------- 1 | STYLE=$(which clang-format) 2 | if [ $? -ne 0 ]; then 3 | echo "clang-format not installed. Unable to check source file format policy." >&2 4 | exit 1 5 | fi 6 | RE=0 7 | BASE=$(git rev-parse --show-toplevel) 8 | if [ $? -ne 0 ]; then 9 | ALLFILES=$(find . -name '*.c' -o -name '*.cpp' -o -name '*.h' -o -name '*.cc' -o -name '*.hh') 10 | else 11 | ALLFILES=$(git ls-tree --full-tree --name-only -r HEAD | grep -e ".*\.\(c\|h\|cc\|cpp\|hh\)\$") 12 | fi 13 | for FILE in $ALLFILES; do 14 | $STYLE $BASE/$FILE | cmp -s $BASE/$FILE - 15 | if [ $? -ne 0 ]; then 16 | echo "$BASE/$FILE does not respect the coding style. Formatting. " >&2 17 | $STYLE -i $BASE/$FILE 18 | RE=1 19 | fi 20 | done 21 | 22 | exit $RE 23 | -------------------------------------------------------------------------------- /Switch/ext/FastPFor/unit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/FastPFor/unit -------------------------------------------------------------------------------- /Switch/ext/ebtree/Makefile: -------------------------------------------------------------------------------- 1 | CC:=clang 2 | CFLAGS:=-Wno-address-of-packed-member -g3 -ggdb -Wall -Ofast 3 | OBJS:=eb32tree.o eb64tree.o ebimtree.o ebistree.o ebmbtree.o ebpttree.o ebsttree.o ebtree.o 4 | 5 | all: lib 6 | 7 | lib: $(OBJS) 8 | @rm -f libebtree.a 9 | ar rcs libtree.a $(OBJS) 10 | 11 | clean: 12 | rm -f *.o 13 | 14 | .PHONY: clean 15 | -------------------------------------------------------------------------------- /Switch/ext/ebtree/common/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/common/base64.h 3 | * Ascii to Base64 conversion as described in RFC1421. 4 | * 5 | * Copyright 2006-2010 Willy Tarreau 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU General Public License 9 | * as published by the Free Software Foundation; either version 10 | * 2 of the License, or (at your option) any later version. 11 | * 12 | */ 13 | 14 | #ifndef _COMMON_BASE64_H 15 | #define _COMMON_BASE64_H 16 | 17 | #include 18 | 19 | int a2base64(char *in, int ilen, char *out, int olen); 20 | int base64dec(const char *in, size_t ilen, char *out, size_t olen); 21 | const char *s30tob64(int in, char *out); 22 | int b64tos30(const char *in); 23 | 24 | extern const char base64tab[]; 25 | 26 | #endif /* _COMMON_BASE64_H */ 27 | -------------------------------------------------------------------------------- /Switch/ext/ebtree/compiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ebtree/compiler.h 3 | * This files contains some compiler-specific settings. 4 | * 5 | * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation, version 2.1 10 | * exclusively. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #include "common/compiler.h" 23 | 24 | -------------------------------------------------------------------------------- /Switch/ext/ebtree/ebtree/Makefile: -------------------------------------------------------------------------------- 1 | CC:=clang 2 | CFLAGS:=-Wno-address-of-packed-member -g3 -ggdb -Wall -Ofast 3 | OBJS:=eb32tree.o eb64tree.o ebimtree.o ebistree.o ebmbtree.o ebpttree.o ebsttree.o ebtree.o 4 | 5 | all: lib 6 | 7 | lib: $(OBJS) 8 | @rm -f libebtree.a 9 | ar rcs libtree.a $(OBJS) 10 | 11 | clean: 12 | rm -f *.o 13 | 14 | .PHONY: clean 15 | -------------------------------------------------------------------------------- /Switch/ext/ebtree/ebtree/common/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/common/base64.h 3 | * Ascii to Base64 conversion as described in RFC1421. 4 | * 5 | * Copyright 2006-2010 Willy Tarreau 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU General Public License 9 | * as published by the Free Software Foundation; either version 10 | * 2 of the License, or (at your option) any later version. 11 | * 12 | */ 13 | 14 | #ifndef _COMMON_BASE64_H 15 | #define _COMMON_BASE64_H 16 | 17 | #include 18 | 19 | int a2base64(char *in, int ilen, char *out, int olen); 20 | int base64dec(const char *in, size_t ilen, char *out, size_t olen); 21 | const char *s30tob64(int in, char *out); 22 | int b64tos30(const char *in); 23 | 24 | extern const char base64tab[]; 25 | 26 | #endif /* _COMMON_BASE64_H */ 27 | -------------------------------------------------------------------------------- /Switch/ext/ebtree/ebtree/compiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ebtree/compiler.h 3 | * This files contains some compiler-specific settings. 4 | * 5 | * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation, version 2.1 10 | * exclusively. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #include "common/compiler.h" 23 | 24 | -------------------------------------------------------------------------------- /Switch/ext/json/.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | - What is the issue you have? 8 | 9 | - Please describe the steps to reproduce the issue. Can you provide a small but working code example? 10 | 11 | - What is the expected behavior? 12 | 13 | - And what is the actual behavior instead? 14 | 15 | - Which compiler and operating system are you using? Is it a [supported compiler](https://github.com/nlohmann/json#supported-compilers)? 16 | 17 | - Did you use a released version of the library or the version from the `develop` branch? 18 | 19 | - If you experience a compilation error: can you [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests)? 20 | -------------------------------------------------------------------------------- /Switch/ext/json/.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | - Describe the feature in as much detail as possible. 8 | 9 | - Include sample usage where appropriate. 10 | -------------------------------------------------------------------------------- /Switch/ext/json/cmake/config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | if(NOT TARGET @PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@) 3 | include("${CMAKE_CURRENT_LIST_DIR}/@NLOHMANN_JSON_TARGETS_EXPORT_NAME@.cmake") 4 | if((NOT TARGET @NLOHMANN_JSON_TARGET_NAME@) AND 5 | (PACKAGE_FIND_VERSION VERSION_LESS 3.2.0)) 6 | add_library(@NLOHMANN_JSON_TARGET_NAME@ ALIAS @PROJECT_NAME@::@NLOHMANN_JSON_TARGET_NAME@) 7 | endif() 8 | endif() 9 | check_required_components("@PROJECT_NAME@") 10 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/avatars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/avatars.png -------------------------------------------------------------------------------- /Switch/ext/json/doc/css/mylayout.css: -------------------------------------------------------------------------------- 1 | /* hide lengthy template information */ 2 | .memtemplate, .memTemplParams { 3 | display: none; 4 | } 5 | 6 | /* allow compiler information to wrap */ 7 | /* https://css-tricks.com/snippets/css/make-pre-text-wrap/ */ 8 | pre.fragment { 9 | white-space: pre-wrap; /* css-3 */ 10 | white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 11 | white-space: -pre-wrap; /* Opera 4-6 */ 12 | white-space: -o-pre-wrap; /* Opera 7 */ 13 | word-wrap: break-word; /* Internet Explorer 5.5+ */ 14 | } 15 | 16 | td.paramname { 17 | vertical-align: top; 18 | } 19 | 20 | .ok_green { 21 | background-color: #89C35C; 22 | } 23 | 24 | .nok_throws { 25 | background-color: #ffa500; 26 | } 27 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/css/mylayout_docset.css: -------------------------------------------------------------------------------- 1 | .memtemplate { 2 | display: none; 3 | } 4 | 5 | .memTemplParams { 6 | display: none; 7 | } 8 | 9 | .navtab { 10 | display: none; 11 | } 12 | 13 | #top, .footer { 14 | display: none; 15 | } 16 | 17 | td.paramname { 18 | vertical-align: top; 19 | } 20 | 21 | .ok_green { 22 | background-color: #89C35C; 23 | } 24 | 25 | .nok_throws { 26 | background-color: #ffa500; 27 | } 28 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/README.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create a JSON object 10 | json j = 11 | { 12 | {"pi", 3.141}, 13 | {"happy", true}, 14 | {"name", "Niels"}, 15 | {"nothing", nullptr}, 16 | { 17 | "answer", { 18 | {"everything", 42} 19 | } 20 | }, 21 | {"list", {1, 0, 2}}, 22 | { 23 | "object", { 24 | {"currency", "USD"}, 25 | {"value", 42.99} 26 | } 27 | } 28 | }; 29 | 30 | // add new values 31 | j["new"]["key"]["value"] = {"another", "list"}; 32 | 33 | // count elements 34 | auto s = j.size(); 35 | j["size"] = s; 36 | 37 | // pretty print with indent of 4 spaces 38 | std::cout << std::setw(4) << j << '\n'; 39 | } 40 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/README.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/README.output: -------------------------------------------------------------------------------- 1 | { 2 | "answer": { 3 | "everything": 42 4 | }, 5 | "happy": true, 6 | "list": [ 7 | 1, 8 | 0, 9 | 2 10 | ], 11 | "name": "Niels", 12 | "new": { 13 | "key": { 14 | "value": [ 15 | "another", 16 | "list" 17 | ] 18 | } 19 | }, 20 | "nothing": null, 21 | "object": { 22 | "currency": "USD", 23 | "value": 42.99 24 | }, 25 | "pi": 3.141, 26 | "size": 8 27 | } 28 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON arrays 9 | json j_no_init_list = json::array(); 10 | json j_empty_init_list = json::array({}); 11 | json j_nonempty_init_list = json::array({1, 2, 3, 4}); 12 | json j_list_of_pairs = json::array({ {"one", 1}, {"two", 2} }); 13 | 14 | // serialize the JSON arrays 15 | std::cout << j_no_init_list << '\n'; 16 | std::cout << j_empty_init_list << '\n'; 17 | std::cout << j_nonempty_init_list << '\n'; 18 | std::cout << j_list_of_pairs << '\n'; 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/array.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/array.output: -------------------------------------------------------------------------------- 1 | [] 2 | [] 3 | [1,2,3,4] 4 | [["one",1],["two",2]] 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__object_t_key_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__object_t_key_type.output: -------------------------------------------------------------------------------- 1 | "il brutto" 2 | {"the bad":"il cattivo","the good":"il buono","the ugly":"il brutto"} 3 | [json.exception.type_error.304] cannot use at() with string 4 | [json.exception.out_of_range.403] key 'the fast' not found 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__object_t_key_type_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__object_t_key_type_const.output: -------------------------------------------------------------------------------- 1 | "il brutto" 2 | [json.exception.type_error.304] cannot use at() with string 3 | out of range 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__size_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__size_type.output: -------------------------------------------------------------------------------- 1 | "third" 2 | ["first","second","third","fourth"] 3 | [json.exception.type_error.304] cannot use at() with string 4 | [json.exception.out_of_range.401] array index 5 is out of range 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__size_type_const.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON array 9 | const json array = {"first", "2nd", "third", "fourth"}; 10 | 11 | // output element at index 2 (third element) 12 | std::cout << array.at(2) << '\n'; 13 | 14 | 15 | // exception type_error.304 16 | try 17 | { 18 | // use at() on a non-array type 19 | const json str = "I am a string"; 20 | std::cout << str.at(0) << '\n'; 21 | } 22 | catch (json::type_error& e) 23 | { 24 | std::cout << e.what() << '\n'; 25 | } 26 | 27 | // exception out_of_range.401 28 | try 29 | { 30 | // try to read beyond the array limit 31 | std::cout << array.at(5) << '\n'; 32 | } 33 | catch (json::out_of_range& e) 34 | { 35 | std::cout << e.what() << '\n'; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__size_type_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at__size_type_const.output: -------------------------------------------------------------------------------- 1 | "third" 2 | [json.exception.type_error.304] cannot use at() with string 3 | [json.exception.out_of_range.401] array index 5 is out of range 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at_json_pointer.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at_json_pointer.output: -------------------------------------------------------------------------------- 1 | 1 2 | "foo" 3 | [1,2] 4 | 2 5 | "bar" 6 | [1,21] 7 | [json.exception.parse_error.106] parse error: array index '01' must not begin with '0' 8 | [json.exception.parse_error.109] parse error: array index 'one' is not a number 9 | [json.exception.out_of_range.401] array index 4 is out of range 10 | [json.exception.out_of_range.402] array index '-' (2) is out of range 11 | [json.exception.out_of_range.403] key 'foo' not found 12 | [json.exception.out_of_range.404] unresolved reference token 'foo' 13 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at_json_pointer_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/at_json_pointer_const.output: -------------------------------------------------------------------------------- 1 | 1 2 | "foo" 3 | [1,2] 4 | 2 5 | [json.exception.parse_error.109] parse error: array index 'one' is not a number 6 | [json.exception.out_of_range.401] array index 4 is out of range 7 | [json.exception.out_of_range.402] array index '-' (2) is out of range 8 | [json.exception.out_of_range.403] key 'foo' not found 9 | [json.exception.out_of_range.404] unresolved reference token 'foo' 10 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/back.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/back.output: -------------------------------------------------------------------------------- 1 | true 2 | 17 3 | 23.42 4 | 2 5 | 16 6 | "Hello, world" 7 | [json.exception.invalid_iterator.214] cannot get value 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__CompatibleType.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__CompatibleType.output: -------------------------------------------------------------------------------- 1 | {"one":1,"two":2} 2 | {"one":1,"three":3,"two":2} 3 | {"one":1.2,"three":3.4,"two":2.3} 4 | {"one":true,"three":false,"two":true} 5 | {"one":true,"three":false,"two":true} 6 | 7 | ["one","two",3,4.5,false] 8 | [1,2,3,4] 9 | [10,9,8,7] 10 | [1.2,2.3,3.4,5.6] 11 | [true,true,false,true] 12 | [12345678909876,23456789098765,34567890987654,45678909876543] 13 | [1,2,3,4] 14 | ["four","one","three","two"] 15 | ["four","three","two","one"] 16 | ["four","one","one","two"] 17 | ["four","two","one","one"] 18 | 19 | "The quick brown fox jumps over the lazy dog." 20 | "The quick brown fox jumps over the lazy dog." 21 | "The quick brown fox jumps over the lazy dog." 22 | 23 | -42 24 | 17 25 | 17 26 | 42 27 | -23 28 | 1024 29 | -17 30 | 8 31 | 3.141592653589793 32 | null 33 | null 34 | 42.22999954223633 35 | null 36 | 23.42 37 | 38 | true 39 | false 40 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__InputIt_InputIt.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_array = {"alpha", "bravo", "charly", "delta", "easy"}; 10 | json j_number = 42; 11 | json j_object = {{"one", "eins"}, {"two", "zwei"}}; 12 | 13 | // create copies using iterators 14 | json j_array_range(j_array.begin() + 1, j_array.end() - 2); 15 | json j_number_range(j_number.begin(), j_number.end()); 16 | json j_object_range(j_object.begin(), j_object.find("two")); 17 | 18 | // serialize the values 19 | std::cout << j_array_range << '\n'; 20 | std::cout << j_number_range << '\n'; 21 | std::cout << j_object_range << '\n'; 22 | 23 | // example for an exception 24 | try 25 | { 26 | json j_invalid(j_number.begin() + 1, j_number.end()); 27 | } 28 | catch (json::invalid_iterator& e) 29 | { 30 | std::cout << e.what() << '\n'; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__InputIt_InputIt.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__InputIt_InputIt.output: -------------------------------------------------------------------------------- 1 | ["bravo","charly"] 2 | 42 3 | {"one":"eins"} 4 | [json.exception.invalid_iterator.204] iterators out of range 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__basic_json.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json j1 = {"one", "two", 3, 4.5, false}; 10 | 11 | // create a copy 12 | json j2(j1); 13 | 14 | // serialize the JSON array 15 | std::cout << j1 << " = " << j2 << '\n'; 16 | std::cout << std::boolalpha << (j1 == j2) << '\n'; 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__basic_json.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__basic_json.output: -------------------------------------------------------------------------------- 1 | ["one","two",3,4.5,false] = ["one","two",3,4.5,false] 2 | true 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__copyassignment.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json a = 23; 10 | json b = 42; 11 | 12 | // copy-assign a to b 13 | b = a; 14 | 15 | // serialize the JSON arrays 16 | std::cout << a << '\n'; 17 | std::cout << b << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__copyassignment.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__copyassignment.output: -------------------------------------------------------------------------------- 1 | 23 2 | 23 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__list_init_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_empty_init_list = json({}); 10 | json j_object = { {"one", 1}, {"two", 2} }; 11 | json j_array = {1, 2, 3, 4}; 12 | json j_nested_object = { {"one", {1}}, {"two", {1, 2}} }; 13 | json j_nested_array = { {{1}, "one"}, {{1, 2}, "two"} }; 14 | 15 | // serialize the JSON value 16 | std::cout << j_empty_init_list << '\n'; 17 | std::cout << j_object << '\n'; 18 | std::cout << j_array << '\n'; 19 | std::cout << j_nested_object << '\n'; 20 | std::cout << j_nested_array << '\n'; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__list_init_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__list_init_t.output: -------------------------------------------------------------------------------- 1 | {} 2 | {"one":1,"two":2} 3 | [1,2,3,4] 4 | {"one":[1],"two":[1,2]} 5 | [[[1],"one"],[[1,2],"two"]] 6 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__moveconstructor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON value 9 | json a = 23; 10 | 11 | // move contents of a to b 12 | json b(std::move(a)); 13 | 14 | // serialize the JSON arrays 15 | std::cout << a << '\n'; 16 | std::cout << b << '\n'; 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__moveconstructor.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__moveconstructor.output: -------------------------------------------------------------------------------- 1 | null 2 | 23 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__nullptr_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // implicitly create a JSON null value 9 | json j1; 10 | 11 | // explicitly create a JSON null value 12 | json j2(nullptr); 13 | 14 | // serialize the JSON null value 15 | std::cout << j1 << '\n' << j2 << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__nullptr_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__nullptr_t.output: -------------------------------------------------------------------------------- 1 | null 2 | null 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__size_type_basic_json.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array by creating copies of a JSON value 9 | json value = "Hello"; 10 | json array_0 = json(0, value); 11 | json array_1 = json(1, value); 12 | json array_5 = json(5, value); 13 | 14 | // serialize the JSON arrays 15 | std::cout << array_0 << '\n'; 16 | std::cout << array_1 << '\n'; 17 | std::cout << array_5 << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__size_type_basic_json.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__size_type_basic_json.output: -------------------------------------------------------------------------------- 1 | [] 2 | ["Hello"] 3 | ["Hello","Hello","Hello","Hello","Hello"] 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object with different entry types 9 | json j = 10 | { 11 | {"integer", 1}, 12 | {"floating", 42.23}, 13 | {"string", "hello world"}, 14 | {"boolean", true}, 15 | {"object", {{"key1", 1}, {"key2", 2}}}, 16 | {"array", {1, 2, 3}} 17 | }; 18 | 19 | // access existing values 20 | int v_integer = j.value("integer", 0); 21 | double v_floating = j.value("floating", 47.11); 22 | 23 | // access nonexisting values and rely on default value 24 | std::string v_string = j.value("nonexisting", "oops"); 25 | bool v_boolean = j.value("nonexisting", false); 26 | 27 | // output values 28 | std::cout << std::boolalpha << v_integer << " " << v_floating 29 | << " " << v_string << " " << v_boolean << "\n"; 30 | } 31 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value.output: -------------------------------------------------------------------------------- 1 | 1 42.23 oops false 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_ptr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object with different entry types 9 | json j = 10 | { 11 | {"integer", 1}, 12 | {"floating", 42.23}, 13 | {"string", "hello world"}, 14 | {"boolean", true}, 15 | {"object", {{"key1", 1}, {"key2", 2}}}, 16 | {"array", {1, 2, 3}} 17 | }; 18 | 19 | // access existing values 20 | int v_integer = j.value("/integer"_json_pointer, 0); 21 | double v_floating = j.value("/floating"_json_pointer, 47.11); 22 | 23 | // access nonexisting values and rely on default value 24 | std::string v_string = j.value("/nonexisting"_json_pointer, "oops"); 25 | bool v_boolean = j.value("/nonexisting"_json_pointer, false); 26 | 27 | // output values 28 | std::cout << std::boolalpha << v_integer << " " << v_floating 29 | << " " << v_string << " " << v_boolean << "\n"; 30 | } 31 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_ptr.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_ptr.output: -------------------------------------------------------------------------------- 1 | 1 42.23 oops false 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create the different JSON values with default values 9 | json j_null(json::value_t::null); 10 | json j_boolean(json::value_t::boolean); 11 | json j_number_integer(json::value_t::number_integer); 12 | json j_number_float(json::value_t::number_float); 13 | json j_object(json::value_t::object); 14 | json j_array(json::value_t::array); 15 | json j_string(json::value_t::string); 16 | 17 | // serialize the JSON values 18 | std::cout << j_null << '\n'; 19 | std::cout << j_boolean << '\n'; 20 | std::cout << j_number_integer << '\n'; 21 | std::cout << j_number_float << '\n'; 22 | std::cout << j_object << '\n'; 23 | std::cout << j_array << '\n'; 24 | std::cout << j_string << '\n'; 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/basic_json__value_t.output: -------------------------------------------------------------------------------- 1 | null 2 | false 3 | 0 4 | 0.0 5 | {} 6 | [] 7 | "" 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/begin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get am iterator to the first element 12 | json::iterator it = array.begin(); 13 | 14 | // serialize the element that the iterator points to 15 | std::cout << *it << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/begin.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/begin.output: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cbegin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | const json array = {1, 2, 3, 4, 5}; 10 | 11 | // get am iterator to the first element 12 | json::const_iterator it = array.cbegin(); 13 | 14 | // serialize the element that the iterator points to 15 | std::cout << *it << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cbegin.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cbegin.output: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cend.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get am iterator to one past the last element 12 | json::const_iterator it = array.cend(); 13 | 14 | // decrement the iterator to point to the last element 15 | --it; 16 | 17 | // serialize the element that the iterator points to 18 | std::cout << *it << '\n'; 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cend.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/cend.output: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/clear.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_float = 23.42; 13 | json j_object = {{"one", 1}, {"two", 2}}; 14 | json j_array = {1, 2, 4, 8, 16}; 15 | json j_string = "Hello, world"; 16 | 17 | // call clear() 18 | j_null.clear(); 19 | j_boolean.clear(); 20 | j_number_integer.clear(); 21 | j_number_float.clear(); 22 | j_object.clear(); 23 | j_array.clear(); 24 | j_string.clear(); 25 | 26 | // serialize the cleared values() 27 | std::cout << j_null << '\n'; 28 | std::cout << j_boolean << '\n'; 29 | std::cout << j_number_integer << '\n'; 30 | std::cout << j_number_float << '\n'; 31 | std::cout << j_object << '\n'; 32 | std::cout << j_array << '\n'; 33 | std::cout << j_string << '\n'; 34 | } 35 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/clear.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/clear.output: -------------------------------------------------------------------------------- 1 | null 2 | false 3 | 0 4 | 0.0 5 | {} 6 | [] 7 | "" 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/count.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object 9 | json j_object = {{"one", 1}, {"two", 2}}; 10 | 11 | // call find 12 | auto count_two = j_object.count("two"); 13 | auto count_three = j_object.count("three"); 14 | 15 | // print values 16 | std::cout << "number of elements with key \"two\": " << count_two << '\n'; 17 | std::cout << "number of elements with key \"three\": " << count_three << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/count.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/count.output: -------------------------------------------------------------------------------- 1 | number of elements with key "two": 1 2 | number of elements with key "three": 0 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crbegin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get an iterator to the reverse-beginning 12 | json::const_reverse_iterator it = array.crbegin(); 13 | 14 | // serialize the element that the iterator points to 15 | std::cout << *it << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crbegin.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crbegin.output: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crend.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get an iterator to the reverse-end 12 | json::const_reverse_iterator it = array.crend(); 13 | 14 | // increment the iterator to point to the first element 15 | --it; 16 | 17 | // serialize the element that the iterator points to 18 | std::cout << *it << '\n'; 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crend.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/crend.output: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/diff.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // the source document 10 | json source = R"( 11 | { 12 | "baz": "qux", 13 | "foo": "bar" 14 | } 15 | )"_json; 16 | 17 | // the target document 18 | json target = R"( 19 | { 20 | "baz": "boo", 21 | "hello": [ 22 | "world" 23 | ] 24 | } 25 | )"_json; 26 | 27 | // create the patch 28 | json patch = json::diff(source, target); 29 | 30 | // roundtrip 31 | json patched_source = source.patch(patch); 32 | 33 | // output patch and roundtrip result 34 | std::cout << std::setw(4) << patch << "\n\n" 35 | << std::setw(4) << patched_source << std::endl; 36 | } 37 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/diff.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/diff.output: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "op": "replace", 4 | "path": "/baz", 5 | "value": "boo" 6 | }, 7 | { 8 | "op": "remove", 9 | "path": "/foo" 10 | }, 11 | { 12 | "op": "add", 13 | "path": "/hello", 14 | "value": [ 15 | "world" 16 | ] 17 | } 18 | ] 19 | 20 | { 21 | "baz": "boo", 22 | "hello": [ 23 | "world" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/dump.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/dump.output: -------------------------------------------------------------------------------- 1 | objects: 2 | {"one":1,"two":2} 3 | 4 | {"one":1,"two":2} 5 | 6 | { 7 | "one": 1, 8 | "two": 2 9 | } 10 | 11 | { 12 | "one": 1, 13 | "two": 2 14 | } 15 | 16 | { 17 | "one": 1, 18 | "two": 2 19 | } 20 | 21 | arrays: 22 | [1,2,4,8,16] 23 | 24 | [1,2,4,8,16] 25 | 26 | [ 27 | 1, 28 | 2, 29 | 4, 30 | 8, 31 | 16 32 | ] 33 | 34 | [ 35 | 1, 36 | 2, 37 | 4, 38 | 8, 39 | 16 40 | ] 41 | 42 | [ 43 | 1, 44 | 2, 45 | 4, 46 | 8, 47 | 16 48 | ] 49 | 50 | strings: 51 | "Hellö 😀!" 52 | "Hell\u00f6 \ud83d\ude00!" 53 | [json.exception.type_error.316] invalid UTF-8 byte at index 3: 0xC0 54 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json object = {{"one", 1}, {"two", 2}}; 10 | json null; 11 | 12 | // print values 13 | std::cout << object << '\n'; 14 | std::cout << null << '\n'; 15 | 16 | // add values 17 | auto res1 = object.emplace("three", 3); 18 | null.emplace("A", "a"); 19 | null.emplace("B", "b"); 20 | 21 | // the following call will not add an object, because there is already 22 | // a value stored at key "B" 23 | auto res2 = null.emplace("B", "c"); 24 | 25 | // print values 26 | std::cout << object << '\n'; 27 | std::cout << *res1.first << " " << std::boolalpha << res1.second << '\n'; 28 | 29 | std::cout << null << '\n'; 30 | std::cout << *res2.first << " " << std::boolalpha << res2.second << '\n'; 31 | } 32 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace.output: -------------------------------------------------------------------------------- 1 | {"one":1,"two":2} 2 | null 3 | {"one":1,"three":3,"two":2} 4 | 3 true 5 | {"A":"a","B":"b"} 6 | "b" false 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace_back.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json array = {1, 2, 3, 4, 5}; 10 | json null; 11 | 12 | // print values 13 | std::cout << array << '\n'; 14 | std::cout << null << '\n'; 15 | 16 | // add values 17 | array.emplace_back(6); 18 | null.emplace_back("first"); 19 | null.emplace_back(3, "second"); 20 | 21 | // print values 22 | std::cout << array << '\n'; 23 | std::cout << null << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace_back.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/emplace_back.output: -------------------------------------------------------------------------------- 1 | [1,2,3,4,5] 2 | null 3 | [1,2,3,4,5,6] 4 | ["first",["second","second","second"]] 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/empty.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/empty.output: -------------------------------------------------------------------------------- 1 | true 2 | false 3 | false 4 | false 5 | false 6 | true 7 | false 8 | true 9 | false 10 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/end.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get am iterator to one past the last element 12 | json::iterator it = array.end(); 13 | 14 | // decrement the iterator to point to the last element 15 | --it; 16 | 17 | // serialize the element that the iterator points to 18 | std::cout << *it << '\n'; 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/end.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/end.output: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__IteratorType.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_boolean = true; 10 | json j_number_integer = 17; 11 | json j_number_float = 23.42; 12 | json j_object = {{"one", 1}, {"two", 2}}; 13 | json j_array = {1, 2, 4, 8, 16}; 14 | json j_string = "Hello, world"; 15 | 16 | // call erase 17 | j_boolean.erase(j_boolean.begin()); 18 | j_number_integer.erase(j_number_integer.begin()); 19 | j_number_float.erase(j_number_float.begin()); 20 | j_object.erase(j_object.find("two")); 21 | j_array.erase(j_array.begin() + 2); 22 | j_string.erase(j_string.begin()); 23 | 24 | // print values 25 | std::cout << j_boolean << '\n'; 26 | std::cout << j_number_integer << '\n'; 27 | std::cout << j_number_float << '\n'; 28 | std::cout << j_object << '\n'; 29 | std::cout << j_array << '\n'; 30 | std::cout << j_string << '\n'; 31 | } 32 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__IteratorType.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__IteratorType.output: -------------------------------------------------------------------------------- 1 | null 2 | null 3 | null 4 | {"one":1} 5 | [1,2,8,16] 6 | null 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__IteratorType_IteratorType.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__IteratorType_IteratorType.output: -------------------------------------------------------------------------------- 1 | null 2 | null 3 | null 4 | {"one":1} 5 | [1,8,16] 6 | null 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__key_type.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object 9 | json j_object = {{"one", 1}, {"two", 2}}; 10 | 11 | // call erase 12 | auto count_one = j_object.erase("one"); 13 | auto count_three = j_object.erase("three"); 14 | 15 | // print values 16 | std::cout << j_object << '\n'; 17 | std::cout << count_one << " " << count_three << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__key_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__key_type.output: -------------------------------------------------------------------------------- 1 | {"two":2} 2 | 1 0 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__size_type.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json j_array = {0, 1, 2, 3, 4, 5}; 10 | 11 | // call erase 12 | j_array.erase(2); 13 | 14 | // print values 15 | std::cout << j_array << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__size_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/erase__size_type.output: -------------------------------------------------------------------------------- 1 | [0,1,3,4,5] 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/exception.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // calling at() for a non-existing key 11 | json j = {{"foo", "bar"}}; 12 | json k = j.at("non-existing"); 13 | } 14 | catch (json::exception& e) 15 | { 16 | // output exception information 17 | std::cout << "message: " << e.what() << '\n' 18 | << "exception id: " << e.id << std::endl; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/exception.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/exception.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.out_of_range.403] key 'non-existing' not found 2 | exception id: 403 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/find__key_type.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object 9 | json j_object = {{"one", 1}, {"two", 2}}; 10 | 11 | // call find 12 | auto it_two = j_object.find("two"); 13 | auto it_three = j_object.find("three"); 14 | 15 | // print values 16 | std::cout << std::boolalpha; 17 | std::cout << "\"two\" was found: " << (it_two != j_object.end()) << '\n'; 18 | std::cout << "value at key \"two\": " << *it_two << '\n'; 19 | std::cout << "\"three\" was found: " << (it_three != j_object.end()) << '\n'; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/find__key_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/find__key_type.output: -------------------------------------------------------------------------------- 1 | "two" was found: true 2 | value at key "two": 2 3 | "three" was found: false 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/flatten.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create JSON value 10 | json j = 11 | { 12 | {"pi", 3.141}, 13 | {"happy", true}, 14 | {"name", "Niels"}, 15 | {"nothing", nullptr}, 16 | { 17 | "answer", { 18 | {"everything", 42} 19 | } 20 | }, 21 | {"list", {1, 0, 2}}, 22 | { 23 | "object", { 24 | {"currency", "USD"}, 25 | {"value", 42.99} 26 | } 27 | } 28 | }; 29 | 30 | // call flatten() 31 | std::cout << std::setw(4) << j.flatten() << '\n'; 32 | } 33 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/flatten.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/flatten.output: -------------------------------------------------------------------------------- 1 | { 2 | "/answer/everything": 42, 3 | "/happy": true, 4 | "/list/0": 1, 5 | "/list/1": 0, 6 | "/list/2": 2, 7 | "/name": "Niels", 8 | "/nothing": null, 9 | "/object/currency": "USD", 10 | "/object/value": 42.99, 11 | "/pi": 3.141 12 | } 13 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_cbor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create byte vector 10 | std::vector v = {0xa2, 0x67, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 11 | 0x74, 0xf5, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 12 | 0x61, 0x00 13 | }; 14 | 15 | // deserialize it with CBOR 16 | json j = json::from_cbor(v); 17 | 18 | // print the deserialized JSON value 19 | std::cout << std::setw(2) << j << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_cbor.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_cbor.output: -------------------------------------------------------------------------------- 1 | { 2 | "compact": true, 3 | "schema": 0 4 | } 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_msgpack.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create byte vector 10 | std::vector v = {0x82, 0xa7, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 11 | 0x74, 0xc3, 0xa6, 0x73, 0x63, 0x68, 0x65, 0x6d, 12 | 0x61, 0x00 13 | }; 14 | 15 | // deserialize it with MessagePack 16 | json j = json::from_msgpack(v); 17 | 18 | // print the deserialized JSON value 19 | std::cout << std::setw(2) << j << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_msgpack.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_msgpack.output: -------------------------------------------------------------------------------- 1 | { 2 | "compact": true, 3 | "schema": 0 4 | } 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_ubjson.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create byte vector 10 | std::vector v = {0x7B, 0x69, 0x07, 0x63, 0x6F, 0x6D, 0x70, 0x61, 11 | 0x63, 0x74, 0x54, 0x69, 0x06, 0x73, 0x63, 0x68, 12 | 0x65, 0x6D, 0x61, 0x69, 0x00, 0x7D 13 | }; 14 | 15 | // deserialize it with UBJSON 16 | json j = json::from_ubjson(v); 17 | 18 | // print the deserialized JSON value 19 | std::cout << std::setw(2) << j << std::endl; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_ubjson.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/from_ubjson.output: -------------------------------------------------------------------------------- 1 | { 2 | "compact": true, 3 | "schema": 0 4 | } 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/front.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/front.output: -------------------------------------------------------------------------------- 1 | true 2 | 17 3 | 23.42 4 | 1 5 | 1 6 | "Hello, world" 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get__PointerType.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON number 9 | json value = 17; 10 | 11 | // explicitly getting pointers 12 | auto p1 = value.get(); 13 | auto p2 = value.get(); 14 | auto p3 = value.get(); 15 | auto p4 = value.get(); 16 | auto p5 = value.get(); 17 | 18 | // print the pointees 19 | std::cout << *p1 << ' ' << *p2 << ' ' << *p3 << ' ' << *p4 << '\n'; 20 | std::cout << std::boolalpha << (p5 == nullptr) << '\n'; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get__PointerType.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get__PointerType.output: -------------------------------------------------------------------------------- 1 | 17 17 17 17 2 | true 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get__ValueType_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get__ValueType_const.output: -------------------------------------------------------------------------------- 1 | 1 2 | 42 42 3 | 17.23 17 4 | Hello, world! 5 | 1 2 3 4 5 6 | 7 | string: "Hello, world!" 8 | number: {"floating-point":17.23,"integer":42} 9 | null: null 10 | boolean: true 11 | array: [1,2,3,4,5] 12 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ptr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON number 9 | json value = 17; 10 | 11 | // explicitly getting pointers 12 | auto p1 = value.get_ptr(); 13 | auto p2 = value.get_ptr(); 14 | auto p3 = value.get_ptr(); 15 | auto p4 = value.get_ptr(); 16 | auto p5 = value.get_ptr(); 17 | 18 | // print the pointees 19 | std::cout << *p1 << ' ' << *p2 << ' ' << *p3 << ' ' << *p4 << '\n'; 20 | std::cout << std::boolalpha << (p5 == nullptr) << '\n'; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ptr.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ptr.output: -------------------------------------------------------------------------------- 1 | 17 17 17 17 2 | true 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ref.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON number 9 | json value = 17; 10 | 11 | // explicitly getting references 12 | auto r1 = value.get_ref(); 13 | auto r2 = value.get_ref(); 14 | 15 | // print the values 16 | std::cout << r1 << ' ' << r2 << '\n'; 17 | 18 | // incompatible type throws exception 19 | try 20 | { 21 | auto r3 = value.get_ref(); 22 | } 23 | catch (json::type_error& ex) 24 | { 25 | std::cout << ex.what() << '\n'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ref.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/get_ref.output: -------------------------------------------------------------------------------- 1 | 17 17 2 | [json.exception.type_error.303] incompatible ReferenceType for get_ref, actual type is number 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json v = {1, 2, 3, 4}; 10 | 11 | // insert number 10 before number 3 12 | auto new_pos = v.insert(v.begin() + 2, 10); 13 | 14 | // output new array and result of insert call 15 | std::cout << *new_pos << '\n'; 16 | std::cout << v << '\n'; 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert.output: -------------------------------------------------------------------------------- 1 | 10 2 | [1,2,10,3,4] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__count.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json v = {1, 2, 3, 4}; 10 | 11 | // insert number 7 copies of number 7 before number 3 12 | auto new_pos = v.insert(v.begin() + 2, 7, 7); 13 | 14 | // output new array and result of insert call 15 | std::cout << *new_pos << '\n'; 16 | std::cout << v << '\n'; 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__count.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__count.output: -------------------------------------------------------------------------------- 1 | 7 2 | [1,2,7,7,7,7,7,7,7,3,4] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__ilist.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json v = {1, 2, 3, 4}; 10 | 11 | // insert range from v2 before the end of array v 12 | auto new_pos = v.insert(v.end(), {7, 8, 9}); 13 | 14 | // output new array and result of insert call 15 | std::cout << *new_pos << '\n'; 16 | std::cout << v << '\n'; 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__ilist.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__ilist.output: -------------------------------------------------------------------------------- 1 | 7 2 | [1,2,3,4,7,8,9] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json v = {1, 2, 3, 4}; 10 | 11 | // create a JSON array to copy values from 12 | json v2 = {"one", "two", "three", "four"}; 13 | 14 | // insert range from v2 before the end of array v 15 | auto new_pos = v.insert(v.end(), v2.begin(), v2.end()); 16 | 17 | // output new array and result of insert call 18 | std::cout << *new_pos << '\n'; 19 | std::cout << v << '\n'; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range.output: -------------------------------------------------------------------------------- 1 | "one" 2 | [1,2,3,4,"one","two","three","four"] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range_object.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create two JSON objects 9 | json j1 = {{"one", "eins"}, {"two", "zwei"}}; 10 | json j2 = {{"eleven", "elf"}, {"seventeen", "siebzehn"}}; 11 | 12 | // output objects 13 | std::cout << j1 << '\n'; 14 | std::cout << j2 << '\n'; 15 | 16 | // insert range from j2 to j1 17 | j1.insert(j2.begin(), j2.end()); 18 | 19 | // output result of insert call 20 | std::cout << j1 << '\n'; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range_object.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/insert__range_object.output: -------------------------------------------------------------------------------- 1 | {"one":"eins","two":"zwei"} 2 | {"eleven":"elf","seventeen":"siebzehn"} 3 | {"eleven":"elf","one":"eins","seventeen":"siebzehn","two":"zwei"} 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/invalid_iterator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // calling iterator::key() on non-object iterator 11 | json j = "string"; 12 | json::iterator it = j.begin(); 13 | auto k = it.key(); 14 | } 15 | catch (json::invalid_iterator& e) 16 | { 17 | // output exception information 18 | std::cout << "message: " << e.what() << '\n' 19 | << "exception id: " << e.id << std::endl; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/invalid_iterator.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/invalid_iterator.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.invalid_iterator.207] cannot use key() for non-object iterators 2 | exception id: 207 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_unsigned_integer = 12345678987654321u; 13 | json j_number_float = 23.42; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_array() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_array() << '\n'; 21 | std::cout << j_boolean.is_array() << '\n'; 22 | std::cout << j_number_integer.is_array() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_array() << '\n'; 24 | std::cout << j_number_float.is_array() << '\n'; 25 | std::cout << j_object.is_array() << '\n'; 26 | std::cout << j_array.is_array() << '\n'; 27 | std::cout << j_string.is_array() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_array.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_array.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | false 7 | true 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_boolean.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_unsigned_integer = 12345678987654321u; 13 | json j_number_float = 23.42; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_boolean() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_boolean() << '\n'; 21 | std::cout << j_boolean.is_boolean() << '\n'; 22 | std::cout << j_number_integer.is_boolean() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_boolean() << '\n'; 24 | std::cout << j_number_float.is_boolean() << '\n'; 25 | std::cout << j_object.is_boolean() << '\n'; 26 | std::cout << j_array.is_boolean() << '\n'; 27 | std::cout << j_string.is_boolean() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_boolean.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_boolean.output: -------------------------------------------------------------------------------- 1 | false 2 | true 3 | false 4 | false 5 | false 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_discarded.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_discarded.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_null.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_unsigned_integer = 12345678987654321u; 13 | json j_number_float = 23.42; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_null() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_null() << '\n'; 21 | std::cout << j_boolean.is_null() << '\n'; 22 | std::cout << j_number_integer.is_null() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_null() << '\n'; 24 | std::cout << j_number_float.is_null() << '\n'; 25 | std::cout << j_object.is_null() << '\n'; 26 | std::cout << j_array.is_null() << '\n'; 27 | std::cout << j_string.is_null() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_null.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_null.output: -------------------------------------------------------------------------------- 1 | true 2 | false 3 | false 4 | false 5 | false 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_unsigned_integer = 12345678987654321u; 13 | json j_number_float = 23.42; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_number() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_number() << '\n'; 21 | std::cout << j_boolean.is_number() << '\n'; 22 | std::cout << j_number_integer.is_number() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_number() << '\n'; 24 | std::cout << j_number_float.is_number() << '\n'; 25 | std::cout << j_object.is_number() << '\n'; 26 | std::cout << j_array.is_number() << '\n'; 27 | std::cout << j_string.is_number() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | true 4 | true 5 | true 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_float.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_float.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | true 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_integer.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_integer.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | true 4 | true 5 | false 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_unsigned.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_number_unsigned.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | true 5 | false 6 | false 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_object.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_float = 23.42; 13 | json j_number_unsigned_integer = 12345678987654321u; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_object() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_object() << '\n'; 21 | std::cout << j_boolean.is_object() << '\n'; 22 | std::cout << j_number_integer.is_object() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_object() << '\n'; 24 | std::cout << j_number_float.is_object() << '\n'; 25 | std::cout << j_object.is_object() << '\n'; 26 | std::cout << j_array.is_object() << '\n'; 27 | std::cout << j_string.is_object() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_object.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_object.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | true 7 | false 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_primitive.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_primitive.output: -------------------------------------------------------------------------------- 1 | true 2 | true 3 | true 4 | true 5 | true 6 | false 7 | false 8 | true 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_string.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_float = 23.42; 13 | json j_number_unsigned_integer = 12345678987654321u; 14 | json j_object = {{"one", 1}, {"two", 2}}; 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_string = "Hello, world"; 17 | 18 | // call is_string() 19 | std::cout << std::boolalpha; 20 | std::cout << j_null.is_string() << '\n'; 21 | std::cout << j_boolean.is_string() << '\n'; 22 | std::cout << j_number_integer.is_string() << '\n'; 23 | std::cout << j_number_unsigned_integer.is_string() << '\n'; 24 | std::cout << j_number_float.is_string() << '\n'; 25 | std::cout << j_object.is_string() << '\n'; 26 | std::cout << j_array.is_string() << '\n'; 27 | std::cout << j_string.is_string() << '\n'; 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_string.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_string.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | false 7 | false 8 | true 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_structured.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/is_structured.output: -------------------------------------------------------------------------------- 1 | false 2 | false 3 | false 4 | false 5 | false 6 | true 7 | true 8 | false 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/items.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_object = {{"one", 1}, {"two", 2}}; 10 | json j_array = {1, 2, 4, 8, 16}; 11 | 12 | // example for an object 13 | for (auto& x : j_object.items()) 14 | { 15 | std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; 16 | } 17 | 18 | // example for an array 19 | for (auto& x : j_array.items()) 20 | { 21 | std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/items.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/items.output: -------------------------------------------------------------------------------- 1 | key: one, value: 1 2 | key: two, value: 2 3 | key: 0, value: 1 4 | key: 1, value: 2 5 | key: 2, value: 4 6 | key: 3, value: 8 7 | key: 4, value: 16 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/iterator_wrapper.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_object = {{"one", 1}, {"two", 2}}; 10 | json j_array = {1, 2, 4, 8, 16}; 11 | 12 | // example for an object 13 | for (auto& x : json::iterator_wrapper(j_object)) 14 | { 15 | std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; 16 | } 17 | 18 | // example for an array 19 | for (auto& x : json::iterator_wrapper(j_array)) 20 | { 21 | std::cout << "key: " << x.key() << ", value: " << x.value() << '\n'; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/iterator_wrapper.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/iterator_wrapper.output: -------------------------------------------------------------------------------- 1 | key: one, value: 1 2 | key: two, value: 2 3 | key: 0, value: 1 4 | key: 1, value: 2 5 | key: 2, value: 4 6 | key: 3, value: 8 7 | key: 4, value: 16 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/json_pointer.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/json_pointer.output: -------------------------------------------------------------------------------- 1 | [json.exception.parse_error.107] parse error at 1: JSON pointer must be empty or begin with '/' - was: 'foo' 2 | [json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1' 3 | [json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1' 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/json_pointer__to_string.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/json_pointer__to_string.output: -------------------------------------------------------------------------------- 1 | 2 | /foo 3 | /foo/0 4 | / 5 | /a~1b 6 | /c%d 7 | /e^f 8 | /g|h 9 | /i\j 10 | /k"l 11 | / 12 | /m~0n 13 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/max_size.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_float = 23.42; 13 | json j_object = {{"one", 1}, {"two", 2}}; 14 | json j_array = {1, 2, 4, 8, 16}; 15 | json j_string = "Hello, world"; 16 | 17 | // call max_size() 18 | std::cout << j_null.max_size() << '\n'; 19 | std::cout << j_boolean.max_size() << '\n'; 20 | std::cout << j_number_integer.max_size() << '\n'; 21 | std::cout << j_number_float.max_size() << '\n'; 22 | std::cout << j_object.max_size() << '\n'; 23 | std::cout << j_array.max_size() << '\n'; 24 | std::cout << j_string.max_size() << '\n'; 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/max_size.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/max_size.output: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | 1 4 | 1 5 | 256204778801521550 6 | 1152921504606846975 7 | 1 8 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/merge_patch.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/merge_patch.output: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "givenName": "John" 4 | }, 5 | "content": "This will be unchanged", 6 | "phoneNumber": "+01-123-456-7890", 7 | "tags": [ 8 | "example" 9 | ], 10 | "title": "Hello!" 11 | } 12 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/meta.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // call meta() 10 | std::cout << std::setw(4) << json::meta() << '\n'; 11 | } 12 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/meta.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/meta.output: -------------------------------------------------------------------------------- 1 | { 2 | "compiler": { 3 | "c++": "201103", 4 | "family": "clang", 5 | "version": "9.1.0 (clang-902.0.39.2)" 6 | }, 7 | "copyright": "(C) 2013-2017 Niels Lohmann", 8 | "name": "JSON for Modern C++", 9 | "platform": "apple", 10 | "url": "https://github.com/nlohmann/json", 11 | "version": { 12 | "major": 3, 13 | "minor": 2, 14 | "patch": 0, 15 | "string": "3.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/object.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON objects 9 | json j_no_init_list = json::object(); 10 | json j_empty_init_list = json::object({}); 11 | json j_list_of_pairs = json::object({ {"one", 1}, {"two", 2} }); 12 | 13 | // serialize the JSON objects 14 | std::cout << j_no_init_list << '\n'; 15 | std::cout << j_empty_init_list << '\n'; 16 | std::cout << j_list_of_pairs << '\n'; 17 | 18 | // example for an exception 19 | try 20 | { 21 | // can only create an object from a list of pairs 22 | json j_invalid_object = json::object({{ "one", 1, 2 }}); 23 | } 24 | catch (json::type_error& e) 25 | { 26 | std::cout << e.what() << '\n'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/object.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/object.output: -------------------------------------------------------------------------------- 1 | {} 2 | {} 3 | {"one":1,"two":2} 4 | [json.exception.type_error.301] cannot create object from initializer list 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__ValueType.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__ValueType.output: -------------------------------------------------------------------------------- 1 | 1 2 | 42 42 3 | 17.23 17 4 | Hello, world! 5 | 1 2 3 4 5 6 | 7 | string: "Hello, world!" 8 | number: {"floating-point":17.23,"integer":42} 9 | null: null 10 | boolean: true 11 | array: [1,2,3,4,5] 12 | [json.exception.type_error.302] type must be boolean, but is string 13 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.000000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " == " << array_2 << " " << (array_1 == array_2) << '\n'; 21 | std::cout << object_1 << " == " << object_2 << " " << (object_1 == object_2) << '\n'; 22 | std::cout << number_1 << " == " << number_2 << " " << (number_1 == number_2) << '\n'; 23 | std::cout << string_1 << " == " << string_2 << " " << (string_1 == string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal.output: -------------------------------------------------------------------------------- 1 | [1,2,3] == [1,2,4] false 2 | {"A":"a","B":"b"} == {"A":"a","B":"b"} true 3 | 17 == 17.0 true 4 | "foo" == "bar" false 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal__nullptr_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array = {1, 2, 3}; 10 | json object = {{"A", "a"}, {"B", "b"}}; 11 | json number = 17; 12 | json string = "foo"; 13 | json null; 14 | 15 | // output values and comparisons 16 | std::cout << std::boolalpha; 17 | std::cout << array << " == nullptr " << (array == nullptr) << '\n'; 18 | std::cout << object << " == nullptr " << (object == nullptr) << '\n'; 19 | std::cout << number << " == nullptr " << (number == nullptr) << '\n'; 20 | std::cout << string << " == nullptr " << (string == nullptr) << '\n'; 21 | std::cout << null << " == nullptr " << (null == nullptr) << '\n'; 22 | } 23 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal__nullptr_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__equal__nullptr_t.output: -------------------------------------------------------------------------------- 1 | [1,2,3] == nullptr false 2 | {"A":"a","B":"b"} == nullptr false 3 | 17 == nullptr false 4 | "foo" == nullptr false 5 | null == nullptr true 6 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greater.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.0000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " > " << array_2 << " " << (array_1 > array_2) << '\n'; 21 | std::cout << object_1 << " > " << object_2 << " " << (object_1 > object_2) << '\n'; 22 | std::cout << number_1 << " > " << number_2 << " " << (number_1 > number_2) << '\n'; 23 | std::cout << string_1 << " > " << string_2 << " " << (string_1 > string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greater.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greater.output: -------------------------------------------------------------------------------- 1 | [1,2,3] > [1,2,4] false 2 | {"A":"a","B":"b"} > {"A":"a","B":"b"} false 3 | 17 > 17.0000000000001 false 4 | "foo" > "bar" true 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greaterequal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.0000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " >= " << array_2 << " " << (array_1 >= array_2) << '\n'; 21 | std::cout << object_1 << " >= " << object_2 << " " << (object_1 >= object_2) << '\n'; 22 | std::cout << number_1 << " >= " << number_2 << " " << (number_1 >= number_2) << '\n'; 23 | std::cout << string_1 << " >= " << string_2 << " " << (string_1 >= string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greaterequal.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__greaterequal.output: -------------------------------------------------------------------------------- 1 | [1,2,3] >= [1,2,4] false 2 | {"A":"a","B":"b"} >= {"A":"a","B":"b"} true 3 | 17 >= 17.0000000000001 false 4 | "foo" >= "bar" true 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__less.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.0000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " == " << array_2 << " " << (array_1 < array_2) << '\n'; 21 | std::cout << object_1 << " == " << object_2 << " " << (object_1 < object_2) << '\n'; 22 | std::cout << number_1 << " == " << number_2 << " " << (number_1 < number_2) << '\n'; 23 | std::cout << string_1 << " == " << string_2 << " " << (string_1 < string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__less.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__less.output: -------------------------------------------------------------------------------- 1 | [1,2,3] == [1,2,4] true 2 | {"A":"a","B":"b"} == {"A":"a","B":"b"} false 3 | 17 == 17.0000000000001 true 4 | "foo" == "bar" false 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__lessequal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.0000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " <= " << array_2 << " " << (array_1 <= array_2) << '\n'; 21 | std::cout << object_1 << " <= " << object_2 << " " << (object_1 <= object_2) << '\n'; 22 | std::cout << number_1 << " <= " << number_2 << " " << (number_1 <= number_2) << '\n'; 23 | std::cout << string_1 << " <= " << string_2 << " " << (string_1 <= string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__lessequal.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__lessequal.output: -------------------------------------------------------------------------------- 1 | [1,2,3] <= [1,2,4] true 2 | {"A":"a","B":"b"} <= {"A":"a","B":"b"} true 3 | 17 <= 17.0000000000001 true 4 | "foo" <= "bar" false 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array_1 = {1, 2, 3}; 10 | json array_2 = {1, 2, 4}; 11 | json object_1 = {{"A", "a"}, {"B", "b"}}; 12 | json object_2 = {{"B", "b"}, {"A", "a"}}; 13 | json number_1 = 17; 14 | json number_2 = 17.000000000000001L; 15 | json string_1 = "foo"; 16 | json string_2 = "bar"; 17 | 18 | // output values and comparisons 19 | std::cout << std::boolalpha; 20 | std::cout << array_1 << " != " << array_2 << " " << (array_1 != array_2) << '\n'; 21 | std::cout << object_1 << " != " << object_2 << " " << (object_1 != object_2) << '\n'; 22 | std::cout << number_1 << " != " << number_2 << " " << (number_1 != number_2) << '\n'; 23 | std::cout << string_1 << " != " << string_2 << " " << (string_1 != string_2) << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal.output: -------------------------------------------------------------------------------- 1 | [1,2,3] != [1,2,4] true 2 | {"A":"a","B":"b"} != {"A":"a","B":"b"} false 3 | 17 != 17.0 false 4 | "foo" != "bar" true 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal__nullptr_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create several JSON values 9 | json array = {1, 2, 3}; 10 | json object = {{"A", "a"}, {"B", "b"}}; 11 | json number = 17; 12 | json string = "foo"; 13 | json null; 14 | 15 | // output values and comparisons 16 | std::cout << std::boolalpha; 17 | std::cout << array << " != nullptr " << (array != nullptr) << '\n'; 18 | std::cout << object << " != nullptr " << (object != nullptr) << '\n'; 19 | std::cout << number << " != nullptr " << (number != nullptr) << '\n'; 20 | std::cout << string << " != nullptr " << (string != nullptr) << '\n'; 21 | std::cout << null << " != nullptr " << (null != nullptr) << '\n'; 22 | } 23 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal__nullptr_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__notequal__nullptr_t.output: -------------------------------------------------------------------------------- 1 | [1,2,3] != nullptr true 2 | {"A":"a","B":"b"} != nullptr true 3 | 17 != nullptr true 4 | "foo" != nullptr true 5 | null != nullptr false 6 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__value_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator__value_t.output: -------------------------------------------------------------------------------- 1 | true 2 | true 3 | true 4 | true 5 | true 6 | true 7 | true 8 | true 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_deserialize.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using json = nlohmann::json; 7 | 8 | int main() 9 | { 10 | // create stream with serialized JSON 11 | std::stringstream ss; 12 | ss << R"({ 13 | "number": 23, 14 | "string": "Hello, world!", 15 | "array": [1, 2, 3, 4, 5], 16 | "boolean": false, 17 | "null": null 18 | })"; 19 | 20 | // create JSON value and read the serialization from the stream 21 | json j; 22 | ss >> j; 23 | 24 | // serialize JSON 25 | std::cout << std::setw(2) << j << '\n'; 26 | } 27 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_deserialize.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_deserialize.output: -------------------------------------------------------------------------------- 1 | { 2 | "array": [ 3 | 1, 4 | 2, 5 | 3, 6 | 4, 7 | 5 8 | ], 9 | "boolean": false, 10 | "null": null, 11 | "number": 23, 12 | "string": "Hello, world!" 13 | } 14 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_serialize.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create JSON values 10 | json j_object = {{"one", 1}, {"two", 2}}; 11 | json j_array = {1, 2, 4, 8, 16}; 12 | 13 | // serialize without indentation 14 | std::cout << j_object << "\n\n"; 15 | std::cout << j_array << "\n\n"; 16 | 17 | // serialize with indentation 18 | std::cout << std::setw(4) << j_object << "\n\n"; 19 | std::cout << std::setw(2) << j_array << "\n\n"; 20 | std::cout << std::setw(1) << std::setfill('\t') << j_object << "\n\n"; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_serialize.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operator_serialize.output: -------------------------------------------------------------------------------- 1 | {"one":1,"two":2} 2 | 3 | [1,2,4,8,16] 4 | 5 | { 6 | "one": 1, 7 | "two": 2 8 | } 9 | 10 | [ 11 | 1, 12 | 2, 13 | 4, 14 | 8, 15 | 16 16 | ] 17 | 18 | { 19 | "one": 1, 20 | "two": 2 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create a JSON object 10 | json object = 11 | { 12 | {"one", 1}, {"two", 2}, {"three", 2.9} 13 | }; 14 | 15 | // output element with key "two" 16 | std::cout << object["two"] << "\n\n"; 17 | 18 | // change element with key "three" 19 | object["three"] = 3; 20 | 21 | // output changed array 22 | std::cout << std::setw(4) << object << "\n\n"; 23 | 24 | // mention nonexisting key 25 | object["four"]; 26 | 27 | // write to nonexisting key 28 | object["five"]["really"]["nested"] = true; 29 | 30 | // output changed object 31 | std::cout << std::setw(4) << object << '\n'; 32 | } 33 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type.output: -------------------------------------------------------------------------------- 1 | 2 2 | 3 | { 4 | "one": 1, 5 | "three": 3, 6 | "two": 2 7 | } 8 | 9 | { 10 | "five": { 11 | "really": { 12 | "nested": true 13 | } 14 | }, 15 | "four": null, 16 | "one": 1, 17 | "three": 3, 18 | "two": 2 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type_const.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON object 9 | const json object = 10 | { 11 | {"one", 1}, {"two", 2}, {"three", 2.9} 12 | }; 13 | 14 | // output element with key "two" 15 | std::cout << object["two"] << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__key_type_const.output: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON array 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // output element at index 3 (fourth element) 12 | std::cout << array[3] << '\n'; 13 | 14 | // change last element to 6 15 | array[array.size() - 1] = 6; 16 | 17 | // output changed array 18 | std::cout << array << '\n'; 19 | 20 | // write beyond array limit 21 | array[10] = 11; 22 | 23 | // output changed array 24 | std::cout << array << '\n'; 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type.output: -------------------------------------------------------------------------------- 1 | 4 2 | [1,2,3,4,6] 3 | [1,2,3,4,6,null,null,null,null,null,11] 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type_const.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON array 9 | json array = {"first", "2nd", "third", "fourth"}; 10 | 11 | // output element at index 2 (third element) 12 | std::cout << array.at(2) << '\n'; 13 | } 14 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorarray__size_type_const.output: -------------------------------------------------------------------------------- 1 | "third" 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorjson_pointer.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorjson_pointer.output: -------------------------------------------------------------------------------- 1 | 1 2 | "foo" 3 | [1,2] 4 | 2 5 | "bar" 6 | {"array":[1,2],"boolean":true,"number":1,"string":"bar"} 7 | [1,21,null,null,44] 8 | [1,21,null,null,44,55] 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorjson_pointer_const.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON value 9 | const json j = 10 | { 11 | {"number", 1}, {"string", "foo"}, {"array", {1, 2}} 12 | }; 13 | 14 | // read-only access 15 | 16 | // output element with JSON pointer "/number" 17 | std::cout << j["/number"_json_pointer] << '\n'; 18 | // output element with JSON pointer "/string" 19 | std::cout << j["/string"_json_pointer] << '\n'; 20 | // output element with JSON pointer "/array" 21 | std::cout << j["/array"_json_pointer] << '\n'; 22 | // output element with JSON pointer "/array/1" 23 | std::cout << j["/array/1"_json_pointer] << '\n'; 24 | } 25 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorjson_pointer_const.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/operatorjson_pointer_const.output: -------------------------------------------------------------------------------- 1 | 1 2 | "foo" 3 | [1,2] 4 | 2 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/other_error.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // executing a failing JSON Patch operation 11 | json value = R"({ 12 | "best_biscuit": { 13 | "name": "Oreo" 14 | } 15 | })"_json; 16 | json patch = R"([{ 17 | "op": "test", 18 | "path": "/best_biscuit/name", 19 | "value": "Choco Leibniz" 20 | }])"_json; 21 | value.patch(patch); 22 | } 23 | catch (json::other_error& e) 24 | { 25 | // output exception information 26 | std::cout << "message: " << e.what() << '\n' 27 | << "exception id: " << e.id << std::endl; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/other_error.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/other_error.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.other_error.501] unsuccessful: {"op":"test","path":"/best_biscuit/name","value":"Choco Leibniz"} 2 | exception id: 501 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/out_of_range.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // calling at() for an invalid index 11 | json j = {1, 2, 3, 4}; 12 | j.at(4) = 10; 13 | } 14 | catch (json::out_of_range& e) 15 | { 16 | // output exception information 17 | std::cout << "message: " << e.what() << '\n' 18 | << "exception id: " << e.id << std::endl; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/out_of_range.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/out_of_range.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.out_of_range.401] array index 4 is out of range 2 | exception id: 401 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__array__parser_callback_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // a JSON text 10 | char text[] = R"( 11 | { 12 | "Image": { 13 | "Width": 800, 14 | "Height": 600, 15 | "Title": "View from 15th Floor", 16 | "Thumbnail": { 17 | "Url": "http://www.example.com/image/481989943", 18 | "Height": 125, 19 | "Width": 100 20 | }, 21 | "Animated" : false, 22 | "IDs": [116, 943, 234, 38793] 23 | } 24 | } 25 | )"; 26 | 27 | // parse and serialize JSON 28 | json j_complete = json::parse(text); 29 | std::cout << std::setw(4) << j_complete << "\n\n"; 30 | } 31 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__array__parser_callback_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__array__parser_callback_t.output: -------------------------------------------------------------------------------- 1 | { 2 | "Image": { 3 | "Animated": false, 4 | "Height": 600, 5 | "IDs": [ 6 | 116, 7 | 943, 8 | 234, 9 | 38793 10 | ], 11 | "Thumbnail": { 12 | "Height": 125, 13 | "Url": "http://www.example.com/image/481989943", 14 | "Width": 100 15 | }, 16 | "Title": "View from 15th Floor", 17 | "Width": 800 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__contiguouscontainer__parser_callback_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // a JSON text given as std::vector 10 | std::vector text = {'[', '1', ',', '2', ',', '3', ']', '\0'}; 11 | 12 | // parse and serialize JSON 13 | json j_complete = json::parse(text); 14 | std::cout << std::setw(4) << j_complete << "\n\n"; 15 | } 16 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__contiguouscontainer__parser_callback_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__contiguouscontainer__parser_callback_t.output: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2, 4 | 3 5 | ] 6 | 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__istream__parser_callback_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__istream__parser_callback_t.output: -------------------------------------------------------------------------------- 1 | { 2 | "Image": { 3 | "Animated": false, 4 | "Height": 600, 5 | "IDs": [ 6 | 116, 7 | 943, 8 | 234, 9 | 38793 10 | ], 11 | "Thumbnail": { 12 | "Height": 125, 13 | "Url": "http://www.example.com/image/481989943", 14 | "Width": 100 15 | }, 16 | "Title": "View from 15th Floor", 17 | "Width": 800 18 | } 19 | } 20 | 21 | { 22 | "Image": { 23 | "Animated": false, 24 | "Height": 600, 25 | "IDs": [ 26 | 116, 27 | 943, 28 | 234, 29 | 38793 30 | ], 31 | "Title": "View from 15th Floor", 32 | "Width": 800 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__iteratortype__parser_callback_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // a JSON text given as std::vector 10 | std::vector text = {'[', '1', ',', '2', ',', '3', ']', '\0'}; 11 | 12 | // parse and serialize JSON 13 | json j_complete = json::parse(text.begin(), text.end()); 14 | std::cout << std::setw(4) << j_complete << "\n\n"; 15 | } 16 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__iteratortype__parser_callback_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__iteratortype__parser_callback_t.output: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2, 4 | 3 5 | ] 6 | 7 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__string__parser_callback_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse__string__parser_callback_t.output: -------------------------------------------------------------------------------- 1 | { 2 | "Image": { 3 | "Animated": false, 4 | "Height": 600, 5 | "IDs": [ 6 | 116, 7 | 943, 8 | 234, 9 | 38793 10 | ], 11 | "Thumbnail": { 12 | "Height": 125, 13 | "Url": "http://www.example.com/image/481989943", 14 | "Width": 100 15 | }, 16 | "Title": "View from 15th Floor", 17 | "Width": 800 18 | } 19 | } 20 | 21 | { 22 | "Image": { 23 | "Animated": false, 24 | "Height": 600, 25 | "IDs": [ 26 | 116, 27 | 943, 28 | 234, 29 | 38793 30 | ], 31 | "Title": "View from 15th Floor", 32 | "Width": 800 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse_error.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // parsing input with a syntax error 11 | json::parse("[1,2,3,]"); 12 | } 13 | catch (json::parse_error& e) 14 | { 15 | // output exception information 16 | std::cout << "message: " << e.what() << '\n' 17 | << "exception id: " << e.id << '\n' 18 | << "byte position of error: " << e.byte << std::endl; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse_error.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/parse_error.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.parse_error.101] parse error at 8: syntax error - unexpected ']'; expected '[', '{', or a literal 2 | exception id: 101 3 | byte position of error: 8 4 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/patch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // the original document 10 | json doc = R"( 11 | { 12 | "baz": "qux", 13 | "foo": "bar" 14 | } 15 | )"_json; 16 | 17 | // the patch 18 | json patch = R"( 19 | [ 20 | { "op": "replace", "path": "/baz", "value": "boo" }, 21 | { "op": "add", "path": "/hello", "value": ["world"] }, 22 | { "op": "remove", "path": "/foo"} 23 | ] 24 | )"_json; 25 | 26 | // apply the patch 27 | json patched_doc = doc.patch(patch); 28 | 29 | // output original and patched document 30 | std::cout << std::setw(4) << doc << "\n\n" 31 | << std::setw(4) << patched_doc << std::endl; 32 | } 33 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/patch.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/patch.output: -------------------------------------------------------------------------------- 1 | { 2 | "baz": "qux", 3 | "foo": "bar" 4 | } 5 | 6 | { 7 | "baz": "boo", 8 | "hello": [ 9 | "world" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json array = {1, 2, 3, 4, 5}; 10 | json null; 11 | 12 | // print values 13 | std::cout << array << '\n'; 14 | std::cout << null << '\n'; 15 | 16 | // add values 17 | array.push_back(6); 18 | array += 7; 19 | null += "first"; 20 | null += "second"; 21 | 22 | // print values 23 | std::cout << array << '\n'; 24 | std::cout << null << '\n'; 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back.output: -------------------------------------------------------------------------------- 1 | [1,2,3,4,5] 2 | null 3 | [1,2,3,4,5,6,7] 4 | ["first","second"] 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__initializer_list.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json object = {{"one", 1}, {"two", 2}}; 10 | json null; 11 | 12 | // print values 13 | std::cout << object << '\n'; 14 | std::cout << null << '\n'; 15 | 16 | // add values: 17 | object.push_back({"three", 3}); // object is extended 18 | object += {"four", 4}; // object is extended 19 | null.push_back({"five", 5}); // null is converted to array 20 | 21 | // print values 22 | std::cout << object << '\n'; 23 | std::cout << null << '\n'; 24 | 25 | // would throw: 26 | //object.push_back({1, 2, 3}); 27 | } 28 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__initializer_list.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__initializer_list.output: -------------------------------------------------------------------------------- 1 | {"one":1,"two":2} 2 | null 3 | {"four":4,"one":1,"three":3,"two":2} 4 | [["five",5]] 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__object_t__value.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json object = {{"one", 1}, {"two", 2}}; 10 | json null; 11 | 12 | // print values 13 | std::cout << object << '\n'; 14 | std::cout << null << '\n'; 15 | 16 | // add values 17 | object.push_back(json::object_t::value_type("three", 3)); 18 | object += json::object_t::value_type("four", 4); 19 | null += json::object_t::value_type("A", "a"); 20 | null += json::object_t::value_type("B", "b"); 21 | 22 | // print values 23 | std::cout << object << '\n'; 24 | std::cout << null << '\n'; 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__object_t__value.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/push_back__object_t__value.output: -------------------------------------------------------------------------------- 1 | {"one":1,"two":2} 2 | null 3 | {"four":4,"one":1,"three":3,"two":2} 4 | {"A":"a","B":"b"} 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rbegin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get an iterator to the reverse-beginning 12 | json::reverse_iterator it = array.rbegin(); 13 | 14 | // serialize the element that the iterator points to 15 | std::cout << *it << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rbegin.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rbegin.output: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rend.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create an array value 9 | json array = {1, 2, 3, 4, 5}; 10 | 11 | // get an iterator to the reverse-end 12 | json::reverse_iterator it = array.rend(); 13 | 14 | // increment the iterator to point to the first element 15 | --it; 16 | 17 | // serialize the element that the iterator points to 18 | std::cout << *it << '\n'; 19 | } 20 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rend.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/rend.output: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/sax_parse.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/sax_parse.output: -------------------------------------------------------------------------------- 1 | (start: object) (key: Image) (start: object) (key: Width) (value: 800) (key: Height) (value: 600) (key: Title) (value: View from 15th Floor) (key: Thumbnail) (start: object) (key: Url) (value: http://www.example.com/image/481989943) (key: Height) (value: 125) (key: Width) (value: 100) (end: object) (key: Animated) (value: false) (key: IDs) (start: array) (value: 116) (value: 943) (value: 234) (value: 38793) (end: array) (key: Distance) (value: 12.723374634) (end: object) (end: object) 2 | result: true 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/size.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create JSON values 9 | json j_null; 10 | json j_boolean = true; 11 | json j_number_integer = 17; 12 | json j_number_float = 23.42; 13 | json j_object = {{"one", 1}, {"two", 2}}; 14 | json j_object_empty(json::value_t::object); 15 | json j_array = {1, 2, 4, 8, 16}; 16 | json j_array_empty(json::value_t::array); 17 | json j_string = "Hello, world"; 18 | 19 | // call size() 20 | std::cout << j_null.size() << '\n'; 21 | std::cout << j_boolean.size() << '\n'; 22 | std::cout << j_number_integer.size() << '\n'; 23 | std::cout << j_number_float.size() << '\n'; 24 | std::cout << j_object.size() << '\n'; 25 | std::cout << j_object_empty.size() << '\n'; 26 | std::cout << j_array.size() << '\n'; 27 | std::cout << j_array_empty.size() << '\n'; 28 | std::cout << j_string.size() << '\n'; 29 | } 30 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/size.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/size.output: -------------------------------------------------------------------------------- 1 | 0 2 | 1 3 | 1 4 | 1 5 | 2 6 | 0 7 | 5 8 | 0 9 | 1 10 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__array_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON value 9 | json value = {{"array", {1, 2, 3, 4}}}; 10 | 11 | // create an array_t 12 | json::array_t array = {"Snap", "Crackle", "Pop"}; 13 | 14 | // swap the array stored in the JSON value 15 | value["array"].swap(array); 16 | 17 | // output the values 18 | std::cout << "value = " << value << '\n'; 19 | std::cout << "array = " << array << '\n'; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__array_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__array_t.output: -------------------------------------------------------------------------------- 1 | value = {"array":["Snap","Crackle","Pop"]} 2 | array = [1,2,3,4] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__object_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON value 9 | json value = { {"translation", {{"one", "eins"}, {"two", "zwei"}}} }; 10 | 11 | // create an object_t 12 | json::object_t object = {{"cow", "Kuh"}, {"dog", "Hund"}}; 13 | 14 | // swap the object stored in the JSON value 15 | value["translation"].swap(object); 16 | 17 | // output the values 18 | std::cout << "value = " << value << '\n'; 19 | std::cout << "object = " << object << '\n'; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__object_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__object_t.output: -------------------------------------------------------------------------------- 1 | value = {"translation":{"cow":"Kuh","dog":"Hund"}} 2 | object = {"one":"eins","two":"zwei"} 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__reference.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create two JSON values 9 | json j1 = {1, 2, 3, 4, 5}; 10 | json j2 = {{"pi", 3.141592653589793}, {"e", 2.718281828459045}}; 11 | 12 | // swap the values 13 | j1.swap(j2); 14 | 15 | // output the values 16 | std::cout << "j1 = " << j1 << '\n'; 17 | std::cout << "j2 = " << j2 << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__reference.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__reference.output: -------------------------------------------------------------------------------- 1 | j1 = {"e":2.718281828459045,"pi":3.141592653589793} 2 | j2 = [1,2,3,4,5] 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__string_t.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | // create a JSON value 9 | json value = { "the good", "the bad", "the ugly" }; 10 | 11 | // create string_t 12 | json::string_t string = "the fast"; 13 | 14 | // swap the object stored in the JSON value 15 | value[1].swap(string); 16 | 17 | // output the values 18 | std::cout << "value = " << value << '\n'; 19 | std::cout << "string = " << string << '\n'; 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__string_t.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/swap__string_t.output: -------------------------------------------------------------------------------- 1 | value = ["the good","the fast","the ugly"] 2 | string = the bad 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_cbor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create a JSON value 10 | json j = R"({"compact": true, "schema": 0})"_json; 11 | 12 | // serialize it to CBOR 13 | std::vector v = json::to_cbor(j); 14 | 15 | // print the vector content 16 | for (auto& byte : v) 17 | { 18 | std::cout << "0x" << std::hex << std::setw(2) << std::setfill('0') << (int)byte << " "; 19 | } 20 | std::cout << std::endl; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_cbor.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_cbor.output: -------------------------------------------------------------------------------- 1 | 0xa2 0x67 0x63 0x6f 0x6d 0x70 0x61 0x63 0x74 0xf5 0x66 0x73 0x63 0x68 0x65 0x6d 0x61 0x00 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_msgpack.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create a JSON value 10 | json j = R"({"compact": true, "schema": 0})"_json; 11 | 12 | // serialize it to MessagePack 13 | std::vector v = json::to_msgpack(j); 14 | 15 | // print the vector content 16 | for (auto& byte : v) 17 | { 18 | std::cout << "0x" << std::hex << std::setw(2) << std::setfill('0') << (int)byte << " "; 19 | } 20 | std::cout << std::endl; 21 | } 22 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_msgpack.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_msgpack.output: -------------------------------------------------------------------------------- 1 | 0x82 0xa7 0x63 0x6f 0x6d 0x70 0x61 0x63 0x74 0xc3 0xa6 0x73 0x63 0x68 0x65 0x6d 0x61 0x00 2 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_ubjson.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/to_ubjson.output: -------------------------------------------------------------------------------- 1 | {i7compactTi6schemaF} 2 | [i1i2i3i4i5i6i7i8] 3 | [#i8i1i2i3i4i5i6i7i8 4 | [$i#i812345678 5 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type.output: -------------------------------------------------------------------------------- 1 | true 2 | true 3 | true 4 | true 5 | true 6 | true 7 | true 8 | true 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type_error.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using json = nlohmann::json; 5 | 6 | int main() 7 | { 8 | try 9 | { 10 | // calling push_back() on a string value 11 | json j = "string"; 12 | j.push_back("another string"); 13 | } 14 | catch (json::type_error& e) 15 | { 16 | // output exception information 17 | std::cout << "message: " << e.what() << '\n' 18 | << "exception id: " << e.id << std::endl; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type_error.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type_error.output: -------------------------------------------------------------------------------- 1 | message: [json.exception.type_error.308] cannot use push_back() with string 2 | exception id: 308 3 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type_name.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/type_name.output: -------------------------------------------------------------------------------- 1 | null is a null 2 | true is a boolean 3 | -17 is a number 4 | 42 is a number 5 | 23.42 is a number 6 | {"one":1,"two":2} is an object 7 | [1,2,4,8,16] is an array 8 | "Hello, world" is a string 9 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/unflatten.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create JSON value 10 | json j_flattened = 11 | { 12 | {"/answer/everything", 42}, 13 | {"/happy", true}, 14 | {"/list/0", 1}, 15 | {"/list/1", 0}, 16 | {"/list/2", 2}, 17 | {"/name", "Niels"}, 18 | {"/nothing", nullptr}, 19 | {"/object/currency", "USD"}, 20 | {"/object/value", 42.99}, 21 | {"/pi", 3.141} 22 | }; 23 | 24 | // call unflatten() 25 | std::cout << std::setw(4) << j_flattened.unflatten() << '\n'; 26 | } 27 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/unflatten.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/unflatten.output: -------------------------------------------------------------------------------- 1 | { 2 | "answer": { 3 | "everything": 42 4 | }, 5 | "happy": true, 6 | "list": [ 7 | 1, 8 | 0, 9 | 2 10 | ], 11 | "name": "Niels", 12 | "nothing": null, 13 | "object": { 14 | "currency": "USD", 15 | "value": 42.99 16 | }, 17 | "pi": 3.141 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create two JSON objects 10 | json o1 = R"( {"color": "red", "price": 17.99} )"_json; 11 | json o2 = R"( {"color": "blue", "speed": 100} )"_json; 12 | 13 | // add all keys from o2 to o1 (updating "color") 14 | o1.update(o2); 15 | 16 | // output updated object o1 17 | std::cout << std::setw(2) << o1 << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update.output: -------------------------------------------------------------------------------- 1 | { 2 | "color": "blue", 3 | "price": 17.99, 4 | "speed": 100 5 | } 6 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update__range.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using json = nlohmann::json; 6 | 7 | int main() 8 | { 9 | // create two JSON objects 10 | json o1 = R"( {"color": "red", "price": 17.99} )"_json; 11 | json o2 = R"( {"color": "blue", "speed": 100} )"_json; 12 | 13 | // add all keys from o2 to o1 (updating "color") 14 | o1.update(o2.begin(), o2.end()); 15 | 16 | // output updated object o1 17 | std::cout << std::setw(2) << o1 << '\n'; 18 | } 19 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update__range.link: -------------------------------------------------------------------------------- 1 | online -------------------------------------------------------------------------------- /Switch/ext/json/doc/examples/update__range.output: -------------------------------------------------------------------------------- 1 | { 2 | "color": "blue", 3 | "price": 17.99, 4 | "speed": 100 5 | } 6 | -------------------------------------------------------------------------------- /Switch/ext/json/doc/images/binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/images/binary.png -------------------------------------------------------------------------------- /Switch/ext/json/doc/images/callback_events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/images/callback_events.png -------------------------------------------------------------------------------- /Switch/ext/json/doc/json.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/json.gif -------------------------------------------------------------------------------- /Switch/ext/json/doc/usages/ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/usages/ios.png -------------------------------------------------------------------------------- /Switch/ext/json/doc/usages/macos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phaistos-networks/TANK/ecb7a2d23532bf6eb21c5f587490f71b7afdb859/Switch/ext/json/doc/usages/macos.png -------------------------------------------------------------------------------- /Switch/ext/json/include/nlohmann/detail/iterators/internal_iterator.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace nlohmann 6 | { 7 | namespace detail 8 | { 9 | /*! 10 | @brief an iterator value 11 | 12 | @note This structure could easily be a union, but MSVC currently does not allow 13 | unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. 14 | */ 15 | template struct internal_iterator 16 | { 17 | /// iterator for JSON objects 18 | typename BasicJsonType::object_t::iterator object_iterator {}; 19 | /// iterator for JSON arrays 20 | typename BasicJsonType::array_t::iterator array_iterator {}; 21 | /// generic iterator for all other types 22 | primitive_iterator_t primitive_iterator {}; 23 | }; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Switch/ext/json/include/nlohmann/detail/macro_unscope.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // restore GCC/clang diagnostic settings 4 | #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) 5 | #pragma GCC diagnostic pop 6 | #endif 7 | #if defined(__clang__) 8 | #pragma GCC diagnostic pop 9 | #endif 10 | 11 | // clean up 12 | #undef JSON_INTERNAL_CATCH 13 | #undef JSON_CATCH 14 | #undef JSON_THROW 15 | #undef JSON_TRY 16 | #undef JSON_LIKELY 17 | #undef JSON_UNLIKELY 18 | #undef JSON_DEPRECATED 19 | #undef JSON_HAS_CPP_14 20 | #undef JSON_HAS_CPP_17 21 | #undef NLOHMANN_BASIC_JSON_TPL_DECLARATION 22 | #undef NLOHMANN_BASIC_JSON_TPL 23 | -------------------------------------------------------------------------------- /Switch/ext/json/include/nlohmann/detail/meta/void_t.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace nlohmann 4 | { 5 | namespace detail 6 | { 7 | template struct make_void 8 | { 9 | using type = void; 10 | }; 11 | template using void_t = typename make_void::type; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Switch/ext/json/meson.build: -------------------------------------------------------------------------------- 1 | project('nlohmann_json', 2 | 'cpp', 3 | version : '3.2.0', 4 | license : 'MIT', 5 | ) 6 | 7 | nlohmann_json_dep = declare_dependency( 8 | include_directories: include_directories('single_include') 9 | ) 10 | 11 | nlohmann_json_multiple_headers = declare_dependency( 12 | include_directories: include_directories('include') 13 | ) 14 | -------------------------------------------------------------------------------- /Switch/ext/json/third_party/amalgamate/CHANGES.md: -------------------------------------------------------------------------------- 1 | The following changes have been made to the code with respect to : 2 | 3 | - Resolved inspection results from PyCharm: 4 | - replaced tabs with spaces 5 | - added encoding annotation 6 | - reindented file to remove trailing whitespaces 7 | - unused import `sys` 8 | - membership check 9 | - made function from `_is_within` 10 | - removed unused variable `actual_path` 11 | -------------------------------------------------------------------------------- /Switch/ext/json/third_party/amalgamate/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": "JSON for Modern C++", 3 | "target": "single_include/nlohmann/json.hpp", 4 | "sources": [ 5 | "include/nlohmann/json.hpp" 6 | ], 7 | "include_paths": ["include"] 8 | } 9 | -------------------------------------------------------------------------------- /Switch/ext_snappy/Makefile: -------------------------------------------------------------------------------- 1 | all: lib 2 | 3 | CXX:=clang++ 4 | CXXFLAGS:=-stdlib=libc++ -std=c++2a 5 | 6 | 7 | lib: snappy.o snappy-sinksource.o snappy-stubs-internal.o 8 | ar rc libsnappy.a snappy.o snappy-sinksource.o snappy-stubs-internal.o 9 | 10 | .o : .cpp 11 | 12 | clean: 13 | rm -f *.o 14 | 15 | .PHONY: clean 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Switch/portability.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #ifdef __linux__ 5 | #define SWITCH_HAVE_MALLOC_USABLE_SIZE 1 6 | #else 7 | #define off64_t off_t 8 | #define pread64 pread 9 | #define pwrite64 pwrite 10 | #define dirent64 dirent 11 | #define readdir64_r readdir_r 12 | #define readdir64 readdir 13 | #endif 14 | -------------------------------------------------------------------------------- /Switch/switch_algorithms.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace SwitchAlgorithms 5 | { 6 | static inline uint64_t Uniform(const uint64_t low, const uint64_t high) 7 | { 8 | return low + (rand()%(high - low)); 9 | } 10 | 11 | inline uint32_t ComputeExponentialBackoffWithDeccorelatedJitter(const uint64_t cap, const uint64_t base, const uint64_t prevSleep) 12 | { 13 | return std::min(cap, Uniform(base, prevSleep * 3)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Switch/switch_hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef __clang__ 4 | extern "C" { 5 | #endif 6 | unsigned long long XXH64(const void *input, unsigned int len, unsigned long long seed); 7 | #ifndef __clang__ 8 | } 9 | #endif 10 | 11 | static inline uint64_t FNVHash64(const uint8_t *const p, const uint32_t len) 12 | { 13 | uint64_t h{14695981039346656037ULL}; 14 | 15 | for (uint32_t i = 0; i != len; ++i) 16 | h = (h * 1099511628211ULL) ^ p[i]; 17 | 18 | return h; 19 | } 20 | 21 | static inline constexpr uint64_t BeginFNVHash64(void) 22 | { 23 | return 14695981039346656037ULL; 24 | } 25 | 26 | static inline uint64_t FNVHash64(uint64_t h, const uint8_t *const p, const uint32_t len) 27 | { 28 | for (uint32_t i = 0; i != len; ++i) 29 | h = (h * 1099511628211ULL) ^ p[i]; 30 | return h; 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /Switch/switch_numops.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | template 5 | [[gnu::always_inline]] inline T Clamp(const T v, const T min, const T max) 6 | { 7 | static_assert(std::is_scalar::value, "Expected scalar"); 8 | return std::min(std::max(v, min), max); 9 | } 10 | 11 | inline static int RoundToMultiple(const int v, const int alignment) 12 | { 13 | const int mask = alignment - 1; 14 | 15 | return (v + mask) & ~mask; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Switch/thread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace Switch 5 | { 6 | using mutex = std::mutex; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /client_common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "tank_client.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #ifdef TRACE_REACHABILITY_OVERSEER 9 | #include 10 | #endif 11 | -------------------------------------------------------------------------------- /service_common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "service.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #ifndef LEAN_SWITCH 21 | #include 22 | #endif 23 | -------------------------------------------------------------------------------- /service_main.cpp: -------------------------------------------------------------------------------- 1 | #include "service_common.h" 2 | #include 3 | #include 4 | 5 | // deals with the weak symbol getentropy@@GLIBC_2.25 6 | int getentropy(void *buffer, size_t length) { 7 | return 0; 8 | } 9 | 10 | int main(int argc, char *argv[]) { 11 | signal(SIGHUP, SIG_IGN); 12 | 13 | if (struct rlimit rl{.rlim_cur = RLIM_INFINITY, .rlim_max = RLIM_INFINITY}; setrlimit(RLIMIT_CORE, &rl) == -1) { 14 | Print("Warning: setrlimit() failed:", strerror(errno), "\n"); 15 | } 16 | 17 | return Service{}.start(argc, argv); 18 | } 19 | --------------------------------------------------------------------------------