├── .clang-format ├── .gitignore ├── CHANGELOG.md ├── CMakeLists.txt ├── Data ├── Images │ ├── Arrow.png │ ├── Axes.png │ ├── Box.png │ ├── Cone.png │ ├── Cylinder.png │ ├── Gizmo.gif │ ├── IntersectorModeLine.gif │ ├── IntersectorModeLineSegment.gif │ ├── IntersectorModePoint.gif │ ├── IntersectorModePolytope.gif │ ├── Line.png │ ├── Logo.gif │ ├── Logo.png │ ├── Mesh.png │ ├── Plane.png │ ├── Point.png │ ├── Robot.gif │ ├── Sphere.png │ ├── logo.png │ ├── move_box.gif │ └── vis.png ├── Models │ └── Visual │ │ ├── BaseLink.stl │ │ ├── Link1.stl │ │ ├── Link2.stl │ │ ├── Link3.stl │ │ ├── Link4.stl │ │ ├── Link5.stl │ │ └── Link6.stl └── TLS_kitchen_sample.ply ├── Examples ├── C++ │ ├── Basics.cpp │ └── CMakeLists.txt ├── CMakeLists.txt └── Python │ ├── Basics.py │ ├── Pick.py │ ├── SegmentPlanes.py │ └── Transform.py ├── Externals ├── CMakeLists.txt ├── Fmt │ ├── CMakeLists.txt │ ├── README.md │ └── fmt │ │ ├── .clang-format │ │ ├── .github │ │ └── pull_request_template.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── ChangeLog.rst │ │ ├── LICENSE.rst │ │ ├── README.rst │ │ ├── doc │ │ ├── CMakeLists.txt │ │ ├── _static │ │ │ ├── bootstrap.min.js │ │ │ ├── breathe.css │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── _templates │ │ │ ├── layout.html │ │ │ └── search.html │ │ ├── api.rst │ │ ├── basic-bootstrap │ │ │ ├── README │ │ │ ├── layout.html │ │ │ └── theme.conf │ │ ├── bootstrap │ │ │ ├── alerts.less │ │ │ ├── badges.less │ │ │ ├── bootstrap.less │ │ │ ├── breadcrumbs.less │ │ │ ├── button-groups.less │ │ │ ├── buttons.less │ │ │ ├── carousel.less │ │ │ ├── close.less │ │ │ ├── code.less │ │ │ ├── component-animations.less │ │ │ ├── dropdowns.less │ │ │ ├── forms.less │ │ │ ├── glyphicons.less │ │ │ ├── grid.less │ │ │ ├── input-groups.less │ │ │ ├── jumbotron.less │ │ │ ├── labels.less │ │ │ ├── list-group.less │ │ │ ├── media.less │ │ │ ├── mixins.less │ │ │ ├── mixins │ │ │ │ ├── alerts.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── buttons.less │ │ │ │ ├── center-block.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── forms.less │ │ │ │ ├── gradients.less │ │ │ │ ├── grid-framework.less │ │ │ │ ├── grid.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── image.less │ │ │ │ ├── labels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── opacity.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── resize.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── size.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── table-row.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ └── vendor-prefixes.less │ │ │ ├── modals.less │ │ │ ├── navbar.less │ │ │ ├── navs.less │ │ │ ├── normalize.less │ │ │ ├── pager.less │ │ │ ├── pagination.less │ │ │ ├── panels.less │ │ │ ├── popovers.less │ │ │ ├── print.less │ │ │ ├── progress-bars.less │ │ │ ├── responsive-embed.less │ │ │ ├── responsive-utilities.less │ │ │ ├── scaffolding.less │ │ │ ├── tables.less │ │ │ ├── theme.less │ │ │ ├── thumbnails.less │ │ │ ├── tooltip.less │ │ │ ├── type.less │ │ │ ├── utilities.less │ │ │ ├── variables.less │ │ │ └── wells.less │ │ ├── build.py │ │ ├── conf.py │ │ ├── contents.rst │ │ ├── fmt.less │ │ ├── index.rst │ │ ├── python-license.txt │ │ ├── syntax.rst │ │ └── usage.rst │ │ ├── include │ │ └── fmt │ │ │ ├── chrono.h │ │ │ ├── color.h │ │ │ ├── compile.h │ │ │ ├── core.h │ │ │ ├── format-inl.h │ │ │ ├── format.h │ │ │ ├── locale.h │ │ │ ├── os.h │ │ │ ├── ostream.h │ │ │ ├── posix.h │ │ │ ├── printf.h │ │ │ └── ranges.h │ │ ├── src │ │ ├── format.cc │ │ └── os.cc │ │ ├── support │ │ ├── Android.mk │ │ ├── AndroidManifest.xml │ │ ├── C++.sublime-syntax │ │ ├── README │ │ ├── Vagrantfile │ │ ├── appveyor-build.py │ │ ├── appveyor.yml │ │ ├── build.gradle │ │ ├── cmake │ │ │ ├── FindSetEnv.cmake │ │ │ ├── cxx14.cmake │ │ │ ├── fmt-config.cmake.in │ │ │ └── fmt.pc.in │ │ ├── compute-powers.py │ │ ├── docopt.py │ │ ├── fmt.pro │ │ ├── manage.py │ │ ├── rst2md.py │ │ ├── rtd │ │ │ ├── conf.py │ │ │ ├── index.rst │ │ │ └── theme │ │ │ │ ├── layout.html │ │ │ │ └── theme.conf │ │ ├── travis-build.py │ │ └── update-coverity-branch.py │ │ └── test │ │ ├── CMakeLists.txt │ │ ├── add-subdirectory-test │ │ ├── CMakeLists.txt │ │ └── main.cc │ │ ├── assert-test.cc │ │ ├── chrono-test.cc │ │ ├── color-test.cc │ │ ├── compile-error-test │ │ └── CMakeLists.txt │ │ ├── compile-test.cc │ │ ├── core-test.cc │ │ ├── cuda-test │ │ ├── CMakeLists.txt │ │ ├── cpp14.cc │ │ └── cuda-cpp14.cu │ │ ├── custom-formatter-test.cc │ │ ├── find-package-test │ │ ├── CMakeLists.txt │ │ └── main.cc │ │ ├── format │ │ ├── format-impl-test.cc │ │ ├── format-test.cc │ │ ├── fuzzing │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── build.sh │ │ ├── chrono_duration.cpp │ │ ├── fuzzer_common.h │ │ ├── main.cpp │ │ ├── named_arg.cpp │ │ ├── one_arg.cpp │ │ ├── sprintf.cpp │ │ └── two_args.cpp │ │ ├── gmock-gtest-all.cc │ │ ├── gmock │ │ └── gmock.h │ │ ├── grisu-test.cc │ │ ├── gtest-extra-test.cc │ │ ├── gtest-extra.cc │ │ ├── gtest-extra.h │ │ ├── gtest │ │ ├── gtest-spi.h │ │ └── gtest.h │ │ ├── header-only-test.cc │ │ ├── header-only-test2.cc │ │ ├── locale-test.cc │ │ ├── mock-allocator.h │ │ ├── os-test.cc │ │ ├── ostream-test.cc │ │ ├── posix-mock-test.cc │ │ ├── posix-mock.h │ │ ├── printf-test.cc │ │ ├── ranges-test.cc │ │ ├── scan-test.cc │ │ ├── scan.h │ │ ├── std-format-test.cc │ │ ├── test-assert.h │ │ ├── test-main.cc │ │ ├── util.cc │ │ └── util.h ├── Pybind11 │ ├── CMakeLists.txt │ ├── README.md │ ├── Tests │ │ ├── CMakeLists.txt │ │ └── Pybind11Test.cpp │ └── pybind11 │ │ ├── .appveyor.yml │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── .readthedocs.yml │ │ ├── .travis.yml │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── ISSUE_TEMPLATE.md │ │ ├── LICENSE │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── docs │ │ ├── Doxyfile │ │ ├── _static │ │ │ └── theme_overrides.css │ │ ├── advanced │ │ │ ├── cast │ │ │ │ ├── chrono.rst │ │ │ │ ├── custom.rst │ │ │ │ ├── eigen.rst │ │ │ │ ├── functional.rst │ │ │ │ ├── index.rst │ │ │ │ ├── overview.rst │ │ │ │ ├── stl.rst │ │ │ │ └── strings.rst │ │ │ ├── classes.rst │ │ │ ├── embedding.rst │ │ │ ├── exceptions.rst │ │ │ ├── functions.rst │ │ │ ├── misc.rst │ │ │ ├── pycpp │ │ │ │ ├── index.rst │ │ │ │ ├── numpy.rst │ │ │ │ ├── object.rst │ │ │ │ └── utilities.rst │ │ │ └── smart_ptrs.rst │ │ ├── basics.rst │ │ ├── benchmark.py │ │ ├── benchmark.rst │ │ ├── changelog.rst │ │ ├── classes.rst │ │ ├── compiling.rst │ │ ├── conf.py │ │ ├── faq.rst │ │ ├── index.rst │ │ ├── intro.rst │ │ ├── limitations.rst │ │ ├── pybind11-logo.png │ │ ├── pybind11_vs_boost_python1.png │ │ ├── pybind11_vs_boost_python1.svg │ │ ├── pybind11_vs_boost_python2.png │ │ ├── pybind11_vs_boost_python2.svg │ │ ├── reference.rst │ │ ├── release.rst │ │ ├── requirements.txt │ │ └── upgrade.rst │ │ ├── include │ │ └── pybind11 │ │ │ ├── attr.h │ │ │ ├── buffer_info.h │ │ │ ├── cast.h │ │ │ ├── chrono.h │ │ │ ├── common.h │ │ │ ├── complex.h │ │ │ ├── detail │ │ │ ├── class.h │ │ │ ├── common.h │ │ │ ├── descr.h │ │ │ ├── init.h │ │ │ ├── internals.h │ │ │ └── typeid.h │ │ │ ├── eigen.h │ │ │ ├── embed.h │ │ │ ├── eval.h │ │ │ ├── functional.h │ │ │ ├── iostream.h │ │ │ ├── numpy.h │ │ │ ├── operators.h │ │ │ ├── options.h │ │ │ ├── pybind11.h │ │ │ ├── pytypes.h │ │ │ ├── stl.h │ │ │ └── stl_bind.h │ │ ├── pybind11 │ │ ├── __init__.py │ │ ├── __main__.py │ │ └── _version.py │ │ ├── setup.cfg │ │ ├── setup.py │ │ ├── tests │ │ ├── CMakeLists.txt │ │ ├── conftest.py │ │ ├── constructor_stats.h │ │ ├── cross_module_gil_utils.cpp │ │ ├── local_bindings.h │ │ ├── object.h │ │ ├── pybind11_cross_module_tests.cpp │ │ ├── pybind11_tests.cpp │ │ ├── pybind11_tests.h │ │ ├── pytest.ini │ │ ├── test_async.cpp │ │ ├── test_async.py │ │ ├── test_buffers.cpp │ │ ├── test_buffers.py │ │ ├── test_builtin_casters.cpp │ │ ├── test_builtin_casters.py │ │ ├── test_call_policies.cpp │ │ ├── test_call_policies.py │ │ ├── test_callbacks.cpp │ │ ├── test_callbacks.py │ │ ├── test_chrono.cpp │ │ ├── test_chrono.py │ │ ├── test_class.cpp │ │ ├── test_class.py │ │ ├── test_cmake_build │ │ │ ├── CMakeLists.txt │ │ │ ├── embed.cpp │ │ │ ├── installed_embed │ │ │ │ └── CMakeLists.txt │ │ │ ├── installed_function │ │ │ │ └── CMakeLists.txt │ │ │ ├── installed_target │ │ │ │ └── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ ├── subdirectory_embed │ │ │ │ └── CMakeLists.txt │ │ │ ├── subdirectory_function │ │ │ │ └── CMakeLists.txt │ │ │ ├── subdirectory_target │ │ │ │ └── CMakeLists.txt │ │ │ └── test.py │ │ ├── test_constants_and_functions.cpp │ │ ├── test_constants_and_functions.py │ │ ├── test_copy_move.cpp │ │ ├── test_copy_move.py │ │ ├── test_docstring_options.cpp │ │ ├── test_docstring_options.py │ │ ├── test_eigen.cpp │ │ ├── test_eigen.py │ │ ├── test_embed │ │ │ ├── CMakeLists.txt │ │ │ ├── catch.cpp │ │ │ ├── external_module.cpp │ │ │ ├── test_interpreter.cpp │ │ │ └── test_interpreter.py │ │ ├── test_enum.cpp │ │ ├── test_enum.py │ │ ├── test_eval.cpp │ │ ├── test_eval.py │ │ ├── test_eval_call.py │ │ ├── test_exceptions.cpp │ │ ├── test_exceptions.py │ │ ├── test_factory_constructors.cpp │ │ ├── test_factory_constructors.py │ │ ├── test_gil_scoped.cpp │ │ ├── test_gil_scoped.py │ │ ├── test_iostream.cpp │ │ ├── test_iostream.py │ │ ├── test_kwargs_and_defaults.cpp │ │ ├── test_kwargs_and_defaults.py │ │ ├── test_local_bindings.cpp │ │ ├── test_local_bindings.py │ │ ├── test_methods_and_attributes.cpp │ │ ├── test_methods_and_attributes.py │ │ ├── test_modules.cpp │ │ ├── test_modules.py │ │ ├── test_multiple_inheritance.cpp │ │ ├── test_multiple_inheritance.py │ │ ├── test_numpy_array.cpp │ │ ├── test_numpy_array.py │ │ ├── test_numpy_dtypes.cpp │ │ ├── test_numpy_dtypes.py │ │ ├── test_numpy_vectorize.cpp │ │ ├── test_numpy_vectorize.py │ │ ├── test_opaque_types.cpp │ │ ├── test_opaque_types.py │ │ ├── test_operator_overloading.cpp │ │ ├── test_operator_overloading.py │ │ ├── test_pickling.cpp │ │ ├── test_pickling.py │ │ ├── test_pytypes.cpp │ │ ├── test_pytypes.py │ │ ├── test_sequences_and_iterators.cpp │ │ ├── test_sequences_and_iterators.py │ │ ├── test_smart_ptr.cpp │ │ ├── test_smart_ptr.py │ │ ├── test_stl.cpp │ │ ├── test_stl.py │ │ ├── test_stl_binders.cpp │ │ ├── test_stl_binders.py │ │ ├── test_tagbased_polymorphic.cpp │ │ ├── test_tagbased_polymorphic.py │ │ ├── test_union.cpp │ │ ├── test_union.py │ │ ├── test_virtual_functions.cpp │ │ └── test_virtual_functions.py │ │ └── tools │ │ ├── FindCatch.cmake │ │ ├── FindEigen3.cmake │ │ ├── FindPythonLibsNew.cmake │ │ ├── check-style.sh │ │ ├── libsize.py │ │ ├── mkdoc.py │ │ ├── pybind11Config.cmake.in │ │ └── pybind11Tools.cmake ├── Spdlog │ ├── CMakeLists.txt │ ├── README.md │ ├── Tests │ │ ├── CMakeLists.txt │ │ └── SpdlogTest.cpp │ ├── include │ │ └── spdlog │ │ │ ├── async.h │ │ │ ├── async_logger-inl.h │ │ │ ├── async_logger.h │ │ │ ├── common-inl.h │ │ │ ├── common.h │ │ │ ├── details │ │ │ ├── backtracer-inl.h │ │ │ ├── backtracer.h │ │ │ ├── circular_q.h │ │ │ ├── console_globals.h │ │ │ ├── file_helper-inl.h │ │ │ ├── file_helper.h │ │ │ ├── fmt_helper.h │ │ │ ├── log_msg-inl.h │ │ │ ├── log_msg.h │ │ │ ├── log_msg_buffer-inl.h │ │ │ ├── log_msg_buffer.h │ │ │ ├── mpmc_blocking_q.h │ │ │ ├── null_mutex.h │ │ │ ├── os-inl.h │ │ │ ├── os.h │ │ │ ├── pattern_formatter-inl.h │ │ │ ├── pattern_formatter.h │ │ │ ├── periodic_worker-inl.h │ │ │ ├── periodic_worker.h │ │ │ ├── registry-inl.h │ │ │ ├── registry.h │ │ │ ├── synchronous_factory.h │ │ │ ├── tcp_client.h │ │ │ ├── thread_pool-inl.h │ │ │ ├── thread_pool.h │ │ │ └── windows_include.h │ │ │ ├── fmt │ │ │ ├── bin_to_hex.h │ │ │ ├── bundled │ │ │ │ ├── LICENSE.rst │ │ │ │ ├── chrono.h │ │ │ │ ├── color.h │ │ │ │ ├── compile.h │ │ │ │ ├── core.h │ │ │ │ ├── format-inl.h │ │ │ │ ├── format.h │ │ │ │ ├── locale.h │ │ │ │ ├── ostream.h │ │ │ │ ├── posix.h │ │ │ │ ├── printf.h │ │ │ │ └── ranges.h │ │ │ ├── fmt.h │ │ │ └── ostr.h │ │ │ ├── formatter.h │ │ │ ├── logger-inl.h │ │ │ ├── logger.h │ │ │ ├── sinks │ │ │ ├── android_sink.h │ │ │ ├── ansicolor_sink-inl.h │ │ │ ├── ansicolor_sink.h │ │ │ ├── base_sink-inl.h │ │ │ ├── base_sink.h │ │ │ ├── basic_file_sink-inl.h │ │ │ ├── basic_file_sink.h │ │ │ ├── daily_file_sink.h │ │ │ ├── dist_sink.h │ │ │ ├── dup_filter_sink.h │ │ │ ├── msvc_sink.h │ │ │ ├── null_sink.h │ │ │ ├── ostream_sink.h │ │ │ ├── ringbuffer_sink.h │ │ │ ├── rotating_file_sink-inl.h │ │ │ ├── rotating_file_sink.h │ │ │ ├── sink-inl.h │ │ │ ├── sink.h │ │ │ ├── stdout_color_sinks-inl.h │ │ │ ├── stdout_color_sinks.h │ │ │ ├── stdout_sinks-inl.h │ │ │ ├── stdout_sinks.h │ │ │ ├── syslog_sink.h │ │ │ ├── systemd_sink.h │ │ │ ├── tcp_sink.h │ │ │ ├── win_eventlog_sink.h │ │ │ ├── wincolor_sink-inl.h │ │ │ └── wincolor_sink.h │ │ │ ├── spdlog-inl.h │ │ │ ├── spdlog.h │ │ │ ├── tweakme.h │ │ │ └── version.h │ └── src │ │ ├── async.cpp │ │ ├── color_sinks.cpp │ │ ├── file_sinks.cpp │ │ ├── fmt.cpp │ │ ├── spdlog.cpp │ │ └── stdout_sinks.cpp └── libgizmo │ ├── CMakeLists.txt │ ├── Include │ └── IGizmo.h │ └── Src │ ├── GizmoTransform.h │ ├── GizmoTransformMove.cpp │ ├── GizmoTransformMove.h │ ├── GizmoTransformRender.cpp │ ├── GizmoTransformRender.h │ ├── GizmoTransformRotate.cpp │ ├── GizmoTransformRotate.h │ ├── GizmoTransformScale.cpp │ ├── GizmoTransformScale.h │ ├── LibBase.h │ ├── ZBaseDefs.h │ ├── ZBaseMaths.cpp │ ├── ZBaseMaths.h │ ├── ZBaseMaths.inl │ ├── ZCollisionsUtils.h │ ├── ZMathsFunc.cpp │ └── ZMathsFunc.h ├── Include └── Vis │ └── Vis.h ├── README.md ├── README_EN.md ├── Setup.py ├── Src ├── GzimoDrawable.h ├── Intersector │ ├── LineIntersector.cpp │ ├── LineIntersector.h │ ├── PointIntersector.cpp │ └── PointIntersector.h ├── Manipulator │ ├── TouchballManipulator.cpp │ └── TouchballManipulator.h ├── Python │ ├── CMakeLists.txt │ └── PyVis.cpp └── Vis.cpp └── postinst /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # CHANGLOG 3 | 4 | ## [v1.1.1] - 2023-02-02 5 | 6 | ### 新增功能 7 | - 增加文字绘制接口 8 | 9 | ### 改进内容 10 | - 修改 osg 依赖版本说明 11 | 12 | ## [v1.0.1] - 2022-08-24 13 | 14 | ### 改进内容 15 | - 将交互操作修改为右键, 操作会与视角操作耦合在一起, 引起误操作; 16 | - 改进模型显示效果 17 | 18 | ## [v1.0.0] - 2021-07-24 19 | ### Added 20 | - 第一次发布; -------------------------------------------------------------------------------- /Data/Images/Arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Arrow.png -------------------------------------------------------------------------------- /Data/Images/Axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Axes.png -------------------------------------------------------------------------------- /Data/Images/Box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Box.png -------------------------------------------------------------------------------- /Data/Images/Cone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Cone.png -------------------------------------------------------------------------------- /Data/Images/Cylinder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Cylinder.png -------------------------------------------------------------------------------- /Data/Images/Gizmo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Gizmo.gif -------------------------------------------------------------------------------- /Data/Images/IntersectorModeLine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/IntersectorModeLine.gif -------------------------------------------------------------------------------- /Data/Images/IntersectorModeLineSegment.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/IntersectorModeLineSegment.gif -------------------------------------------------------------------------------- /Data/Images/IntersectorModePoint.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/IntersectorModePoint.gif -------------------------------------------------------------------------------- /Data/Images/IntersectorModePolytope.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/IntersectorModePolytope.gif -------------------------------------------------------------------------------- /Data/Images/Line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Line.png -------------------------------------------------------------------------------- /Data/Images/Logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Logo.gif -------------------------------------------------------------------------------- /Data/Images/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Logo.png -------------------------------------------------------------------------------- /Data/Images/Mesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Mesh.png -------------------------------------------------------------------------------- /Data/Images/Plane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Plane.png -------------------------------------------------------------------------------- /Data/Images/Point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Point.png -------------------------------------------------------------------------------- /Data/Images/Robot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Robot.gif -------------------------------------------------------------------------------- /Data/Images/Sphere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/Sphere.png -------------------------------------------------------------------------------- /Data/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/logo.png -------------------------------------------------------------------------------- /Data/Images/move_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/move_box.gif -------------------------------------------------------------------------------- /Data/Images/vis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Images/vis.png -------------------------------------------------------------------------------- /Data/Models/Visual/BaseLink.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/BaseLink.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link1.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link1.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link2.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link3.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link4.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link4.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link5.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link5.stl -------------------------------------------------------------------------------- /Data/Models/Visual/Link6.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/Models/Visual/Link6.stl -------------------------------------------------------------------------------- /Data/TLS_kitchen_sample.ply: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Data/TLS_kitchen_sample.ply -------------------------------------------------------------------------------- /Examples/C++/Basics.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static inline void Sleep(uint64_t ms) { 6 | std::this_thread::sleep_for(std::chrono::milliseconds(ms)); 7 | } 8 | 9 | int main(int argc, char *argv[]) { 10 | Vis::View v("Basics"); 11 | v.Ground(20, 0.1, {1, 0, 0}); 12 | v.Box({0, 0, 1}, {1, 1, 1}, {0, 1, 0}); 13 | Sleep(10000); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Examples/C++/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(Basics Basics.cpp) 2 | target_link_libraries(Basics PRIVATE Vis) 3 | -------------------------------------------------------------------------------- /Examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(C++) 2 | -------------------------------------------------------------------------------- /Examples/Python/Pick.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | # Copyright 2021 RVBUST Inc. 4 | 5 | ''' 6 | Vis Picking例子 7 | Intersector交互模式 8 | - 点击鼠标右键进行选择 9 | - 同时按住Ctrl可以进行多选 10 | - Axes Marker的大小可以通过按键盘上的 “+/-”来快捷调整 11 | ''' 12 | 13 | import numpy as np 14 | from RVBUST import Vis 15 | 16 | def PickDemo(): 17 | v = Vis.View("PickDemo") 18 | 19 | h1 = v.Axes([0, 0, 0], [0, 0, 0, 1], 0.5, 2) 20 | h3 = v.Box([1, 0, 0], [0.1, 0.1, 0.1]) 21 | h5 = v.Point(np.random.uniform(-1, 1, 90), 5, [0, 1, 0]) 22 | h6 = v.Line([0, 0, 0, 1, 1, 1], 1) 23 | 24 | 25 | v.SetIntersectorMode(Vis.IntersectorMode_LineSegment) 26 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 27 | hs = v.GetPickedPointAxes() 28 | for h in hs: 29 | print(v.GetPosition(h)[1]) 30 | v.ClearPickedPointAxes() 31 | 32 | v.SetIntersectorMode(Vis.IntersectorMode_Polytope) 33 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 34 | hs = v.MultiPicked() 35 | for h in hs: 36 | print(h) 37 | 38 | v.SetIntersectorMode(Vis.IntersectorMode_Point) 39 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 40 | hs = v.GetPickedPointAxes() 41 | for h in hs: 42 | print(v.GetPosition(h)) 43 | v.ClearPickedPointAxes() 44 | 45 | v.SetIntersectorMode(Vis.IntersectorMode_Line) 46 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 47 | hs = v.MultiPicked() 48 | for h in hs: 49 | print(h) 50 | 51 | if __name__ == '__main__': 52 | PickDemo() 53 | -------------------------------------------------------------------------------- /Examples/Python/SegmentPlanes.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | # Copyright 2021 RVBUST Inc. 4 | 5 | from RVBUST import Vis 6 | import numpy as np 7 | try: 8 | import open3d as o3d 9 | except: 10 | print("Open3D is needed for running this example.") 11 | raise 12 | import time 13 | 14 | def RandColor(): 15 | return np.random.rand(3) 16 | 17 | def SegmentPlaneDemo(): 18 | v = Vis.View("SegementPlane") 19 | pcd = o3d.io.read_point_cloud("../../Data/TLS_kitchen_sample.ply") 20 | pts = np.array(pcd.points).copy() 21 | 22 | v.Point(pts, 1, (1,0,0)) 23 | v.Home() 24 | 25 | pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=16), fast_normal_computation=True) 26 | 27 | segment_models={} 28 | segments={} 29 | rest=pcd 30 | d_threshold=0.01 31 | 32 | for i in range(10): 33 | segment_models[i], inliers = rest.segment_plane(distance_threshold=0.01,ransac_n=3,num_iterations=1000) 34 | segments[i]=rest.select_by_index(inliers) 35 | labels = np.array(segments[i].cluster_dbscan(eps=d_threshold*10, min_points=10)) 36 | candidates=[len(np.where(labels==j)[0]) for j in np.unique(labels)] 37 | best_candidate=int(np.unique(labels)[np.where(candidates==np.max(candidates))[0]]) 38 | print("the best candidate is: ", best_candidate) 39 | rest = rest.select_by_index(inliers, invert=True)+segments[i].select_by_index(list(np.where(labels!=best_candidate)[0])) 40 | segments[i]=segments[i].select_by_index(list(np.where(labels==best_candidate)[0])) 41 | 42 | plane_pts = np.array(segments[i].points) 43 | v.Point(plane_pts, 3, RandColor()) 44 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 45 | time.sleep(0.3) 46 | 47 | from IPython.terminal import embed; ipshell=embed.InteractiveShellEmbed(config=embed.load_default_config())(local_ns=locals()) 48 | 49 | if __name__ == '__main__': 50 | SegmentPlaneDemo() 51 | -------------------------------------------------------------------------------- /Externals/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Fmt) 2 | add_subdirectory(Spdlog) 3 | add_subdirectory(Pybind11) 4 | add_subdirectory(libgizmo) 5 | -------------------------------------------------------------------------------- /Externals/Fmt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(fmt) 2 | -------------------------------------------------------------------------------- /Externals/Fmt/README.md: -------------------------------------------------------------------------------- 1 | git clone and add_subdirectory 2 | 3 | tag: 1e8493196efa4e05baa22461ba61b636ab2e662b 4 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | IndentPPDirectives: AfterHash 6 | IndentCaseLabels: false 7 | AlwaysBreakTemplateDeclarations: false 8 | DerivePointerAlignment: false 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing. 7 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | 3 | *.iml 4 | .idea/ 5 | .externalNativeBuild/ 6 | .gradle/ 7 | gradle/ 8 | gradlew* 9 | local.properties 10 | build/ 11 | 12 | bin/ 13 | /_CPack_Packages 14 | /CMakeScripts 15 | /doc/doxyxml 16 | /doc/html 17 | virtualenv 18 | /Testing 19 | /install_manifest.txt 20 | *~ 21 | *.a 22 | *.so* 23 | *.xcodeproj 24 | *.zip 25 | cmake_install.cmake 26 | CPack*.cmake 27 | fmt-*.cmake 28 | CTestTestfile.cmake 29 | CMakeCache.txt 30 | CMakeFiles 31 | FMT.build 32 | Makefile 33 | run-msbuild.bat 34 | fmt.pc 35 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to {fmt} 2 | ===================== 3 | 4 | By submitting a pull request or a patch, you represent that you have the right 5 | to license your contribution to the {fmt} project owners and the community, 6 | agree that your contributions are licensed under the {fmt} license, and agree 7 | to future changes to the licensing. 8 | 9 | All C++ code must adhere to [Google C++ Style Guide]( 10 | https://google.github.io/styleguide/cppguide.html) with the following 11 | exceptions: 12 | 13 | * Exceptions are permitted 14 | * snake_case should be used instead of UpperCamelCase for function and type 15 | names 16 | 17 | Thanks for contributing! 18 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_program(DOXYGEN doxygen) 2 | if (NOT DOXYGEN) 3 | message(STATUS "Target 'doc' disabled (requires doxygen)") 4 | return () 5 | endif () 6 | 7 | add_custom_target(doc 8 | COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION} 9 | SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html) 10 | 11 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ 12 | DESTINATION share/doc/fmt OPTIONAL) 13 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/_static/breathe.css: -------------------------------------------------------------------------------- 1 | 2 | /* -- breathe specific styles ----------------------------------------------- */ 3 | 4 | /* So enum value descriptions are displayed inline to the item */ 5 | .breatheenumvalues li tt + p { 6 | display: inline; 7 | } 8 | 9 | /* So parameter descriptions are displayed inline to the item */ 10 | .breatheparameterlist li tt + p { 11 | display: inline; 12 | } 13 | 14 | .container .breathe-sectiondef { 15 | width: inherit; 16 | } 17 | 18 | .github-btn { 19 | border: 0; 20 | overflow: hidden; 21 | } 22 | 23 | .jumbotron { 24 | background-size: 100% 4px; 25 | background-repeat: repeat-y; 26 | color: white; 27 | text-align: center; 28 | } 29 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Fmt/fmt/doc/_static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/_templates/search.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/search.html 3 | ~~~~~~~~~~~~~~~~~ 4 | 5 | Template for the search page. 6 | 7 | :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {%- extends "layout.html" %} 11 | {% set title = _('Search') %} 12 | {% set script_files = script_files + ['_static/searchtools.js'] %} 13 | {% block extrahead %} 14 | 17 | {# this is used when loading the search index using $.ajax fails, 18 | such as on Chrome for documents on localhost #} 19 | 20 | {{ super() }} 21 | {% endblock %} 22 | {% block body %} 23 |

{{ _('Search') }}

24 |
25 | 26 |

27 | {% trans %}Please activate JavaScript to enable the search 28 | functionality.{% endtrans %} 29 |

30 |
31 |

32 | {% trans %}From here you can search these documents. Enter your search 33 | words into the box below and click "search". Note that the search 34 | function will automatically search for all of the words. Pages 35 | containing fewer words won't appear in the result list.{% endtrans %} 36 |

37 | {{ searchform('form-inline', True) }} 38 | {% if search_performed %} 39 |

{{ _('Search Results') }}

40 | {% if not search_results %} 41 |

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

42 | {% endif %} 43 | {% endif %} 44 |
45 | {% if search_results %} 46 |
    47 | {% for href, caption, context in search_results %} 48 |
  • {{ caption }} 49 |
    {{ context|e }}
    50 |
  • 51 | {% endfor %} 52 |
53 | {% endif %} 54 |
55 | {% endblock %} 56 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/basic-bootstrap/README: -------------------------------------------------------------------------------- 1 | Sphinx basic theme with Bootstrap support. Modifications are kept to 2 | a minimum to simplify integration in case of changes to Sphinx theming. 3 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/basic-bootstrap/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset and dependencies 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | @import "glyphicons.less"; 9 | 10 | // Core CSS 11 | @import "scaffolding.less"; 12 | @import "type.less"; 13 | @import "code.less"; 14 | @import "grid.less"; 15 | @import "tables.less"; 16 | @import "forms.less"; 17 | @import "buttons.less"; 18 | 19 | // Components 20 | @import "component-animations.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "responsive-embed.less"; 39 | @import "wells.less"; 40 | @import "close.less"; 41 | 42 | // Components w/ JavaScript 43 | @import "modals.less"; 44 | @import "tooltip.less"; 45 | @import "popovers.less"; 46 | @import "carousel.less"; 47 | 48 | // Utility classes 49 | @import "utilities.less"; 50 | @import "responsive-utilities.less"; 51 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .tb-container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding (@jumbotron-padding / 2); 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | 17 | p { 18 | margin-bottom: (@jumbotron-padding / 2); 19 | font-size: @jumbotron-font-size; 20 | font-weight: 200; 21 | } 22 | 23 | > hr { 24 | border-top-color: darken(@jumbotron-bg, 10%); 25 | } 26 | 27 | .tb-container &, 28 | .container-fluid & { 29 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 30 | } 31 | 32 | .tb-container { 33 | max-width: 100%; 34 | } 35 | 36 | @media screen and (min-width: @screen-sm-min) { 37 | padding: (@jumbotron-padding * 1.6) 0; 38 | 39 | .tb-container &, 40 | .container-fluid & { 41 | padding-left: (@jumbotron-padding * 2); 42 | padding-right: (@jumbotron-padding * 2); 43 | } 44 | 45 | h1, 46 | .h1 { 47 | font-size: (@font-size-base * 4.5); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | } 23 | 24 | .media-right, 25 | .media > .pull-right { 26 | padding-left: 10px; 27 | } 28 | 29 | .media-left, 30 | .media > .pull-left { 31 | padding-right: 10px; 32 | } 33 | 34 | .media-left, 35 | .media-right, 36 | .media-body { 37 | display: table-cell; 38 | vertical-align: top; 39 | } 40 | 41 | .media-middle { 42 | vertical-align: middle; 43 | } 44 | 45 | .media-bottom { 46 | vertical-align: bottom; 47 | } 48 | 49 | // Reset margins on headings for tighter default spacing 50 | .media-heading { 51 | margin-top: 0; 52 | margin-bottom: 5px; 53 | } 54 | 55 | // Media list variation 56 | // 57 | // Undo default ul/ol styles 58 | .media-list { 59 | padding-left: 0; 60 | list-style: none; 61 | } 62 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/text-emphasis.less"; 15 | @import "mixins/text-overflow.less"; 16 | @import "mixins/vendor-prefixes.less"; 17 | 18 | // Components 19 | @import "mixins/alerts.less"; 20 | @import "mixins/buttons.less"; 21 | @import "mixins/panels.less"; 22 | @import "mixins/pagination.less"; 23 | @import "mixins/list-group.less"; 24 | @import "mixins/nav-divider.less"; 25 | @import "mixins/forms.less"; 26 | @import "mixins/progress-bar.less"; 27 | @import "mixins/table-row.less"; 28 | 29 | // Skins 30 | @import "mixins/background-variant.less"; 31 | @import "mixins/border-radius.less"; 32 | @import "mixins/gradients.less"; 33 | 34 | // Layout 35 | @import "mixins/clearfix.less"; 36 | @import "mixins/center-block.less"; 37 | @import "mixins/nav-vertical-align.less"; 38 | @import "mixins/grid-framework.less"; 39 | @import "mixins/grid.less"; 40 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:hover, 12 | &:focus, 13 | &.focus, 14 | &:active, 15 | &.active, 16 | .open > .dropdown-toggle& { 17 | color: @color; 18 | background-color: darken(@background, 10%); 19 | border-color: darken(@border, 12%); 20 | } 21 | &:active, 22 | &.active, 23 | .open > .dropdown-toggle& { 24 | background-image: none; 25 | } 26 | &.disabled, 27 | &[disabled], 28 | fieldset[disabled] & { 29 | &, 30 | &:hover, 31 | &:focus, 32 | &.focus, 33 | &:active, 34 | &.active { 35 | background-color: @background; 36 | border-color: @border; 37 | } 38 | } 39 | 40 | .badge { 41 | color: @background; 42 | background-color: @color; 43 | } 44 | } 45 | 46 | // Button sizes 47 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 48 | padding: @padding-vertical @padding-horizontal; 49 | font-size: @font-size; 50 | line-height: @line-height; 51 | border-radius: @border-radius; 52 | } 53 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | .img-responsive(@display: block) { 10 | display: @display; 11 | max-width: 100%; // Part 1: Set a maximum relative to the parent 12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 13 | } 14 | 15 | 16 | // Retina image 17 | // 18 | // Short retina mixin for setting background-image and -size. Note that the 19 | // spelling of `min--moz-device-pixel-ratio` is intentional. 20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 21 | background-image: url("@{file-1x}"); 22 | 23 | @media 24 | only screen and (-webkit-min-device-pixel-ratio: 2), 25 | only screen and ( min--moz-device-pixel-ratio: 2), 26 | only screen and ( -o-min-device-pixel-ratio: 2/1), 27 | only screen and ( min-device-pixel-ratio: 2), 28 | only screen and ( min-resolution: 192dpi), 29 | only screen and ( min-resolution: 2dppx) { 30 | background-image: url("@{file-2x}"); 31 | background-size: @width-1x @height-1x; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/table-row.less: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | .table-row-variant(@state; @background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: @cursor-disabled; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: @cursor-disabled; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | // Bar itself 23 | // ------------------------- 24 | 25 | // Outer container 26 | .progress { 27 | overflow: hidden; 28 | height: @line-height-computed; 29 | margin-bottom: @line-height-computed; 30 | background-color: @progress-bg; 31 | border-radius: @progress-border-radius; 32 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 33 | } 34 | 35 | // Bar of progress 36 | .progress-bar { 37 | float: left; 38 | width: 0%; 39 | height: 100%; 40 | font-size: @font-size-small; 41 | line-height: @line-height-computed; 42 | color: @progress-bar-color; 43 | text-align: center; 44 | background-color: @progress-bar-bg; 45 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 46 | .transition(width .6s ease); 47 | } 48 | 49 | // Striped bars 50 | // 51 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the 52 | // `.progress-bar-striped` class, which you just add to an existing 53 | // `.progress-bar`. 54 | .progress-striped .progress-bar, 55 | .progress-bar-striped { 56 | #gradient > .striped(); 57 | background-size: 40px 40px; 58 | } 59 | 60 | // Call animation for the active one 61 | // 62 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the 63 | // `.progress-bar.active` approach. 64 | .progress.active .progress-bar, 65 | .progress-bar.active { 66 | .animation(progress-bar-stripes 2s linear infinite); 67 | } 68 | 69 | 70 | // Variations 71 | // ------------------------- 72 | 73 | .progress-bar-success { 74 | .progress-bar-variant(@progress-bar-success-bg); 75 | } 76 | 77 | .progress-bar-info { 78 | .progress-bar-variant(@progress-bar-info-bg); 79 | } 80 | 81 | .progress-bar-warning { 82 | .progress-bar-variant(@progress-bar-warning-bg); 83 | } 84 | 85 | .progress-bar-danger { 86 | .progress-bar-variant(@progress-bar-danger-bg); 87 | } 88 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | } 26 | 27 | // Modifier class for 16:9 aspect ratio 28 | .embed-responsive-16by9 { 29 | padding-bottom: 56.25%; 30 | } 31 | 32 | // Modifier class for 4:3 aspect ratio 33 | .embed-responsive-4by3 { 34 | padding-bottom: 75%; 35 | } 36 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(border .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | } 48 | 49 | 50 | // For Affix plugin 51 | // ------------------------- 52 | 53 | .affix { 54 | position: fixed; 55 | } 56 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/contents.rst: -------------------------------------------------------------------------------- 1 | ######## 2 | Contents 3 | ######## 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | usage 9 | api 10 | syntax 11 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/doc/fmt.less: -------------------------------------------------------------------------------- 1 | @import 'bootstrap.less'; 2 | 3 | @header-bg: #094d75; 4 | @icon-font-path: "fonts/"; 5 | 6 | html { 7 | overflow-y: scroll; 8 | } 9 | 10 | .navbar { 11 | border-radius: 0; 12 | margin-bottom: 0; 13 | background-color: darken(@header-bg, 10%); 14 | } 15 | 16 | .jumbotron { 17 | #gradient > .vertical(@header-bg; darken(@header-bg, 2%); 50%; 50%); 18 | background-size: 100% 4px; 19 | background-color: @header-bg; 20 | background-repeat: repeat-y; 21 | color: white; 22 | text-align: center; 23 | } 24 | 25 | div.sphinxsidebar { 26 | margin-left: 0; 27 | } 28 | 29 | // Keep content not too wide for better readability. 30 | .navbar-content, .content { 31 | .make-md-column-offset(1); 32 | .make-md-column(10); 33 | .make-lg-column-offset(2); 34 | .make-lg-column(8); 35 | } 36 | 37 | .footer { 38 | padding-top: 20px; 39 | padding-bottom: 20px; 40 | border-top: 1px solid @gray-lighter; 41 | text-align: center; 42 | } 43 | 44 | // Indent descriptions of classes, functions and macros. 45 | .class dd, .function dd, .macro dd { 46 | margin-left: 20px; 47 | } 48 | 49 | // Remove Bootstrap padding for Sphinx containers. 50 | .breathe-sectiondef.container { 51 | padding: 0; 52 | } 53 | 54 | // Remove Bootstrap padding for Sphinx code elements in API signatures. 55 | .descclassname, .descname { 56 | padding: 0; 57 | } 58 | 59 | p.rubric { 60 | margin-top: 10px; 61 | } 62 | 63 | .github-btn { 64 | border: 0; 65 | overflow: hidden; 66 | } 67 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/include/fmt/posix.h: -------------------------------------------------------------------------------- 1 | #include "os.h" 2 | #warning "fmt/posix.h is deprecated; use fmt/os.h instead" -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := fmt_static 5 | LOCAL_MODULE_FILENAME := libfmt 6 | 7 | LOCAL_SRC_FILES := ../src/format.cc 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH) 10 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) 11 | 12 | LOCAL_CFLAGS += -std=c++11 -fexceptions 13 | 14 | include $(BUILD_STATIC_LIBRARY) 15 | 16 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/README: -------------------------------------------------------------------------------- 1 | This directory contains build support files such as 2 | 3 | * CMake modules 4 | * Build scripts 5 | * qmake (static build with dynamic libc only) 6 | 7 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # A vagrant config for testing against gcc-4.8. 5 | Vagrant.configure("2") do |config| 6 | config.vm.box = "ubuntu/xenial64" 7 | 8 | config.vm.provider "virtualbox" do |vb| 9 | vb.memory = "4096" 10 | end 11 | 12 | config.vm.provision "shell", inline: <<-SHELL 13 | apt-get update 14 | apt-get install -y g++ make wget git 15 | wget -q https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.tar.gz 16 | tar xzf cmake-3.14.4-Linux-x86_64.tar.gz 17 | ln -s `pwd`/cmake-3.14.4-Linux-x86_64/bin/cmake /usr/local/bin 18 | SHELL 19 | end 20 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/appveyor-build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Build the project on AppVeyor. 3 | 4 | import os 5 | from subprocess import check_call 6 | 7 | build = os.environ['BUILD'] 8 | config = os.environ['CONFIGURATION'] 9 | platform = os.environ['PLATFORM'] 10 | path = os.environ['PATH'] 11 | image = os.environ['APPVEYOR_BUILD_WORKER_IMAGE'] 12 | jobid = os.environ['APPVEYOR_JOB_ID'] 13 | cmake_command = ['cmake', '-DFMT_PEDANTIC=ON', '-DCMAKE_BUILD_TYPE=' + config, '..'] 14 | if build == 'mingw': 15 | cmake_command.append('-GMinGW Makefiles') 16 | build_command = ['mingw32-make', '-j4'] 17 | test_command = ['mingw32-make', 'test'] 18 | # Remove the path to Git bin directory from $PATH because it breaks 19 | # MinGW config. 20 | path = path.replace(r'C:\Program Files (x86)\Git\bin', '') 21 | os.environ['PATH'] = r'C:\MinGW\bin;' + path 22 | else: 23 | # Add MSBuild 14.0 to PATH as described in 24 | # http://help.appveyor.com/discussions/problems/2229-v140-not-found-on-vs2105rc. 25 | os.environ['PATH'] = r'C:\Program Files (x86)\MSBuild\15.0\Bin;' + path 26 | if image == 'Visual Studio 2019': 27 | generator = 'Visual Studio 16 2019' 28 | if platform == 'x64': 29 | cmake_command.extend(['-A', 'x64']) 30 | else: 31 | if image == 'Visual Studio 2015': 32 | generator = 'Visual Studio 14 2015' 33 | elif image == 'Visual Studio 2017': 34 | generator = 'Visual Studio 15 2017' 35 | if platform == 'x64': 36 | generator += ' Win64' 37 | cmake_command.append('-G' + generator) 38 | build_command = ['cmake', '--build', '.', '--config', config, '--', '/m:4'] 39 | test_command = ['ctest', '-C', config] 40 | 41 | check_call(cmake_command) 42 | check_call(build_command) 43 | check_call(test_command) 44 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/appveyor.yml: -------------------------------------------------------------------------------- 1 | configuration: 2 | - Debug 3 | - Release 4 | 5 | clone_depth: 1 6 | 7 | image: 8 | - Visual Studio 2015 9 | - Visual Studio 2019 10 | - Visual Studio 2017 11 | 12 | platform: 13 | - Win32 14 | - x64 15 | 16 | environment: 17 | CTEST_OUTPUT_ON_FAILURE: 1 18 | MSVC_DEFAULT_OPTIONS: ON 19 | BUILD: msvc 20 | 21 | matrix: 22 | exclude: 23 | - image: Visual Studio 2015 24 | platform: Win32 25 | - image: Visual Studio 2019 26 | platform: Win32 27 | 28 | before_build: 29 | - mkdir build 30 | - cd build 31 | 32 | build_script: 33 | - python ../support/appveyor-build.py 34 | 35 | on_failure: 36 | - appveyor PushArtifact Testing/Temporary/LastTest.log 37 | - appveyor AddTest test 38 | 39 | # Uncomment this to debug AppVeyor failures. 40 | #on_finish: 41 | # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) 42 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/cmake/FindSetEnv.cmake: -------------------------------------------------------------------------------- 1 | # A CMake script to find SetEnv.cmd. 2 | 3 | find_program(WINSDK_SETENV NAMES SetEnv.cmd 4 | PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]/bin") 5 | if (WINSDK_SETENV AND PRINT_PATH) 6 | execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WINSDK_SETENV}") 7 | endif () 8 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/cmake/fmt-config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) 4 | check_required_components(fmt) 5 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/cmake/fmt.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ 4 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 5 | 6 | Name: fmt 7 | Description: A modern formatting library 8 | Version: @FMT_VERSION@ 9 | Libs: -L${libdir} -l@FMT_LIB_NAME@ 10 | Cflags: -I${includedir} 11 | 12 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/compute-powers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Compute 10 ** exp with exp in the range [min_exponent, max_exponent] and print 3 | # normalized (with most-significant bit equal to 1) significands in hexadecimal. 4 | 5 | from __future__ import print_function 6 | 7 | min_exponent = -348 8 | max_exponent = 340 9 | step = 8 10 | significand_size = 64 11 | exp_offset = 2000 12 | 13 | class fp: 14 | pass 15 | 16 | powers = [] 17 | for i, exp in enumerate(range(min_exponent, max_exponent + 1, step)): 18 | result = fp() 19 | n = 10 ** exp if exp >= 0 else 2 ** exp_offset / 10 ** -exp 20 | k = significand_size + 1 21 | # Convert to binary and round. 22 | binary = '{:b}'.format(n) 23 | result.f = (int('{:0<{}}'.format(binary[:k], k), 2) + 1) / 2 24 | result.e = len(binary) - (exp_offset if exp < 0 else 0) - significand_size 25 | powers.append(result) 26 | # Sanity check. 27 | exp_offset10 = 400 28 | actual = result.f * 10 ** exp_offset10 29 | if result.e > 0: 30 | actual *= 2 ** result.e 31 | else: 32 | for j in range(-result.e): 33 | actual /= 2 34 | expected = 10 ** (exp_offset10 + exp) 35 | precision = len('{}'.format(expected)) - len('{}'.format(actual - expected)) 36 | if precision < 19: 37 | print('low precision:', precision) 38 | exit(1) 39 | 40 | print('Significands:', end='') 41 | for i, fp in enumerate(powers): 42 | if i % 3 == 0: 43 | print(end='\n ') 44 | print(' {:0<#16x}'.format(fp.f, ), end=',') 45 | 46 | print('\n\nExponents:', end='') 47 | for i, fp in enumerate(powers): 48 | if i % 11 == 0: 49 | print(end='\n ') 50 | print(' {:5}'.format(fp.e), end=',') 51 | 52 | print('\n\nMax exponent difference:', 53 | max([x.e - powers[i - 1].e for i, x in enumerate(powers)][1:])) 54 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/fmt.pro: -------------------------------------------------------------------------------- 1 | # Staticlib configuration for qmake builds 2 | # For some reason qmake 3.1 fails to identify source dependencies and excludes format.cc and printf.cc 3 | # from compilation so it _MUST_ be called as qmake -nodepend 4 | # A workaround is implemented below: a custom compiler is defined which does not track dependencies 5 | 6 | TEMPLATE = lib 7 | 8 | TARGET = fmt 9 | 10 | QMAKE_EXT_CPP = .cc 11 | 12 | CONFIG = staticlib warn_on c++11 13 | 14 | FMT_SOURCES = \ 15 | ../src/format.cc \ 16 | ../src/posix.cc 17 | 18 | fmt.name = libfmt 19 | fmt.input = FMT_SOURCES 20 | fmt.output = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ 21 | fmt.clean = ${QMAKE_FILE_BASE}$$QMAKE_EXT_OBJ 22 | fmt.depends = ${QMAKE_FILE_IN} 23 | # QMAKE_RUN_CXX will not be expanded 24 | fmt.commands = $$QMAKE_CXX -c $$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_WARN_ON $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO $$QMAKE_CXXFLAGS_CXX11 ${QMAKE_FILE_IN} 25 | fmt.variable_out = OBJECTS 26 | fmt.CONFIG = no_dependencies no_link 27 | QMAKE_EXTRA_COMPILERS += fmt 28 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/rtd/conf.py: -------------------------------------------------------------------------------- 1 | # Sphinx configuration for readthedocs. 2 | 3 | import os, sys 4 | 5 | master_doc = 'index' 6 | html_theme = 'theme' 7 | html_theme_path = ["."] 8 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/rtd/index.rst: -------------------------------------------------------------------------------- 1 | If you are not redirected automatically, follow the 2 | `link to the fmt documentation `_. 3 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/rtd/theme/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "basic/layout.html" %} 2 | 3 | {% block extrahead %} 4 | 5 | 6 | 9 | Page Redirection 10 | {% endblock %} 11 | 12 | {% block document %} 13 | If you are not redirected automatically, follow the link to the fmt documentation. 14 | {% endblock %} 15 | 16 | {% block footer %} 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/rtd/theme/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = basic 3 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/support/update-coverity-branch.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Update the coverity branch from the master branch. 3 | # It is not done automatically because Coverity Scan limits 4 | # the number of submissions per day. 5 | 6 | from __future__ import print_function 7 | import shutil, tempfile 8 | from subprocess import check_output, STDOUT 9 | 10 | class Git: 11 | def __init__(self, dir): 12 | self.dir = dir 13 | 14 | def __call__(self, *args): 15 | output = check_output(['git'] + list(args), cwd=self.dir, stderr=STDOUT) 16 | print(output) 17 | return output 18 | 19 | dir = tempfile.mkdtemp() 20 | try: 21 | git = Git(dir) 22 | git('clone', '-b', 'coverity', 'git@github.com:fmtlib/fmt.git', dir) 23 | output = git('merge', '-X', 'theirs', '--no-commit', 'origin/master') 24 | if 'Fast-forward' not in output: 25 | git('reset', 'HEAD', '.travis.yml') 26 | git('checkout', '--', '.travis.yml') 27 | git('commit', '-m', 'Update coverity branch') 28 | git('push') 29 | finally: 30 | shutil.rmtree(dir) 31 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/add-subdirectory-test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1.0) 2 | 3 | project(fmt-test) 4 | 5 | add_subdirectory(../.. fmt) 6 | 7 | add_executable(library-test "main.cc") 8 | target_link_libraries(library-test fmt::fmt) 9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 10 | target_include_directories(library-test PUBLIC SYSTEM .) 11 | 12 | if (TARGET fmt::fmt-header-only) 13 | add_executable(header-only-test "main.cc") 14 | target_link_libraries(header-only-test fmt::fmt-header-only) 15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 16 | target_include_directories(header-only-test PUBLIC SYSTEM .) 17 | endif () 18 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/add-subdirectory-test/main.cc: -------------------------------------------------------------------------------- 1 | #include "fmt/format.h" 2 | 3 | int main(int argc, char** argv) { 4 | for(int i = 0; i < argc; ++i) 5 | fmt::print("{}: {}\n", i, argv[i]); 6 | } 7 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/assert-test.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - assertion tests 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include "fmt/core.h" 9 | #include "gtest.h" 10 | 11 | TEST(AssertTest, Fail) { 12 | #if GTEST_HAS_DEATH_TEST 13 | EXPECT_DEBUG_DEATH(FMT_ASSERT(false, "don't panic!"), "don't panic!"); 14 | #else 15 | fmt::print("warning: death tests are not supported\n"); 16 | #endif 17 | } 18 | 19 | bool test_condition = false; 20 | 21 | TEST(AssertTest, DanglingElse) { 22 | bool executed_else = false; 23 | if (test_condition) 24 | FMT_ASSERT(true, ""); 25 | else 26 | executed_else = true; 27 | EXPECT_TRUE(executed_else); 28 | } 29 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/cuda-test/cpp14.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // The purpose of this part is to ensure NVCC's host compiler also supports 4 | // the standard version. See 'cuda-cpp14.cu'. 5 | // 6 | // https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros 7 | static_assert(__cplusplus >= 201402L, "expect C++ 2014 for host compiler"); 8 | 9 | auto make_message_cpp() -> std::string { 10 | return fmt::format("host compiler \t: __cplusplus == {}", __cplusplus); 11 | } 12 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/cuda-test/cuda-cpp14.cu: -------------------------------------------------------------------------------- 1 | // Direct NVCC command line example: 2 | // 3 | // nvcc ./cuda-cpp14.cu -x cu -I"../include" -l"fmtd" -L"../build/Debug" \ 4 | // -std=c++14 -Xcompiler /std:c++14 -Xcompiler /Zc:__cplusplus 5 | 6 | // Ensure that we are using the latest C++ standard for NVCC 7 | // The version is C++14 8 | // 9 | // https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-cplusplus-language-support 10 | // https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros 11 | static_assert(__cplusplus >= 201402L, "expect C++ 2014 for nvcc"); 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | extern auto make_message_cpp() -> std::string; 19 | extern auto make_message_cuda() -> std::string; 20 | 21 | int main() { 22 | std::cout << make_message_cuda() << std::endl; 23 | std::cout << make_message_cpp() << std::endl; 24 | } 25 | 26 | auto make_message_cuda() -> std::string { 27 | return fmt::format("nvcc compiler \t: __cplusplus == {}", __cplusplus); 28 | } 29 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/custom-formatter-test.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - custom argument formatter tests 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #ifndef _CRT_SECURE_NO_WARNINGS 9 | #define _CRT_SECURE_NO_WARNINGS 10 | #endif 11 | 12 | #include "fmt/format.h" 13 | #include "gtest-extra.h" 14 | 15 | // MSVC 2013 is known to be broken. 16 | #if !FMT_MSC_VER || FMT_MSC_VER > 1800 17 | 18 | // A custom argument formatter that doesn't print `-` for floating-point values 19 | // rounded to 0. 20 | class custom_arg_formatter 21 | : public fmt::arg_formatter> { 22 | public: 23 | using range = fmt::buffer_range; 24 | typedef fmt::arg_formatter base; 25 | 26 | custom_arg_formatter(fmt::format_context& ctx, 27 | fmt::format_parse_context* parse_ctx, 28 | fmt::format_specs* s = nullptr) 29 | : base(ctx, parse_ctx, s) {} 30 | 31 | using base::operator(); 32 | 33 | iterator operator()(double value) { 34 | // Comparing a float to 0.0 is safe. 35 | if (round(value * pow(10, specs()->precision)) == 0.0) value = 0; 36 | return base::operator()(value); 37 | } 38 | }; 39 | 40 | std::string custom_vformat(fmt::string_view format_str, fmt::format_args args) { 41 | fmt::memory_buffer buffer; 42 | // Pass custom argument formatter as a template arg to vwrite. 43 | fmt::vformat_to(buffer, format_str, args); 44 | return std::string(buffer.data(), buffer.size()); 45 | } 46 | 47 | template 48 | std::string custom_format(const char* format_str, const Args&... args) { 49 | auto va = fmt::make_format_args(args...); 50 | return custom_vformat(format_str, va); 51 | } 52 | 53 | TEST(CustomFormatterTest, Format) { 54 | EXPECT_EQ("0.00", custom_format("{:.2f}", -.00001)); 55 | } 56 | #endif 57 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/find-package-test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1.0) 2 | 3 | project(fmt-test) 4 | 5 | find_package(FMT REQUIRED) 6 | 7 | add_executable(library-test main.cc) 8 | target_link_libraries(library-test fmt::fmt) 9 | target_compile_options(library-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 10 | target_include_directories(library-test PUBLIC SYSTEM .) 11 | 12 | if (TARGET fmt::fmt-header-only) 13 | add_executable(header-only-test main.cc) 14 | target_link_libraries(header-only-test fmt::fmt-header-only) 15 | target_compile_options(header-only-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) 16 | target_include_directories(header-only-test PUBLIC SYSTEM .) 17 | endif () 18 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/find-package-test/main.cc: -------------------------------------------------------------------------------- 1 | #include "fmt/format.h" 2 | 3 | int main(int argc, char** argv) { 4 | for(int i = 0; i < argc; ++i) 5 | fmt::print("{}: {}\n", i, argv[i]); 6 | } 7 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/fuzzing/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore artifacts from the build.sh script 2 | build-*/ 3 | 4 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/fuzzing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, Paul Dreik 2 | # License: see LICENSE.rst in the fmt root directory 3 | 4 | # settings this links in a main. useful for reproducing, 5 | # kcov, gdb, afl, valgrind. 6 | # (note that libFuzzer can also reproduce, just pass it the files) 7 | option(FMT_FUZZ_LINKMAIN "enables the reproduce mode, instead of libFuzzer" On) 8 | 9 | # For oss-fuzz - insert $LIB_FUZZING_ENGINE into the link flags, but only for 10 | # the fuzz targets, otherwise the cmake configuration step fails. 11 | set(FMT_FUZZ_LDFLAGS "" CACHE STRING "LDFLAGS for the fuzz targets") 12 | 13 | # Find all fuzzers. 14 | set(SOURCES 15 | chrono_duration.cpp 16 | named_arg.cpp 17 | one_arg.cpp 18 | sprintf.cpp 19 | two_args.cpp 20 | ) 21 | 22 | macro(implement_fuzzer sourcefile) 23 | get_filename_component(basename ${sourcefile} NAME_WE) 24 | set(name fuzzer_${basename}) 25 | add_executable(${name} ${sourcefile} fuzzer_common.h) 26 | if (FMT_FUZZ_LINKMAIN) 27 | target_sources(${name} PRIVATE main.cpp) 28 | endif () 29 | target_link_libraries(${name} PRIVATE fmt) 30 | if (FMT_FUZZ_LDFLAGS) 31 | target_link_libraries(${name} PRIVATE ${FMT_FUZZ_LDFLAGS}) 32 | endif () 33 | target_compile_features(${name} PRIVATE cxx_generic_lambdas) 34 | endmacro () 35 | 36 | foreach (X IN ITEMS ${SOURCES}) 37 | implement_fuzzer(${X}) 38 | endforeach () 39 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/fuzzing/README.md: -------------------------------------------------------------------------------- 1 | # FMT Fuzzer 2 | 3 | Fuzzing has revealed [several bugs](https://github.com/fmtlib/fmt/issues?&q=is%3Aissue+fuzz) 4 | in fmt. It is a part of the continous fuzzing at 5 | [oss-fuzz](https://github.com/google/oss-fuzz). 6 | 7 | The source code is modified to make the fuzzing possible without locking up on 8 | resource exhaustion: 9 | ```cpp 10 | #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION 11 | if(spec.precision>100000) { 12 | throw std::runtime_error("fuzz mode - avoiding large precision"); 13 | } 14 | #endif 15 | ``` 16 | This macro is the defacto standard for making fuzzing practically possible, see 17 | [the libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html#fuzzer-friendly-build-mode). 18 | 19 | ## Running the fuzzers locally 20 | 21 | There is a [helper script](build.sh) to build the fuzzers, which has only been 22 | tested on Debian and Ubuntu linux so far. There should be no problems fuzzing on 23 | Windows (using clang>=8) or on Mac, but the script will probably not work out of 24 | the box. 25 | 26 | Something along 27 | ```sh 28 | mkdir build 29 | cd build 30 | export CXX=clang++ 31 | export CXXFLAGS="-fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION= -g" 32 | cmake .. -DFMT_SAFE_DURATION_CAST=On -DFMT_FUZZ=On -DFMT_FUZZ_LINKMAIN=Off -DFMT_FUZZ_LDFLAGS="-fsanitize=fuzzer" 33 | cmake --build . 34 | ``` 35 | should work to build the fuzzers for all platforms which clang supports. 36 | 37 | Execute a fuzzer with for instance 38 | ```sh 39 | cd build 40 | export UBSAN_OPTIONS=halt_on_error=1 41 | mkdir out_chrono 42 | bin/fuzzer_chrono_duration out_chrono 43 | ``` 44 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/fuzzing/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "fuzzer_common.h" 6 | 7 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t* Data, std::size_t Size); 8 | int main(int argc, char* argv[]) { 9 | for (int i = 1; i < argc; ++i) { 10 | std::ifstream in(argv[i]); 11 | assert(in); 12 | in.seekg(0, std::ios_base::end); 13 | const auto pos = in.tellg(); 14 | assert(pos >= 0); 15 | in.seekg(0, std::ios_base::beg); 16 | std::vector buf(static_cast(pos)); 17 | in.read(buf.data(), static_cast(buf.size())); 18 | assert(in.gcount() == pos); 19 | LLVMFuzzerTestOneInput(fmt_fuzzer::as_bytes(buf.data()), buf.size()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/header-only-test.cc: -------------------------------------------------------------------------------- 1 | // Header-only configuration test 2 | 3 | #include "fmt/core.h" 4 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/header-only-test2.cc: -------------------------------------------------------------------------------- 1 | // Additional translation unit for the header-only configuration test 2 | 3 | #include "fmt/core.h" 4 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/mock-allocator.h: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - mock allocator 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #ifndef FMT_MOCK_ALLOCATOR_H_ 9 | #define FMT_MOCK_ALLOCATOR_H_ 10 | 11 | #include "fmt/format.h" 12 | #include "gmock.h" 13 | 14 | template class mock_allocator { 15 | public: 16 | mock_allocator() {} 17 | mock_allocator(const mock_allocator&) {} 18 | typedef T value_type; 19 | MOCK_METHOD1_T(allocate, T*(std::size_t n)); 20 | MOCK_METHOD2_T(deallocate, void(T* p, std::size_t n)); 21 | }; 22 | 23 | template class allocator_ref { 24 | private: 25 | Allocator* alloc_; 26 | 27 | void move(allocator_ref& other) { 28 | alloc_ = other.alloc_; 29 | other.alloc_ = nullptr; 30 | } 31 | 32 | public: 33 | typedef typename Allocator::value_type value_type; 34 | 35 | explicit allocator_ref(Allocator* alloc = nullptr) : alloc_(alloc) {} 36 | 37 | allocator_ref(const allocator_ref& other) : alloc_(other.alloc_) {} 38 | allocator_ref(allocator_ref&& other) { move(other); } 39 | 40 | allocator_ref& operator=(allocator_ref&& other) { 41 | assert(this != &other); 42 | move(other); 43 | return *this; 44 | } 45 | 46 | allocator_ref& operator=(const allocator_ref& other) { 47 | alloc_ = other.alloc_; 48 | return *this; 49 | } 50 | 51 | public: 52 | Allocator* get() const { return alloc_; } 53 | 54 | value_type* allocate(std::size_t n) { 55 | return std::allocator_traits::allocate(*alloc_, n); 56 | } 57 | void deallocate(value_type* p, std::size_t n) { alloc_->deallocate(p, n); } 58 | }; 59 | 60 | #endif // FMT_MOCK_ALLOCATOR_H_ 61 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/posix-mock.h: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - mocks of POSIX functions 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #ifndef FMT_POSIX_TEST_H 9 | #define FMT_POSIX_TEST_H 10 | 11 | #include 12 | #include 13 | 14 | #ifdef _WIN32 15 | # include 16 | #else 17 | # include // for FreeBSD version 18 | # include // for ssize_t 19 | #endif 20 | 21 | #ifndef _MSC_VER 22 | struct stat; 23 | #endif 24 | 25 | namespace test { 26 | 27 | #ifndef _MSC_VER 28 | // Size type for read and write. 29 | typedef size_t size_t; 30 | typedef ssize_t ssize_t; 31 | int open(const char* path, int oflag, int mode); 32 | int fstat(int fd, struct stat* buf); 33 | #else 34 | typedef unsigned size_t; 35 | typedef int ssize_t; 36 | errno_t sopen_s(int* pfh, const char* filename, int oflag, int shflag, 37 | int pmode); 38 | #endif 39 | 40 | #ifndef _WIN32 41 | long sysconf(int name); 42 | #else 43 | DWORD GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh); 44 | #endif 45 | 46 | int close(int fildes); 47 | 48 | int dup(int fildes); 49 | int dup2(int fildes, int fildes2); 50 | 51 | FILE* fdopen(int fildes, const char* mode); 52 | 53 | ssize_t read(int fildes, void* buf, size_t nbyte); 54 | ssize_t write(int fildes, const void* buf, size_t nbyte); 55 | 56 | #ifndef _WIN32 57 | int pipe(int fildes[2]); 58 | #else 59 | int pipe(int* pfds, unsigned psize, int textmode); 60 | #endif 61 | 62 | FILE* fopen(const char* filename, const char* mode); 63 | int fclose(FILE* stream); 64 | int(fileno)(FILE* stream); 65 | } // namespace test 66 | 67 | #define FMT_SYSTEM(call) test::call 68 | 69 | #endif // FMT_POSIX_TEST_H 70 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/test-assert.h: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - test version of FMT_ASSERT 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #ifndef FMT_TEST_ASSERT_H_ 9 | #define FMT_TEST_ASSERT_H_ 10 | 11 | #include 12 | #include "gtest.h" 13 | 14 | class assertion_failure : public std::logic_error { 15 | public: 16 | explicit assertion_failure(const char* message) : std::logic_error(message) {} 17 | 18 | private: 19 | virtual void avoid_weak_vtable(); 20 | }; 21 | 22 | void assertion_failure::avoid_weak_vtable() {} 23 | 24 | #define FMT_ASSERT(condition, message) \ 25 | if (!(condition)) throw assertion_failure(message); 26 | 27 | // Expects an assertion failure. 28 | #define EXPECT_ASSERT(stmt, message) \ 29 | FMT_TEST_THROW_(stmt, assertion_failure, message, GTEST_NONFATAL_FAILURE_) 30 | 31 | #endif // FMT_TEST_ASSERT_H_ 32 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/test-main.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - test main function. 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include 9 | #include "gtest.h" 10 | 11 | #ifdef _WIN32 12 | # include 13 | #endif 14 | 15 | #ifdef _MSC_VER 16 | # include 17 | #else 18 | # define _CrtSetReportFile(a, b) 19 | # define _CrtSetReportMode(a, b) 20 | #endif 21 | 22 | int main(int argc, char** argv) { 23 | #ifdef _WIN32 24 | // Don't display any error dialogs. This also suppresses message boxes 25 | // on assertion failures in MinGW where _set_error_mode/CrtSetReportMode 26 | // doesn't help. 27 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | 28 | SEM_NOOPENFILEERRORBOX); 29 | #endif 30 | // Disable message boxes on assertion failures. 31 | _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); 32 | _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 33 | _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); 34 | _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 35 | try { 36 | testing::InitGoogleTest(&argc, argv); 37 | return RUN_ALL_TESTS(); 38 | } catch (...) { 39 | // Catch all exceptions to make Coverity happy. 40 | } 41 | return EXIT_FAILURE; 42 | } 43 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/util.cc: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - test utilities 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include "util.h" 9 | #include 10 | 11 | void increment(char* s) { 12 | for (int i = static_cast(std::strlen(s)) - 1; i >= 0; --i) { 13 | if (s[i] != '9') { 14 | ++s[i]; 15 | break; 16 | } 17 | s[i] = '0'; 18 | } 19 | } 20 | 21 | std::string get_system_error(int error_code) { 22 | #if defined(__MINGW32__) || !defined(_WIN32) 23 | return strerror(error_code); 24 | #else 25 | enum { BUFFER_SIZE = 200 }; 26 | char buffer[BUFFER_SIZE]; 27 | if (strerror_s(buffer, BUFFER_SIZE, error_code)) 28 | throw std::exception("strerror_s failed"); 29 | return buffer; 30 | #endif 31 | } 32 | 33 | const char* const FILE_CONTENT = "Don't panic!"; 34 | 35 | fmt::buffered_file open_buffered_file(FILE** fp) { 36 | #if FMT_USE_FCNTL 37 | fmt::file read_end, write_end; 38 | fmt::file::pipe(read_end, write_end); 39 | write_end.write(FILE_CONTENT, std::strlen(FILE_CONTENT)); 40 | write_end.close(); 41 | fmt::buffered_file f = read_end.fdopen("r"); 42 | if (fp) *fp = f.get(); 43 | #else 44 | fmt::buffered_file f("test-file", "w"); 45 | fputs(FILE_CONTENT, f.get()); 46 | if (fp) *fp = f.get(); 47 | #endif 48 | return f; 49 | } 50 | -------------------------------------------------------------------------------- /Externals/Fmt/fmt/test/util.h: -------------------------------------------------------------------------------- 1 | // Formatting library for C++ - test utilities 2 | // 3 | // Copyright (c) 2012 - present, Victor Zverovich 4 | // All rights reserved. 5 | // 6 | // For the license information refer to format.h. 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "fmt/os.h" 13 | 14 | enum { BUFFER_SIZE = 256 }; 15 | 16 | #ifdef _MSC_VER 17 | # define FMT_VSNPRINTF vsprintf_s 18 | #else 19 | # define FMT_VSNPRINTF vsnprintf 20 | #endif 21 | 22 | template 23 | void safe_sprintf(char (&buffer)[SIZE], const char* format, ...) { 24 | std::va_list args; 25 | va_start(args, format); 26 | FMT_VSNPRINTF(buffer, SIZE, format, args); 27 | va_end(args); 28 | } 29 | 30 | // Increment a number in a string. 31 | void increment(char* s); 32 | 33 | std::string get_system_error(int error_code); 34 | 35 | extern const char* const FILE_CONTENT; 36 | 37 | // Opens a buffered file for reading. 38 | fmt::buffered_file open_buffered_file(FILE** fp = nullptr); 39 | 40 | inline FILE* safe_fopen(const char* filename, const char* mode) { 41 | #if defined(_WIN32) && !defined(__MINGW32__) 42 | // Fix MSVC warning about "unsafe" fopen. 43 | FILE* f = 0; 44 | errno = fopen_s(&f, filename, mode); 45 | return f; 46 | #else 47 | return std::fopen(filename, mode); 48 | #endif 49 | } 50 | 51 | template class BasicTestString { 52 | private: 53 | std::basic_string value_; 54 | 55 | static const Char EMPTY[]; 56 | 57 | public: 58 | explicit BasicTestString(const Char* value = EMPTY) : value_(value) {} 59 | 60 | const std::basic_string& value() const { return value_; } 61 | }; 62 | 63 | template const Char BasicTestString::EMPTY[] = {0}; 64 | 65 | typedef BasicTestString TestString; 66 | typedef BasicTestString TestWString; 67 | 68 | template 69 | std::basic_ostream& operator<<(std::basic_ostream& os, 70 | const BasicTestString& s) { 71 | os << s.value(); 72 | return os; 73 | } 74 | 75 | class Date { 76 | int year_, month_, day_; 77 | 78 | public: 79 | Date(int year, int month, int day) : year_(year), month_(month), day_(day) {} 80 | 81 | int year() const { return year_; } 82 | int month() const { return month_; } 83 | int day() const { return day_; } 84 | }; 85 | -------------------------------------------------------------------------------- /Externals/Pybind11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(pybind11) 2 | 3 | if(BUILD_TESTS) 4 | add_subdirectory(Tests) 5 | endif(BUILD_TESTS) 6 | -------------------------------------------------------------------------------- /Externals/Pybind11/README.md: -------------------------------------------------------------------------------- 1 | git clone https://github.com/pybind/pybind11 2 | 3 | tag: 4f72ef846fe8453596230ac285eeaa0ce3278bb4 4 | -------------------------------------------------------------------------------- /Externals/Pybind11/Tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pybind11_add_module(Pybind11Test Pybind11Test.cpp) 2 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/.gitignore: -------------------------------------------------------------------------------- 1 | CMakeCache.txt 2 | CMakeFiles 3 | Makefile 4 | cmake_install.cmake 5 | .DS_Store 6 | *.so 7 | *.pyd 8 | *.dll 9 | *.sln 10 | *.sdf 11 | *.opensdf 12 | *.vcxproj 13 | *.filters 14 | example.dir 15 | Win32 16 | x64 17 | Release 18 | Debug 19 | .vs 20 | CTestTestfile.cmake 21 | Testing 22 | autogen 23 | MANIFEST 24 | /.ninja_* 25 | /*.ninja 26 | /docs/.build 27 | *.py[co] 28 | *.egg-info 29 | *~ 30 | .*.swp 31 | .DS_Store 32 | /dist 33 | /build 34 | /cmake/ 35 | .cache/ 36 | sosize-*.txt 37 | pybind11Config*.cmake 38 | pybind11Targets.cmake 39 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tools/clang"] 2 | path = tools/clang 3 | url = ../../wjakob/clang-cindex-python3 4 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/.readthedocs.yml: -------------------------------------------------------------------------------- 1 | python: 2 | version: 3 3 | requirements_file: docs/requirements.txt 4 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Make sure you've completed the following steps before submitting your issue -- thank you! 2 | 3 | 1. Check if your question has already been answered in the [FAQ](http://pybind11.readthedocs.io/en/latest/faq.html) section. 4 | 2. Make sure you've read the [documentation](http://pybind11.readthedocs.io/en/latest/). Your issue may be addressed there. 5 | 3. If those resources didn't help and you only have a short question (not a bug report), consider asking in the [Gitter chat room](https://gitter.im/pybind/Lobby). 6 | 4. If you have a genuine bug report or a more complex question which is not answered in the previous items (or not suitable for chat), please fill in the details below. 7 | 5. Include a self-contained and minimal piece of code that reproduces the problem. If that's not possible, try to make the description as clear as possible. 8 | 9 | *After reading, remove this checklist and the template text in parentheses below.* 10 | 11 | ## Issue description 12 | 13 | (Provide a short description, state the expected behavior and what actually happens.) 14 | 15 | ## Reproducible example code 16 | 17 | (The code should be minimal, have no external dependencies, isolate the function(s) that cause breakage. Submit matched and complete C++ and Python snippets that can be easily compiled and run to diagnose the issue.) 18 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Wenzel Jakob , All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software 15 | without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | Please also refer to the file CONTRIBUTING.md, which clarifies licensing of 29 | external contributions to this project including patches, pull requests, etc. 30 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include include/pybind11 *.h 2 | include LICENSE README.md CONTRIBUTING.md 3 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/Doxyfile: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = pybind11 2 | INPUT = ../include/pybind11/ 3 | RECURSIVE = YES 4 | 5 | GENERATE_HTML = NO 6 | GENERATE_LATEX = NO 7 | GENERATE_XML = YES 8 | XML_OUTPUT = .build/doxygenxml 9 | XML_PROGRAMLISTING = YES 10 | 11 | MACRO_EXPANSION = YES 12 | EXPAND_ONLY_PREDEF = YES 13 | EXPAND_AS_DEFINED = PYBIND11_RUNTIME_EXCEPTION 14 | 15 | ALIASES = "rst=\verbatim embed:rst" 16 | ALIASES += "endrst=\endverbatim" 17 | 18 | QUIET = YES 19 | WARNINGS = YES 20 | WARN_IF_UNDOCUMENTED = NO 21 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/_static/theme_overrides.css: -------------------------------------------------------------------------------- 1 | .wy-table-responsive table td, 2 | .wy-table-responsive table th { 3 | white-space: initial !important; 4 | } 5 | .rst-content table.docutils td { 6 | vertical-align: top !important; 7 | } 8 | div[class^='highlight'] pre { 9 | white-space: pre; 10 | white-space: pre-wrap; 11 | } 12 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/advanced/cast/index.rst: -------------------------------------------------------------------------------- 1 | Type conversions 2 | ################ 3 | 4 | Apart from enabling cross-language function calls, a fundamental problem 5 | that a binding tool like pybind11 must address is to provide access to 6 | native Python types in C++ and vice versa. There are three fundamentally 7 | different ways to do this—which approach is preferable for a particular type 8 | depends on the situation at hand. 9 | 10 | 1. Use a native C++ type everywhere. In this case, the type must be wrapped 11 | using pybind11-generated bindings so that Python can interact with it. 12 | 13 | 2. Use a native Python type everywhere. It will need to be wrapped so that 14 | C++ functions can interact with it. 15 | 16 | 3. Use a native C++ type on the C++ side and a native Python type on the 17 | Python side. pybind11 refers to this as a *type conversion*. 18 | 19 | Type conversions are the most "natural" option in the sense that native 20 | (non-wrapped) types are used everywhere. The main downside is that a copy 21 | of the data must be made on every Python ↔ C++ transition: this is 22 | needed since the C++ and Python versions of the same type generally won't 23 | have the same memory layout. 24 | 25 | pybind11 can perform many kinds of conversions automatically. An overview 26 | is provided in the table ":ref:`conversion_table`". 27 | 28 | The following subsections discuss the differences between these options in more 29 | detail. The main focus in this section is on type conversions, which represent 30 | the last case of the above list. 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | overview 36 | strings 37 | stl 38 | functional 39 | chrono 40 | eigen 41 | custom 42 | 43 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/advanced/pycpp/index.rst: -------------------------------------------------------------------------------- 1 | Python C++ interface 2 | #################### 3 | 4 | pybind11 exposes Python types and functions using thin C++ wrappers, which 5 | makes it possible to conveniently call Python code from C++ without resorting 6 | to Python's C API. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | 11 | object 12 | numpy 13 | utilities 14 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. only: not latex 2 | 3 | .. image:: pybind11-logo.png 4 | 5 | pybind11 --- Seamless operability between C++11 and Python 6 | ========================================================== 7 | 8 | .. only: not latex 9 | 10 | Contents: 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | intro 16 | changelog 17 | upgrade 18 | 19 | .. toctree:: 20 | :caption: The Basics 21 | :maxdepth: 2 22 | 23 | basics 24 | classes 25 | compiling 26 | 27 | .. toctree:: 28 | :caption: Advanced Topics 29 | :maxdepth: 2 30 | 31 | advanced/functions 32 | advanced/classes 33 | advanced/exceptions 34 | advanced/smart_ptrs 35 | advanced/cast/index 36 | advanced/pycpp/index 37 | advanced/embedding 38 | advanced/misc 39 | 40 | .. toctree:: 41 | :caption: Extra Information 42 | :maxdepth: 1 43 | 44 | faq 45 | benchmark 46 | limitations 47 | reference 48 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/limitations.rst: -------------------------------------------------------------------------------- 1 | Limitations 2 | ########### 3 | 4 | pybind11 strives to be a general solution to binding generation, but it also has 5 | certain limitations: 6 | 7 | - pybind11 casts away ``const``-ness in function arguments and return values. 8 | This is in line with the Python language, which has no concept of ``const`` 9 | values. This means that some additional care is needed to avoid bugs that 10 | would be caught by the type checker in a traditional C++ program. 11 | 12 | - The NumPy interface ``pybind11::array`` greatly simplifies accessing 13 | numerical data from C++ (and vice versa), but it's not a full-blown array 14 | class like ``Eigen::Array`` or ``boost.multi_array``. 15 | 16 | These features could be implemented but would lead to a significant increase in 17 | complexity. I've decided to draw the line here to keep this project simple and 18 | compact. Users who absolutely require these features are encouraged to fork 19 | pybind11. 20 | 21 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/pybind11-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Pybind11/pybind11/docs/pybind11-logo.png -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/pybind11_vs_boost_python1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Pybind11/pybind11/docs/pybind11_vs_boost_python1.png -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/pybind11_vs_boost_python2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rvbust/Vis/de85ef7233a10a26bc777c822bfb82ad91638c84/Externals/Pybind11/pybind11/docs/pybind11_vs_boost_python2.png -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/release.rst: -------------------------------------------------------------------------------- 1 | To release a new version of pybind11: 2 | 3 | - Update the version number and push to pypi 4 | - Update ``pybind11/_version.py`` (set release version, remove 'dev'). 5 | - Update ``PYBIND11_VERSION_MAJOR`` etc. in ``include/pybind11/detail/common.h``. 6 | - Ensure that all the information in ``setup.py`` is up-to-date. 7 | - Update version in ``docs/conf.py``. 8 | - Tag release date in ``docs/changelog.rst``. 9 | - ``git add`` and ``git commit``. 10 | - if new minor version: ``git checkout -b vX.Y``, ``git push -u origin vX.Y`` 11 | - ``git tag -a vX.Y.Z -m 'vX.Y.Z release'``. 12 | - ``git push`` 13 | - ``git push --tags``. 14 | - ``python setup.py sdist upload``. 15 | - ``python setup.py bdist_wheel upload``. 16 | - Get back to work 17 | - Update ``_version.py`` (add 'dev' and increment minor). 18 | - Update version in ``docs/conf.py`` 19 | - Update version macros in ``include/pybind11/common.h`` 20 | - ``git add`` and ``git commit``. 21 | ``git push`` 22 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | breathe == 4.5.0 2 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/include/pybind11/common.h: -------------------------------------------------------------------------------- 1 | #include "detail/common.h" 2 | #warning "Including 'common.h' is deprecated. It will be removed in v3.0. Use 'pybind11.h'." 3 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/include/pybind11/complex.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/complex.h: Complex number support 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "pybind11.h" 13 | #include 14 | 15 | /// glibc defines I as a macro which breaks things, e.g., boost template names 16 | #ifdef I 17 | # undef I 18 | #endif 19 | 20 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 21 | 22 | template struct format_descriptor, detail::enable_if_t::value>> { 23 | static constexpr const char c = format_descriptor::c; 24 | static constexpr const char value[3] = { 'Z', c, '\0' }; 25 | static std::string format() { return std::string(value); } 26 | }; 27 | 28 | #ifndef PYBIND11_CPP17 29 | 30 | template constexpr const char format_descriptor< 31 | std::complex, detail::enable_if_t::value>>::value[3]; 32 | 33 | #endif 34 | 35 | NAMESPACE_BEGIN(detail) 36 | 37 | template struct is_fmt_numeric, detail::enable_if_t::value>> { 38 | static constexpr bool value = true; 39 | static constexpr int index = is_fmt_numeric::index + 3; 40 | }; 41 | 42 | template class type_caster> { 43 | public: 44 | bool load(handle src, bool convert) { 45 | if (!src) 46 | return false; 47 | if (!convert && !PyComplex_Check(src.ptr())) 48 | return false; 49 | Py_complex result = PyComplex_AsCComplex(src.ptr()); 50 | if (result.real == -1.0 && PyErr_Occurred()) { 51 | PyErr_Clear(); 52 | return false; 53 | } 54 | value = std::complex((T) result.real, (T) result.imag); 55 | return true; 56 | } 57 | 58 | static handle cast(const std::complex &src, return_value_policy /* policy */, handle /* parent */) { 59 | return PyComplex_FromDoubles((double) src.real(), (double) src.imag()); 60 | } 61 | 62 | PYBIND11_TYPE_CASTER(std::complex, _("complex")); 63 | }; 64 | NAMESPACE_END(detail) 65 | NAMESPACE_END(PYBIND11_NAMESPACE) 66 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/include/pybind11/detail/typeid.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/detail/typeid.h: Compiler-independent access to type identifiers 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | #include 14 | 15 | #if defined(__GNUG__) 16 | #include 17 | #endif 18 | 19 | #include "common.h" 20 | 21 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 22 | NAMESPACE_BEGIN(detail) 23 | /// Erase all occurrences of a substring 24 | inline void erase_all(std::string &string, const std::string &search) { 25 | for (size_t pos = 0;;) { 26 | pos = string.find(search, pos); 27 | if (pos == std::string::npos) break; 28 | string.erase(pos, search.length()); 29 | } 30 | } 31 | 32 | PYBIND11_NOINLINE inline void clean_type_id(std::string &name) { 33 | #if defined(__GNUG__) 34 | int status = 0; 35 | std::unique_ptr res { 36 | abi::__cxa_demangle(name.c_str(), nullptr, nullptr, &status), std::free }; 37 | if (status == 0) 38 | name = res.get(); 39 | #else 40 | detail::erase_all(name, "class "); 41 | detail::erase_all(name, "struct "); 42 | detail::erase_all(name, "enum "); 43 | #endif 44 | detail::erase_all(name, "pybind11::"); 45 | } 46 | NAMESPACE_END(detail) 47 | 48 | /// Return a string representation of a C++ type 49 | template static std::string type_id() { 50 | std::string name(typeid(T).name()); 51 | detail::clean_type_id(name); 52 | return name; 53 | } 54 | 55 | NAMESPACE_END(PYBIND11_NAMESPACE) 56 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/include/pybind11/options.h: -------------------------------------------------------------------------------- 1 | /* 2 | pybind11/options.h: global settings that are configurable at runtime. 3 | 4 | Copyright (c) 2016 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "detail/common.h" 13 | 14 | NAMESPACE_BEGIN(PYBIND11_NAMESPACE) 15 | 16 | class options { 17 | public: 18 | 19 | // Default RAII constructor, which leaves settings as they currently are. 20 | options() : previous_state(global_state()) {} 21 | 22 | // Class is non-copyable. 23 | options(const options&) = delete; 24 | options& operator=(const options&) = delete; 25 | 26 | // Destructor, which restores settings that were in effect before. 27 | ~options() { 28 | global_state() = previous_state; 29 | } 30 | 31 | // Setter methods (affect the global state): 32 | 33 | options& disable_user_defined_docstrings() & { global_state().show_user_defined_docstrings = false; return *this; } 34 | 35 | options& enable_user_defined_docstrings() & { global_state().show_user_defined_docstrings = true; return *this; } 36 | 37 | options& disable_function_signatures() & { global_state().show_function_signatures = false; return *this; } 38 | 39 | options& enable_function_signatures() & { global_state().show_function_signatures = true; return *this; } 40 | 41 | // Getter methods (return the global state): 42 | 43 | static bool show_user_defined_docstrings() { return global_state().show_user_defined_docstrings; } 44 | 45 | static bool show_function_signatures() { return global_state().show_function_signatures; } 46 | 47 | // This type is not meant to be allocated on the heap. 48 | void* operator new(size_t) = delete; 49 | 50 | private: 51 | 52 | struct state { 53 | bool show_user_defined_docstrings = true; //< Include user-supplied texts in docstrings. 54 | bool show_function_signatures = true; //< Include auto-generated function signatures in docstrings. 55 | }; 56 | 57 | static state &global_state() { 58 | static state instance; 59 | return instance; 60 | } 61 | 62 | state previous_state; 63 | }; 64 | 65 | NAMESPACE_END(PYBIND11_NAMESPACE) 66 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/pybind11/__init__.py: -------------------------------------------------------------------------------- 1 | from ._version import version_info, __version__ # noqa: F401 imported but unused 2 | 3 | 4 | def get_include(user=False): 5 | import os 6 | d = os.path.dirname(__file__) 7 | if os.path.exists(os.path.join(d, "include")): 8 | # Package is installed 9 | return os.path.join(d, "include") 10 | else: 11 | # Package is from a source directory 12 | return os.path.join(os.path.dirname(d), "include") 13 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/pybind11/__main__.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | 3 | import argparse 4 | import sys 5 | import sysconfig 6 | 7 | from . import get_include 8 | 9 | 10 | def print_includes(): 11 | dirs = [sysconfig.get_path('include'), 12 | sysconfig.get_path('platinclude'), 13 | get_include()] 14 | 15 | # Make unique but preserve order 16 | unique_dirs = [] 17 | for d in dirs: 18 | if d not in unique_dirs: 19 | unique_dirs.append(d) 20 | 21 | print(' '.join('-I' + d for d in unique_dirs)) 22 | 23 | 24 | def main(): 25 | parser = argparse.ArgumentParser(prog='python -m pybind11') 26 | parser.add_argument('--includes', action='store_true', 27 | help='Include flags for both pybind11 and Python headers.') 28 | args = parser.parse_args() 29 | if not sys.argv[1:]: 30 | parser.print_help() 31 | if args.includes: 32 | print_includes() 33 | 34 | 35 | if __name__ == '__main__': 36 | main() 37 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/pybind11/_version.py: -------------------------------------------------------------------------------- 1 | version_info = (2, 4, 'dev4') 2 | __version__ = '.'.join(map(str, version_info)) 3 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | 4 | [flake8] 5 | max-line-length = 99 6 | show_source = True 7 | exclude = .git, __pycache__, build, dist, docs, tools, venv 8 | ignore = 9 | # required for pretty matrix formatting: multiple spaces after `,` and `[` 10 | E201, E241, W504, 11 | # camelcase 'cPickle' imported as lowercase 'pickle' 12 | N813 13 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/cross_module_gil_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | tests/cross_module_gil_utils.cpp -- tools for acquiring GIL from a different module 3 | 4 | Copyright (c) 2019 Google LLC 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | #include 10 | #include 11 | 12 | // This file mimics a DSO that makes pybind11 calls but does not define a 13 | // PYBIND11_MODULE. The purpose is to test that such a DSO can create a 14 | // py::gil_scoped_acquire when the running thread is in a GIL-released state. 15 | // 16 | // Note that we define a Python module here for convenience, but in general 17 | // this need not be the case. The typical scenario would be a DSO that implements 18 | // shared logic used internally by multiple pybind11 modules. 19 | 20 | namespace { 21 | 22 | namespace py = pybind11; 23 | void gil_acquire() { py::gil_scoped_acquire gil; } 24 | 25 | constexpr char kModuleName[] = "cross_module_gil_utils"; 26 | 27 | #if PY_MAJOR_VERSION >= 3 28 | struct PyModuleDef moduledef = { 29 | PyModuleDef_HEAD_INIT, 30 | kModuleName, 31 | NULL, 32 | 0, 33 | NULL, 34 | NULL, 35 | NULL, 36 | NULL, 37 | NULL 38 | }; 39 | #else 40 | PyMethodDef module_methods[] = { 41 | {NULL, NULL, 0, NULL} 42 | }; 43 | #endif 44 | 45 | } // namespace 46 | 47 | extern "C" PYBIND11_EXPORT 48 | #if PY_MAJOR_VERSION >= 3 49 | PyObject* PyInit_cross_module_gil_utils() 50 | #else 51 | void initcross_module_gil_utils() 52 | #endif 53 | { 54 | 55 | PyObject* m = 56 | #if PY_MAJOR_VERSION >= 3 57 | PyModule_Create(&moduledef); 58 | #else 59 | Py_InitModule(kModuleName, module_methods); 60 | #endif 61 | 62 | if (m != NULL) { 63 | static_assert( 64 | sizeof(&gil_acquire) == sizeof(void*), 65 | "Function pointer must have the same size as void*"); 66 | PyModule_AddObject(m, "gil_acquire_funcaddr", 67 | PyLong_FromVoidPtr(reinterpret_cast(&gil_acquire))); 68 | } 69 | 70 | #if PY_MAJOR_VERSION >= 3 71 | return m; 72 | #endif 73 | } 74 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/local_bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pybind11_tests.h" 3 | 4 | /// Simple class used to test py::local: 5 | template class LocalBase { 6 | public: 7 | LocalBase(int i) : i(i) { } 8 | int i = -1; 9 | }; 10 | 11 | /// Registered with py::module_local in both main and secondary modules: 12 | using LocalType = LocalBase<0>; 13 | /// Registered without py::module_local in both modules: 14 | using NonLocalType = LocalBase<1>; 15 | /// A second non-local type (for stl_bind tests): 16 | using NonLocal2 = LocalBase<2>; 17 | /// Tests within-module, different-compilation-unit local definition conflict: 18 | using LocalExternal = LocalBase<3>; 19 | /// Mixed: registered local first, then global 20 | using MixedLocalGlobal = LocalBase<4>; 21 | /// Mixed: global first, then local 22 | using MixedGlobalLocal = LocalBase<5>; 23 | 24 | /// Registered with py::module_local only in the secondary module: 25 | using ExternalType1 = LocalBase<6>; 26 | using ExternalType2 = LocalBase<7>; 27 | 28 | using LocalVec = std::vector; 29 | using LocalVec2 = std::vector; 30 | using LocalMap = std::unordered_map; 31 | using NonLocalVec = std::vector; 32 | using NonLocalVec2 = std::vector; 33 | using NonLocalMap = std::unordered_map; 34 | using NonLocalMap2 = std::unordered_map; 35 | 36 | PYBIND11_MAKE_OPAQUE(LocalVec); 37 | PYBIND11_MAKE_OPAQUE(LocalVec2); 38 | PYBIND11_MAKE_OPAQUE(LocalMap); 39 | PYBIND11_MAKE_OPAQUE(NonLocalVec); 40 | //PYBIND11_MAKE_OPAQUE(NonLocalVec2); // same type as LocalVec2 41 | PYBIND11_MAKE_OPAQUE(NonLocalMap); 42 | PYBIND11_MAKE_OPAQUE(NonLocalMap2); 43 | 44 | 45 | // Simple bindings (used with the above): 46 | template 47 | py::class_ bind_local(Args && ...args) { 48 | return py::class_(std::forward(args)...) 49 | .def(py::init()) 50 | .def("get", [](T &i) { return i.i + Adjust; }); 51 | }; 52 | 53 | // Simulate a foreign library base class (to match the example in the docs): 54 | namespace pets { 55 | class Pet { 56 | public: 57 | Pet(std::string name) : name_(name) {} 58 | std::string name_; 59 | const std::string &name() { return name_; } 60 | }; 61 | } 62 | 63 | struct MixGL { int i; MixGL(int i) : i{i} {} }; 64 | struct MixGL2 { int i; MixGL2(int i) : i{i} {} }; 65 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | minversion = 3.0 3 | norecursedirs = test_cmake_build test_embed 4 | addopts = 5 | # show summary of skipped tests 6 | -rs 7 | # capture only Python print and C++ py::print, but not C output (low-level Python errors) 8 | --capture=sys 9 | filterwarnings = 10 | # make warnings into errors but ignore certain third-party extension issues 11 | error 12 | # importing scipy submodules on some version of Python 13 | ignore::ImportWarning 14 | # bogus numpy ABI warning (see numpy/#432) 15 | ignore:.*numpy.dtype size changed.*:RuntimeWarning 16 | ignore:.*numpy.ufunc size changed.*:RuntimeWarning 17 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_async.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | tests/test_async.cpp -- __await__ support 3 | 4 | Copyright (c) 2019 Google Inc. 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #include "pybind11_tests.h" 11 | 12 | TEST_SUBMODULE(async_module, m) { 13 | struct DoesNotSupportAsync {}; 14 | py::class_(m, "DoesNotSupportAsync") 15 | .def(py::init<>()); 16 | struct SupportsAsync {}; 17 | py::class_(m, "SupportsAsync") 18 | .def(py::init<>()) 19 | .def("__await__", [](const SupportsAsync& self) -> py::object { 20 | static_cast(self); 21 | py::object loop = py::module::import("asyncio.events").attr("get_event_loop")(); 22 | py::object f = loop.attr("create_future")(); 23 | f.attr("set_result")(5); 24 | return f.attr("__await__")(); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_async.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import pytest 3 | from pybind11_tests import async_module as m 4 | 5 | 6 | @pytest.fixture 7 | def event_loop(): 8 | loop = asyncio.new_event_loop() 9 | yield loop 10 | loop.close() 11 | 12 | 13 | async def get_await_result(x): 14 | return await x 15 | 16 | 17 | def test_await(event_loop): 18 | assert 5 == event_loop.run_until_complete(get_await_result(m.SupportsAsync())) 19 | 20 | 21 | def test_await_missing(event_loop): 22 | with pytest.raises(TypeError): 23 | event_loop.run_until_complete(get_await_result(m.DoesNotSupportAsync())) 24 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_chrono.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | tests/test_chrono.cpp -- test conversions to/from std::chrono types 3 | 4 | Copyright (c) 2016 Trent Houliston and 5 | Wenzel Jakob 6 | 7 | All rights reserved. Use of this source code is governed by a 8 | BSD-style license that can be found in the LICENSE file. 9 | */ 10 | 11 | #include "pybind11_tests.h" 12 | #include 13 | 14 | TEST_SUBMODULE(chrono, m) { 15 | using system_time = std::chrono::system_clock::time_point; 16 | using steady_time = std::chrono::steady_clock::time_point; 17 | 18 | using timespan = std::chrono::duration; 19 | using timestamp = std::chrono::time_point; 20 | 21 | // test_chrono_system_clock 22 | // Return the current time off the wall clock 23 | m.def("test_chrono1", []() { return std::chrono::system_clock::now(); }); 24 | 25 | // test_chrono_system_clock_roundtrip 26 | // Round trip the passed in system clock time 27 | m.def("test_chrono2", [](system_time t) { return t; }); 28 | 29 | // test_chrono_duration_roundtrip 30 | // Round trip the passed in duration 31 | m.def("test_chrono3", [](std::chrono::system_clock::duration d) { return d; }); 32 | 33 | // test_chrono_duration_subtraction_equivalence 34 | // Difference between two passed in time_points 35 | m.def("test_chrono4", [](system_time a, system_time b) { return a - b; }); 36 | 37 | // test_chrono_steady_clock 38 | // Return the current time off the steady_clock 39 | m.def("test_chrono5", []() { return std::chrono::steady_clock::now(); }); 40 | 41 | // test_chrono_steady_clock_roundtrip 42 | // Round trip a steady clock timepoint 43 | m.def("test_chrono6", [](steady_time t) { return t; }); 44 | 45 | // test_floating_point_duration 46 | // Roundtrip a duration in microseconds from a float argument 47 | m.def("test_chrono7", [](std::chrono::microseconds t) { return t; }); 48 | // Float durations (issue #719) 49 | m.def("test_chrono_float_diff", [](std::chrono::duration a, std::chrono::duration b) { 50 | return a - b; }); 51 | 52 | m.def("test_nano_timepoint", [](timestamp start, timespan delta) -> timestamp { 53 | return start + delta; 54 | }); 55 | } 56 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_custom_target(test_cmake_build) 2 | 3 | if(CMAKE_VERSION VERSION_LESS 3.1) 4 | # 3.0 needed for interface library for subdirectory_target/installed_target 5 | # 3.1 needed for cmake -E env for testing 6 | return() 7 | endif() 8 | 9 | include(CMakeParseArguments) 10 | function(pybind11_add_build_test name) 11 | cmake_parse_arguments(ARG "INSTALL" "" "" ${ARGN}) 12 | 13 | set(build_options "-DCMAKE_PREFIX_PATH=${PROJECT_BINARY_DIR}/mock_install" 14 | "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}" 15 | "-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}" 16 | "-DPYBIND11_CPP_STANDARD=${PYBIND11_CPP_STANDARD}") 17 | if(NOT ARG_INSTALL) 18 | list(APPEND build_options "-DPYBIND11_PROJECT_DIR=${PROJECT_SOURCE_DIR}") 19 | endif() 20 | 21 | add_custom_target(test_${name} ${CMAKE_CTEST_COMMAND} 22 | --quiet --output-log ${name}.log 23 | --build-and-test "${CMAKE_CURRENT_SOURCE_DIR}/${name}" 24 | "${CMAKE_CURRENT_BINARY_DIR}/${name}" 25 | --build-config Release 26 | --build-noclean 27 | --build-generator ${CMAKE_GENERATOR} 28 | $<$:--build-generator-platform> ${CMAKE_GENERATOR_PLATFORM} 29 | --build-makeprogram ${CMAKE_MAKE_PROGRAM} 30 | --build-target check 31 | --build-options ${build_options} 32 | ) 33 | if(ARG_INSTALL) 34 | add_dependencies(test_${name} mock_install) 35 | endif() 36 | add_dependencies(test_cmake_build test_${name}) 37 | endfunction() 38 | 39 | pybind11_add_build_test(subdirectory_function) 40 | pybind11_add_build_test(subdirectory_target) 41 | if(NOT ${PYTHON_MODULE_EXTENSION} MATCHES "pypy") 42 | pybind11_add_build_test(subdirectory_embed) 43 | endif() 44 | 45 | if(PYBIND11_INSTALL) 46 | add_custom_target(mock_install ${CMAKE_COMMAND} 47 | "-DCMAKE_INSTALL_PREFIX=${PROJECT_BINARY_DIR}/mock_install" 48 | -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" 49 | ) 50 | 51 | pybind11_add_build_test(installed_function INSTALL) 52 | pybind11_add_build_test(installed_target INSTALL) 53 | if(NOT ${PYTHON_MODULE_EXTENSION} MATCHES "pypy") 54 | pybind11_add_build_test(installed_embed INSTALL) 55 | endif() 56 | endif() 57 | 58 | add_dependencies(check test_cmake_build) 59 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/embed.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace py = pybind11; 3 | 4 | PYBIND11_EMBEDDED_MODULE(test_cmake_build, m) { 5 | m.def("add", [](int i, int j) { return i + j; }); 6 | } 7 | 8 | int main(int argc, char *argv[]) { 9 | if (argc != 2) 10 | throw std::runtime_error("Expected test.py file as the first argument"); 11 | auto test_py_file = argv[1]; 12 | 13 | py::scoped_interpreter guard{}; 14 | 15 | auto m = py::module::import("test_cmake_build"); 16 | if (m.attr("add")(1, 2).cast() != 3) 17 | throw std::runtime_error("embed.cpp failed"); 18 | 19 | py::module::import("sys").attr("argv") = py::make_tuple("test.py", "embed.cpp"); 20 | py::eval_file(test_py_file, py::globals()); 21 | } 22 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(test_installed_embed CXX) 3 | 4 | set(CMAKE_MODULE_PATH "") 5 | find_package(pybind11 CONFIG REQUIRED) 6 | message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") 7 | 8 | add_executable(test_cmake_build ../embed.cpp) 9 | target_link_libraries(test_cmake_build PRIVATE pybind11::embed) 10 | 11 | # Do not treat includes from IMPORTED target as SYSTEM (Python headers in pybind11::embed). 12 | # This may be needed to resolve header conflicts, e.g. between Python release and debug headers. 13 | set_target_properties(test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON) 14 | 15 | add_custom_target(check $ ${PROJECT_SOURCE_DIR}/../test.py) 16 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | project(test_installed_module CXX) 3 | 4 | set(CMAKE_MODULE_PATH "") 5 | 6 | find_package(pybind11 CONFIG REQUIRED) 7 | message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") 8 | 9 | pybind11_add_module(test_cmake_build SHARED NO_EXTRAS ../main.cpp) 10 | 11 | add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$ 12 | ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME}) 13 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(test_installed_target CXX) 3 | 4 | set(CMAKE_MODULE_PATH "") 5 | 6 | find_package(pybind11 CONFIG REQUIRED) 7 | message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIRS}") 8 | 9 | add_library(test_cmake_build MODULE ../main.cpp) 10 | 11 | target_link_libraries(test_cmake_build PRIVATE pybind11::module) 12 | 13 | # make sure result is, for example, test_installed_target.so, not libtest_installed_target.dylib 14 | set_target_properties(test_cmake_build PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}" 15 | SUFFIX "${PYTHON_MODULE_EXTENSION}") 16 | 17 | # Do not treat includes from IMPORTED target as SYSTEM (Python headers in pybind11::module). 18 | # This may be needed to resolve header conflicts, e.g. between Python release and debug headers. 19 | set_target_properties(test_cmake_build PROPERTIES NO_SYSTEM_FROM_IMPORTED ON) 20 | 21 | add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$ 22 | ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME}) 23 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | namespace py = pybind11; 3 | 4 | PYBIND11_MODULE(test_cmake_build, m) { 5 | m.def("add", [](int i, int j) { return i + j; }); 6 | } 7 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(test_subdirectory_embed CXX) 3 | 4 | set(PYBIND11_INSTALL ON CACHE BOOL "") 5 | set(PYBIND11_EXPORT_NAME test_export) 6 | 7 | add_subdirectory(${PYBIND11_PROJECT_DIR} pybind11) 8 | 9 | # Test basic target functionality 10 | add_executable(test_cmake_build ../embed.cpp) 11 | target_link_libraries(test_cmake_build PRIVATE pybind11::embed) 12 | 13 | add_custom_target(check $ ${PROJECT_SOURCE_DIR}/../test.py) 14 | 15 | # Test custom export group -- PYBIND11_EXPORT_NAME 16 | add_library(test_embed_lib ../embed.cpp) 17 | target_link_libraries(test_embed_lib PRIVATE pybind11::embed) 18 | 19 | install(TARGETS test_embed_lib 20 | EXPORT test_export 21 | ARCHIVE DESTINATION bin 22 | LIBRARY DESTINATION lib 23 | RUNTIME DESTINATION lib) 24 | install(EXPORT test_export 25 | DESTINATION lib/cmake/test_export/test_export-Targets.cmake) 26 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | project(test_subdirectory_module CXX) 3 | 4 | add_subdirectory(${PYBIND11_PROJECT_DIR} pybind11) 5 | pybind11_add_module(test_cmake_build THIN_LTO ../main.cpp) 6 | 7 | add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$ 8 | ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME}) 9 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | project(test_subdirectory_target CXX) 3 | 4 | add_subdirectory(${PYBIND11_PROJECT_DIR} pybind11) 5 | 6 | add_library(test_cmake_build MODULE ../main.cpp) 7 | 8 | target_link_libraries(test_cmake_build PRIVATE pybind11::module) 9 | 10 | # make sure result is, for example, test_installed_target.so, not libtest_installed_target.dylib 11 | set_target_properties(test_cmake_build PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}" 12 | SUFFIX "${PYTHON_MODULE_EXTENSION}") 13 | 14 | add_custom_target(check ${CMAKE_COMMAND} -E env PYTHONPATH=$ 15 | ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../test.py ${PROJECT_NAME}) 16 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_cmake_build/test.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import test_cmake_build 3 | 4 | assert test_cmake_build.add(1, 2) == 3 5 | print("{} imports, runs, and adds: 1 + 2 = 3".format(sys.argv[1])) 6 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_constants_and_functions.py: -------------------------------------------------------------------------------- 1 | from pybind11_tests import constants_and_functions as m 2 | 3 | 4 | def test_constants(): 5 | assert m.some_constant == 14 6 | 7 | 8 | def test_function_overloading(): 9 | assert m.test_function() == "test_function()" 10 | assert m.test_function(7) == "test_function(7)" 11 | assert m.test_function(m.MyEnum.EFirstEntry) == "test_function(enum=1)" 12 | assert m.test_function(m.MyEnum.ESecondEntry) == "test_function(enum=2)" 13 | 14 | assert m.test_function() == "test_function()" 15 | assert m.test_function("abcd") == "test_function(char *)" 16 | assert m.test_function(1, 1.0) == "test_function(int, float)" 17 | assert m.test_function(1, 1.0) == "test_function(int, float)" 18 | assert m.test_function(2.0, 2) == "test_function(float, int)" 19 | 20 | 21 | def test_bytes(): 22 | assert m.print_bytes(m.return_bytes()) == "bytes[1 0 2 0]" 23 | 24 | 25 | def test_exception_specifiers(): 26 | c = m.C() 27 | assert c.m1(2) == 1 28 | assert c.m2(3) == 1 29 | assert c.m3(5) == 2 30 | assert c.m4(7) == 3 31 | assert c.m5(10) == 5 32 | assert c.m6(14) == 8 33 | assert c.m7(20) == 13 34 | assert c.m8(29) == 21 35 | 36 | assert m.f1(33) == 34 37 | assert m.f2(53) == 55 38 | assert m.f3(86) == 89 39 | assert m.f4(140) == 144 40 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_docstring_options.py: -------------------------------------------------------------------------------- 1 | from pybind11_tests import docstring_options as m 2 | 3 | 4 | def test_docstring_options(): 5 | # options.disable_function_signatures() 6 | assert not m.test_function1.__doc__ 7 | 8 | assert m.test_function2.__doc__ == "A custom docstring" 9 | 10 | # docstring specified on just the first overload definition: 11 | assert m.test_overloaded1.__doc__ == "Overload docstring" 12 | 13 | # docstring on both overloads: 14 | assert m.test_overloaded2.__doc__ == "overload docstring 1\noverload docstring 2" 15 | 16 | # docstring on only second overload: 17 | assert m.test_overloaded3.__doc__ == "Overload docstr" 18 | 19 | # options.enable_function_signatures() 20 | assert m.test_function3.__doc__ .startswith("test_function3(a: int, b: int) -> None") 21 | 22 | assert m.test_function4.__doc__ .startswith("test_function4(a: int, b: int) -> None") 23 | assert m.test_function4.__doc__ .endswith("A custom docstring\n") 24 | 25 | # options.disable_function_signatures() 26 | # options.disable_user_defined_docstrings() 27 | assert not m.test_function5.__doc__ 28 | 29 | # nested options.enable_user_defined_docstrings() 30 | assert m.test_function6.__doc__ == "A custom docstring" 31 | 32 | # RAII destructor 33 | assert m.test_function7.__doc__ .startswith("test_function7(a: int, b: int) -> None") 34 | assert m.test_function7.__doc__ .endswith("A custom docstring\n") 35 | 36 | # Suppression of user-defined docstrings for non-function objects 37 | assert not m.DocstringTestFoo.__doc__ 38 | assert not m.DocstringTestFoo.value_prop.__doc__ 39 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_embed/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(${PYTHON_MODULE_EXTENSION} MATCHES "pypy") 2 | add_custom_target(cpptest) # Dummy target on PyPy. Embedding is not supported. 3 | set(_suppress_unused_variable_warning "${DOWNLOAD_CATCH}") 4 | return() 5 | endif() 6 | 7 | find_package(Catch 1.9.3) 8 | if(CATCH_FOUND) 9 | message(STATUS "Building interpreter tests using Catch v${CATCH_VERSION}") 10 | else() 11 | message(STATUS "Catch not detected. Interpreter tests will be skipped. Install Catch headers" 12 | " manually or use `cmake -DDOWNLOAD_CATCH=1` to fetch them automatically.") 13 | return() 14 | endif() 15 | 16 | add_executable(test_embed 17 | catch.cpp 18 | test_interpreter.cpp 19 | ) 20 | target_include_directories(test_embed PRIVATE ${CATCH_INCLUDE_DIR}) 21 | pybind11_enable_warnings(test_embed) 22 | 23 | if(NOT CMAKE_VERSION VERSION_LESS 3.0) 24 | target_link_libraries(test_embed PRIVATE pybind11::embed) 25 | else() 26 | target_include_directories(test_embed PRIVATE ${PYBIND11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) 27 | target_compile_options(test_embed PRIVATE ${PYBIND11_CPP_STANDARD}) 28 | target_link_libraries(test_embed PRIVATE ${PYTHON_LIBRARIES}) 29 | endif() 30 | 31 | find_package(Threads REQUIRED) 32 | target_link_libraries(test_embed PUBLIC ${CMAKE_THREAD_LIBS_INIT}) 33 | 34 | add_custom_target(cpptest COMMAND $ 35 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 36 | 37 | pybind11_add_module(external_module THIN_LTO external_module.cpp) 38 | set_target_properties(external_module PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 39 | add_dependencies(cpptest external_module) 40 | 41 | add_dependencies(check cpptest) 42 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_embed/catch.cpp: -------------------------------------------------------------------------------- 1 | // The Catch implementation is compiled here. This is a standalone 2 | // translation unit to avoid recompiling it for every test change. 3 | 4 | #include 5 | 6 | #ifdef _MSC_VER 7 | // Silence MSVC C++17 deprecation warning from Catch regarding std::uncaught_exceptions (up to catch 8 | // 2.0.1; this should be fixed in the next catch release after 2.0.1). 9 | # pragma warning(disable: 4996) 10 | #endif 11 | 12 | #define CATCH_CONFIG_RUNNER 13 | #include 14 | 15 | namespace py = pybind11; 16 | 17 | int main(int argc, char *argv[]) { 18 | py::scoped_interpreter guard{}; 19 | auto result = Catch::Session().run(argc, argv); 20 | 21 | return result < 0xff ? result : 0xff; 22 | } 23 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_embed/external_module.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace py = pybind11; 4 | 5 | /* Simple test module/test class to check that the referenced internals data of external pybind11 6 | * modules aren't preserved over a finalize/initialize. 7 | */ 8 | 9 | PYBIND11_MODULE(external_module, m) { 10 | class A { 11 | public: 12 | A(int value) : v{value} {}; 13 | int v; 14 | }; 15 | 16 | py::class_(m, "A") 17 | .def(py::init()) 18 | .def_readwrite("value", &A::v); 19 | 20 | m.def("internals_at", []() { 21 | return reinterpret_cast(&py::detail::get_internals()); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_embed/test_interpreter.py: -------------------------------------------------------------------------------- 1 | from widget_module import Widget 2 | 3 | 4 | class DerivedWidget(Widget): 5 | def __init__(self, message): 6 | super(DerivedWidget, self).__init__(message) 7 | 8 | def the_answer(self): 9 | return 42 10 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_eval.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pybind11_tests import eval_ as m 3 | 4 | 5 | def test_evals(capture): 6 | with capture: 7 | assert m.test_eval_statements() 8 | assert capture == "Hello World!" 9 | 10 | assert m.test_eval() 11 | assert m.test_eval_single_statement() 12 | 13 | filename = os.path.join(os.path.dirname(__file__), "test_eval_call.py") 14 | assert m.test_eval_file(filename) 15 | 16 | assert m.test_eval_failure() 17 | assert m.test_eval_file_failure() 18 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_eval_call.py: -------------------------------------------------------------------------------- 1 | # This file is called from 'test_eval.py' 2 | 3 | if 'call_test2' in locals(): 4 | call_test2(y) # noqa: F821 undefined name 5 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_gil_scoped.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | tests/test_gil_scoped.cpp -- acquire and release gil 3 | 4 | Copyright (c) 2017 Borja Zarco (Google LLC) 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #include "pybind11_tests.h" 11 | #include 12 | 13 | 14 | class VirtClass { 15 | public: 16 | virtual ~VirtClass() {} 17 | virtual void virtual_func() {} 18 | virtual void pure_virtual_func() = 0; 19 | }; 20 | 21 | class PyVirtClass : public VirtClass { 22 | void virtual_func() override { 23 | PYBIND11_OVERLOAD(void, VirtClass, virtual_func,); 24 | } 25 | void pure_virtual_func() override { 26 | PYBIND11_OVERLOAD_PURE(void, VirtClass, pure_virtual_func,); 27 | } 28 | }; 29 | 30 | TEST_SUBMODULE(gil_scoped, m) { 31 | py::class_(m, "VirtClass") 32 | .def(py::init<>()) 33 | .def("virtual_func", &VirtClass::virtual_func) 34 | .def("pure_virtual_func", &VirtClass::pure_virtual_func); 35 | 36 | m.def("test_callback_py_obj", 37 | [](py::object func) { func(); }); 38 | m.def("test_callback_std_func", 39 | [](const std::function &func) { func(); }); 40 | m.def("test_callback_virtual_func", 41 | [](VirtClass &virt) { virt.virtual_func(); }); 42 | m.def("test_callback_pure_virtual_func", 43 | [](VirtClass &virt) { virt.pure_virtual_func(); }); 44 | m.def("test_cross_module_gil", 45 | []() { 46 | auto cm = py::module::import("cross_module_gil_utils"); 47 | auto gil_acquire = reinterpret_cast( 48 | PyLong_AsVoidPtr(cm.attr("gil_acquire_funcaddr").ptr())); 49 | py::gil_scoped_release gil_release; 50 | gil_acquire(); 51 | }); 52 | } 53 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_opaque_types.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from pybind11_tests import opaque_types as m 3 | from pybind11_tests import ConstructorStats, UserType 4 | 5 | 6 | def test_string_list(): 7 | lst = m.StringList() 8 | lst.push_back("Element 1") 9 | lst.push_back("Element 2") 10 | assert m.print_opaque_list(lst) == "Opaque list: [Element 1, Element 2]" 11 | assert lst.back() == "Element 2" 12 | 13 | for i, k in enumerate(lst, start=1): 14 | assert k == "Element {}".format(i) 15 | lst.pop_back() 16 | assert m.print_opaque_list(lst) == "Opaque list: [Element 1]" 17 | 18 | cvp = m.ClassWithSTLVecProperty() 19 | assert m.print_opaque_list(cvp.stringList) == "Opaque list: []" 20 | 21 | cvp.stringList = lst 22 | cvp.stringList.push_back("Element 3") 23 | assert m.print_opaque_list(cvp.stringList) == "Opaque list: [Element 1, Element 3]" 24 | 25 | 26 | def test_pointers(msg): 27 | living_before = ConstructorStats.get(UserType).alive() 28 | assert m.get_void_ptr_value(m.return_void_ptr()) == 0x1234 29 | assert m.get_void_ptr_value(UserType()) # Should also work for other C++ types 30 | assert ConstructorStats.get(UserType).alive() == living_before 31 | 32 | with pytest.raises(TypeError) as excinfo: 33 | m.get_void_ptr_value([1, 2, 3]) # This should not work 34 | assert msg(excinfo.value) == """ 35 | get_void_ptr_value(): incompatible function arguments. The following argument types are supported: 36 | 1. (arg0: capsule) -> int 37 | 38 | Invoked with: [1, 2, 3] 39 | """ # noqa: E501 line too long 40 | 41 | assert m.return_null_str() is None 42 | assert m.get_null_str_value(m.return_null_str()) is not None 43 | 44 | ptr = m.return_unique_ptr() 45 | assert "StringList" in repr(ptr) 46 | assert m.print_opaque_list(ptr) == "Opaque list: [some value]" 47 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_pickling.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from pybind11_tests import pickling as m 3 | 4 | try: 5 | import cPickle as pickle # Use cPickle on Python 2.7 6 | except ImportError: 7 | import pickle 8 | 9 | 10 | @pytest.mark.parametrize("cls_name", ["Pickleable", "PickleableNew"]) 11 | def test_roundtrip(cls_name): 12 | cls = getattr(m, cls_name) 13 | p = cls("test_value") 14 | p.setExtra1(15) 15 | p.setExtra2(48) 16 | 17 | data = pickle.dumps(p, 2) # Must use pickle protocol >= 2 18 | p2 = pickle.loads(data) 19 | assert p2.value() == p.value() 20 | assert p2.extra1() == p.extra1() 21 | assert p2.extra2() == p.extra2() 22 | 23 | 24 | @pytest.unsupported_on_pypy 25 | @pytest.mark.parametrize("cls_name", ["PickleableWithDict", "PickleableWithDictNew"]) 26 | def test_roundtrip_with_dict(cls_name): 27 | cls = getattr(m, cls_name) 28 | p = cls("test_value") 29 | p.extra = 15 30 | p.dynamic = "Attribute" 31 | 32 | data = pickle.dumps(p, pickle.HIGHEST_PROTOCOL) 33 | p2 = pickle.loads(data) 34 | assert p2.value == p.value 35 | assert p2.extra == p.extra 36 | assert p2.dynamic == p.dynamic 37 | 38 | 39 | def test_enum_pickle(): 40 | from pybind11_tests import enums as e 41 | data = pickle.dumps(e.EOne, 2) 42 | assert e.EOne == pickle.loads(data) 43 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_tagbased_polymorphic.py: -------------------------------------------------------------------------------- 1 | from pybind11_tests import tagbased_polymorphic as m 2 | 3 | 4 | def test_downcast(): 5 | zoo = m.create_zoo() 6 | assert [type(animal) for animal in zoo] == [ 7 | m.Labrador, m.Dog, m.Chihuahua, m.Cat, m.Panther 8 | ] 9 | assert [animal.name for animal in zoo] == [ 10 | "Fido", "Ginger", "Hertzl", "Tiger", "Leo" 11 | ] 12 | zoo[1].sound = "woooooo" 13 | assert [dog.bark() for dog in zoo[:3]] == [ 14 | "Labrador Fido goes WOOF!", 15 | "Dog Ginger goes woooooo", 16 | "Chihuahua Hertzl goes iyiyiyiyiyi and runs in circles" 17 | ] 18 | assert [cat.purr() for cat in zoo[3:]] == ["mrowr", "mrrrRRRRRR"] 19 | zoo[0].excitement -= 1000 20 | assert zoo[0].excitement == 14000 21 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_union.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | tests/test_class.cpp -- test py::class_ definitions and basic functionality 3 | 4 | Copyright (c) 2019 Roland Dreier 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #include "pybind11_tests.h" 11 | 12 | TEST_SUBMODULE(union_, m) { 13 | union TestUnion { 14 | int value_int; 15 | unsigned value_uint; 16 | }; 17 | 18 | py::class_(m, "TestUnion") 19 | .def(py::init<>()) 20 | .def_readonly("as_int", &TestUnion::value_int) 21 | .def_readwrite("as_uint", &TestUnion::value_uint); 22 | } 23 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tests/test_union.py: -------------------------------------------------------------------------------- 1 | from pybind11_tests import union_ as m 2 | 3 | 4 | def test_union(): 5 | instance = m.TestUnion() 6 | 7 | instance.as_uint = 10 8 | assert instance.as_int == 10 9 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tools/FindCatch.cmake: -------------------------------------------------------------------------------- 1 | # - Find the Catch test framework or download it (single header) 2 | # 3 | # This is a quick module for internal use. It assumes that Catch is 4 | # REQUIRED and that a minimum version is provided (not EXACT). If 5 | # a suitable version isn't found locally, the single header file 6 | # will be downloaded and placed in the build dir: PROJECT_BINARY_DIR. 7 | # 8 | # This code sets the following variables: 9 | # CATCH_INCLUDE_DIR - path to catch.hpp 10 | # CATCH_VERSION - version number 11 | 12 | if(NOT Catch_FIND_VERSION) 13 | message(FATAL_ERROR "A version number must be specified.") 14 | elseif(Catch_FIND_REQUIRED) 15 | message(FATAL_ERROR "This module assumes Catch is not required.") 16 | elseif(Catch_FIND_VERSION_EXACT) 17 | message(FATAL_ERROR "Exact version numbers are not supported, only minimum.") 18 | endif() 19 | 20 | # Extract the version number from catch.hpp 21 | function(_get_catch_version) 22 | file(STRINGS "${CATCH_INCLUDE_DIR}/catch.hpp" version_line REGEX "Catch v.*" LIMIT_COUNT 1) 23 | if(version_line MATCHES "Catch v([0-9]+)\\.([0-9]+)\\.([0-9]+)") 24 | set(CATCH_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}" PARENT_SCOPE) 25 | endif() 26 | endfunction() 27 | 28 | # Download the single-header version of Catch 29 | function(_download_catch version destination_dir) 30 | message(STATUS "Downloading catch v${version}...") 31 | set(url https://github.com/philsquared/Catch/releases/download/v${version}/catch.hpp) 32 | file(DOWNLOAD ${url} "${destination_dir}/catch.hpp" STATUS status) 33 | list(GET status 0 error) 34 | if(error) 35 | message(FATAL_ERROR "Could not download ${url}") 36 | endif() 37 | set(CATCH_INCLUDE_DIR "${destination_dir}" CACHE INTERNAL "") 38 | endfunction() 39 | 40 | # Look for catch locally 41 | find_path(CATCH_INCLUDE_DIR NAMES catch.hpp PATH_SUFFIXES catch) 42 | if(CATCH_INCLUDE_DIR) 43 | _get_catch_version() 44 | endif() 45 | 46 | # Download the header if it wasn't found or if it's outdated 47 | if(NOT CATCH_VERSION OR CATCH_VERSION VERSION_LESS ${Catch_FIND_VERSION}) 48 | if(DOWNLOAD_CATCH) 49 | _download_catch(${Catch_FIND_VERSION} "${PROJECT_BINARY_DIR}/catch/") 50 | _get_catch_version() 51 | else() 52 | set(CATCH_FOUND FALSE) 53 | return() 54 | endif() 55 | endif() 56 | 57 | set(CATCH_FOUND TRUE) 58 | -------------------------------------------------------------------------------- /Externals/Pybind11/pybind11/tools/libsize.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function, division 2 | import os 3 | import sys 4 | 5 | # Internal build script for generating debugging test .so size. 6 | # Usage: 7 | # python libsize.py file.so save.txt -- displays the size of file.so and, if save.txt exists, compares it to the 8 | # size in it, then overwrites save.txt with the new size for future runs. 9 | 10 | if len(sys.argv) != 3: 11 | sys.exit("Invalid arguments: usage: python libsize.py file.so save.txt") 12 | 13 | lib = sys.argv[1] 14 | save = sys.argv[2] 15 | 16 | if not os.path.exists(lib): 17 | sys.exit("Error: requested file ({}) does not exist".format(lib)) 18 | 19 | libsize = os.path.getsize(lib) 20 | 21 | print("------", os.path.basename(lib), "file size:", libsize, end='') 22 | 23 | if os.path.exists(save): 24 | with open(save) as sf: 25 | oldsize = int(sf.readline()) 26 | 27 | if oldsize > 0: 28 | change = libsize - oldsize 29 | if change == 0: 30 | print(" (no change)") 31 | else: 32 | print(" (change of {:+} bytes = {:+.2%})".format(change, change / oldsize)) 33 | else: 34 | print() 35 | 36 | with open(save, 'w') as sf: 37 | sf.write(str(libsize)) 38 | 39 | -------------------------------------------------------------------------------- /Externals/Spdlog/README.md: -------------------------------------------------------------------------------- 1 | git clone spdlog, cp the include folder here. 2 | 3 | tag: 0120dcc787b818f2ce3207467e1c1515360f5385 4 | 5 | -------------------------------------------------------------------------------- /Externals/Spdlog/Tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(SpdlogTest SpdlogTest.cpp) 2 | target_link_libraries(SpdlogTest PRIVATE spdlog::spdlog) 3 | 4 | add_test(NAME SpdlogTest COMMAND SpdlogTest) 5 | -------------------------------------------------------------------------------- /Externals/Spdlog/Tests/SpdlogTest.cpp: -------------------------------------------------------------------------------- 1 | /** @file SpdLogTests.cpp 2 | * Created at 2020-03-05 3 | * Copyright (c) RVBUST, Inc - All rights reserved. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | int main(int argc, char *argv[]) { 10 | auto logger = spdlog::stdout_color_mt("console"); 11 | // Loggers can store in a ring buffer all messages (including debug/trace) and display later on 12 | // demand. When needed, call dump_backtrace() to see them 13 | logger->enable_backtrace(32); // create ring buffer with capacity of 32 messages 14 | // or my_logger->enable_backtrace(32).. 15 | for (int i = 0; i < 10000; i++) { 16 | // TODO: call following line will also output all log messages, this is should be bug 17 | 18 | // logger->log(static_cast(3), "AAAA"); 19 | 20 | // But use following line is fine. 21 | logger->debug("Backtrace message {}", i); // not logged yet.. 22 | } 23 | // e.g. if some error happened: 24 | logger->dump_backtrace(); // log them now! show the last 32 messages 25 | 26 | logger->disable_backtrace(); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/common-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace level { 12 | static string_view_t level_string_views[] SPDLOG_LEVEL_NAMES; 13 | 14 | static const char *short_level_names[] SPDLOG_SHORT_LEVEL_NAMES; 15 | 16 | SPDLOG_INLINE string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT 17 | { 18 | return level_string_views[l]; 19 | } 20 | 21 | SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT 22 | { 23 | return short_level_names[l]; 24 | } 25 | 26 | SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT 27 | { 28 | int level = 0; 29 | for (const auto &level_str : level_string_views) 30 | { 31 | if (level_str == name) 32 | { 33 | return static_cast(level); 34 | } 35 | level++; 36 | } 37 | return level::off; 38 | } 39 | } // namespace level 40 | 41 | SPDLOG_INLINE spdlog_ex::spdlog_ex(std::string msg) 42 | : msg_(std::move(msg)) 43 | {} 44 | 45 | SPDLOG_INLINE spdlog_ex::spdlog_ex(const std::string &msg, int last_errno) 46 | { 47 | memory_buf_t outbuf; 48 | fmt::format_system_error(outbuf, last_errno, msg); 49 | msg_ = fmt::to_string(outbuf); 50 | } 51 | 52 | SPDLOG_INLINE const char *spdlog_ex::what() const SPDLOG_NOEXCEPT 53 | { 54 | return msg_.c_str(); 55 | } 56 | 57 | } // namespace spdlog 58 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/backtracer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | namespace spdlog { 10 | namespace details { 11 | SPDLOG_INLINE backtracer::backtracer(const backtracer &other) 12 | { 13 | std::lock_guard lock(other.mutex_); 14 | enabled_ = other.enabled(); 15 | messages_ = other.messages_; 16 | } 17 | 18 | SPDLOG_INLINE backtracer::backtracer(backtracer &&other) SPDLOG_NOEXCEPT 19 | { 20 | std::lock_guard lock(other.mutex_); 21 | enabled_ = other.enabled(); 22 | messages_ = std::move(other.messages_); 23 | } 24 | 25 | SPDLOG_INLINE backtracer &backtracer::operator=(backtracer other) 26 | { 27 | std::lock_guard lock(mutex_); 28 | enabled_ = other.enabled(); 29 | messages_ = std::move(other.messages_); 30 | return *this; 31 | } 32 | 33 | SPDLOG_INLINE void backtracer::enable(size_t size) 34 | { 35 | std::lock_guard lock{mutex_}; 36 | enabled_.store(true, std::memory_order_relaxed); 37 | messages_ = circular_q{size}; 38 | } 39 | 40 | SPDLOG_INLINE void backtracer::disable() 41 | { 42 | std::lock_guard lock{mutex_}; 43 | enabled_.store(false, std::memory_order_relaxed); 44 | } 45 | 46 | SPDLOG_INLINE bool backtracer::enabled() const 47 | { 48 | return enabled_.load(std::memory_order_relaxed); 49 | } 50 | 51 | SPDLOG_INLINE void backtracer::push_back(const log_msg &msg) 52 | { 53 | std::lock_guard lock{mutex_}; 54 | messages_.push_back(log_msg_buffer{msg}); 55 | } 56 | 57 | // pop all items in the q and apply the given fun on each of them. 58 | SPDLOG_INLINE void backtracer::foreach_pop(std::function fun) 59 | { 60 | std::lock_guard lock{mutex_}; 61 | while (!messages_.empty()) 62 | { 63 | auto &front_msg = messages_.front(); 64 | fun(front_msg); 65 | messages_.pop_front(); 66 | } 67 | } 68 | } // namespace details 69 | } // namespace spdlog 70 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/backtracer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Store log messages in circular buffer. 14 | // Useful for storing debug data in case of error/warning happens. 15 | 16 | namespace spdlog { 17 | namespace details { 18 | class backtracer 19 | { 20 | mutable std::mutex mutex_; 21 | std::atomic enabled_{false}; 22 | circular_q messages_; 23 | 24 | public: 25 | backtracer() = default; 26 | backtracer(const backtracer &other); 27 | 28 | backtracer(backtracer &&other) SPDLOG_NOEXCEPT; 29 | backtracer &operator=(backtracer other); 30 | 31 | void enable(size_t size); 32 | void disable(); 33 | bool enabled() const; 34 | void push_back(const log_msg &msg); 35 | 36 | // pop all items in the q and apply the given fun on each of them. 37 | void foreach_pop(std::function fun); 38 | }; 39 | 40 | } // namespace details 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "backtracer-inl.h" 45 | #endif -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex 13 | { 14 | using mutex_t = std::mutex; 15 | static mutex_t &mutex() 16 | { 17 | static mutex_t s_mutex; 18 | return s_mutex; 19 | } 20 | }; 21 | 22 | struct console_nullmutex 23 | { 24 | using mutex_t = null_mutex; 25 | static mutex_t &mutex() 26 | { 27 | static mutex_t s_mutex; 28 | return s_mutex; 29 | } 30 | }; 31 | } // namespace details 32 | } // namespace spdlog 33 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/file_helper.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | // Helper class for file sinks. 13 | // When failing to open a file, retry several times(5) with a delay interval(10 ms). 14 | // Throw spdlog_ex exception on errors. 15 | 16 | class file_helper 17 | { 18 | public: 19 | explicit file_helper() = default; 20 | 21 | file_helper(const file_helper &) = delete; 22 | file_helper &operator=(const file_helper &) = delete; 23 | ~file_helper(); 24 | 25 | void open(const filename_t &fname, bool truncate = false); 26 | void reopen(bool truncate); 27 | void flush(); 28 | void close(); 29 | void write(const memory_buf_t &buf); 30 | size_t size() const; 31 | const filename_t &filename() const; 32 | 33 | // 34 | // return file path and its extension: 35 | // 36 | // "mylog.txt" => ("mylog", ".txt") 37 | // "mylog" => ("mylog", "") 38 | // "mylog." => ("mylog.", "") 39 | // "/dir1/dir2/mylog.txt" => ("/dir1/dir2/mylog", ".txt") 40 | // 41 | // the starting dot in filenames is ignored (hidden files): 42 | // 43 | // ".mylog" => (".mylog". "") 44 | // "my_folder/.mylog" => ("my_folder/.mylog", "") 45 | // "my_folder/.mylog.txt" => ("my_folder/.mylog", ".txt") 46 | static std::tuple split_by_extension(const filename_t &fname); 47 | 48 | private: 49 | const int open_tries_ = 5; 50 | const int open_interval_ = 10; 51 | std::FILE *fd_{nullptr}; 52 | filename_t filename_; 53 | }; 54 | } // namespace details 55 | } // namespace spdlog 56 | 57 | #ifdef SPDLOG_HEADER_ONLY 58 | #include "file_helper-inl.h" 59 | #endif 60 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/log_msg-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace details { 14 | 15 | SPDLOG_INLINE log_msg::log_msg( 16 | spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 17 | : logger_name(a_logger_name) 18 | , level(lvl) 19 | , time(os::now()) 20 | #ifndef SPDLOG_NO_THREAD_ID 21 | , thread_id(os::thread_id()) 22 | #endif 23 | , source(loc) 24 | , payload(msg) 25 | {} 26 | 27 | SPDLOG_INLINE log_msg::log_msg(string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg) 28 | : log_msg(source_loc{}, a_logger_name, lvl, msg) 29 | {} 30 | 31 | } // namespace details 32 | } // namespace spdlog 33 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace details { 11 | struct log_msg 12 | { 13 | log_msg() = default; 14 | log_msg(source_loc loc, string_view_t logger_name, level::level_enum lvl, string_view_t msg); 15 | log_msg(string_view_t logger_name, level::level_enum lvl, string_view_t msg); 16 | log_msg(const log_msg &other) = default; 17 | 18 | string_view_t logger_name; 19 | level::level_enum level{level::off}; 20 | log_clock::time_point time; 21 | size_t thread_id{0}; 22 | 23 | // wrapping the formatted text with color (updated by pattern_formatter). 24 | mutable size_t color_range_start{0}; 25 | mutable size_t color_range_end{0}; 26 | 27 | source_loc source; 28 | string_view_t payload; 29 | }; 30 | } // namespace details 31 | } // namespace spdlog 32 | 33 | #ifdef SPDLOG_HEADER_ONLY 34 | #include "log_msg-inl.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/log_msg_buffer-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg &orig_msg) 14 | : log_msg{orig_msg} 15 | { 16 | buffer.append(logger_name.begin(), logger_name.end()); 17 | buffer.append(payload.begin(), payload.end()); 18 | update_string_views(); 19 | } 20 | 21 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(const log_msg_buffer &other) 22 | : log_msg{other} 23 | { 24 | buffer.append(logger_name.begin(), logger_name.end()); 25 | buffer.append(payload.begin(), payload.end()); 26 | update_string_views(); 27 | } 28 | 29 | SPDLOG_INLINE log_msg_buffer::log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT : log_msg{other}, buffer{std::move(other.buffer)} 30 | { 31 | update_string_views(); 32 | } 33 | 34 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(const log_msg_buffer &other) 35 | { 36 | log_msg::operator=(other); 37 | buffer.clear(); 38 | buffer.append(other.buffer.data(), other.buffer.data() + other.buffer.size()); 39 | update_string_views(); 40 | return *this; 41 | } 42 | 43 | SPDLOG_INLINE log_msg_buffer &log_msg_buffer::operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT 44 | { 45 | log_msg::operator=(other); 46 | buffer = std::move(other.buffer); 47 | update_string_views(); 48 | return *this; 49 | } 50 | 51 | SPDLOG_INLINE void log_msg_buffer::update_string_views() 52 | { 53 | logger_name = string_view_t{buffer.data(), logger_name.size()}; 54 | payload = string_view_t{buffer.data() + logger_name.size(), payload.size()}; 55 | } 56 | 57 | } // namespace details 58 | } // namespace spdlog 59 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // THis is needed since log_msg holds string_views that points to stack data. 13 | 14 | class log_msg_buffer : public log_msg 15 | { 16 | memory_buf_t buffer; 17 | void update_string_views(); 18 | 19 | public: 20 | log_msg_buffer() = default; 21 | explicit log_msg_buffer(const log_msg &orig_msg); 22 | log_msg_buffer(const log_msg_buffer &other); 23 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 24 | log_msg_buffer &operator=(const log_msg_buffer &other); 25 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 26 | }; 27 | 28 | } // namespace details 29 | } // namespace spdlog 30 | 31 | #ifdef SPDLOG_HEADER_ONLY 32 | #include "log_msg_buffer-inl.h" 33 | #endif 34 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex 13 | { 14 | void lock() const {} 15 | void unlock() const {} 16 | bool try_lock() const 17 | { 18 | return true; 19 | } 20 | }; 21 | 22 | struct null_atomic_int 23 | { 24 | int value; 25 | null_atomic_int() = default; 26 | 27 | explicit null_atomic_int(int new_value) 28 | : value(new_value) 29 | {} 30 | 31 | int load(std::memory_order = std::memory_order_relaxed) const 32 | { 33 | return value; 34 | } 35 | 36 | void store(int new_value, std::memory_order = std::memory_order_relaxed) 37 | { 38 | value = new_value; 39 | } 40 | 41 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) 42 | { 43 | std::swap(new_value, value); 44 | return new_value; // return value before the call 45 | } 46 | }; 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | SPDLOG_INLINE periodic_worker::periodic_worker(const std::function &callback_fun, std::chrono::seconds interval) 14 | { 15 | active_ = (interval > std::chrono::seconds::zero()); 16 | if (!active_) 17 | { 18 | return; 19 | } 20 | 21 | worker_thread_ = std::thread([this, callback_fun, interval]() { 22 | for (;;) 23 | { 24 | std::unique_lock lock(this->mutex_); 25 | if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) 26 | { 27 | return; // active_ == false, so exit this thread 28 | } 29 | callback_fun(); 30 | } 31 | }); 32 | } 33 | 34 | // stop the worker thread and join it 35 | SPDLOG_INLINE periodic_worker::~periodic_worker() 36 | { 37 | if (worker_thread_.joinable()) 38 | { 39 | { 40 | std::lock_guard lock(mutex_); 41 | active_ = false; 42 | } 43 | cv_.notify_one(); 44 | worker_thread_.join(); 45 | } 46 | } 47 | 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/periodic_worker.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | // periodic worker thread - periodically executes the given callback function. 7 | // 8 | // RAII over the owned thread: 9 | // creates the thread on construction. 10 | // stops and joins the thread on destruction (if the thread is executing a callback, wait for it to finish first). 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | namespace spdlog { 18 | namespace details { 19 | 20 | class periodic_worker 21 | { 22 | public: 23 | periodic_worker(const std::function &callback_fun, std::chrono::seconds interval); 24 | periodic_worker(const periodic_worker &) = delete; 25 | periodic_worker &operator=(const periodic_worker &) = delete; 26 | // stop the worker thread and join it 27 | ~periodic_worker(); 28 | 29 | private: 30 | bool active_; 31 | std::thread worker_thread_; 32 | std::mutex mutex_; 33 | std::condition_variable cv_; 34 | }; 35 | } // namespace details 36 | } // namespace spdlog 37 | 38 | #ifdef SPDLOG_HEADER_ONLY 39 | #include "periodic_worker-inl.h" 40 | #endif 41 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory 14 | { 15 | template 16 | static std::shared_ptr create(std::string logger_name, SinkArgs &&... args) 17 | { 18 | auto sink = std::make_shared(std::forward(args)...); 19 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 20 | details::registry::instance().initialize_logger(new_logger); 21 | return new_logger; 22 | } 23 | }; 24 | } // namespace spdlog -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/fmt/bundled/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - present, Victor Zverovich 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | --- Optional exception to the license --- 23 | 24 | As an exception, if, as a result of your compiling your source code, portions 25 | of this Software are embedded into a machine-executable object form of such 26 | source code, you may redistribute such embedded portions in such object form 27 | without including the above copyright and permission notices. 28 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #ifndef FMT_USE_WINDOWS_H 20 | #define FMT_USE_WINDOWS_H 0 21 | #endif 22 | #include 23 | #include 24 | #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib 25 | #include 26 | #include 27 | #endif -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | 11 | #if !defined(SPDLOG_FMT_EXTERNAL) 12 | #ifdef SPDLOG_HEADER_ONLY 13 | #ifndef FMT_HEADER_ONLY 14 | #define FMT_HEADER_ONLY 15 | #endif 16 | #endif 17 | #include 18 | #else 19 | #include 20 | #endif 21 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | class formatter 12 | { 13 | public: 14 | virtual ~formatter() = default; 15 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 16 | virtual std::unique_ptr clone() const = 0; 17 | }; 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/base_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | template 16 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink() 17 | : formatter_{details::make_unique()} 18 | {} 19 | 20 | template 21 | SPDLOG_INLINE spdlog::sinks::base_sink::base_sink(std::unique_ptr formatter) 22 | : formatter_{std::move(formatter)} 23 | {} 24 | 25 | template 26 | void SPDLOG_INLINE spdlog::sinks::base_sink::log(const details::log_msg &msg) 27 | { 28 | std::lock_guard lock(mutex_); 29 | sink_it_(msg); 30 | } 31 | 32 | template 33 | void SPDLOG_INLINE spdlog::sinks::base_sink::flush() 34 | { 35 | std::lock_guard lock(mutex_); 36 | flush_(); 37 | } 38 | 39 | template 40 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern(const std::string &pattern) 41 | { 42 | std::lock_guard lock(mutex_); 43 | set_pattern_(pattern); 44 | } 45 | 46 | template 47 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_formatter(std::unique_ptr sink_formatter) 48 | { 49 | std::lock_guard lock(mutex_); 50 | set_formatter_(std::move(sink_formatter)); 51 | } 52 | 53 | template 54 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_pattern_(const std::string &pattern) 55 | { 56 | set_formatter_(details::make_unique(pattern)); 57 | } 58 | 59 | template 60 | void SPDLOG_INLINE spdlog::sinks::base_sink::set_formatter_(std::unique_ptr sink_formatter) 61 | { 62 | formatter_ = std::move(sink_formatter); 63 | } 64 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/base_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | // 6 | // base sink templated over a mutex (either dummy or real) 7 | // concrete implementation should override the sink_it_() and flush_() methods. 8 | // locking is taken care of in this class - no locking needed by the 9 | // implementers.. 10 | // 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace spdlog { 17 | namespace sinks { 18 | template 19 | class base_sink : public sink 20 | { 21 | public: 22 | base_sink(); 23 | explicit base_sink(std::unique_ptr formatter); 24 | base_sink(const base_sink &) = delete; 25 | base_sink &operator=(const base_sink &) = delete; 26 | void log(const details::log_msg &msg) final; 27 | void flush() final; 28 | void set_pattern(const std::string &pattern) final; 29 | void set_formatter(std::unique_ptr sink_formatter) final; 30 | 31 | protected: 32 | // sink formatter 33 | std::unique_ptr formatter_; 34 | Mutex mutex_; 35 | 36 | virtual void sink_it_(const details::log_msg &msg) = 0; 37 | virtual void flush_() = 0; 38 | virtual void set_pattern_(const std::string &pattern); 39 | virtual void set_formatter_(std::unique_ptr sink_formatter); 40 | }; 41 | } // namespace sinks 42 | } // namespace spdlog 43 | 44 | #ifdef SPDLOG_HEADER_ONLY 45 | #include "base_sink-inl.h" 46 | #endif 47 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/basic_file_sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | SPDLOG_INLINE basic_file_sink::basic_file_sink(const filename_t &filename, bool truncate) 18 | { 19 | file_helper_.open(filename, truncate); 20 | } 21 | 22 | template 23 | SPDLOG_INLINE const filename_t &basic_file_sink::filename() const 24 | { 25 | return file_helper_.filename(); 26 | } 27 | 28 | template 29 | SPDLOG_INLINE void basic_file_sink::sink_it_(const details::log_msg &msg) 30 | { 31 | memory_buf_t formatted; 32 | base_sink::formatter_->format(msg, formatted); 33 | file_helper_.write(formatted); 34 | } 35 | 36 | template 37 | SPDLOG_INLINE void basic_file_sink::flush_() 38 | { 39 | file_helper_.flush(); 40 | } 41 | 42 | } // namespace sinks 43 | } // namespace spdlog 44 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/basic_file_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | /* 17 | * Trivial file sink with single file as target 18 | */ 19 | template 20 | class basic_file_sink final : public base_sink 21 | { 22 | public: 23 | explicit basic_file_sink(const filename_t &filename, bool truncate = false); 24 | const filename_t &filename() const; 25 | 26 | protected: 27 | void sink_it_(const details::log_msg &msg) override; 28 | void flush_() override; 29 | 30 | private: 31 | details::file_helper file_helper_; 32 | }; 33 | 34 | using basic_file_sink_mt = basic_file_sink; 35 | using basic_file_sink_st = basic_file_sink; 36 | 37 | } // namespace sinks 38 | 39 | // 40 | // factory functions 41 | // 42 | template 43 | inline std::shared_ptr basic_logger_mt(const std::string &logger_name, const filename_t &filename, bool truncate = false) 44 | { 45 | return Factory::template create(logger_name, filename, truncate); 46 | } 47 | 48 | template 49 | inline std::shared_ptr basic_logger_st(const std::string &logger_name, const filename_t &filename, bool truncate = false) 50 | { 51 | return Factory::template create(logger_name, filename, truncate); 52 | } 53 | 54 | } // namespace spdlog 55 | 56 | #ifdef SPDLOG_HEADER_ONLY 57 | #include "basic_file_sink-inl.h" 58 | #endif -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2016 Alexander Dalshov. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #if defined(_WIN32) 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | namespace spdlog { 18 | namespace sinks { 19 | /* 20 | * MSVC sink (logging using OutputDebugStringA) 21 | */ 22 | template 23 | class msvc_sink : public base_sink 24 | { 25 | public: 26 | explicit msvc_sink() {} 27 | 28 | protected: 29 | void sink_it_(const details::log_msg &msg) override 30 | { 31 | 32 | memory_buf_t formatted; 33 | base_sink::formatter_->format(msg, formatted); 34 | OutputDebugStringA(fmt::to_string(formatted).c_str()); 35 | } 36 | 37 | void flush_() override {} 38 | }; 39 | 40 | using msvc_sink_mt = msvc_sink; 41 | using msvc_sink_st = msvc_sink; 42 | 43 | using windebug_sink_mt = msvc_sink_mt; 44 | using windebug_sink_st = msvc_sink_st; 45 | 46 | } // namespace sinks 47 | } // namespace spdlog 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | 15 | template 16 | class null_sink : public base_sink 17 | { 18 | protected: 19 | void sink_it_(const details::log_msg &) override {} 20 | void flush_() override {} 21 | }; 22 | 23 | using null_sink_mt = null_sink; 24 | using null_sink_st = null_sink; 25 | 26 | } // namespace sinks 27 | 28 | template 29 | inline std::shared_ptr null_logger_mt(const std::string &logger_name) 30 | { 31 | auto null_logger = Factory::template create(logger_name); 32 | null_logger->set_level(level::off); 33 | return null_logger; 34 | } 35 | 36 | template 37 | inline std::shared_ptr null_logger_st(const std::string &logger_name) 38 | { 39 | auto null_logger = Factory::template create(logger_name); 40 | null_logger->set_level(level::off); 41 | return null_logger; 42 | } 43 | 44 | } // namespace spdlog 45 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | template 15 | class ostream_sink final : public base_sink 16 | { 17 | public: 18 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 19 | : ostream_(os) 20 | , force_flush_(force_flush) 21 | {} 22 | ostream_sink(const ostream_sink &) = delete; 23 | ostream_sink &operator=(const ostream_sink &) = delete; 24 | 25 | protected: 26 | void sink_it_(const details::log_msg &msg) override 27 | { 28 | memory_buf_t formatted; 29 | base_sink::formatter_->format(msg, formatted); 30 | ostream_.write(formatted.data(), static_cast(formatted.size())); 31 | if (force_flush_) 32 | { 33 | ostream_.flush(); 34 | } 35 | } 36 | 37 | void flush_() override 38 | { 39 | ostream_.flush(); 40 | } 41 | 42 | std::ostream &ostream_; 43 | bool force_flush_; 44 | }; 45 | 46 | using ostream_sink_mt = ostream_sink; 47 | using ostream_sink_st = ostream_sink; 48 | 49 | } // namespace sinks 50 | } // namespace spdlog 51 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/ringbuffer_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "spdlog/sinks/base_sink.h" 7 | #include "spdlog/details/circular_q.h" 8 | #include "spdlog/details/log_msg_buffer.h" 9 | #include "spdlog/details/null_mutex.h" 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace spdlog { 16 | namespace sinks { 17 | /* 18 | * Ring buffer sink 19 | */ 20 | template 21 | class ringbuffer_sink final : public base_sink 22 | { 23 | public: 24 | explicit ringbuffer_sink(size_t n_items) 25 | : q_{n_items} 26 | {} 27 | 28 | std::vector last_raw(size_t lim = 0) 29 | { 30 | std::lock_guard lock(base_sink::mutex_); 31 | auto n_items = lim > 0 ? (std::min)(lim, q_.size()) : q_.size(); 32 | std::vector ret; 33 | ret.reserve(n_items); 34 | for (size_t i = 0; i < n_items; i++) 35 | { 36 | ret.push_back(q_.at(i)); 37 | } 38 | return ret; 39 | } 40 | 41 | std::vector last_formatted(size_t lim = 0) 42 | { 43 | std::lock_guard lock(base_sink::mutex_); 44 | auto n_items = lim > 0 ? (std::min)(lim, q_.size()) : q_.size(); 45 | std::vector ret; 46 | ret.reserve(n_items); 47 | for (size_t i = 0; i < n_items; i++) 48 | { 49 | memory_buf_t formatted; 50 | base_sink::formatter_->format(q_.at(i), formatted); 51 | ret.push_back(fmt::to_string(formatted)); 52 | } 53 | return ret; 54 | } 55 | 56 | protected: 57 | void sink_it_(const details::log_msg &msg) override 58 | { 59 | q_.push_back(details::log_msg_buffer{msg}); 60 | } 61 | void flush_() override {} 62 | 63 | private: 64 | details::circular_q q_; 65 | }; 66 | 67 | using ringbuffer_sink_mt = ringbuffer_sink; 68 | using ringbuffer_sink_st = ringbuffer_sink; 69 | 70 | } // namespace sinks 71 | 72 | } // namespace spdlog 73 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const 13 | { 14 | return msg_level >= level_.load(std::memory_order_relaxed); 15 | } 16 | 17 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) 18 | { 19 | level_.store(log_level, std::memory_order_relaxed); 20 | } 21 | 22 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const 23 | { 24 | return static_cast(level_.load(std::memory_order_relaxed)); 25 | } 26 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class sink 13 | { 14 | public: 15 | virtual ~sink() = default; 16 | virtual void log(const details::log_msg &msg) = 0; 17 | virtual void flush() = 0; 18 | virtual void set_pattern(const std::string &pattern) = 0; 19 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 20 | 21 | void set_level(level::level_enum log_level); 22 | level::level_enum level() const; 23 | bool should_log(level::level_enum msg_level) const; 24 | 25 | protected: 26 | // sink log level - default is all 27 | level_t level_{level::trace}; 28 | }; 29 | 30 | } // namespace sinks 31 | } // namespace spdlog 32 | 33 | #ifdef SPDLOG_HEADER_ONLY 34 | #include "sink-inl.h" 35 | #endif 36 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/stdout_color_sinks-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | namespace spdlog { 14 | 15 | template 16 | SPDLOG_INLINE std::shared_ptr stdout_color_mt(const std::string &logger_name, color_mode mode) 17 | { 18 | return Factory::template create(logger_name, mode); 19 | } 20 | 21 | template 22 | SPDLOG_INLINE std::shared_ptr stdout_color_st(const std::string &logger_name, color_mode mode) 23 | { 24 | return Factory::template create(logger_name, mode); 25 | } 26 | 27 | template 28 | SPDLOG_INLINE std::shared_ptr stderr_color_mt(const std::string &logger_name, color_mode mode) 29 | { 30 | return Factory::template create(logger_name, mode); 31 | } 32 | 33 | template 34 | SPDLOG_INLINE std::shared_ptr stderr_color_st(const std::string &logger_name, color_mode mode) 35 | { 36 | return Factory::template create(logger_name, mode); 37 | } 38 | } // namespace spdlog -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/stdout_color_sinks.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifdef _WIN32 7 | #include 8 | #else 9 | #include 10 | #endif 11 | 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | #ifdef _WIN32 17 | using stdout_color_sink_mt = wincolor_stdout_sink_mt; 18 | using stdout_color_sink_st = wincolor_stdout_sink_st; 19 | using stderr_color_sink_mt = wincolor_stderr_sink_mt; 20 | using stderr_color_sink_st = wincolor_stderr_sink_st; 21 | #else 22 | using stdout_color_sink_mt = ansicolor_stdout_sink_mt; 23 | using stdout_color_sink_st = ansicolor_stdout_sink_st; 24 | using stderr_color_sink_mt = ansicolor_stderr_sink_mt; 25 | using stderr_color_sink_st = ansicolor_stderr_sink_st; 26 | #endif 27 | } // namespace sinks 28 | 29 | template 30 | std::shared_ptr stdout_color_mt(const std::string &logger_name, color_mode mode = color_mode::automatic); 31 | 32 | template 33 | std::shared_ptr stdout_color_st(const std::string &logger_name, color_mode mode = color_mode::automatic); 34 | 35 | template 36 | std::shared_ptr stderr_color_mt(const std::string &logger_name, color_mode mode = color_mode::automatic); 37 | 38 | template 39 | std::shared_ptr stderr_color_st(const std::string &logger_name, color_mode mode = color_mode::automatic); 40 | 41 | } // namespace spdlog 42 | 43 | #ifdef SPDLOG_HEADER_ONLY 44 | #include "stdout_color_sinks-inl.h" 45 | #endif 46 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/sinks/tcp_sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #pragma once 16 | 17 | // Simple tcp client sink 18 | // Connects to remote address and send the formatted log. 19 | // Will attempt to reconnect if connection drops. 20 | // If more complicated behaviour is needed (i.e get responses), you can inherit it and override the sink_it_ method. 21 | 22 | namespace spdlog { 23 | namespace sinks { 24 | 25 | struct tcp_sink_config 26 | { 27 | std::string server_host; 28 | int server_port; 29 | bool lazy_connect = false; // connect on first log call instead of in construction 30 | 31 | tcp_sink_config(std::string host, int port) 32 | : server_host{std::move(host)} 33 | , server_port{port} 34 | {} 35 | }; 36 | 37 | template 38 | class tcp_sink : public spdlog::sinks::base_sink 39 | { 40 | public: 41 | // connect to tcp host/port or throw if failed 42 | // host can be hostname or ip address 43 | explicit tcp_sink(tcp_sink_config sink_config) 44 | : config_{std::move(sink_config)} 45 | { 46 | if (!config_.lazy_connect) 47 | { 48 | this->client_.connect(config_.server_host, config_.server_port); 49 | } 50 | } 51 | 52 | ~tcp_sink() override = default; 53 | 54 | protected: 55 | void sink_it_(const spdlog::details::log_msg &msg) override 56 | { 57 | spdlog::memory_buf_t formatted; 58 | spdlog::sinks::base_sink::formatter_->format(msg, formatted); 59 | if (!client_.is_connected()) 60 | { 61 | client_.connect(config_.server_host, config_.server_port); 62 | } 63 | client_.send(formatted.data(), formatted.size()); 64 | } 65 | 66 | void flush_() override {} 67 | tcp_sink_config config_; 68 | details::tcp_client client_; 69 | }; 70 | 71 | using tcp_sink_mt = tcp_sink; 72 | using tcp_sink_st = tcp_sink; 73 | 74 | } // namespace sinks 75 | } // namespace spdlog 76 | -------------------------------------------------------------------------------- /Externals/Spdlog/include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 5 8 | #define SPDLOG_VER_PATCH 0 9 | 10 | #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) 11 | -------------------------------------------------------------------------------- /Externals/Spdlog/src/async.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include "spdlog/async.h" 9 | #include "spdlog/async_logger-inl.h" 10 | #include "spdlog/details/periodic_worker-inl.h" 11 | #include "spdlog/details/thread_pool-inl.h" 12 | template class spdlog::details::mpmc_blocking_queue; -------------------------------------------------------------------------------- /Externals/Spdlog/src/file_sinks.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include 9 | #include "spdlog/details/null_mutex.h" 10 | #include "spdlog/details/file_helper-inl.h" 11 | #include "spdlog/sinks/basic_file_sink-inl.h" 12 | 13 | template class spdlog::sinks::basic_file_sink; 14 | template class spdlog::sinks::basic_file_sink; 15 | 16 | #include "spdlog/sinks/rotating_file_sink-inl.h" 17 | template class spdlog::sinks::rotating_file_sink; 18 | template class spdlog::sinks::rotating_file_sink; -------------------------------------------------------------------------------- /Externals/Spdlog/src/spdlog.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include "spdlog/spdlog-inl.h" 9 | #include "spdlog/common-inl.h" 10 | #include "spdlog/details/backtracer-inl.h" 11 | #include "spdlog/details/registry-inl.h" 12 | #include "spdlog/details/os-inl.h" 13 | #include "spdlog/details/pattern_formatter-inl.h" 14 | #include "spdlog/details/log_msg-inl.h" 15 | #include "spdlog/details/log_msg_buffer-inl.h" 16 | #include "spdlog/logger-inl.h" 17 | #include "spdlog/sinks/sink-inl.h" 18 | #include "spdlog/sinks/base_sink-inl.h" 19 | #include "spdlog/details/null_mutex.h" 20 | 21 | #include 22 | 23 | // template instantiate logger constructor with sinks init list 24 | template spdlog::logger::logger(std::string name, sinks_init_list::iterator begin, sinks_init_list::iterator end); 25 | template class spdlog::sinks::base_sink; 26 | template class spdlog::sinks::base_sink; -------------------------------------------------------------------------------- /Externals/Spdlog/src/stdout_sinks.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include 9 | 10 | #include "spdlog/details/null_mutex.h" 11 | #include "spdlog/async.h" 12 | #include "spdlog/sinks/stdout_sinks-inl.h" 13 | 14 | template class spdlog::sinks::stdout_sink_base; 15 | template class spdlog::sinks::stdout_sink_base; 16 | template class spdlog::sinks::stdout_sink; 17 | template class spdlog::sinks::stdout_sink; 18 | template class spdlog::sinks::stderr_sink; 19 | template class spdlog::sinks::stderr_sink; 20 | 21 | template std::shared_ptr spdlog::stdout_logger_mt(const std::string &logger_name); 22 | template std::shared_ptr spdlog::stdout_logger_st(const std::string &logger_name); 23 | template std::shared_ptr spdlog::stderr_logger_mt(const std::string &logger_name); 24 | template std::shared_ptr spdlog::stderr_logger_st(const std::string &logger_name); 25 | 26 | template std::shared_ptr spdlog::stdout_logger_mt(const std::string &logger_name); 27 | template std::shared_ptr spdlog::stdout_logger_st(const std::string &logger_name); 28 | template std::shared_ptr spdlog::stderr_logger_mt(const std::string &logger_name); 29 | template std::shared_ptr spdlog::stderr_logger_st(const std::string &logger_name); -------------------------------------------------------------------------------- /Externals/libgizmo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | cmake_policy(VERSION 3.5) 3 | 4 | project(libgizmo CXX C) 5 | 6 | set(SRC 7 | Src/GizmoTransformMove.cpp Src/GizmoTransformRotate.cpp Src/ZBaseMaths.cpp 8 | Src/GizmoTransformRender.cpp Src/GizmoTransformScale.cpp Src/ZMathsFunc.cpp 9 | ) 10 | 11 | add_library(libgizmo ${SRC}) 12 | target_include_directories(libgizmo PUBLIC Include) 13 | 14 | add_library(libgizmo::libgizmo ALIAS libgizmo) 15 | -------------------------------------------------------------------------------- /Externals/libgizmo/Src/LibBase.h: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // LibGizmo 3 | // File Name : 4 | // Creation : 10/01/2012 5 | // Author : Cedric Guillemet 6 | // Description : LibGizmo 7 | // 8 | /// Copyright (C) 2012 Cedric Guillemet 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | // this software and associated documentation files (the "Software"), to deal in 12 | // the Software without restriction, including without limitation the rights to 13 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 14 | // of the Software, and to permit persons to whom the Software is furnished to do 15 | /// so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in all 18 | // copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | // SOFTWARE. 27 | // 28 | 29 | #ifndef LIBBASE_H__ 30 | #define LIBBASE_H__ 31 | 32 | #include "ZBaseDefs.h" 33 | #include "ZBaseMaths.h" 34 | #include "ZCollisionsUtils.h" 35 | #include "ZMathsFunc.h" 36 | #endif 37 | -------------------------------------------------------------------------------- /Externals/libgizmo/Src/ZMathsFunc.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // LibGizmo 3 | // File Name : 4 | // Creation : 10/01/2012 5 | // Author : Cedric Guillemet 6 | // Description : LibGizmo 7 | // 8 | /// Copyright (C) 2012 Cedric Guillemet 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 11 | // this software and associated documentation files (the "Software"), to deal in 12 | // the Software without restriction, including without limitation the rights to 13 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 14 | // of the Software, and to permit persons to whom the Software is furnished to do 15 | /// so, subject to the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be included in all 18 | // copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | // SOFTWARE. 27 | // 28 | 29 | #include "ZMathsFunc.h" 30 | // Globals //////////////////////////////////////////////////////////////////////////////////////// 31 | 32 | /////////////////////////////////////////////////////////////////////////////////////////////////// 33 | 34 | /////////////////////////////////////////////////////////////////////////////////////////////////// 35 | 36 | float MathFloatBezierCubic(const float& v1, const float& v2, const float& v3, const float& v4, 37 | const float s) { 38 | float x = v1 * MathBezierCubicSplineF4(s) + v2 * MathBezierCubicSplineF3(s) + 39 | v4 * MathBezierCubicSplineF2(s) + v3 * MathBezierCubicSplineF1(s); 40 | return x; 41 | } 42 | /////////////////////////////////////////////////////////////////////////////////////////////////// 43 | -------------------------------------------------------------------------------- /Src/Intersector/LineIntersector.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * \brief OSG-based line intersector class. 3 | * \details This file is a part of osgIntersectors example program. See more details: 4 | * https://github.com/vicrucann/osg-intersectors-example 5 | * \autor Victoria Rudakova 6 | * \date 2016-2017 7 | * \copyright MIT License 8 | */ 9 | 10 | #ifndef LINEINTERSECTOR_H 11 | #define LINEINTERSECTOR_H 12 | 13 | #include 14 | #include 15 | 16 | /*! \class LineIntersector 17 | * \brief A class that allows to catch intersections with line loops and lines OpenGL types. 18 | * It uses shortest distance between the cast ray and the geometry line which is calculated 19 | * as a distance between skew lines. 20 | * In addition, it filters out the geometries whose primitive sets are different than line-types. 21 | */ 22 | 23 | class LineIntersector : public osgUtil::LineSegmentIntersector { 24 | public: 25 | LineIntersector(); 26 | 27 | LineIntersector(const osg::Vec3& start, const osg::Vec3& end); 28 | LineIntersector(CoordinateFrame cf, double x, double y); 29 | LineIntersector(CoordinateFrame cf, const osg::Vec3d& start, const osg::Vec3d& end); 30 | 31 | void setOffset(float offset); 32 | float getOffset() const; 33 | void getHitIndices(int& first, int& last) const; 34 | 35 | virtual Intersector* clone(osgUtil::IntersectionVisitor& iv); 36 | virtual void intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable); 37 | 38 | bool isVirtualIntersector() const; 39 | 40 | protected: 41 | double getSkewLinesDistance(const osg::Vec3d& r1, const osg::Vec3d& r2, const osg::Vec3d& v1, 42 | const osg::Vec3d& v2); 43 | virtual bool isRightPrimitive(const osg::Geometry* geometry); 44 | 45 | float m_offset; 46 | std::vector m_hitIndices; 47 | }; 48 | 49 | #endif // LINEINTERSECTOR_H 50 | -------------------------------------------------------------------------------- /Src/Intersector/PointIntersector.h: -------------------------------------------------------------------------------- 1 | /*! 2 | * \brief OSG-based point intersector. 3 | * \details This file is a part of osgIntersectors example program. See more details: 4 | * https://github.com/vicrucann/osg-intersectors-example 5 | * \autor Victoria Rudakova 6 | * \date 2016-2017 7 | * \copyright MIT License 8 | */ 9 | 10 | #ifndef POINTINTERSECTOR_H 11 | #define POINTINTERSECTOR_H 12 | 13 | #include 14 | #include 15 | #include "LineIntersector.h" 16 | 17 | /*! \class PointIntersector 18 | * \brief It allows to catch intersections with point OpenGL types. 19 | * It uses shortest distance between the cast ray and geometry's vertices. 20 | * In addition, it filters out the geometries whose primitive sets are different than GL_POINTS. 21 | * The result primitive index is saved to `hit.primitiveIndex`. 22 | */ 23 | class PointIntersector : public LineIntersector { 24 | public: 25 | PointIntersector(); 26 | PointIntersector(const osg::Vec3& start, const osg::Vec3& end); 27 | PointIntersector(CoordinateFrame cf, double x, double y); 28 | PointIntersector(CoordinateFrame cf, const osg::Vec3d& start, const osg::Vec3d& end); 29 | 30 | virtual Intersector* clone(osgUtil::IntersectionVisitor& iv); 31 | virtual void intersect(osgUtil::IntersectionVisitor& iv, osg::Drawable* drawable); 32 | 33 | protected: 34 | virtual bool isRightPrimitive(const osg::Geometry* geometry); 35 | }; 36 | 37 | #endif // POINTINTERSECTOR_H 38 | -------------------------------------------------------------------------------- /Src/Manipulator/TouchballManipulator.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class TouchballManipulator : public osgGA::MultiTouchTrackballManipulator { 4 | public: 5 | TouchballManipulator(int* gizmod = nullptr, bool* view_manipulation = nullptr) 6 | : m_gizmod(gizmod), m_view_manipulation(view_manipulation) { 7 | setMinimumDistance(-0.5f, true); 8 | } 9 | 10 | bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa); 11 | 12 | protected: 13 | virtual void handleMultiTouchPan(const osgGA::GUIEventAdapter* now, 14 | const osgGA::GUIEventAdapter* last, 15 | const double eventTimeDelta); 16 | virtual void handleMultiTouchZoom(const osgGA::GUIEventAdapter* now, 17 | const osgGA::GUIEventAdapter* last, 18 | const double eventTimeDelta); 19 | 20 | private: 21 | int* m_gizmod; 22 | bool* m_view_manipulation; 23 | double m_4time = 0.0f; 24 | double m_3time = 0.0f; 25 | double m_2time = 0.0f; 26 | double m_1time = 0.0f; 27 | double m_ztime = 0.0f; 28 | }; 29 | -------------------------------------------------------------------------------- /Src/Python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # We put python binding into a seperate lib folder 2 | pybind11_add_module(PyVis PyVis.cpp) 3 | set_target_properties(PyVis PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE) 4 | target_include_directories(PyVis PRIVATE ${EIGEN3_INCLUDE_DIR} ${LOGGER_INCLUDE_DIRS}) 5 | target_link_libraries(PyVis PRIVATE RVS_Vis ${OSG_LIBS}) 6 | set_target_properties(PyVis PROPERTIES INSTALL_RPATH "/home/rvbust/Rvbust/Install/RVS/Lib") 7 | set_target_properties(PyVis PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE) 8 | set_target_properties(PyVis 9 | PROPERTIES 10 | ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/Python/RVS/Vis" 11 | LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Python/RVS/Vis" 12 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" 13 | ) 14 | 15 | # add_sanitizers(PyVis) 16 | -------------------------------------------------------------------------------- /postinst: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [ $1 = configure ]; then 5 | userhome=/home/rvbust 6 | echo "setting PYTHONPATH ..." 7 | if [ -e $userhome/.bashrc ]; then 8 | if [[ ! -z $(cat $userhome/.bashrc | grep /opt/RVBUST/Vis/Python) ]]; then 9 | echo "PYTHONPATH has been set!" 10 | else 11 | echo "export PYTHONPATH=\$PYTHONPATH:/opt/RVBUST/Vis/Python" >>$userhome/.bashrc 12 | fi 13 | fi 14 | if [ -e $userhome/.zshrc ]; then 15 | if [[ ! -z $(cat $userhome/.zshrc | grep /opt/RVBUST/Vis/Python) ]]; then 16 | echo "PYTHONPATH has been set!" 17 | else 18 | echo "export PYTHONPATH=\$PYTHONPATH:/opt/RVBUST/Vis/Python" >>$userhome/.zshrc 19 | fi 20 | fi 21 | echo "Set PYTHONPATH successfully!" 22 | fi 23 | --------------------------------------------------------------------------------