diff --git a/.clang-format b/.clang-format deleted file mode 100644 index 861afc6b..00000000 --- a/.clang-format +++ /dev/null @@ -1,5 +0,0 @@ -BasedOnStyle: LLVM -IndentWidth: 2 -PointerAlignment: Left -ColumnLimit: 100 -AccessModifierOffset: -2 diff --git a/.clang-tidy b/.clang-tidy deleted file mode 100644 index e3292e76..00000000 --- a/.clang-tidy +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -# Configure clang-tidy for this project. - -# Disabled: -# -google-readability-namespace-comments the *_CLIENT_NS is a macro, and -# clang-tidy fails to match it against the initial value. -Checks: > - -*, - bugprone-*, - google-*, - misc-*, - modernize-*, - performance-*, - portability-*, - readability-*, - -modernize-use-trailing-return-type, - -bugprone-implicit-widening-of-multiplication-result, - -modernize-avoid-c-arrays, - -readability-identifier-length, - -misc-non-private-member-variables-in-classes, - -# -google-readability-namespace-comments, -# -google-runtime-int, -# -google-runtime-references, -# -misc-non-private-member-variables-in-classes, -# -readability-named-parameter, -# -readability-braces-around-statements, -# -readability-magic-numbers, -# -# Turn all the warnings from the checks above into errors. -WarningsAsErrors: "*" - -CheckOptions: - - { key: readability-identifier-naming.NamespaceCase, value: lower_case } - - { key: readability-identifier-naming.ClassCase, value: CamelCase } - - { key: readability-identifier-naming.StructCase, value: CamelCase } - - { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase } - - { key: readability-identifier-naming.FunctionCase, value: lower_case } - - { key: readability-identifier-naming.VariableCase, value: lower_case } - - { key: readability-identifier-naming.PrivateMemberPrefix, value: _ } - - { key: readability-identifier-naming.ProtectedMemberPrefix, value: _ } - - { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE } - - { key: readability-identifier-naming.EnumConstantCase, value: CamelCase } - - { key: readability-identifier-naming.EnumConstantPrefix, value: k } - - { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase } - - { key: readability-identifier-naming.ConstexprVariablePrefix, value: k } - - { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE } - - { key: readability-identifier-naming.MemberConstantCase, value: CamelCase } - - { key: readability-identifier-naming.MemberConstantPrefix, value: k } - - { key: readability-identifier-naming.StaticConstantCase, value: CamelCase } - - { key: readability-identifier-naming.StaticConstantPrefix, value: k } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index f88798b4..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: CI - -on: - push: - branches: main - paths: ['.github/workflows/**', '**.cpp', '**.h', '**CMakeLists.txt'] - pull_request: - branches: main - paths: ['.github/workflows/**','**.cpp', '**.h', '**CMakeLists.txt'] - -jobs: - build-and-test: - strategy: - matrix: - os: [ubuntu-latest,macos-latest] - - runs-on: ${{ matrix.os }} - steps: - # Checkout the mcpp repository for building and testing - - name: Checkout mcpp - uses: actions/checkout@v4 - - # Build CMake cache - - name: Build file - run: cmake --debug-output -B build - - - name: Install library - working-directory: ./build - run: sudo make install - - - name: Update linux cache - if: runner.os == 'ubuntu-latest' - run: sudo ldconfig - - - name: Compile and link library - working-directory: ./build - run: make examples - - # Start and join the Spigot Server - - name: Set up Minecraft testing environment - uses: nhatdongdang/mc-env-setup@v1.2 - - # Run the test suite using ctest - - name: Run test suite - working-directory: ./build - run: make test_suite && ctest -R full -V - - - name: Run example - working-directory: ./build - run: ./hello_minecraft diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml deleted file mode 100644 index 64374dbf..00000000 --- a/.github/workflows/cpp-linter.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: cpp-linter -on: - pull_request: - branches: main - paths: ['**.cpp', '**.h', '**CMakeLists.txt'] - push: - branches: main - paths: ['**.cpp', '**.h', '**CMakeLists.txt'] - -permissions: - contents: write - pull-requests: write - actions: write - -jobs: - cpp-linter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: cpp-linter/cpp-linter-action@v2 - id: linter - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - style: 'file' # Use .clang-format config file. - tidy-checks: '-*' # disable clang-tidy checks. - thread-comments: true - format-review: true - - - name: Run clang-format - if: steps.linter.outputs.clang-format-checks-failed > 0 - run: exit 1 diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml deleted file mode 100644 index 29d401d3..00000000 --- a/.github/workflows/doxygen.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: deploy-doxygen - -on: - push: - branches: - - main - paths: - - "include/**" - - "Doxyfile" - - "**/*.md" - - ".github/workflows/doxygen.yml" -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up Doxygen - run: | - sudo apt-get update - sudo apt-get install -y doxygen graphviz - - - name: Generate Documentation - run: doxygen ./Doxyfile - - - name: Deploying to Gh-pages - uses: jinxto/doxygen-env-setup@v1.5 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 036ebfeb..00000000 --- a/.gitignore +++ /dev/null @@ -1,50 +0,0 @@ -# Build artifacts -build -.cache -test/test_suite -test/local_tests - -# CMake -*.cmake -Makefile -*.txt -!CMakeLists.txt -CMakeFiles - -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app -/cmake-build-debug-coverage/ -/cmake-build-release-coverage/ - -#Generated documentation -doc/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 285567ed..00000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "doxygen-awesome-css"] - path = doxygen-awesome-css - url = https://github.com/Jinxto/doxygen-theme.git - branch = main diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index f75a3530..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -cmake_minimum_required(VERSION 3.16) - -# Check if PROJECT_VERSION is already defined, otherwise set a default -if(NOT DEFINED PROJECT_VERSION) - set(PROJECT_VERSION 1.0.0) -endif() - -project(mcpp VERSION ${PROJECT_VERSION}) - -set(CMAKE_CXX_STANDARD 17) - -# Used for clang-tidy -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) -endif() - -set(CMAKE_CXX_FLAGS "-Wall -Wextra") -set(CMAKE_CXX_FLAGS_DEBUG "-g") -set(CMAKE_CXX_FLAGS_RELEASE "-O3") - -set(MCPP_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) -set(MCPP_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) - -# Testing -add_subdirectory(test) -enable_testing() -add_test(NAME local COMMAND local_tests) -add_test(NAME full COMMAND test_suite) - -# Source files -file(GLOB_RECURSE MCPP_INCLUDE_FILES ${MCPP_INC_DIR}/*.h) -file(GLOB_RECURSE MCPP_SOURCE_FILES ${MCPP_SRC_DIR}/*.cpp) - -# Library build -add_library(${PROJECT_NAME} SHARED ${MCPP_INCLUDE_FILES} ${MCPP_SOURCE_FILES}) - -set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) -set(HEADER_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) - -set_target_properties(${PROJECT_NAME} - PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION 1 - PUBLIC_HEADER "${MCPP_INCLUDE_FILES}" - INSTALL_NAME_DIR ${LIB_INSTALL_DIR} -) - -# Fix silly macOS include errors -target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ -) - -install(TARGETS ${PROJECT_NAME} - LIBRARY DESTINATION ${LIB_INSTALL_DIR} - PUBLIC_HEADER DESTINATION ${HEADER_INSTALL_DIR} -) - -# Build examples -add_executable(hello_minecraft EXCLUDE_FROM_ALL example/hello_minecraft.cpp) -add_executable(pyramid EXCLUDE_FROM_ALL example/pyramid.cpp) -add_executable(game_of_life EXCLUDE_FROM_ALL example/game-of-life/game_of_life.cpp) -add_executable(minesweeper EXCLUDE_FROM_ALL example/minesweeper/minesweeper.cpp) -add_executable(video_mc EXCLUDE_FROM_ALL example/video-generation/video-mc.cpp) -add_executable(obj_mc EXCLUDE_FROM_ALL example/model-generation/obj-mc.cpp) - -target_link_libraries(hello_minecraft ${PROJECT_NAME}) -target_link_libraries(pyramid ${PROJECT_NAME}) -target_link_libraries(game_of_life ${PROJECT_NAME}) -target_link_libraries(minesweeper ${PROJECT_NAME}) -target_link_libraries(video_mc ${PROJECT_NAME}) -target_link_libraries(obj_mc ${PROJECT_NAME}) - -add_custom_target(examples DEPENDS hello_minecraft pyramid game_of_life minesweeper video_mc obj_mc) - - diff --git a/Doxyfile b/Doxyfile deleted file mode 100644 index efd988f2..00000000 --- a/Doxyfile +++ /dev/null @@ -1,352 +0,0 @@ -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "mcpp" -PROJECT_NUMBER = -PROJECT_BRIEF = "C++ Minecraft Library" -PROJECT_LOGO = -OUTPUT_DIRECTORY = ./doc/ -CREATE_SUBDIRS = NO -CREATE_SUBDIRS_LEVEL = 8 -ALLOW_UNICODE_NAMES = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -JAVADOC_BANNER = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -PYTHON_DOCSTRING = YES -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 4 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = NO -OPTIMIZE_OUTPUT_VHDL = NO -OPTIMIZE_OUTPUT_SLICE = NO -EXTENSION_MAPPING = -MARKDOWN_SUPPORT = YES -TOC_INCLUDE_HEADINGS = 5 -AUTOLINK_SUPPORT = YES -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -IDL_PROPERTY_SUPPORT = YES -DISTRIBUTE_GROUP_DOC = NO -GROUP_NESTED_COMPOUNDS = NO -SUBGROUPING = YES -INLINE_GROUPED_CLASSES = NO -INLINE_SIMPLE_STRUCTS = NO -TYPEDEF_HIDES_STRUCT = NO -LOOKUP_CACHE_SIZE = 0 -NUM_PROC_THREADS = 1 -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_PRIV_VIRTUAL = NO -EXTRACT_PACKAGE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -RESOLVE_UNNAMED_PARAMS = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -HIDE_COMPOUND_REFERENCE = NO -SHOW_HEADERFILE = YES -SHOW_INCLUDE_FILES = YES -SHOW_GROUPED_MEMB_INC = NO -FORCE_LOCAL_INCLUDES = NO -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_MEMBERS_CTORS_1ST = NO -SORT_GROUP_NAMES = NO -SORT_BY_SCOPE_NAME = NO -STRICT_PROTO_MATCHING = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST = YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_FILES = YES -SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = -LAYOUT_FILE = -CITE_BIB_FILES = -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_IF_INCOMPLETE_DOC = YES -WARN_NO_PARAMDOC = NO -WARN_IF_UNDOC_ENUM_VAL = NO -WARN_AS_ERROR = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LINE_FORMAT = "at line $line of file $file" -WARN_LOGFILE = -INPUT = ./include/mcpp \ - ./README.md -INPUT_ENCODING = UTF-8 -INPUT_FILE_ENCODING = -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.pyw \ - *.f90 \ - *.f95 \ - *.f03 \ - *.f08 \ - *.f18 \ - *.f \ - *.for \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf \ - *.ice -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -FILTER_SOURCE_PATTERNS = -USE_MDFILE_AS_MAINPAGE = README.md -FORTRAN_COMMENT_AFTER = 72 -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -SOURCE_TOOLTIPS = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -CLANG_ASSISTED_PARSING = NO -CLANG_ADD_INC_PATHS = YES -CLANG_OPTIONS = -CLANG_DATABASE_PATH = -ALPHABETICAL_INDEX = YES -IGNORE_PREFIX = -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = doxygen-awesome-css/doxygen-custom/header.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \ - doxygen-awesome-css/doxygen-custom/custom.css \ - doxygen-awesome-css/doxygen-awesome-sidebar-only.css \ - doxygen-awesome-css/doxygen-awesome-sidebar-only-darkmode-toggle.css \ - doxygen-awesome-css/doxygen-custom/custom-alternative.css -HTML_EXTRA_FILES = doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \ - doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \ - doxygen-awesome-css/doxygen-awesome-paragraph-link.js \ - doxygen-awesome-css/doxygen-custom/toggle-alternative-theme.js \ - doxygen-awesome-css/doxygen-awesome-interactive-toc.js \ - doxygen-awesome-css/doxygen-awesome-tabs.js -HTML_COLORSTYLE = LIGHT -HTML_COLORSTYLE_HUE = 209 -HTML_COLORSTYLE_SAT = 255 -HTML_COLORSTYLE_GAMMA = 113 -HTML_TIMESTAMP = NO -HTML_DYNAMIC_MENUS = YES -HTML_DYNAMIC_SECTIONS = NO -HTML_INDEX_NUM_ENTRIES = 100 -GENERATE_DOCSET = NO -DOCSET_FEEDNAME = -DOCSET_FEEDURL = -DOCSET_BUNDLE_ID = -DOCSET_PUBLISHER_ID = -DOCSET_PUBLISHER_NAME = -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -CHM_INDEX_ENCODING = -BINARY_TOC = NO -TOC_EXPAND = NO -GENERATE_QHP = NO -QCH_FILE = -QHP_NAMESPACE = org.doxygen.Project -QHP_VIRTUAL_FOLDER = doc -QHP_CUST_FILTER_NAME = -QHP_CUST_FILTER_ATTRS = -QHP_SECT_FILTER_ATTRS = -QHG_LOCATION = -GENERATE_ECLIPSEHELP = NO -ECLIPSE_DOC_ID = org.doxygen.Project -DISABLE_INDEX = NO -GENERATE_TREEVIEW = YES -FULL_SIDEBAR = NO -ENUM_VALUES_PER_LINE = 4 -TREEVIEW_WIDTH = 335 -EXT_LINKS_IN_WINDOW = NO -OBFUSCATE_EMAILS = YES -HTML_FORMULA_FORMAT = png -FORMULA_FONTSIZE = 10 -FORMULA_MACROFILE = -USE_MATHJAX = NO -MATHJAX_VERSION = MathJax_2 -MATHJAX_FORMAT = HTML-CSS -MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 -MATHJAX_EXTENSIONS = -MATHJAX_CODEFILE = -SEARCHENGINE = YES -SERVER_BASED_SEARCH = NO -EXTERNAL_SEARCH = NO -SEARCHENGINE_URL = -SEARCHDATA_FILE = searchdata.xml -EXTERNAL_SEARCH_ID = -EXTRA_SEARCH_MAPPINGS = -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = -MAKEINDEX_CMD_NAME = makeindex -LATEX_MAKEINDEX_CMD = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4 -EXTRA_PACKAGES = -LATEX_HEADER = -LATEX_FOOTER = -LATEX_EXTRA_STYLESHEET = -LATEX_EXTRA_FILES = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -LATEX_BIB_STYLE = plain -LATEX_TIMESTAMP = NO -LATEX_EMOJI_DIRECTORY = -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_SUBDIR = -MAN_LINKS = NO -GENERATE_XML = NO -XML_OUTPUT = xml -XML_PROGRAMLISTING = YES -XML_NS_MEMB_FILE_SCOPE = NO -GENERATE_DOCBOOK = NO -DOCBOOK_OUTPUT = docbook -GENERATE_AUTOGEN_DEF = NO -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -EXTERNAL_PAGES = YES -DIA_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -DOT_NUM_THREADS = 0 -DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" -DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" -DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" -DOT_FONTPATH = -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = YES -UML_LOOK = NO -UML_LIMIT_NUM_FIELDS = 10 -DOT_UML_DETAILS = NO -DOT_WRAP_THRESHOLD = 17 -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DIR_GRAPH_MAX_DEPTH = 1 -DOT_IMAGE_FORMAT = svg -INTERACTIVE_SVG = NO -DOT_PATH = -DOTFILE_DIRS = -MSCFILE_DIRS = -DIAFILE_DIRS = -PLANTUML_JAR_PATH = -PLANTUML_CFG_FILE = -PLANTUML_INCLUDE_PATH = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 4f9b11a9..00000000 --- a/README.md +++ /dev/null @@ -1,68 +0,0 @@ -![mcpp logo](https://raw.githubusercontent.com/rozukke/mcpp/main/resources/mcpplogosmall.png) - - -# mcpp -[![made-with-cpp](https://img.shields.io/badge/Made%20with-C++_17-1f425f.svg)](https://cplusplus.com/) [![made-by-rozukke](https://img.shields.io/badge/Creator-rozukke-f497af.svg)](https://github.com/rozukke) -[![GitHub license](https://img.shields.io/github/license/rozukke/mcpp.svg)](https://github.com/rozukke/mcpp/blob/main/LICENSE) -[![Build status](https://github.com/rozukke/mcpp/actions/workflows/ci.yml/badge.svg?branch=main&event=push)](https://github.com/rozukke/mcpp/actions/workflows/ci.yml) - -**mcpp** (Minecraft++) is a library built to interface with Minecraft through [Spigot server](https://www.spigotmc.org/) -running the [ELCI](https://github.com/rozukke/ELCI) plugin and using C++. It was primarily designed as a teaching tool, and is tested on MacOS/Linux or Windows with WSL. - -## Documentation -➡ Access the docs for this repo at the [mcpp documentation site](https://rozukke.github.io/mcpp/). - -➡ For more details on the broad strokes of **mcpp**, refer to the [wiki](https://github.com/rozukke/mcpp/wiki/Index)! - -## History -This library is based on [mcpi](https://github.com/martinohanlon/mcpi), which is a Python library with similar functionality. - -In addition to C++ support, this library implements several new commands supported by [ELCI](https://github.com/rozukke/ELCI): -- `getBlocks` to get a cuboid of blocks with modifiers in a performant manner, -- `getHeights` to get a 2D area of heights in a performant manner, -- `doCommand` to perform an in-game minecraft command which allows for additional functionality. - -This C++ version was created for the Royal Melbourne Institute of Technology (RMIT) to supplement the **COSC2084** -(Programming Studio 2) course. - -## Installation -### Windows -Since the release is intended for UNIX systems, the recommendation it to do as follows: -- Install WSL, and then follow the below instructions for Linux. -- Depending on your WSL version, you may need to specify a connection address manually in `MinecraftConnection()` if you are running Spigot (with ELCI) on Windows, which you can find using `nslookup "$(hostname).local"` on your WSL terminal. The default port for ELCI is `4711`. As such, it's recommended to also run the server under WSL. - -### MacOS and Linux -- Install `g++`, `make`, `cmake` and any other build prerequisites -- Run the following commands: -```shell -git clone https://github.com/rozukke/mcpp.git && cd mcpp -cmake -B build && cd build -sudo make install -``` -- After doing this, the library should be accessible via a `#include ` directive. -- When compiling code using the library, use the flag `-lmcpp` for Makefiles or `target_link_libraries(your_executable mcpp)` for CMake. - -## Contributors - - - - - -## License -**The following applies to all relevant code and resource files:** - -Copyright 2024 Artemis Rosman and contributors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - diff --git a/_r_e_a_d_m_e_8md.html b/_r_e_a_d_m_e_8md.html new file mode 100644 index 00000000..cd97fbf8 --- /dev/null +++ b/_r_e_a_d_m_e_8md.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + mcpp: README.md File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
README.md File Reference
+
+
+
+
+ + + + diff --git a/annotated.html b/annotated.html new file mode 100644 index 00000000..ea784e15 --- /dev/null +++ b/annotated.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class List + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 123]
+ + + + + + + + + + + + +
 NmcppNamespace containing all the the mcpp library classes
 CBlocks
 CBlockType
 CChunk
 CConstIteratorAn iterator for the const Chunk's 3D block data
 CIteratorAn iterator for the Chunk's 3D block data
 CCoordinate
 CCoordinate2DHeight-agnostic coordinate class
 CHeightMap
 CConstIteratorAn iterator for the const HeightMap structure
 CIteratorAn iterator for the HeightMap structure
 CMinecraftConnection
+
+
+
+ + + + diff --git a/annotated_dup.js b/annotated_dup.js new file mode 100644 index 00000000..2e9acb87 --- /dev/null +++ b/annotated_dup.js @@ -0,0 +1,12 @@ +var annotated_dup = +[ + [ "mcpp", "namespacemcpp.html", [ + [ "Blocks", "structmcpp_1_1_blocks.html", null ], + [ "BlockType", "classmcpp_1_1_block_type.html", "classmcpp_1_1_block_type" ], + [ "Chunk", "structmcpp_1_1_chunk.html", "structmcpp_1_1_chunk" ], + [ "Coordinate", "structmcpp_1_1_coordinate.html", "structmcpp_1_1_coordinate" ], + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html", "structmcpp_1_1_coordinate2_d" ], + [ "HeightMap", "structmcpp_1_1_height_map.html", "structmcpp_1_1_height_map" ], + [ "MinecraftConnection", "classmcpp_1_1_minecraft_connection.html", "classmcpp_1_1_minecraft_connection" ] + ] ] +]; \ No newline at end of file diff --git a/bc_s.png b/bc_s.png new file mode 100644 index 00000000..5d3c4cb9 Binary files /dev/null and b/bc_s.png differ diff --git a/bc_sd.png b/bc_sd.png new file mode 100644 index 00000000..7c691d4e Binary files /dev/null and b/bc_sd.png differ diff --git a/block_8h.html b/block_8h.html new file mode 100644 index 00000000..1cec6484 --- /dev/null +++ b/block_8h.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/block.h File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
block.h File Reference
+
+
+ +

BlockType class. +More...

+
#include <cstdint>
+#include <ostream>
+
+Include dependency graph for block.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

class  mcpp::BlockType
 
struct  mcpp::Blocks
 
+ + + + +

+Namespaces

namespace  mcpp
 Namespace containing all the the mcpp library classes.
 
+

Detailed Description

+

BlockType class.

+
+
+ + + + diff --git a/block_8h.js b/block_8h.js new file mode 100644 index 00000000..1c5e1621 --- /dev/null +++ b/block_8h.js @@ -0,0 +1,5 @@ +var block_8h = +[ + [ "mcpp::BlockType", "classmcpp_1_1_block_type.html", "classmcpp_1_1_block_type" ], + [ "mcpp::Blocks", "structmcpp_1_1_blocks.html", null ] +]; \ No newline at end of file diff --git a/block_8h__dep__incl.map b/block_8h__dep__incl.map new file mode 100644 index 00000000..729d4a64 --- /dev/null +++ b/block_8h__dep__incl.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/block_8h__dep__incl.md5 b/block_8h__dep__incl.md5 new file mode 100644 index 00000000..3752b473 --- /dev/null +++ b/block_8h__dep__incl.md5 @@ -0,0 +1 @@ +5dd54789b2910e8ce1a4137ae9eb7474 \ No newline at end of file diff --git a/block_8h__dep__incl.svg b/block_8h__dep__incl.svg new file mode 100644 index 00000000..6829da15 --- /dev/null +++ b/block_8h__dep__incl.svg @@ -0,0 +1,66 @@ + + + + + + +include/mcpp/block.h + + +Node1 + + +include/mcpp/block.h + + + + + +Node2 + + +include/mcpp/chunk.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +include/mcpp/mcpp.h + + + + + +Node1->Node3 + + + + + + + + +Node2->Node3 + + + + + + + + diff --git a/block_8h__incl.map b/block_8h__incl.map new file mode 100644 index 00000000..5d7d4139 --- /dev/null +++ b/block_8h__incl.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/block_8h__incl.md5 b/block_8h__incl.md5 new file mode 100644 index 00000000..da3c8cc2 --- /dev/null +++ b/block_8h__incl.md5 @@ -0,0 +1 @@ +1b0727331ea4ae0f053148ee2499db86 \ No newline at end of file diff --git a/block_8h__incl.svg b/block_8h__incl.svg new file mode 100644 index 00000000..19eec525 --- /dev/null +++ b/block_8h__incl.svg @@ -0,0 +1,57 @@ + + + + + + +include/mcpp/block.h + + +Node1 + + +include/mcpp/block.h + + + + + +Node2 + + +cstdint + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ostream + + + + + +Node1->Node3 + + + + + + + + diff --git a/block_8h_source.html b/block_8h_source.html new file mode 100644 index 00000000..ae783c1b --- /dev/null +++ b/block_8h_source.html @@ -0,0 +1,1075 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/block.h Source File + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
block.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2
+
3#include <cstdint>
+
4#include <ostream>
+
5
+
+
10namespace mcpp {
+
+
11class BlockType {
+
12public:
+
13 uint8_t id; // NOLINT
+
14 uint8_t mod; // NOLINT
+
15
+
16 // NOLINTNEXTLINE
+
17 constexpr BlockType(uint8_t id = 0, uint8_t mod = 0) : id(id), mod(mod){};
+
18
+
30 bool operator==(const BlockType& other) const;
+
31
+
42 bool operator!=(const BlockType& other) const;
+
43
+
53 friend std::ostream& operator<<(std::ostream& out, const BlockType& block);
+
54
+
62 [[nodiscard]] BlockType with_mod(uint8_t modifier) const;
+
63};
+
+
64
+
65// Using script to extract ids from https://minecraft-ids.grahamedgecombe.com/
+
66
+
+
72struct Blocks {
+
73 // NOLINTBEGIN
+
74 static constexpr BlockType AIR = BlockType(0);
+
75 static constexpr BlockType STONE = BlockType(1);
+
76 static constexpr BlockType GRANITE = BlockType(1, 1);
+
77 static constexpr BlockType POLISHED_GRANITE = BlockType(1, 2);
+
78 static constexpr BlockType DIORITE = BlockType(1, 3);
+
79 static constexpr BlockType POLISHED_DIORITE = BlockType(1, 4);
+
80 static constexpr BlockType ANDESITE = BlockType(1, 5);
+
81 static constexpr BlockType POLISHED_ANDESITE = BlockType(1, 6);
+
82 static constexpr BlockType GRASS = BlockType(2);
+
83 static constexpr BlockType DIRT = BlockType(3);
+
84 static constexpr BlockType COARSE_DIRT = BlockType(3, 1);
+
85 static constexpr BlockType PODZOL = BlockType(3, 2);
+
86 static constexpr BlockType COBBLESTONE = BlockType(4);
+
87 static constexpr BlockType OAK_WOOD_PLANK = BlockType(5);
+
88 static constexpr BlockType SPRUCE_WOOD_PLANK = BlockType(5, 1);
+
89 static constexpr BlockType BIRCH_WOOD_PLANK = BlockType(5, 2);
+
90 static constexpr BlockType JUNGLE_WOOD_PLANK = BlockType(5, 3);
+
91 static constexpr BlockType ACACIA_WOOD_PLANK = BlockType(5, 4);
+
92 static constexpr BlockType DARK_OAK_WOOD_PLANK = BlockType(5, 5);
+
93 static constexpr BlockType OAK_SAPLING = BlockType(6);
+
94 static constexpr BlockType SPRUCE_SAPLING = BlockType(6, 1);
+
95 static constexpr BlockType BIRCH_SAPLING = BlockType(6, 2);
+
96 static constexpr BlockType JUNGLE_SAPLING = BlockType(6, 3);
+
97 static constexpr BlockType ACACIA_SAPLING = BlockType(6, 4);
+
98 static constexpr BlockType DARK_OAK_SAPLING = BlockType(6, 5);
+
99 static constexpr BlockType BEDROCK = BlockType(7);
+
100 static constexpr BlockType FLOWING_WATER = BlockType(8);
+
101 static constexpr BlockType STILL_WATER = BlockType(9);
+
102 static constexpr BlockType FLOWING_LAVA = BlockType(10);
+
103 static constexpr BlockType STILL_LAVA = BlockType(11);
+
104 static constexpr BlockType SAND = BlockType(12);
+
105 static constexpr BlockType RED_SAND = BlockType(12, 1);
+
106 static constexpr BlockType GRAVEL = BlockType(13);
+
107 static constexpr BlockType GOLD_ORE = BlockType(14);
+
108 static constexpr BlockType IRON_ORE = BlockType(15);
+
109 static constexpr BlockType COAL_ORE = BlockType(16);
+
110 static constexpr BlockType OAK_WOOD = BlockType(17);
+
111 static constexpr BlockType SPRUCE_WOOD = BlockType(17, 1);
+
112 static constexpr BlockType BIRCH_WOOD = BlockType(17, 2);
+
113 static constexpr BlockType JUNGLE_WOOD = BlockType(17, 3);
+
114 static constexpr BlockType OAK_LEAVES = BlockType(18);
+
115 static constexpr BlockType SPRUCE_LEAVES = BlockType(18, 1);
+
116 static constexpr BlockType BIRCH_LEAVES = BlockType(18, 2);
+
117 static constexpr BlockType JUNGLE_LEAVES = BlockType(18, 3);
+
118 static constexpr BlockType SPONGE = BlockType(19);
+
119 static constexpr BlockType WET_SPONGE = BlockType(19, 1);
+
120 static constexpr BlockType GLASS = BlockType(20);
+
121 static constexpr BlockType LAPIS_LAZULI_ORE = BlockType(21);
+
122 static constexpr BlockType LAPIS_LAZULI_BLOCK = BlockType(22);
+
123 static constexpr BlockType DISPENSER = BlockType(23);
+
124 static constexpr BlockType SANDSTONE = BlockType(24);
+
125 static constexpr BlockType CHISELED_SANDSTONE = BlockType(24, 1);
+
126 static constexpr BlockType SMOOTH_SANDSTONE = BlockType(24, 2);
+
127 static constexpr BlockType NOTE_BLOCK = BlockType(25);
+
128 static constexpr BlockType BED = BlockType(26);
+
129 static constexpr BlockType POWERED_RAIL = BlockType(27);
+
130 static constexpr BlockType DETECTOR_RAIL = BlockType(28);
+
131 static constexpr BlockType STICKY_PISTON = BlockType(29);
+
132 static constexpr BlockType COBWEB = BlockType(30);
+
133 static constexpr BlockType DEAD_SHRUB = BlockType(31);
+
134 static constexpr BlockType TALL_GRASS = BlockType(31, 1);
+
135 static constexpr BlockType FERN = BlockType(31, 2);
+
136 static constexpr BlockType DEAD_BUSH = BlockType(32);
+
137 static constexpr BlockType PISTON = BlockType(33);
+
138 static constexpr BlockType PISTON_HEAD = BlockType(34);
+
139 static constexpr BlockType WHITE_WOOL = BlockType(35);
+
140 static constexpr BlockType ORANGE_WOOL = BlockType(35, 1);
+
141 static constexpr BlockType MAGENTA_WOOL = BlockType(35, 2);
+
142 static constexpr BlockType LIGHT_BLUE_WOOL = BlockType(35, 3);
+
143 static constexpr BlockType YELLOW_WOOL = BlockType(35, 4);
+
144 static constexpr BlockType LIME_WOOL = BlockType(35, 5);
+
145 static constexpr BlockType PINK_WOOL = BlockType(35, 6);
+
146 static constexpr BlockType GRAY_WOOL = BlockType(35, 7);
+
147 static constexpr BlockType LIGHT_GRAY_WOOL = BlockType(35, 8);
+
148 static constexpr BlockType CYAN_WOOL = BlockType(35, 9);
+
149 static constexpr BlockType PURPLE_WOOL = BlockType(35, 10);
+
150 static constexpr BlockType BLUE_WOOL = BlockType(35, 11);
+
151 static constexpr BlockType BROWN_WOOL = BlockType(35, 12);
+
152 static constexpr BlockType GREEN_WOOL = BlockType(35, 13);
+
153 static constexpr BlockType RED_WOOL = BlockType(35, 14);
+
154 static constexpr BlockType BLACK_WOOL = BlockType(35, 15);
+
155 static constexpr BlockType DANDELION = BlockType(37);
+
156 static constexpr BlockType POPPY = BlockType(38);
+
157 static constexpr BlockType BLUE_ORCHID = BlockType(38, 1);
+
158 static constexpr BlockType ALLIUM = BlockType(38, 2);
+
159 static constexpr BlockType AZURE_BLUET = BlockType(38, 3);
+
160 static constexpr BlockType RED_TULIP = BlockType(38, 4);
+
161 static constexpr BlockType ORANGE_TULIP = BlockType(38, 5);
+
162 static constexpr BlockType WHITE_TULIP = BlockType(38, 6);
+
163 static constexpr BlockType PINK_TULIP = BlockType(38, 7);
+
164 static constexpr BlockType OXEYE_DAISY = BlockType(38, 8);
+
165 static constexpr BlockType BROWN_MUSHROOM = BlockType(39);
+
166 static constexpr BlockType RED_MUSHROOM = BlockType(40);
+
167 static constexpr BlockType GOLD_BLOCK = BlockType(41);
+
168 static constexpr BlockType IRON_BLOCK = BlockType(42);
+
169 static constexpr BlockType DOUBLE_STONE_SLAB = BlockType(43);
+
170 static constexpr BlockType DOUBLE_SANDSTONE_SLAB = BlockType(43, 1);
+
171 static constexpr BlockType DOUBLE_WOODEN_SLAB = BlockType(43, 2);
+
172 static constexpr BlockType DOUBLE_COBBLESTONE_SLAB = BlockType(43, 3);
+
173 static constexpr BlockType DOUBLE_BRICK_SLAB = BlockType(43, 4);
+
174 static constexpr BlockType DOUBLE_STONE_BRICK_SLAB = BlockType(43, 5);
+ +
176 static constexpr BlockType DOUBLE_QUARTZ_SLAB = BlockType(43, 7);
+
177 static constexpr BlockType STONE_SLAB = BlockType(44);
+
178 static constexpr BlockType SANDSTONE_SLAB = BlockType(44, 1);
+
179 static constexpr BlockType WOODEN_SLAB = BlockType(44, 2);
+
180 static constexpr BlockType COBBLESTONE_SLAB = BlockType(44, 3);
+
181 static constexpr BlockType BRICK_SLAB = BlockType(44, 4);
+
182 static constexpr BlockType STONE_BRICK_SLAB = BlockType(44, 5);
+
183 static constexpr BlockType NETHER_BRICK_SLAB = BlockType(44, 6);
+
184 static constexpr BlockType QUARTZ_SLAB = BlockType(44, 7);
+
185 static constexpr BlockType BRICKS = BlockType(45);
+
186 static constexpr BlockType TNT = BlockType(46);
+
187 static constexpr BlockType BOOKSHELF = BlockType(47);
+
188 static constexpr BlockType MOSS_STONE = BlockType(48);
+
189 static constexpr BlockType OBSIDIAN = BlockType(49);
+
190 static constexpr BlockType TORCH = BlockType(50);
+
191 static constexpr BlockType FIRE = BlockType(51);
+
192 static constexpr BlockType MONSTER_SPAWNER = BlockType(52);
+
193 static constexpr BlockType OAK_WOOD_STAIRS = BlockType(53);
+
194 static constexpr BlockType CHEST = BlockType(54);
+
195 static constexpr BlockType REDSTONE_WIRE = BlockType(55);
+
196 static constexpr BlockType DIAMOND_ORE = BlockType(56);
+
197 static constexpr BlockType DIAMOND_BLOCK = BlockType(57);
+
198 static constexpr BlockType CRAFTING_TABLE = BlockType(58);
+
199 static constexpr BlockType WHEAT_CROPS = BlockType(59);
+
200 static constexpr BlockType FARMLAND = BlockType(60);
+
201 static constexpr BlockType FURNACE = BlockType(61);
+
202 static constexpr BlockType BURNING_FURNACE = BlockType(62);
+ +
204 static constexpr BlockType OAK_DOOR_BLOCK = BlockType(64);
+
205 static constexpr BlockType LADDER = BlockType(65);
+
206 static constexpr BlockType RAIL = BlockType(66);
+
207 static constexpr BlockType COBBLESTONE_STAIRS = BlockType(67);
+ +
209 static constexpr BlockType LEVER = BlockType(69);
+ +
211 static constexpr BlockType IRON_DOOR_BLOCK = BlockType(71);
+ +
213 static constexpr BlockType REDSTONE_ORE = BlockType(73);
+ +
215 static constexpr BlockType REDSTONE_TORCH_OFF = BlockType(75);
+
216 static constexpr BlockType REDSTONE_TORCH_ON = BlockType(76);
+
217 static constexpr BlockType STONE_BUTTON = BlockType(77);
+
218 static constexpr BlockType SNOW = BlockType(78);
+
219 static constexpr BlockType ICE = BlockType(79);
+
220 static constexpr BlockType SNOW_BLOCK = BlockType(80);
+
221 static constexpr BlockType CACTUS = BlockType(81);
+
222 static constexpr BlockType CLAY = BlockType(82);
+
223 static constexpr BlockType SUGAR_CANES = BlockType(83);
+
224 static constexpr BlockType JUKEBOX = BlockType(84);
+
225 static constexpr BlockType OAK_FENCE = BlockType(85);
+
226 static constexpr BlockType PUMPKIN = BlockType(86);
+
227 static constexpr BlockType NETHERRACK = BlockType(87);
+
228 static constexpr BlockType SOUL_SAND = BlockType(88);
+
229 static constexpr BlockType GLOWSTONE = BlockType(89);
+
230 static constexpr BlockType NETHER_PORTAL = BlockType(90);
+
231 static constexpr BlockType JACK_OLANTERN = BlockType(91);
+
232 static constexpr BlockType CAKE_BLOCK = BlockType(92);
+ + + +
236 static constexpr BlockType ORANGE_STAINED_GLASS = BlockType(95, 1);
+
237 static constexpr BlockType MAGENTA_STAINED_GLASS = BlockType(95, 2);
+ +
239 static constexpr BlockType YELLOW_STAINED_GLASS = BlockType(95, 4);
+
240 static constexpr BlockType LIME_STAINED_GLASS = BlockType(95, 5);
+
241 static constexpr BlockType PINK_STAINED_GLASS = BlockType(95, 6);
+
242 static constexpr BlockType GRAY_STAINED_GLASS = BlockType(95, 7);
+ +
244 static constexpr BlockType CYAN_STAINED_GLASS = BlockType(95, 9);
+
245 static constexpr BlockType PURPLE_STAINED_GLASS = BlockType(95, 10);
+
246 static constexpr BlockType BLUE_STAINED_GLASS = BlockType(95, 11);
+
247 static constexpr BlockType BROWN_STAINED_GLASS = BlockType(95, 12);
+
248 static constexpr BlockType GREEN_STAINED_GLASS = BlockType(95, 13);
+
249 static constexpr BlockType RED_STAINED_GLASS = BlockType(95, 14);
+
250 static constexpr BlockType BLACK_STAINED_GLASS = BlockType(95, 15);
+
251 static constexpr BlockType WOODEN_TRAPDOOR = BlockType(96);
+
252 static constexpr BlockType STONE_MONSTER_EGG = BlockType(97);
+
253 static constexpr BlockType COBBLESTONE_MONSTER_EGG = BlockType(97, 1);
+
254 static constexpr BlockType STONE_BRICK_MONSTER_EGG = BlockType(97, 2);
+ + + +
258 static constexpr BlockType STONE_BRICKS = BlockType(98);
+
259 static constexpr BlockType MOSSY_STONE_BRICKS = BlockType(98, 1);
+
260 static constexpr BlockType CRACKED_STONE_BRICKS = BlockType(98, 2);
+
261 static constexpr BlockType CHISELED_STONE_BRICKS = BlockType(98, 3);
+ +
263 static constexpr BlockType RED_MUSHROOM_BLOCK = BlockType(100);
+
264 static constexpr BlockType IRON_BARS = BlockType(101);
+
265 static constexpr BlockType GLASS_PANE = BlockType(102);
+
266 static constexpr BlockType MELON_BLOCK = BlockType(103);
+
267 static constexpr BlockType PUMPKIN_STEM = BlockType(104);
+
268 static constexpr BlockType MELON_STEM = BlockType(105);
+
269 static constexpr BlockType VINES = BlockType(106);
+
270 static constexpr BlockType OAK_FENCE_GATE = BlockType(107);
+
271 static constexpr BlockType BRICK_STAIRS = BlockType(108);
+
272 static constexpr BlockType STONE_BRICK_STAIRS = BlockType(109);
+
273 static constexpr BlockType MYCELIUM = BlockType(110);
+
274 static constexpr BlockType LILY_PAD = BlockType(111);
+
275 static constexpr BlockType NETHER_BRICK = BlockType(112);
+
276 static constexpr BlockType NETHER_BRICK_FENCE = BlockType(113);
+
277 static constexpr BlockType NETHER_BRICK_STAIRS = BlockType(114);
+
278 static constexpr BlockType NETHER_WART = BlockType(115);
+
279 static constexpr BlockType ENCHANTMENT_TABLE = BlockType(116);
+
280 static constexpr BlockType BREWING_STAND = BlockType(117);
+
281 static constexpr BlockType CAULDRON = BlockType(118);
+
282 static constexpr BlockType END_PORTAL = BlockType(119);
+
283 static constexpr BlockType END_PORTAL_FRAME = BlockType(120);
+
284 static constexpr BlockType END_STONE = BlockType(121);
+
285 static constexpr BlockType DRAGON_EGG = BlockType(122);
+ +
287 static constexpr BlockType REDSTONE_LAMP_ACTIVE = BlockType(124);
+
288 static constexpr BlockType DOUBLE_OAK_WOOD_SLAB = BlockType(125);
+
289 static constexpr BlockType DOUBLE_SPRUCE_WOOD_SLAB = BlockType(125, 1);
+
290 static constexpr BlockType DOUBLE_BIRCH_WOOD_SLAB = BlockType(125, 2);
+
291 static constexpr BlockType DOUBLE_JUNGLE_WOOD_SLAB = BlockType(125, 3);
+
292 static constexpr BlockType DOUBLE_ACACIA_WOOD_SLAB = BlockType(125, 4);
+ +
294 static constexpr BlockType OAK_WOOD_SLAB = BlockType(126);
+
295 static constexpr BlockType SPRUCE_WOOD_SLAB = BlockType(126, 1);
+
296 static constexpr BlockType BIRCH_WOOD_SLAB = BlockType(126, 2);
+
297 static constexpr BlockType JUNGLE_WOOD_SLAB = BlockType(126, 3);
+
298 static constexpr BlockType ACACIA_WOOD_SLAB = BlockType(126, 4);
+
299 static constexpr BlockType DARK_OAK_WOOD_SLAB = BlockType(126, 5);
+
300 static constexpr BlockType COCOA = BlockType(127);
+
301 static constexpr BlockType SANDSTONE_STAIRS = BlockType(128);
+
302 static constexpr BlockType EMERALD_ORE = BlockType(129);
+
303 static constexpr BlockType ENDER_CHEST = BlockType(130);
+
304 static constexpr BlockType TRIPWIRE_HOOK = BlockType(131);
+
305 static constexpr BlockType TRIPWIRE = BlockType(132);
+
306 static constexpr BlockType EMERALD_BLOCK = BlockType(133);
+
307 static constexpr BlockType SPRUCE_WOOD_STAIRS = BlockType(134);
+
308 static constexpr BlockType BIRCH_WOOD_STAIRS = BlockType(135);
+
309 static constexpr BlockType JUNGLE_WOOD_STAIRS = BlockType(136);
+
310 static constexpr BlockType COMMAND_BLOCK = BlockType(137);
+
311 static constexpr BlockType BEACON = BlockType(138);
+
312 static constexpr BlockType COBBLESTONE_WALL = BlockType(139);
+
313 static constexpr BlockType MOSSY_COBBLESTONE_WALL = BlockType(139, 1);
+
314 static constexpr BlockType FLOWER_POT = BlockType(140);
+
315 static constexpr BlockType CARROTS = BlockType(141);
+
316 static constexpr BlockType POTATOES = BlockType(142);
+
317 static constexpr BlockType WOODEN_BUTTON = BlockType(143);
+
318 static constexpr BlockType MOB_HEAD = BlockType(144);
+
319 static constexpr BlockType ANVIL = BlockType(145);
+
320 static constexpr BlockType TRAPPED_CHEST = BlockType(146);
+ + + + +
325 static constexpr BlockType DAYLIGHT_SENSOR = BlockType(151);
+
326 static constexpr BlockType REDSTONE_BLOCK = BlockType(152);
+
327 static constexpr BlockType NETHER_QUARTZ_ORE = BlockType(153);
+
328 static constexpr BlockType HOPPER = BlockType(154);
+
329 static constexpr BlockType QUARTZ_BLOCK = BlockType(155);
+
330 static constexpr BlockType CHISELED_QUARTZ_BLOCK = BlockType(155, 1);
+
331 static constexpr BlockType PILLAR_QUARTZ_BLOCK = BlockType(155, 2);
+
332 static constexpr BlockType QUARTZ_STAIRS = BlockType(156);
+
333 static constexpr BlockType ACTIVATOR_RAIL = BlockType(157);
+
334 static constexpr BlockType DROPPER = BlockType(158);
+
335 static constexpr BlockType WHITE_HARDENED_CLAY = BlockType(159);
+
336 static constexpr BlockType ORANGE_HARDENED_CLAY = BlockType(159, 1);
+
337 static constexpr BlockType MAGENTA_HARDENED_CLAY = BlockType(159, 2);
+
338 static constexpr BlockType LIGHT_BLUE_HARDENED_CLAY = BlockType(159, 3);
+
339 static constexpr BlockType YELLOW_HARDENED_CLAY = BlockType(159, 4);
+
340 static constexpr BlockType LIME_HARDENED_CLAY = BlockType(159, 5);
+
341 static constexpr BlockType PINK_HARDENED_CLAY = BlockType(159, 6);
+
342 static constexpr BlockType GRAY_HARDENED_CLAY = BlockType(159, 7);
+
343 static constexpr BlockType LIGHT_GRAY_HARDENED_CLAY = BlockType(159, 8);
+
344 static constexpr BlockType CYAN_HARDENED_CLAY = BlockType(159, 9);
+
345 static constexpr BlockType PURPLE_HARDENED_CLAY = BlockType(159, 10);
+
346 static constexpr BlockType BLUE_HARDENED_CLAY = BlockType(159, 11);
+
347 static constexpr BlockType BROWN_HARDENED_CLAY = BlockType(159, 12);
+
348 static constexpr BlockType GREEN_HARDENED_CLAY = BlockType(159, 13);
+
349 static constexpr BlockType RED_HARDENED_CLAY = BlockType(159, 14);
+
350 static constexpr BlockType BLACK_HARDENED_CLAY = BlockType(159, 15);
+ + + + + +
356 static constexpr BlockType LIME_STAINED_GLASS_PANE = BlockType(160, 5);
+
357 static constexpr BlockType PINK_STAINED_GLASS_PANE = BlockType(160, 6);
+
358 static constexpr BlockType GRAY_STAINED_GLASS_PANE = BlockType(160, 7);
+ +
360 static constexpr BlockType CYAN_STAINED_GLASS_PANE = BlockType(160, 9);
+
361 static constexpr BlockType PURPLE_STAINED_GLASS_PANE = BlockType(160, 10);
+
362 static constexpr BlockType BLUE_STAINED_GLASS_PANE = BlockType(160, 11);
+
363 static constexpr BlockType BROWN_STAINED_GLASS_PANE = BlockType(160, 12);
+
364 static constexpr BlockType GREEN_STAINED_GLASS_PANE = BlockType(160, 13);
+
365 static constexpr BlockType RED_STAINED_GLASS_PANE = BlockType(160, 14);
+
366 static constexpr BlockType BLACK_STAINED_GLASS_PANE = BlockType(160, 15);
+
367 static constexpr BlockType ACACIA_LEAVES = BlockType(161);
+
368 static constexpr BlockType DARK_OAK_LEAVES = BlockType(161, 1);
+
369 static constexpr BlockType ACACIA_WOOD = BlockType(162);
+
370 static constexpr BlockType DARK_OAK_WOOD = BlockType(162, 1);
+
371 static constexpr BlockType ACACIA_WOOD_STAIRS = BlockType(163);
+
372 static constexpr BlockType DARK_OAK_WOOD_STAIRS = BlockType(164);
+
373 static constexpr BlockType SLIME_BLOCK = BlockType(165);
+
374 static constexpr BlockType BARRIER = BlockType(166);
+
375 static constexpr BlockType IRON_TRAPDOOR = BlockType(167);
+
376 static constexpr BlockType PRISMARINE = BlockType(168);
+
377 static constexpr BlockType PRISMARINE_BRICKS = BlockType(168, 1);
+
378 static constexpr BlockType DARK_PRISMARINE = BlockType(168, 2);
+
379 static constexpr BlockType SEA_LANTERN = BlockType(169);
+
380 static constexpr BlockType HAY_BALE = BlockType(170);
+
381 static constexpr BlockType WHITE_CARPET = BlockType(171);
+
382 static constexpr BlockType ORANGE_CARPET = BlockType(171, 1);
+
383 static constexpr BlockType MAGENTA_CARPET = BlockType(171, 2);
+
384 static constexpr BlockType LIGHT_BLUE_CARPET = BlockType(171, 3);
+
385 static constexpr BlockType YELLOW_CARPET = BlockType(171, 4);
+
386 static constexpr BlockType LIME_CARPET = BlockType(171, 5);
+
387 static constexpr BlockType PINK_CARPET = BlockType(171, 6);
+
388 static constexpr BlockType GRAY_CARPET = BlockType(171, 7);
+
389 static constexpr BlockType LIGHT_GRAY_CARPET = BlockType(171, 8);
+
390 static constexpr BlockType CYAN_CARPET = BlockType(171, 9);
+
391 static constexpr BlockType PURPLE_CARPET = BlockType(171, 10);
+
392 static constexpr BlockType BLUE_CARPET = BlockType(171, 11);
+
393 static constexpr BlockType BROWN_CARPET = BlockType(171, 12);
+
394 static constexpr BlockType GREEN_CARPET = BlockType(171, 13);
+
395 static constexpr BlockType RED_CARPET = BlockType(171, 14);
+
396 static constexpr BlockType BLACK_CARPET = BlockType(171, 15);
+
397 static constexpr BlockType HARDENED_CLAY = BlockType(172);
+
398 static constexpr BlockType BLOCK_OF_COAL = BlockType(173);
+
399 static constexpr BlockType PACKED_ICE = BlockType(174);
+
400 static constexpr BlockType SUNFLOWER = BlockType(175);
+
401 static constexpr BlockType LILAC = BlockType(175, 1);
+
402 static constexpr BlockType DOUBLE_TALLGRASS = BlockType(175, 2);
+
403 static constexpr BlockType LARGE_FERN = BlockType(175, 3);
+
404 static constexpr BlockType ROSE_BUSH = BlockType(175, 4);
+
405 static constexpr BlockType PEONY = BlockType(175, 5);
+
406 static constexpr BlockType FREESTANDING_BANNER = BlockType(176);
+
407 static constexpr BlockType WALLMOUNTED_BANNER = BlockType(177);
+ +
409 static constexpr BlockType RED_SANDSTONE = BlockType(179);
+
410 static constexpr BlockType CHISELED_RED_SANDSTONE = BlockType(179, 1);
+
411 static constexpr BlockType SMOOTH_RED_SANDSTONE = BlockType(179, 2);
+
412 static constexpr BlockType RED_SANDSTONE_STAIRS = BlockType(180);
+ +
414 static constexpr BlockType RED_SANDSTONE_SLAB = BlockType(182);
+
415 static constexpr BlockType SPRUCE_FENCE_GATE = BlockType(183);
+
416 static constexpr BlockType BIRCH_FENCE_GATE = BlockType(184);
+
417 static constexpr BlockType JUNGLE_FENCE_GATE = BlockType(185);
+
418 static constexpr BlockType DARK_OAK_FENCE_GATE = BlockType(186);
+
419 static constexpr BlockType ACACIA_FENCE_GATE = BlockType(187);
+
420 static constexpr BlockType SPRUCE_FENCE = BlockType(188);
+
421 static constexpr BlockType BIRCH_FENCE = BlockType(189);
+
422 static constexpr BlockType JUNGLE_FENCE = BlockType(190);
+
423 static constexpr BlockType DARK_OAK_FENCE = BlockType(191);
+
424 static constexpr BlockType ACACIA_FENCE = BlockType(192);
+
425 static constexpr BlockType SPRUCE_DOOR_BLOCK = BlockType(193);
+
426 static constexpr BlockType BIRCH_DOOR_BLOCK = BlockType(194);
+
427 static constexpr BlockType JUNGLE_DOOR_BLOCK = BlockType(195);
+
428 static constexpr BlockType ACACIA_DOOR_BLOCK = BlockType(196);
+
429 static constexpr BlockType DARK_OAK_DOOR_BLOCK = BlockType(197);
+
430 static constexpr BlockType END_ROD = BlockType(198);
+
431 static constexpr BlockType CHORUS_PLANT = BlockType(199);
+
432 static constexpr BlockType CHORUS_FLOWER = BlockType(200);
+
433 static constexpr BlockType PURPUR_BLOCK = BlockType(201);
+
434 static constexpr BlockType PURPUR_PILLAR = BlockType(202);
+
435 static constexpr BlockType PURPUR_STAIRS = BlockType(203);
+
436 static constexpr BlockType PURPUR_DOUBLE_SLAB = BlockType(204);
+
437 static constexpr BlockType PURPUR_SLAB = BlockType(205);
+
438 static constexpr BlockType END_STONE_BRICKS = BlockType(206);
+
439 static constexpr BlockType BEETROOT_BLOCK = BlockType(207);
+
440 static constexpr BlockType GRASS_PATH = BlockType(208);
+
441 static constexpr BlockType END_GATEWAY = BlockType(209);
+ +
443 static constexpr BlockType CHAIN_COMMAND_BLOCK = BlockType(211);
+
444 static constexpr BlockType FROSTED_ICE = BlockType(212);
+
445 static constexpr BlockType MAGMA_BLOCK = BlockType(213);
+
446 static constexpr BlockType NETHER_WART_BLOCK = BlockType(214);
+
447 static constexpr BlockType RED_NETHER_BRICK = BlockType(215);
+
448 static constexpr BlockType BONE_BLOCK = BlockType(216);
+
449 static constexpr BlockType STRUCTURE_VOID = BlockType(217);
+
450 static constexpr BlockType OBSERVER = BlockType(218);
+
451 static constexpr BlockType WHITE_SHULKER_BOX = BlockType(219);
+
452 static constexpr BlockType ORANGE_SHULKER_BOX = BlockType(220);
+
453 static constexpr BlockType MAGENTA_SHULKER_BOX = BlockType(221);
+ +
455 static constexpr BlockType YELLOW_SHULKER_BOX = BlockType(223);
+
456 static constexpr BlockType LIME_SHULKER_BOX = BlockType(224);
+
457 static constexpr BlockType PINK_SHULKER_BOX = BlockType(225);
+
458 static constexpr BlockType GRAY_SHULKER_BOX = BlockType(226);
+ +
460 static constexpr BlockType CYAN_SHULKER_BOX = BlockType(228);
+
461 static constexpr BlockType PURPLE_SHULKER_BOX = BlockType(229);
+
462 static constexpr BlockType BLUE_SHULKER_BOX = BlockType(230);
+
463 static constexpr BlockType BROWN_SHULKER_BOX = BlockType(231);
+
464 static constexpr BlockType GREEN_SHULKER_BOX = BlockType(232);
+
465 static constexpr BlockType RED_SHULKER_BOX = BlockType(233);
+
466 static constexpr BlockType BLACK_SHULKER_BOX = BlockType(234);
+ + + + + + + + + + + + + + + + +
483 static constexpr BlockType WHITE_CONCRETE = BlockType(251);
+
484 static constexpr BlockType ORANGE_CONCRETE = BlockType(251, 1);
+
485 static constexpr BlockType MAGENTA_CONCRETE = BlockType(251, 2);
+
486 static constexpr BlockType LIGHT_BLUE_CONCRETE = BlockType(251, 3);
+
487 static constexpr BlockType YELLOW_CONCRETE = BlockType(251, 4);
+
488 static constexpr BlockType LIME_CONCRETE = BlockType(251, 5);
+
489 static constexpr BlockType PINK_CONCRETE = BlockType(251, 6);
+
490 static constexpr BlockType GRAY_CONCRETE = BlockType(251, 7);
+
491 static constexpr BlockType LIGHT_GRAY_CONCRETE = BlockType(251, 8);
+
492 static constexpr BlockType CYAN_CONCRETE = BlockType(251, 9);
+
493 static constexpr BlockType PURPLE_CONCRETE = BlockType(251, 10);
+
494 static constexpr BlockType BLUE_CONCRETE = BlockType(251, 11);
+
495 static constexpr BlockType BROWN_CONCRETE = BlockType(251, 12);
+
496 static constexpr BlockType GREEN_CONCRETE = BlockType(251, 13);
+
497 static constexpr BlockType RED_CONCRETE = BlockType(251, 14);
+
498 static constexpr BlockType BLACK_CONCRETE = BlockType(251, 15);
+ +
500 static constexpr BlockType ORANGE_CONCRETE_POWDER = BlockType(252, 1);
+
501 static constexpr BlockType MAGENTA_CONCRETE_POWDER = BlockType(252, 2);
+ +
503 static constexpr BlockType YELLOW_CONCRETE_POWDER = BlockType(252, 4);
+
504 static constexpr BlockType LIME_CONCRETE_POWDER = BlockType(252, 5);
+
505 static constexpr BlockType PINK_CONCRETE_POWDER = BlockType(252, 6);
+
506 static constexpr BlockType GRAY_CONCRETE_POWDER = BlockType(252, 7);
+ +
508 static constexpr BlockType CYAN_CONCRETE_POWDER = BlockType(252, 9);
+
509 static constexpr BlockType PURPLE_CONCRETE_POWDER = BlockType(252, 10);
+
510 static constexpr BlockType BLUE_CONCRETE_POWDER = BlockType(252, 11);
+
511 static constexpr BlockType BROWN_CONCRETE_POWDER = BlockType(252, 12);
+
512 static constexpr BlockType GREEN_CONCRETE_POWDER = BlockType(252, 13);
+
513 static constexpr BlockType RED_CONCRETE_POWDER = BlockType(252, 14);
+
514 static constexpr BlockType BLACK_CONCRETE_POWDER = BlockType(252, 15);
+
515 static constexpr BlockType STRUCTURE_BLOCK = BlockType(255);
+
516 // NOLINTEND
+
517};
+
+
518} // namespace mcpp
+
+
Definition block.h:11
+
bool operator!=(const BlockType &other) const
Inequality comparison operator.
+
uint8_t mod
Definition block.h:14
+
bool operator==(const BlockType &other) const
Equality comparison operator.
+
friend std::ostream & operator<<(std::ostream &out, const BlockType &block)
Stream insertion operator for outputting the BlockType to an output stream.
+
BlockType with_mod(uint8_t modifier) const
+
constexpr BlockType(uint8_t id=0, uint8_t mod=0)
Definition block.h:17
+
uint8_t id
Definition block.h:13
+
Namespace containing all the the mcpp library classes.
Definition block.h:10
+
Definition block.h:72
+
static constexpr BlockType PINK_CONCRETE
Definition block.h:489
+
static constexpr BlockType MOSSY_STONE_BRICKS
Definition block.h:259
+
static constexpr BlockType RED_MUSHROOM_BLOCK
Definition block.h:263
+
static constexpr BlockType YELLOW_STAINED_GLASS_PANE
Definition block.h:355
+
static constexpr BlockType POWERED_RAIL
Definition block.h:129
+
static constexpr BlockType LIME_SHULKER_BOX
Definition block.h:456
+
static constexpr BlockType PINK_CONCRETE_POWDER
Definition block.h:505
+
static constexpr BlockType SANDSTONE
Definition block.h:124
+
static constexpr BlockType STRUCTURE_VOID
Definition block.h:449
+
static constexpr BlockType DOUBLE_COBBLESTONE_SLAB
Definition block.h:172
+
static constexpr BlockType MAGENTA_CARPET
Definition block.h:383
+
static constexpr BlockType RED_TULIP
Definition block.h:160
+
static constexpr BlockType MAGENTA_STAINED_GLASS_PANE
Definition block.h:353
+
static constexpr BlockType SPRUCE_FENCE_GATE
Definition block.h:415
+
static constexpr BlockType BREWING_STAND
Definition block.h:280
+
static constexpr BlockType RED_SAND
Definition block.h:105
+
static constexpr BlockType POLISHED_GRANITE
Definition block.h:77
+
static constexpr BlockType STONE_BRICKS
Definition block.h:258
+
static constexpr BlockType BLUE_STAINED_GLASS_PANE
Definition block.h:362
+
static constexpr BlockType GREEN_GLAZED_TERRACOTTA
Definition block.h:480
+
static constexpr BlockType ICE
Definition block.h:219
+
static constexpr BlockType ROSE_BUSH
Definition block.h:404
+
static constexpr BlockType MONSTER_SPAWNER
Definition block.h:192
+
static constexpr BlockType SPRUCE_DOOR_BLOCK
Definition block.h:425
+
static constexpr BlockType CHISELED_QUARTZ_BLOCK
Definition block.h:330
+
static constexpr BlockType CHISELED_RED_SANDSTONE
Definition block.h:410
+
static constexpr BlockType BIRCH_WOOD_STAIRS
Definition block.h:308
+
static constexpr BlockType YELLOW_CONCRETE
Definition block.h:487
+
static constexpr BlockType LAPIS_LAZULI_ORE
Definition block.h:121
+
static constexpr BlockType RED_SHULKER_BOX
Definition block.h:465
+
static constexpr BlockType DOUBLE_SANDSTONE_SLAB
Definition block.h:170
+
static constexpr BlockType GRAY_STAINED_GLASS_PANE
Definition block.h:358
+
static constexpr BlockType SEA_LANTERN
Definition block.h:379
+
static constexpr BlockType RED_CARPET
Definition block.h:395
+
static constexpr BlockType WHITE_GLAZED_TERRACOTTA
Definition block.h:467
+
static constexpr BlockType LIME_WOOL
Definition block.h:144
+
static constexpr BlockType CYAN_STAINED_GLASS
Definition block.h:244
+
static constexpr BlockType CYAN_CARPET
Definition block.h:390
+
static constexpr BlockType PURPUR_BLOCK
Definition block.h:433
+
static constexpr BlockType WOODEN_SLAB
Definition block.h:179
+
static constexpr BlockType LIGHT_GRAY_STAINED_GLASS_PANE
Definition block.h:359
+
static constexpr BlockType SPRUCE_WOOD_PLANK
Definition block.h:88
+
static constexpr BlockType JUNGLE_SAPLING
Definition block.h:96
+
static constexpr BlockType LILAC
Definition block.h:401
+
static constexpr BlockType DIORITE
Definition block.h:78
+
static constexpr BlockType BLUE_WOOL
Definition block.h:150
+
static constexpr BlockType RED_GLAZED_TERRACOTTA
Definition block.h:481
+
static constexpr BlockType CAULDRON
Definition block.h:281
+
static constexpr BlockType INVERTED_DAYLIGHT_SENSOR
Definition block.h:408
+
static constexpr BlockType LIME_CARPET
Definition block.h:386
+
static constexpr BlockType WHITE_STAINED_GLASS_PANE
Definition block.h:351
+
static constexpr BlockType OAK_LEAVES
Definition block.h:114
+
static constexpr BlockType BEACON
Definition block.h:311
+
static constexpr BlockType GLOWSTONE
Definition block.h:229
+
static constexpr BlockType DIAMOND_ORE
Definition block.h:196
+
static constexpr BlockType EMERALD_BLOCK
Definition block.h:306
+
static constexpr BlockType TRIPWIRE
Definition block.h:305
+
static constexpr BlockType LIGHT_BLUE_HARDENED_CLAY
Definition block.h:338
+
static constexpr BlockType WHITE_SHULKER_BOX
Definition block.h:451
+
static constexpr BlockType RED_MUSHROOM
Definition block.h:166
+
static constexpr BlockType BLACK_CARPET
Definition block.h:396
+
static constexpr BlockType ANVIL
Definition block.h:319
+
static constexpr BlockType WHITE_HARDENED_CLAY
Definition block.h:335
+
static constexpr BlockType LIME_STAINED_GLASS
Definition block.h:240
+
static constexpr BlockType RED_SANDSTONE_SLAB
Definition block.h:414
+
static constexpr BlockType STILL_WATER
Definition block.h:101
+
static constexpr BlockType YELLOW_SHULKER_BOX
Definition block.h:455
+
static constexpr BlockType WHITE_TULIP
Definition block.h:162
+
static constexpr BlockType BARRIER
Definition block.h:374
+
static constexpr BlockType COBBLESTONE_MONSTER_EGG
Definition block.h:253
+
static constexpr BlockType BROWN_GLAZED_TERRACOTTA
Definition block.h:479
+
static constexpr BlockType NETHER_BRICK_STAIRS
Definition block.h:277
+
static constexpr BlockType SAND
Definition block.h:104
+
static constexpr BlockType POLISHED_DIORITE
Definition block.h:79
+
static constexpr BlockType BROWN_STAINED_GLASS
Definition block.h:247
+
static constexpr BlockType SPRUCE_WOOD_SLAB
Definition block.h:295
+
static constexpr BlockType SPRUCE_WOOD
Definition block.h:111
+
static constexpr BlockType STONE_SLAB
Definition block.h:177
+
static constexpr BlockType DISPENSER
Definition block.h:123
+
static constexpr BlockType ORANGE_STAINED_GLASS_PANE
Definition block.h:352
+
static constexpr BlockType CHISELED_STONE_BRICKS
Definition block.h:261
+
static constexpr BlockType REDSTONE_WIRE
Definition block.h:195
+
static constexpr BlockType PINK_WOOL
Definition block.h:145
+
static constexpr BlockType BROWN_SHULKER_BOX
Definition block.h:463
+
static constexpr BlockType CHISELED_STONE_BRICK_MONSTER_EGG
Definition block.h:257
+
static constexpr BlockType BIRCH_LEAVES
Definition block.h:116
+
static constexpr BlockType CARROTS
Definition block.h:315
+
static constexpr BlockType JUNGLE_WOOD_SLAB
Definition block.h:297
+
static constexpr BlockType PILLAR_QUARTZ_BLOCK
Definition block.h:331
+
static constexpr BlockType REDSTONE_TORCH_OFF
Definition block.h:215
+
static constexpr BlockType COBBLESTONE_SLAB
Definition block.h:180
+
static constexpr BlockType PUMPKIN_STEM
Definition block.h:267
+
static constexpr BlockType DOUBLE_STONE_BRICK_SLAB
Definition block.h:174
+
static constexpr BlockType ORANGE_CONCRETE_POWDER
Definition block.h:500
+
static constexpr BlockType BLACK_HARDENED_CLAY
Definition block.h:350
+
static constexpr BlockType DAYLIGHT_SENSOR
Definition block.h:325
+
static constexpr BlockType STONE
Definition block.h:75
+
static constexpr BlockType PURPUR_SLAB
Definition block.h:437
+
static constexpr BlockType PURPLE_STAINED_GLASS_PANE
Definition block.h:361
+
static constexpr BlockType LIGHT_GRAY_SHULKER_BOX
Definition block.h:459
+
static constexpr BlockType SPRUCE_LEAVES
Definition block.h:115
+
static constexpr BlockType SUNFLOWER
Definition block.h:400
+
static constexpr BlockType BROWN_MUSHROOM_BLOCK
Definition block.h:262
+
static constexpr BlockType ORANGE_GLAZED_TERRACOTTA
Definition block.h:468
+
static constexpr BlockType MELON_STEM
Definition block.h:268
+
static constexpr BlockType REDSTONE_BLOCK
Definition block.h:326
+
static constexpr BlockType TNT
Definition block.h:186
+
static constexpr BlockType WOODEN_BUTTON
Definition block.h:317
+
static constexpr BlockType DIAMOND_BLOCK
Definition block.h:197
+
static constexpr BlockType DARK_PRISMARINE
Definition block.h:378
+
static constexpr BlockType STONE_BRICK_SLAB
Definition block.h:182
+
static constexpr BlockType WHITE_STAINED_GLASS
Definition block.h:235
+
static constexpr BlockType BURNING_FURNACE
Definition block.h:202
+
static constexpr BlockType LIGHT_GRAY_CONCRETE_POWDER
Definition block.h:507
+
static constexpr BlockType STONE_BRICK_STAIRS
Definition block.h:272
+
static constexpr BlockType CYAN_CONCRETE
Definition block.h:492
+
static constexpr BlockType PISTON
Definition block.h:137
+
static constexpr BlockType WALLMOUNTED_SIGN_BLOCK
Definition block.h:208
+
static constexpr BlockType CLAY
Definition block.h:222
+
static constexpr BlockType BLUE_ORCHID
Definition block.h:157
+
static constexpr BlockType OAK_FENCE_GATE
Definition block.h:270
+
static constexpr BlockType SPONGE
Definition block.h:118
+
static constexpr BlockType LIGHT_GRAY_CONCRETE
Definition block.h:491
+
static constexpr BlockType DARK_OAK_DOOR_BLOCK
Definition block.h:429
+
static constexpr BlockType OAK_WOOD_STAIRS
Definition block.h:193
+
static constexpr BlockType BLUE_CONCRETE_POWDER
Definition block.h:510
+
static constexpr BlockType PURPLE_STAINED_GLASS
Definition block.h:245
+
static constexpr BlockType BROWN_HARDENED_CLAY
Definition block.h:347
+
static constexpr BlockType PURPUR_DOUBLE_SLAB
Definition block.h:436
+
static constexpr BlockType SPRUCE_FENCE
Definition block.h:420
+
static constexpr BlockType RED_STAINED_GLASS
Definition block.h:249
+
static constexpr BlockType DANDELION
Definition block.h:155
+
static constexpr BlockType HARDENED_CLAY
Definition block.h:397
+
static constexpr BlockType GREEN_WOOL
Definition block.h:152
+
static constexpr BlockType GREEN_STAINED_GLASS
Definition block.h:248
+
static constexpr BlockType PURPLE_SHULKER_BOX
Definition block.h:461
+
static constexpr BlockType BLOCK_OF_COAL
Definition block.h:398
+
static constexpr BlockType BLUE_SHULKER_BOX
Definition block.h:462
+
static constexpr BlockType WHEAT_CROPS
Definition block.h:199
+
static constexpr BlockType LIGHT_BLUE_STAINED_GLASS
Definition block.h:238
+
static constexpr BlockType MOSSY_COBBLESTONE_WALL
Definition block.h:313
+
static constexpr BlockType SANDSTONE_STAIRS
Definition block.h:301
+
static constexpr BlockType QUARTZ_SLAB
Definition block.h:184
+
static constexpr BlockType ORANGE_WOOL
Definition block.h:140
+
static constexpr BlockType NETHER_BRICK_SLAB
Definition block.h:183
+
static constexpr BlockType VINES
Definition block.h:269
+
static constexpr BlockType DOUBLE_TALLGRASS
Definition block.h:402
+
static constexpr BlockType BRICK_SLAB
Definition block.h:181
+
static constexpr BlockType RED_SANDSTONE_STAIRS
Definition block.h:412
+
static constexpr BlockType MAGENTA_WOOL
Definition block.h:141
+
static constexpr BlockType REPEATING_COMMAND_BLOCK
Definition block.h:442
+
static constexpr BlockType MELON_BLOCK
Definition block.h:266
+
static constexpr BlockType LIGHT_BLUE_STAINED_GLASS_PANE
Definition block.h:354
+
static constexpr BlockType COMMAND_BLOCK
Definition block.h:310
+
static constexpr BlockType DOUBLE_QUARTZ_SLAB
Definition block.h:176
+
static constexpr BlockType BLACK_STAINED_GLASS_PANE
Definition block.h:366
+
static constexpr BlockType BLACK_SHULKER_BOX
Definition block.h:466
+
static constexpr BlockType REDSTONE_COMPARATOR_INACTIVE
Definition block.h:323
+
static constexpr BlockType BLACK_CONCRETE
Definition block.h:498
+
static constexpr BlockType HOPPER
Definition block.h:328
+
static constexpr BlockType BLACK_STAINED_GLASS
Definition block.h:250
+
static constexpr BlockType STANDING_SIGN_BLOCK
Definition block.h:203
+
static constexpr BlockType MAGENTA_STAINED_GLASS
Definition block.h:237
+
static constexpr BlockType TALL_GRASS
Definition block.h:134
+
static constexpr BlockType CYAN_GLAZED_TERRACOTTA
Definition block.h:476
+
static constexpr BlockType GRASS
Definition block.h:82
+
static constexpr BlockType GLOWING_REDSTONE_ORE
Definition block.h:214
+
static constexpr BlockType JUNGLE_FENCE_GATE
Definition block.h:417
+
static constexpr BlockType STRUCTURE_BLOCK
Definition block.h:515
+
static constexpr BlockType SPRUCE_WOOD_STAIRS
Definition block.h:307
+
static constexpr BlockType PISTON_HEAD
Definition block.h:138
+
static constexpr BlockType NETHER_WART_BLOCK
Definition block.h:446
+
static constexpr BlockType OBSERVER
Definition block.h:450
+
static constexpr BlockType DOUBLE_RED_SANDSTONE_SLAB
Definition block.h:413
+
static constexpr BlockType REDSTONE_LAMP_ACTIVE
Definition block.h:287
+
static constexpr BlockType BIRCH_WOOD
Definition block.h:112
+
static constexpr BlockType CRACKED_STONE_BRICK_MONSTER_EGG
Definition block.h:256
+
static constexpr BlockType SANDSTONE_SLAB
Definition block.h:178
+
static constexpr BlockType OAK_DOOR_BLOCK
Definition block.h:204
+
static constexpr BlockType JACK_OLANTERN
Definition block.h:231
+
static constexpr BlockType MAGENTA_GLAZED_TERRACOTTA
Definition block.h:469
+
static constexpr BlockType WALLMOUNTED_BANNER
Definition block.h:407
+
static constexpr BlockType TRAPPED_CHEST
Definition block.h:320
+
static constexpr BlockType DOUBLE_JUNGLE_WOOD_SLAB
Definition block.h:291
+
static constexpr BlockType DARK_OAK_WOOD
Definition block.h:370
+
static constexpr BlockType LIGHT_GRAY_HARDENED_CLAY
Definition block.h:343
+
static constexpr BlockType MAGMA_BLOCK
Definition block.h:445
+
static constexpr BlockType CHEST
Definition block.h:194
+
static constexpr BlockType END_STONE
Definition block.h:284
+
static constexpr BlockType GRAY_SHULKER_BOX
Definition block.h:458
+
static constexpr BlockType POLISHED_ANDESITE
Definition block.h:81
+
static constexpr BlockType FURNACE
Definition block.h:201
+
static constexpr BlockType LIME_HARDENED_CLAY
Definition block.h:340
+
static constexpr BlockType SMOOTH_RED_SANDSTONE
Definition block.h:411
+
static constexpr BlockType JUNGLE_FENCE
Definition block.h:422
+
static constexpr BlockType LIME_CONCRETE_POWDER
Definition block.h:504
+
static constexpr BlockType FIRE
Definition block.h:191
+
static constexpr BlockType END_ROD
Definition block.h:430
+
static constexpr BlockType PACKED_ICE
Definition block.h:399
+
static constexpr BlockType GRAY_CONCRETE_POWDER
Definition block.h:506
+
static constexpr BlockType ACACIA_WOOD_SLAB
Definition block.h:298
+
static constexpr BlockType CRAFTING_TABLE
Definition block.h:198
+
static constexpr BlockType DOUBLE_OAK_WOOD_SLAB
Definition block.h:288
+
static constexpr BlockType TRIPWIRE_HOOK
Definition block.h:304
+
static constexpr BlockType GRAY_HARDENED_CLAY
Definition block.h:342
+
static constexpr BlockType ACACIA_DOOR_BLOCK
Definition block.h:428
+
static constexpr BlockType QUARTZ_STAIRS
Definition block.h:332
+
static constexpr BlockType BROWN_WOOL
Definition block.h:151
+
static constexpr BlockType JUNGLE_WOOD_STAIRS
Definition block.h:309
+
static constexpr BlockType OAK_WOOD_PLANK
Definition block.h:87
+
static constexpr BlockType DIRT
Definition block.h:83
+
static constexpr BlockType GRAY_STAINED_GLASS
Definition block.h:242
+
static constexpr BlockType NETHER_QUARTZ_ORE
Definition block.h:327
+
static constexpr BlockType LIGHT_GRAY_CARPET
Definition block.h:389
+
static constexpr BlockType PURPUR_PILLAR
Definition block.h:434
+
static constexpr BlockType RED_STAINED_GLASS_PANE
Definition block.h:365
+
static constexpr BlockType LARGE_FERN
Definition block.h:403
+
static constexpr BlockType PURPLE_HARDENED_CLAY
Definition block.h:345
+
static constexpr BlockType DOUBLE_WOODEN_SLAB
Definition block.h:171
+
static constexpr BlockType GREEN_CARPET
Definition block.h:394
+
static constexpr BlockType LIME_GLAZED_TERRACOTTA
Definition block.h:472
+
static constexpr BlockType STONE_MONSTER_EGG
Definition block.h:252
+
static constexpr BlockType SLIME_BLOCK
Definition block.h:373
+
static constexpr BlockType NETHER_PORTAL
Definition block.h:230
+
static constexpr BlockType ACACIA_FENCE_GATE
Definition block.h:419
+
static constexpr BlockType PURPLE_WOOL
Definition block.h:149
+
static constexpr BlockType TORCH
Definition block.h:190
+
static constexpr BlockType ORANGE_CARPET
Definition block.h:382
+
static constexpr BlockType SNOW
Definition block.h:218
+
static constexpr BlockType PINK_CARPET
Definition block.h:387
+
static constexpr BlockType PURPLE_GLAZED_TERRACOTTA
Definition block.h:477
+
static constexpr BlockType ACACIA_WOOD_STAIRS
Definition block.h:371
+
static constexpr BlockType IRON_DOOR_BLOCK
Definition block.h:211
+
static constexpr BlockType BROWN_CARPET
Definition block.h:393
+
static constexpr BlockType CYAN_STAINED_GLASS_PANE
Definition block.h:360
+
static constexpr BlockType MOSS_STONE
Definition block.h:188
+
static constexpr BlockType SMOOTH_SANDSTONE
Definition block.h:126
+
static constexpr BlockType BED
Definition block.h:128
+
static constexpr BlockType OAK_WOOD
Definition block.h:110
+
static constexpr BlockType RED_SANDSTONE
Definition block.h:409
+
static constexpr BlockType LIGHT_BLUE_WOOL
Definition block.h:142
+
static constexpr BlockType GRAVEL
Definition block.h:106
+
static constexpr BlockType BIRCH_WOOD_PLANK
Definition block.h:89
+
static constexpr BlockType WHITE_WOOL
Definition block.h:139
+
static constexpr BlockType DARK_OAK_WOOD_SLAB
Definition block.h:299
+
static constexpr BlockType BROWN_CONCRETE_POWDER
Definition block.h:511
+
static constexpr BlockType STILL_LAVA
Definition block.h:103
+
static constexpr BlockType DETECTOR_RAIL
Definition block.h:130
+
static constexpr BlockType OAK_FENCE
Definition block.h:225
+
static constexpr BlockType LIME_STAINED_GLASS_PANE
Definition block.h:356
+
static constexpr BlockType GLASS
Definition block.h:120
+
static constexpr BlockType BIRCH_WOOD_SLAB
Definition block.h:296
+
static constexpr BlockType IRON_ORE
Definition block.h:108
+
static constexpr BlockType RAIL
Definition block.h:206
+
static constexpr BlockType JUNGLE_WOOD
Definition block.h:113
+
static constexpr BlockType WHITE_CONCRETE
Definition block.h:483
+
static constexpr BlockType WOODEN_TRAPDOOR
Definition block.h:251
+
static constexpr BlockType REDSTONE_LAMP_INACTIVE
Definition block.h:286
+
static constexpr BlockType GREEN_SHULKER_BOX
Definition block.h:464
+
static constexpr BlockType ACACIA_WOOD_PLANK
Definition block.h:91
+
static constexpr BlockType PURPLE_CARPET
Definition block.h:391
+
static constexpr BlockType MAGENTA_CONCRETE_POWDER
Definition block.h:501
+
static constexpr BlockType YELLOW_STAINED_GLASS
Definition block.h:239
+
static constexpr BlockType DARK_OAK_SAPLING
Definition block.h:98
+
static constexpr BlockType STONE_BRICK_MONSTER_EGG
Definition block.h:254
+
static constexpr BlockType LIGHT_GRAY_GLAZED_TERRACOTTA
Definition block.h:475
+
static constexpr BlockType GRASS_PATH
Definition block.h:440
+
static constexpr BlockType BLUE_CARPET
Definition block.h:392
+
static constexpr BlockType GOLD_ORE
Definition block.h:107
+
static constexpr BlockType CHAIN_COMMAND_BLOCK
Definition block.h:443
+
static constexpr BlockType BLUE_GLAZED_TERRACOTTA
Definition block.h:478
+
static constexpr BlockType GOLD_BLOCK
Definition block.h:167
+
static constexpr BlockType WHITE_CARPET
Definition block.h:381
+
static constexpr BlockType BLACK_GLAZED_TERRACOTTA
Definition block.h:482
+
static constexpr BlockType COBBLESTONE
Definition block.h:86
+
static constexpr BlockType BIRCH_DOOR_BLOCK
Definition block.h:426
+
static constexpr BlockType CHORUS_PLANT
Definition block.h:431
+
static constexpr BlockType COBBLESTONE_STAIRS
Definition block.h:207
+
static constexpr BlockType DOUBLE_SPRUCE_WOOD_SLAB
Definition block.h:289
+
static constexpr BlockType CYAN_SHULKER_BOX
Definition block.h:460
+
static constexpr BlockType IRON_BARS
Definition block.h:264
+
static constexpr BlockType LAPIS_LAZULI_BLOCK
Definition block.h:122
+
static constexpr BlockType CYAN_CONCRETE_POWDER
Definition block.h:508
+
static constexpr BlockType STICKY_PISTON
Definition block.h:131
+
static constexpr BlockType COBBLESTONE_WALL
Definition block.h:312
+
static constexpr BlockType GREEN_HARDENED_CLAY
Definition block.h:348
+
static constexpr BlockType FROSTED_ICE
Definition block.h:444
+
static constexpr BlockType ACACIA_LEAVES
Definition block.h:367
+
static constexpr BlockType LIGHT_BLUE_CARPET
Definition block.h:384
+
static constexpr BlockType DARK_OAK_WOOD_STAIRS
Definition block.h:372
+
static constexpr BlockType PEONY
Definition block.h:405
+
static constexpr BlockType DEAD_BUSH
Definition block.h:136
+
static constexpr BlockType ACACIA_FENCE
Definition block.h:424
+
static constexpr BlockType ORANGE_SHULKER_BOX
Definition block.h:452
+
static constexpr BlockType REDSTONE_COMPARATOR_ACTIVE
Definition block.h:324
+
static constexpr BlockType FLOWING_WATER
Definition block.h:100
+
static constexpr BlockType ENDER_CHEST
Definition block.h:303
+
static constexpr BlockType BIRCH_FENCE_GATE
Definition block.h:416
+
static constexpr BlockType DOUBLE_BRICK_SLAB
Definition block.h:173
+
static constexpr BlockType LIGHT_GRAY_WOOL
Definition block.h:147
+
static constexpr BlockType MOSSY_STONE_BRICK_MONSTER_EGG
Definition block.h:255
+
static constexpr BlockType COARSE_DIRT
Definition block.h:84
+
static constexpr BlockType DARK_OAK_FENCE
Definition block.h:423
+
static constexpr BlockType WEIGHTED_PRESSURE_PLATE_LIGHT
Definition block.h:321
+
static constexpr BlockType YELLOW_GLAZED_TERRACOTTA
Definition block.h:471
+
static constexpr BlockType DOUBLE_NETHER_BRICK_SLAB
Definition block.h:175
+
static constexpr BlockType COBWEB
Definition block.h:132
+
static constexpr BlockType NETHER_BRICK_FENCE
Definition block.h:276
+
static constexpr BlockType CHORUS_FLOWER
Definition block.h:432
+
static constexpr BlockType AZURE_BLUET
Definition block.h:159
+
static constexpr BlockType DROPPER
Definition block.h:334
+
static constexpr BlockType LADDER
Definition block.h:205
+
static constexpr BlockType BOOKSHELF
Definition block.h:187
+
static constexpr BlockType STONE_PRESSURE_PLATE
Definition block.h:210
+
static constexpr BlockType DARK_OAK_LEAVES
Definition block.h:368
+
static constexpr BlockType LIGHT_BLUE_SHULKER_BOX
Definition block.h:454
+
static constexpr BlockType LIME_CONCRETE
Definition block.h:488
+
static constexpr BlockType BRICK_STAIRS
Definition block.h:271
+
static constexpr BlockType PODZOL
Definition block.h:85
+
static constexpr BlockType SUGAR_CANES
Definition block.h:223
+
static constexpr BlockType AIR
Definition block.h:74
+
static constexpr BlockType PINK_GLAZED_TERRACOTTA
Definition block.h:473
+
static constexpr BlockType COCOA
Definition block.h:300
+
static constexpr BlockType FARMLAND
Definition block.h:200
+
static constexpr BlockType WET_SPONGE
Definition block.h:119
+
static constexpr BlockType BIRCH_FENCE
Definition block.h:421
+
static constexpr BlockType JUNGLE_DOOR_BLOCK
Definition block.h:427
+
static constexpr BlockType DOUBLE_BIRCH_WOOD_SLAB
Definition block.h:290
+
static constexpr BlockType YELLOW_HARDENED_CLAY
Definition block.h:339
+
static constexpr BlockType OXEYE_DAISY
Definition block.h:164
+
static constexpr BlockType BLUE_HARDENED_CLAY
Definition block.h:346
+
static constexpr BlockType ANDESITE
Definition block.h:80
+
static constexpr BlockType PINK_HARDENED_CLAY
Definition block.h:341
+
static constexpr BlockType PRISMARINE_BRICKS
Definition block.h:377
+
static constexpr BlockType FREESTANDING_BANNER
Definition block.h:406
+
static constexpr BlockType SOUL_SAND
Definition block.h:228
+
static constexpr BlockType DOUBLE_ACACIA_WOOD_SLAB
Definition block.h:292
+
static constexpr BlockType PINK_SHULKER_BOX
Definition block.h:457
+
static constexpr BlockType HAY_BALE
Definition block.h:380
+
static constexpr BlockType ACACIA_WOOD
Definition block.h:369
+
static constexpr BlockType BROWN_STAINED_GLASS_PANE
Definition block.h:363
+
static constexpr BlockType GRAY_WOOL
Definition block.h:146
+
static constexpr BlockType PUMPKIN
Definition block.h:226
+
static constexpr BlockType LEVER
Definition block.h:209
+
static constexpr BlockType JUKEBOX
Definition block.h:224
+
static constexpr BlockType GREEN_STAINED_GLASS_PANE
Definition block.h:364
+
static constexpr BlockType BONE_BLOCK
Definition block.h:448
+
static constexpr BlockType SNOW_BLOCK
Definition block.h:220
+
static constexpr BlockType BLUE_STAINED_GLASS
Definition block.h:246
+
static constexpr BlockType SPRUCE_SAPLING
Definition block.h:94
+
static constexpr BlockType OAK_SAPLING
Definition block.h:93
+
static constexpr BlockType MAGENTA_CONCRETE
Definition block.h:485
+
static constexpr BlockType BRICKS
Definition block.h:185
+
static constexpr BlockType PINK_TULIP
Definition block.h:163
+
static constexpr BlockType PURPLE_CONCRETE
Definition block.h:493
+
static constexpr BlockType JUNGLE_LEAVES
Definition block.h:117
+
static constexpr BlockType END_GATEWAY
Definition block.h:441
+
static constexpr BlockType LIGHT_GRAY_STAINED_GLASS
Definition block.h:243
+
static constexpr BlockType PURPUR_STAIRS
Definition block.h:435
+
static constexpr BlockType JUNGLE_WOOD_PLANK
Definition block.h:90
+
static constexpr BlockType BROWN_MUSHROOM
Definition block.h:165
+
static constexpr BlockType ACTIVATOR_RAIL
Definition block.h:333
+
static constexpr BlockType MOB_HEAD
Definition block.h:318
+
static constexpr BlockType RED_CONCRETE
Definition block.h:497
+
static constexpr BlockType ALLIUM
Definition block.h:158
+
static constexpr BlockType PURPLE_CONCRETE_POWDER
Definition block.h:509
+
static constexpr BlockType END_STONE_BRICKS
Definition block.h:438
+
static constexpr BlockType DRAGON_EGG
Definition block.h:285
+
static constexpr BlockType BEETROOT_BLOCK
Definition block.h:439
+
static constexpr BlockType ACACIA_SAPLING
Definition block.h:97
+
static constexpr BlockType POPPY
Definition block.h:156
+
static constexpr BlockType REDSTONE_TORCH_ON
Definition block.h:216
+
static constexpr BlockType OAK_WOOD_SLAB
Definition block.h:294
+
static constexpr BlockType WHITE_CONCRETE_POWDER
Definition block.h:499
+
static constexpr BlockType STONE_BUTTON
Definition block.h:217
+
static constexpr BlockType CRACKED_STONE_BRICKS
Definition block.h:260
+
static constexpr BlockType CYAN_WOOL
Definition block.h:148
+
static constexpr BlockType NETHER_BRICK
Definition block.h:275
+
static constexpr BlockType COAL_ORE
Definition block.h:109
+
static constexpr BlockType PRISMARINE
Definition block.h:376
+
static constexpr BlockType RED_WOOL
Definition block.h:153
+
static constexpr BlockType RED_HARDENED_CLAY
Definition block.h:349
+
static constexpr BlockType BLACK_WOOL
Definition block.h:154
+
static constexpr BlockType BROWN_CONCRETE
Definition block.h:495
+
static constexpr BlockType GRAY_CONCRETE
Definition block.h:490
+
static constexpr BlockType YELLOW_WOOL
Definition block.h:143
+
static constexpr BlockType FLOWING_LAVA
Definition block.h:102
+
static constexpr BlockType GRANITE
Definition block.h:76
+
static constexpr BlockType MYCELIUM
Definition block.h:273
+
static constexpr BlockType IRON_TRAPDOOR
Definition block.h:375
+
static constexpr BlockType WOODEN_PRESSURE_PLATE
Definition block.h:212
+
static constexpr BlockType GREEN_CONCRETE
Definition block.h:496
+
static constexpr BlockType MAGENTA_SHULKER_BOX
Definition block.h:453
+
static constexpr BlockType CYAN_HARDENED_CLAY
Definition block.h:344
+
static constexpr BlockType BIRCH_SAPLING
Definition block.h:95
+
static constexpr BlockType GRAY_GLAZED_TERRACOTTA
Definition block.h:474
+
static constexpr BlockType IRON_BLOCK
Definition block.h:168
+
static constexpr BlockType CACTUS
Definition block.h:221
+
static constexpr BlockType WEIGHTED_PRESSURE_PLATE_HEAVY
Definition block.h:322
+
static constexpr BlockType CAKE_BLOCK
Definition block.h:232
+
static constexpr BlockType ORANGE_CONCRETE
Definition block.h:484
+
static constexpr BlockType ORANGE_STAINED_GLASS
Definition block.h:236
+
static constexpr BlockType NOTE_BLOCK
Definition block.h:127
+
static constexpr BlockType LIGHT_BLUE_GLAZED_TERRACOTTA
Definition block.h:470
+
static constexpr BlockType DOUBLE_STONE_SLAB
Definition block.h:169
+
static constexpr BlockType ORANGE_TULIP
Definition block.h:161
+
static constexpr BlockType REDSTONE_REPEATER_BLOCK_ON
Definition block.h:234
+
static constexpr BlockType ENCHANTMENT_TABLE
Definition block.h:279
+
static constexpr BlockType MAGENTA_HARDENED_CLAY
Definition block.h:337
+
static constexpr BlockType EMERALD_ORE
Definition block.h:302
+
static constexpr BlockType FLOWER_POT
Definition block.h:314
+
static constexpr BlockType ORANGE_HARDENED_CLAY
Definition block.h:336
+
static constexpr BlockType DARK_OAK_WOOD_PLANK
Definition block.h:92
+
static constexpr BlockType LIGHT_BLUE_CONCRETE_POWDER
Definition block.h:502
+
static constexpr BlockType YELLOW_CONCRETE_POWDER
Definition block.h:503
+
static constexpr BlockType PINK_STAINED_GLASS
Definition block.h:241
+
static constexpr BlockType END_PORTAL_FRAME
Definition block.h:283
+
static constexpr BlockType FERN
Definition block.h:135
+
static constexpr BlockType RED_CONCRETE_POWDER
Definition block.h:513
+
static constexpr BlockType DOUBLE_DARK_OAK_WOOD_SLAB
Definition block.h:293
+
static constexpr BlockType OBSIDIAN
Definition block.h:189
+
static constexpr BlockType GREEN_CONCRETE_POWDER
Definition block.h:512
+
static constexpr BlockType NETHER_WART
Definition block.h:278
+
static constexpr BlockType LIGHT_BLUE_CONCRETE
Definition block.h:486
+
static constexpr BlockType DEAD_SHRUB
Definition block.h:133
+
static constexpr BlockType REDSTONE_ORE
Definition block.h:213
+
static constexpr BlockType GRAY_CARPET
Definition block.h:388
+
static constexpr BlockType NETHERRACK
Definition block.h:227
+
static constexpr BlockType RED_NETHER_BRICK
Definition block.h:447
+
static constexpr BlockType POTATOES
Definition block.h:316
+
static constexpr BlockType PINK_STAINED_GLASS_PANE
Definition block.h:357
+
static constexpr BlockType REDSTONE_REPEATER_BLOCK_OFF
Definition block.h:233
+
static constexpr BlockType DARK_OAK_FENCE_GATE
Definition block.h:418
+
static constexpr BlockType YELLOW_CARPET
Definition block.h:385
+
static constexpr BlockType BEDROCK
Definition block.h:99
+
static constexpr BlockType END_PORTAL
Definition block.h:282
+
static constexpr BlockType BLACK_CONCRETE_POWDER
Definition block.h:514
+
static constexpr BlockType LILY_PAD
Definition block.h:274
+
static constexpr BlockType BLUE_CONCRETE
Definition block.h:494
+
static constexpr BlockType GLASS_PANE
Definition block.h:265
+
static constexpr BlockType CHISELED_SANDSTONE
Definition block.h:125
+
static constexpr BlockType QUARTZ_BLOCK
Definition block.h:329
+
+
+ + + + diff --git a/chunk_8h.html b/chunk_8h.html new file mode 100644 index 00000000..efe7be27 --- /dev/null +++ b/chunk_8h.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/chunk.h File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
chunk.h File Reference
+
+
+
#include "block.h"
+#include "coordinate.h"
+#include <memory>
+#include <vector>
+
+Include dependency graph for chunk.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Classes

struct  mcpp::Chunk
 
struct  mcpp::Chunk::Iterator
 An iterator for the Chunk's 3D block data. More...
 
struct  mcpp::Chunk::ConstIterator
 An iterator for the const Chunk's 3D block data. More...
 
+ + + + +

+Namespaces

namespace  mcpp
 Namespace containing all the the mcpp library classes.
 
+
+
+ + + + diff --git a/chunk_8h.js b/chunk_8h.js new file mode 100644 index 00000000..9bdf82ed --- /dev/null +++ b/chunk_8h.js @@ -0,0 +1,6 @@ +var chunk_8h = +[ + [ "mcpp::Chunk", "structmcpp_1_1_chunk.html", "structmcpp_1_1_chunk" ], + [ "mcpp::Chunk::Iterator", "structmcpp_1_1_chunk_1_1_iterator.html", "structmcpp_1_1_chunk_1_1_iterator" ], + [ "mcpp::Chunk::ConstIterator", "structmcpp_1_1_chunk_1_1_const_iterator.html", "structmcpp_1_1_chunk_1_1_const_iterator" ] +]; \ No newline at end of file diff --git a/chunk_8h__dep__incl.map b/chunk_8h__dep__incl.map new file mode 100644 index 00000000..dc3abd34 --- /dev/null +++ b/chunk_8h__dep__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/chunk_8h__dep__incl.md5 b/chunk_8h__dep__incl.md5 new file mode 100644 index 00000000..1264285f --- /dev/null +++ b/chunk_8h__dep__incl.md5 @@ -0,0 +1 @@ +a17fc8ba377097613daa8f49bf82dee2 \ No newline at end of file diff --git a/chunk_8h__dep__incl.svg b/chunk_8h__dep__incl.svg new file mode 100644 index 00000000..add7905a --- /dev/null +++ b/chunk_8h__dep__incl.svg @@ -0,0 +1,39 @@ + + + + + + +include/mcpp/chunk.h + + +Node1 + + +include/mcpp/chunk.h + + + + + +Node2 + + +include/mcpp/mcpp.h + + + + + +Node1->Node2 + + + + + + + + diff --git a/chunk_8h__incl.map b/chunk_8h__incl.map new file mode 100644 index 00000000..c8134bdc --- /dev/null +++ b/chunk_8h__incl.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/chunk_8h__incl.md5 b/chunk_8h__incl.md5 new file mode 100644 index 00000000..16997038 --- /dev/null +++ b/chunk_8h__incl.md5 @@ -0,0 +1 @@ +c72f02252f0babbab51a8d2ff5e30953 \ No newline at end of file diff --git a/chunk_8h__incl.svg b/chunk_8h__incl.svg new file mode 100644 index 00000000..c95fae61 --- /dev/null +++ b/chunk_8h__incl.svg @@ -0,0 +1,138 @@ + + + + + + +include/mcpp/chunk.h + + +Node1 + + +include/mcpp/chunk.h + + + + + +Node2 + + +block.h + + + + + +Node1->Node2 + + + + + + + + +Node5 + + +coordinate.h + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +memory + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +vector + + + + + +Node1->Node7 + + + + + + + + +Node3 + + +cstdint + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +ostream + + + + + +Node2->Node4 + + + + + + + + +Node5->Node4 + + + + + + + + diff --git a/chunk_8h_source.html b/chunk_8h_source.html new file mode 100644 index 00000000..9b000660 --- /dev/null +++ b/chunk_8h_source.html @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/chunk.h Source File + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
chunk.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2
+
3#include "block.h"
+
4#include "coordinate.h"
+
5#include <memory>
+
6#include <vector>
+
7
+
8namespace mcpp {
+
+
13struct Chunk {
+
14private:
+
15 Coordinate _base_pt;
+
16 uint16_t _x_len;
+
17 uint16_t _y_len;
+
18 uint16_t _z_len;
+
19 std::unique_ptr<BlockType[]> _raw_data;
+
20
+
21public:
+
22 // Constructors and assignment
+
23 Chunk(const Coordinate& loc1, const Coordinate& loc2, const std::vector<BlockType>& block_list);
+
24 ~Chunk() = default;
+
25
+
+
26 Chunk(const Chunk& other)
+
27 : _base_pt(other._base_pt), _x_len(other._x_len), _y_len(other._y_len), _z_len(other._z_len) {
+
28 size_t size = _x_len * _y_len * _z_len;
+
29 _raw_data.reset(new BlockType[size]);
+
30 std::copy(other._raw_data.get(), other._raw_data.get() + size, _raw_data.get());
+
31 }
+
+
32
+
33 Chunk(Chunk&& other) noexcept = default;
+
34 Chunk& operator=(const Chunk& other);
+
35 Chunk& operator=(Chunk&& other) = default;
+
36
+ +
45
+
54 BlockType get(int x, int y, int z) const;
+
55
+
60 uint16_t x_len() const;
+
61
+
66 uint16_t y_len() const;
+
67
+
72 uint16_t z_len() const;
+
73
+ +
79
+
+
88 struct Iterator {
+
89 using iterator_category = std::forward_iterator_tag;
+
90 using difference_type = std::ptrdiff_t;
+ + + +
94
+
100 Iterator(pointer ptr) : m_ptr(ptr) {}
+
101
+
108 reference operator*() const { return *m_ptr; }
+
109
+
115 pointer operator->() { return m_ptr; }
+
116
+
+ +
124 m_ptr++;
+
125 return *this;
+
126 }
+
+
127
+
+ +
137 Iterator tmp = *this;
+
138 ++(*this);
+
139 return tmp;
+
140 }
+
+
141
+
150 friend bool operator==(const Iterator& a, const Iterator& b) { return a.m_ptr == b.m_ptr; };
+
151
+
160 friend bool operator!=(const Iterator& a, const Iterator& b) { return a.m_ptr != b.m_ptr; };
+
161
+
162 private:
+
163 pointer m_ptr;
+
164 };
+
+
165
+
+ +
175 using iterator_category = std::forward_iterator_tag;
+
176 using difference_type = std::ptrdiff_t;
+ +
178 using pointer = const BlockType*;
+
179 using reference = const BlockType&;
+
180
+
186 ConstIterator(pointer ptr) : m_ptr(ptr) {}
+
187
+
194 reference operator*() const { return *m_ptr; }
+
195
+
201 pointer operator->() { return m_ptr; }
+
202
+
+ +
210 m_ptr++;
+
211 return *this;
+
212 }
+
+
213
+
+ +
223 ConstIterator tmp = *this;
+
224 ++(*this);
+
225 return tmp;
+
226 }
+
+
227
+
+
236 friend bool operator==(const ConstIterator& a, const ConstIterator& b) {
+
237 return a.m_ptr == b.m_ptr;
+
238 };
+
+
239
+
+
248 friend bool operator!=(const ConstIterator& a, const ConstIterator& b) {
+
249 return a.m_ptr != b.m_ptr;
+
250 };
+
+
251
+
252 private:
+
253 pointer m_ptr;
+
254 };
+
+
255
+
256 // Iterators
+
257 Iterator begin() { return Iterator(&_raw_data[0]); }
+
258 Iterator end() { return Iterator(&_raw_data[_x_len * _y_len * _z_len]); }
+
259 ConstIterator begin() const { return ConstIterator(&_raw_data[0]); }
+
260 ConstIterator end() const { return ConstIterator(&_raw_data[_x_len * _y_len * _z_len]); }
+
261};
+
+
262} // namespace mcpp
+
BlockType class.
+
Definition block.h:11
+
Coordinate class.
+
Namespace containing all the the mcpp library classes.
Definition block.h:10
+
An iterator for the const Chunk's 3D block data.
Definition chunk.h:174
+
reference operator*() const
Dereference the iterator to access the value at the current position.
Definition chunk.h:194
+
pointer operator->()
Access the pointer to the current element.
Definition chunk.h:201
+
const BlockType * pointer
Definition chunk.h:178
+
ConstIterator operator++(int)
Post-increment operator. Advances the iterator to the next position.
Definition chunk.h:222
+
ConstIterator & operator++()
Pre-increment operator. Advances the iterator to the next position.
Definition chunk.h:209
+
ConstIterator(pointer ptr)
Constructs an iterator at the given pointer position.
Definition chunk.h:186
+
std::ptrdiff_t difference_type
Definition chunk.h:176
+
friend bool operator==(const ConstIterator &a, const ConstIterator &b)
Equality comparison operator.
Definition chunk.h:236
+
friend bool operator!=(const ConstIterator &a, const ConstIterator &b)
Inequality comparison operator.
Definition chunk.h:248
+
std::forward_iterator_tag iterator_category
Definition chunk.h:175
+
An iterator for the Chunk's 3D block data.
Definition chunk.h:88
+
BlockType * pointer
Definition chunk.h:92
+
Iterator(pointer ptr)
Constructs an iterator at the given pointer position.
Definition chunk.h:100
+
friend bool operator!=(const Iterator &a, const Iterator &b)
Inequality comparison operator.
Definition chunk.h:160
+
std::ptrdiff_t difference_type
Definition chunk.h:90
+
pointer operator->()
Access the pointer to the current element.
Definition chunk.h:115
+
Iterator & operator++()
Pre-increment operator. Advances the iterator to the next position.
Definition chunk.h:123
+
Iterator operator++(int)
Post-increment operator. Advances the iterator to the next position.
Definition chunk.h:136
+
std::forward_iterator_tag iterator_category
Definition chunk.h:89
+
friend bool operator==(const Iterator &a, const Iterator &b)
Equality comparison operator.
Definition chunk.h:150
+
reference operator*() const
Dereference the iterator to access the value at the current position.
Definition chunk.h:108
+
Definition chunk.h:13
+
ConstIterator end() const
Definition chunk.h:260
+
Coordinate base_pt() const
+
BlockType get_worldspace(const Coordinate &pos) const
+
Chunk(Chunk &&other) noexcept=default
+
uint16_t y_len() const
+
BlockType get(int x, int y, int z) const
+
Iterator begin()
Definition chunk.h:257
+
Iterator end()
Definition chunk.h:258
+
Chunk & operator=(Chunk &&other)=default
+
Chunk & operator=(const Chunk &other)
+
Chunk(const Coordinate &loc1, const Coordinate &loc2, const std::vector< BlockType > &block_list)
+
Chunk(const Chunk &other)
Definition chunk.h:26
+
uint16_t z_len() const
+
uint16_t x_len() const
+
~Chunk()=default
+
ConstIterator begin() const
Definition chunk.h:259
+
Definition coordinate.h:17
+
+
+ + + + diff --git a/classes.html b/classes.html new file mode 100644 index 00000000..56bb0aae --- /dev/null +++ b/classes.html @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Index + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Class Index
+
+ +
+ + + + diff --git a/classmcpp_1_1_block_type-members.html b/classmcpp_1_1_block_type-members.html new file mode 100644 index 00000000..ceb96537 --- /dev/null +++ b/classmcpp_1_1_block_type-members.html @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mcpp::BlockType Member List
+
+
+ +

This is the complete list of members for mcpp::BlockType, including all inherited members.

+ + + + + + + + +
BlockType(uint8_t id=0, uint8_t mod=0)mcpp::BlockTypeinline
idmcpp::BlockType
modmcpp::BlockType
operator!=(const BlockType &other) constmcpp::BlockType
operator<<mcpp::BlockTypefriend
operator==(const BlockType &other) constmcpp::BlockType
with_mod(uint8_t modifier) constmcpp::BlockType
+
+ + + + diff --git a/classmcpp_1_1_block_type.html b/classmcpp_1_1_block_type.html new file mode 100644 index 00000000..bdea3db2 --- /dev/null +++ b/classmcpp_1_1_block_type.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::BlockType Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
mcpp::BlockType Class Reference
+
+
+ +

#include <block.h>

+ + + + + + + + + + + + +

+Public Member Functions

constexpr BlockType (uint8_t id=0, uint8_t mod=0)
 
bool operator== (const BlockType &other) const
 Equality comparison operator.
 
bool operator!= (const BlockType &other) const
 Inequality comparison operator.
 
BlockType with_mod (uint8_t modifier) const
 
+ + + + + +

+Public Attributes

uint8_t id
 
uint8_t mod
 
+ + + + +

+Friends

std::ostream & operator<< (std::ostream &out, const BlockType &block)
 Stream insertion operator for outputting the BlockType to an output stream.
 
+

Constructor & Destructor Documentation

+ +

◆ BlockType()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
constexpr mcpp::BlockType::BlockType (uint8_t id = 0,
uint8_t mod = 0 
)
+
+inlineconstexpr
+
+ +
+
+

Member Function Documentation

+ +

◆ operator!=()

+ +
+
+ + + + + + + + +
bool mcpp::BlockType::operator!= (const BlockTypeother) const
+
+ +

Inequality comparison operator.

+

Watch out as this also compares the BlockType.mod element of the block, so some equalities may behave in unexpected ways e.g. rotated stairs

+
Parameters
+ + +
otherThe BlockType to compare with the current instance.
+
+
+
Returns
True if the two BlockType instances are not equal, false otherwise.
+ +
+
+ +

◆ operator==()

+ +
+
+ + + + + + + + +
bool mcpp::BlockType::operator== (const BlockTypeother) const
+
+ +

Equality comparison operator.

+

Watch out as this also compares the BlockType.mod element of the block, so some equalities may behave in unexpected ways e.g. rotated stairs

+
Parameters
+ + +
otherThe BlockType to compare with the current instance.
+
+
+
Returns
True if the two BlockType instances are not equal, false otherwise.
+ +
+
+ +

◆ with_mod()

+ +
+
+ + + + + + + + +
BlockType mcpp::BlockType::with_mod (uint8_t modifier) const
+
+

Returns a new BlockType with the same id and specified modifier, useful for rotations etc.

+
Parameters
+ + +
modifierNew modifier for the BlockType
+
+
+
Returns
New BlockType object with the specified modifier
+ +
+
+

Friends And Related Symbol Documentation

+ +

◆ operator<<

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::ostream & operator<< (std::ostream & out,
const BlockTypeblock 
)
+
+friend
+
+ +

Stream insertion operator for outputting the BlockType to an output stream.

+
Parameters
+ + + +
outThe output stream to write to.
blockThe BlockType instance to output.
+
+
+
Returns
A reference to the output stream after the block information has been inserted.
+ +
+
+

Member Data Documentation

+ +

◆ id

+ +
+
+ + + + +
uint8_t mcpp::BlockType::id
+
+ +
+
+ +

◆ mod

+ +
+
+ + + + +
uint8_t mcpp::BlockType::mod
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classmcpp_1_1_block_type.js b/classmcpp_1_1_block_type.js new file mode 100644 index 00000000..12c05410 --- /dev/null +++ b/classmcpp_1_1_block_type.js @@ -0,0 +1,10 @@ +var classmcpp_1_1_block_type = +[ + [ "BlockType", "classmcpp_1_1_block_type.html#ac475e584965cb95d1b5ec3ac3060413e", null ], + [ "operator!=", "classmcpp_1_1_block_type.html#a1b86156283c53bb60f74d504b6c7f78c", null ], + [ "operator==", "classmcpp_1_1_block_type.html#a7964fb92287d04581559534d0bff91a5", null ], + [ "with_mod", "classmcpp_1_1_block_type.html#a7dd394937bd5ebb798a95ff54b546f16", null ], + [ "operator<<", "classmcpp_1_1_block_type.html#a7dbe770d87d057f9e45b9b6509b07e96", null ], + [ "id", "classmcpp_1_1_block_type.html#ae5e0c3da00cf1a23d9e49977ed082a6b", null ], + [ "mod", "classmcpp_1_1_block_type.html#a6af0613ecc563701ea7848a092de0899", null ] +]; \ No newline at end of file diff --git a/classmcpp_1_1_minecraft_connection-members.html b/classmcpp_1_1_minecraft_connection-members.html new file mode 100644 index 00000000..51257bc5 --- /dev/null +++ b/classmcpp_1_1_minecraft_connection-members.html @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mcpp::MinecraftConnection Member List
+
+
+ +

This is the complete list of members for mcpp::MinecraftConnection, including all inherited members.

+ + + + + + + + + + + + + + + + +
doCommand(const std::string &command)mcpp::MinecraftConnection
fillHeight(Coordinate2D loc) constmcpp::MinecraftConnection
getBlock(const Coordinate &loc) constmcpp::MinecraftConnection
getBlocks(const Coordinate &loc1, const Coordinate &loc2) constmcpp::MinecraftConnection
getHeight(Coordinate2D loc) constmcpp::MinecraftConnection
getHeights(const Coordinate2D &loc1, const Coordinate2D &loc2) constmcpp::MinecraftConnection
getPlayerPosition() constmcpp::MinecraftConnection
getPlayerTilePosition() constmcpp::MinecraftConnection
MinecraftConnection(const std::string &address="localhost", uint16_t port=MCPP_PORT)mcpp::MinecraftConnectionexplicit
postToChat(const std::string &message)mcpp::MinecraftConnection
setBlock(const Coordinate &loc, const BlockType &block_type)mcpp::MinecraftConnection
setBlocks(const Coordinate &loc1, const Coordinate &loc2, const BlockType &block_type)mcpp::MinecraftConnection
setPlayerPosition(const Coordinate &pos)mcpp::MinecraftConnection
setPlayerTilePosition(const Coordinate &tile)mcpp::MinecraftConnection
~MinecraftConnection()mcpp::MinecraftConnection
+
+ + + + diff --git a/classmcpp_1_1_minecraft_connection.html b/classmcpp_1_1_minecraft_connection.html new file mode 100644 index 00000000..9f2b37b7 --- /dev/null +++ b/classmcpp_1_1_minecraft_connection.html @@ -0,0 +1,645 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::MinecraftConnection Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
mcpp::MinecraftConnection Class Reference
+
+
+ +

#include <mcpp.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 MinecraftConnection (const std::string &address="localhost", uint16_t port=MCPP_PORT)
 Represents the main endpoint for interaction with the minecraft world.
 
 ~MinecraftConnection ()
 
void postToChat (const std::string &message)
 Sends a message to the in-game chat, does not require a joined player.
 
void doCommand (const std::string &command)
 Performs an in-game minecraft command. Players have to exist on the server and should be server operators (default with ELCI)
 
void setPlayerPosition (const Coordinate &pos)
 Sets player pos (block pos of lower half of playermodel) to specified Coordinate.
 
Coordinate getPlayerPosition () const
 Returns a coordinate representing player position (block pos of lower half of playermodel)
 
void setPlayerTilePosition (const Coordinate &tile)
 Sets player position to be one above specified tile (i.e. tile = block player is standing on)
 
Coordinate getPlayerTilePosition () const
 Returns the coordinate location of the block the player is standing on.
 
void setBlock (const Coordinate &loc, const BlockType &block_type)
 Sets block at Coordinate loc to the BlockType specified by blockType.
 
void setBlocks (const Coordinate &loc1, const Coordinate &loc2, const BlockType &block_type)
 Sets a cuboid of blocks to the specified BlockType blockType, with the corners of the cuboid provided by the Coordinate loc1 and loc2.
 
BlockType getBlock (const Coordinate &loc) const
 Returns BlockType object from the specified Coordinate loc with modifier.
 
Chunk getBlocks (const Coordinate &loc1, const Coordinate &loc2) const
 Returns a 3D vector of the BlockTypes of the requested cuboid with modifiers.
 
int32_t getHeight (Coordinate2D loc) const
 Returns the height of the specific provided 2D coordinate.
 
Coordinate fillHeight (Coordinate2D loc) const
 Returns the coordinate with the x, z, and in-world height of the specific provided 2D coordinate.
 
HeightMap getHeights (const Coordinate2D &loc1, const Coordinate2D &loc2) const
 Provides a scaled option of the getHeight call to allow for considerable performance gains.
 
+

Constructor & Destructor Documentation

+ +

◆ MinecraftConnection()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
mcpp::MinecraftConnection::MinecraftConnection (const std::string & address = "localhost",
uint16_t port = MCPP_PORT 
)
+
+explicit
+
+ +

Represents the main endpoint for interaction with the minecraft world.

+
Parameters
+ + + +
addressString address in IPV4 format, defaults to "localhost"
portInteger port to run on, defaults to 4711 as that is the port for ELCI
+
+
+ +
+
+ +

◆ ~MinecraftConnection()

+ +
+
+ + + + + + + +
mcpp::MinecraftConnection::~MinecraftConnection ()
+
+ +
+
+

Member Function Documentation

+ +

◆ doCommand()

+ +
+
+ + + + + + + + +
void mcpp::MinecraftConnection::doCommand (const std::string & command)
+
+ +

Performs an in-game minecraft command. Players have to exist on the server and should be server operators (default with ELCI)

+
Parameters
+ + +
commandCommand string in the in-game format (e.g. "time set day")
+
+
+ +
+
+ +

◆ fillHeight()

+ +
+
+ + + + + + + + +
Coordinate mcpp::MinecraftConnection::fillHeight (Coordinate2D loc) const
+
+ +

Returns the coordinate with the x, z, and in-world height of the specific provided 2D coordinate.

+

IMPORTANT: DO NOT USE FOR LARGE AREAS, IT WILL BE VERY SLOW USE getHeights() INSTEAD

+

Gets the y-value of the highest non-air block at the specified 2D coordinate, and creates a new 3D coordinate.

Parameters
+ + +
loc2D coordinate
+
+
+
Returns
Returns the coordinate with the filled-in height.
+ +
+
+ +

◆ getBlock()

+ +
+
+ + + + + + + + +
BlockType mcpp::MinecraftConnection::getBlock (const Coordinateloc) const
+
+ +

Returns BlockType object from the specified Coordinate loc with modifier.

+
Parameters
+ + +
loc
+
+
+
Returns
BlockType of the requested block
+ +
+
+ +

◆ getBlocks()

+ +
+
+ + + + + + + + + + + + + + + + + + +
Chunk mcpp::MinecraftConnection::getBlocks (const Coordinateloc1,
const Coordinateloc2 
) const
+
+ +

Returns a 3D vector of the BlockTypes of the requested cuboid with modifiers.

+
Parameters
+ + + +
loc11st corner of the cuboid
loc22nd corner of the cuboid
+
+
+
Returns
Chunk containing the blocks in the specified area.
+ +
+
+ +

◆ getHeight()

+ +
+
+ + + + + + + + +
int32_t mcpp::MinecraftConnection::getHeight (Coordinate2D loc) const
+
+ +

Returns the height of the specific provided 2D coordinate.

+

IMPORTANT: DO NOT USE FOR LARGE AREAS, IT WILL BE VERY SLOW USE getHeights() INSTEAD

+

Gets the y-value of the highest non-air block at the specified 2D coordinate.

Parameters
+ + +
loc2D coordinate
+
+
+
Returns
Returns the integer y-height at the requested coordinate.
+ +
+
+ +

◆ getHeights()

+ +
+
+ + + + + + + + + + + + + + + + + + +
HeightMap mcpp::MinecraftConnection::getHeights (const Coordinate2Dloc1,
const Coordinate2Dloc2 
) const
+
+ +

Provides a scaled option of the getHeight call to allow for considerable performance gains.

+
USE THIS instead of getHeight in a for loop.
+
Parameters
+ + + +
loc11st corner of rectangle
loc22nd corner of rectangle
+
+
+
Returns
Returns a vector of integers representing the 2D area of heights.
+ +
+
+ +

◆ getPlayerPosition()

+ +
+
+ + + + + + + +
Coordinate mcpp::MinecraftConnection::getPlayerPosition () const
+
+ +

Returns a coordinate representing player position (block pos of lower half of playermodel)

+
Returns
Coordinate of location
+ +
+
+ +

◆ getPlayerTilePosition()

+ +
+
+ + + + + + + +
Coordinate mcpp::MinecraftConnection::getPlayerTilePosition () const
+
+ +

Returns the coordinate location of the block the player is standing on.

+
Returns
Coordinate of location
+ +
+
+ +

◆ postToChat()

+ +
+
+ + + + + + + + +
void mcpp::MinecraftConnection::postToChat (const std::string & message)
+
+ +

Sends a message to the in-game chat, does not require a joined player.

+
Parameters
+ + +
message
+
+
+ +
+
+ +

◆ setBlock()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void mcpp::MinecraftConnection::setBlock (const Coordinateloc,
const BlockTypeblock_type 
)
+
+ +

Sets block at Coordinate loc to the BlockType specified by blockType.

+
Parameters
+ + + +
loc
blockType
+
+
+ +
+
+ +

◆ setBlocks()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void mcpp::MinecraftConnection::setBlocks (const Coordinateloc1,
const Coordinateloc2,
const BlockTypeblock_type 
)
+
+ +

Sets a cuboid of blocks to the specified BlockType blockType, with the corners of the cuboid provided by the Coordinate loc1 and loc2.

+
Parameters
+ + + + +
loc1
loc2
blockType
+
+
+ +
+
+ +

◆ setPlayerPosition()

+ +
+
+ + + + + + + + +
void mcpp::MinecraftConnection::setPlayerPosition (const Coordinatepos)
+
+ +

Sets player pos (block pos of lower half of playermodel) to specified Coordinate.

+
Parameters
+ + +
posCoordinate to set
+
+
+ +
+
+ +

◆ setPlayerTilePosition()

+ +
+
+ + + + + + + + +
void mcpp::MinecraftConnection::setPlayerTilePosition (const Coordinatetile)
+
+ +

Sets player position to be one above specified tile (i.e. tile = block player is standing on)

+
Parameters
+ + +
tileCoordinate to set
+
+
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/classmcpp_1_1_minecraft_connection.js b/classmcpp_1_1_minecraft_connection.js new file mode 100644 index 00000000..14982e6d --- /dev/null +++ b/classmcpp_1_1_minecraft_connection.js @@ -0,0 +1,18 @@ +var classmcpp_1_1_minecraft_connection = +[ + [ "MinecraftConnection", "classmcpp_1_1_minecraft_connection.html#ac36095d95c9b64c02e2a4ff8a8472752", null ], + [ "~MinecraftConnection", "classmcpp_1_1_minecraft_connection.html#ae470f965ac0cdb97d7d92bd0ab9e6587", null ], + [ "doCommand", "classmcpp_1_1_minecraft_connection.html#a706ee80a08b33fc44512f4e483cec416", null ], + [ "fillHeight", "classmcpp_1_1_minecraft_connection.html#a82059d72f8eb1785d60961a493675602", null ], + [ "getBlock", "classmcpp_1_1_minecraft_connection.html#a59c3b6a46e94b139930781d308c36e51", null ], + [ "getBlocks", "classmcpp_1_1_minecraft_connection.html#a5c581d64d7bb0207ccc70f8e4ef56aff", null ], + [ "getHeight", "classmcpp_1_1_minecraft_connection.html#a3cd994404a9fd333f78b8a4671594db0", null ], + [ "getHeights", "classmcpp_1_1_minecraft_connection.html#ab4fcb04814b36f82e935586f47e5ebb1", null ], + [ "getPlayerPosition", "classmcpp_1_1_minecraft_connection.html#a7003573d8ebf553c8ccc7130694b2575", null ], + [ "getPlayerTilePosition", "classmcpp_1_1_minecraft_connection.html#a3e28810c0bf53f6365f3d1f285b561ad", null ], + [ "postToChat", "classmcpp_1_1_minecraft_connection.html#a7f489b281f16ac1bf4e75c6070589130", null ], + [ "setBlock", "classmcpp_1_1_minecraft_connection.html#a7da57f4b67732a3eedc943cec715ed8f", null ], + [ "setBlocks", "classmcpp_1_1_minecraft_connection.html#ac33d67903491e0a1c753c8754377b71a", null ], + [ "setPlayerPosition", "classmcpp_1_1_minecraft_connection.html#a35965000d661f13f19cee02a676780f2", null ], + [ "setPlayerTilePosition", "classmcpp_1_1_minecraft_connection.html#a0c54cfc5da2741d4abff1115e8acef33", null ] +]; \ No newline at end of file diff --git a/closed.png b/closed.png new file mode 100644 index 00000000..12a4330f Binary files /dev/null and b/closed.png differ diff --git a/coordinate_8h.html b/coordinate_8h.html new file mode 100644 index 00000000..59266007 --- /dev/null +++ b/coordinate_8h.html @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/coordinate.h File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
coordinate.h File Reference
+
+
+ +

Coordinate class. +More...

+
#include <ostream>
+
+Include dependency graph for coordinate.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+
+
+

Go to the source code of this file.

+ + + + + + + +

+Classes

struct  mcpp::Coordinate
 
struct  mcpp::Coordinate2D
 Height-agnostic coordinate class. More...
 
+ + + + +

+Namespaces

namespace  mcpp
 Namespace containing all the the mcpp library classes.
 
+ + + + +

+Functions

std::string mcpp::to_string (const Coordinate &coord)
 Convert coordinate to string representation.
 
+

Detailed Description

+

Coordinate class.

+
+
+ + + + diff --git a/coordinate_8h.js b/coordinate_8h.js new file mode 100644 index 00000000..d09837e9 --- /dev/null +++ b/coordinate_8h.js @@ -0,0 +1,6 @@ +var coordinate_8h = +[ + [ "mcpp::Coordinate", "structmcpp_1_1_coordinate.html", "structmcpp_1_1_coordinate" ], + [ "mcpp::Coordinate2D", "structmcpp_1_1_coordinate2_d.html", "structmcpp_1_1_coordinate2_d" ], + [ "to_string", "coordinate_8h.html#ab1bf0af2b50790de272ff6f3f4d26f29", null ] +]; \ No newline at end of file diff --git a/coordinate_8h__dep__incl.map b/coordinate_8h__dep__incl.map new file mode 100644 index 00000000..7a009fd3 --- /dev/null +++ b/coordinate_8h__dep__incl.map @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/coordinate_8h__dep__incl.md5 b/coordinate_8h__dep__incl.md5 new file mode 100644 index 00000000..3984057e --- /dev/null +++ b/coordinate_8h__dep__incl.md5 @@ -0,0 +1 @@ +870d7c6edc7e6051fb737983d24a21c7 \ No newline at end of file diff --git a/coordinate_8h__dep__incl.svg b/coordinate_8h__dep__incl.svg new file mode 100644 index 00000000..69adf391 --- /dev/null +++ b/coordinate_8h__dep__incl.svg @@ -0,0 +1,93 @@ + + + + + + +include/mcpp/coordinate.h + + +Node1 + + +include/mcpp/coordinate.h + + + + + +Node2 + + +include/mcpp/chunk.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +include/mcpp/mcpp.h + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +include/mcpp/heightmap.h + + + + + +Node1->Node4 + + + + + + + + +Node2->Node3 + + + + + + + + +Node4->Node3 + + + + + + + + diff --git a/coordinate_8h__incl.map b/coordinate_8h__incl.map new file mode 100644 index 00000000..bbf95215 --- /dev/null +++ b/coordinate_8h__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/coordinate_8h__incl.md5 b/coordinate_8h__incl.md5 new file mode 100644 index 00000000..3f687cfa --- /dev/null +++ b/coordinate_8h__incl.md5 @@ -0,0 +1 @@ +1aefad4c81908cf0f046b4860bbcfd51 \ No newline at end of file diff --git a/coordinate_8h__incl.svg b/coordinate_8h__incl.svg new file mode 100644 index 00000000..fe5d7154 --- /dev/null +++ b/coordinate_8h__incl.svg @@ -0,0 +1,39 @@ + + + + + + +include/mcpp/coordinate.h + + +Node1 + + +include/mcpp/coordinate.h + + + + + +Node2 + + +ostream + + + + + +Node1->Node2 + + + + + + + + diff --git a/coordinate_8h_source.html b/coordinate_8h_source.html new file mode 100644 index 00000000..dca05eee --- /dev/null +++ b/coordinate_8h_source.html @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/coordinate.h Source File + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
coordinate.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2
+
3#include <ostream>
+
4
+
9namespace mcpp {
+
10
+
11struct Coordinate2D;
+
12
+
+
17struct Coordinate {
+
18 int32_t x;
+
19 int32_t y;
+
20 int32_t z;
+
21
+
29 constexpr Coordinate(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z) {}
+
30
+
34 constexpr Coordinate() : x(0), y(0), z(0) {}
+
35
+
+
43 constexpr Coordinate(double x, double y, double z)
+
44 : x(static_cast<int>(x)), y(static_cast<int>(y)), z(static_cast<int>(z)) {}
+
+
45
+
53 Coordinate operator+(const Coordinate& obj) const;
+
54
+ +
56
+
63 bool operator==(const Coordinate& obj) const;
+
64
+
71 bool operator!=(const Coordinate& obj) const;
+
72
+
80 Coordinate operator-(const Coordinate& obj) const;
+
81
+
89 std::size_t operator()(const Coordinate& obj) const;
+
90
+
98 friend std::ostream& operator<<(std::ostream& out, const Coordinate& coord);
+
99};
+
+
100
+
+ +
114 constexpr Coordinate2D(int x, int z) : x(x), z(z) {}
+
115
+
119 constexpr Coordinate2D() : x(0), z(0) {}
+
120
+
127 constexpr Coordinate2D(double x, double z) : x(static_cast<int>(x)), z(static_cast<int>(z)) {}
+
128
+
134 constexpr Coordinate2D(const Coordinate& coord) : x(coord.x), z(coord.z) {}
+
135
+ +
144
+ +
153
+
160 bool operator==(const Coordinate2D& obj) const;
+
161
+
168 bool operator!=(const Coordinate2D& obj) const;
+
169
+ +
178
+
186 std::size_t operator()(const Coordinate2D& obj) const;
+
187
+
195 friend std::ostream& operator<<(std::ostream& out, const Coordinate2D& coord);
+
196
+
197 int x;
+
198 int z;
+
199};
+
+
200
+
207std::string to_string(const Coordinate& coord);
+
208
+
209} // namespace mcpp
+
Namespace containing all the the mcpp library classes.
Definition block.h:10
+
std::string to_string(const Coordinate &coord)
Convert coordinate to string representation.
+
Height-agnostic coordinate class.
Definition coordinate.h:107
+
Coordinate2D operator-(const Coordinate2D &obj) const
Subtracts one Coordinate2D object from another.
+
bool operator==(const Coordinate2D &obj) const
Checks if two Coordinate2D objects are equal.
+
bool operator!=(const Coordinate2D &obj) const
Checks if two Coordinate2D objects are not equal.
+
constexpr Coordinate2D(double x, double z)
Constructs a Coordinate2D object with double values.
Definition coordinate.h:127
+
constexpr Coordinate2D(const Coordinate &coord)
Constructs a Coordinate2D object from a Coordinate object.
Definition coordinate.h:134
+
constexpr Coordinate2D()
Constructs a Coordinate2D object with zero values.
Definition coordinate.h:119
+
int x
Definition coordinate.h:197
+
std::size_t operator()(const Coordinate2D &obj) const
Implements hash algorithm for Coordinate2D object using non-negative mapping and weighted coordinate ...
+
int z
Definition coordinate.h:198
+
Coordinate2D operator+(const Coordinate2D &obj) const
Adds two Coordinate2D objects.
+
Coordinate with_height(int y) const
Constructs a Coordinate object from a Coordinate2D object and a y value.
+
friend std::ostream & operator<<(std::ostream &out, const Coordinate2D &coord)
Outputs the Coordinate2D object to an ostream.
+
constexpr Coordinate2D(int x, int z)
Constructs a Coordinate2D object with integer values.
Definition coordinate.h:114
+
Definition coordinate.h:17
+
Coordinate operator+(const Coordinate &obj) const
Adds two Coordinate objects.
+
int32_t y
Definition coordinate.h:19
+
Coordinate operator-(const Coordinate &obj) const
Subtracts one Coordinate object from another.
+
bool operator!=(const Coordinate &obj) const
Checks if two Coordinate objects are not equal.
+
int32_t x
Definition coordinate.h:18
+
constexpr Coordinate(int32_t x, int32_t y, int32_t z)
Constructs a Coordinate object with integer values.
Definition coordinate.h:29
+
std::size_t operator()(const Coordinate &obj) const
Implements hash algorithm for Coordinate object using non-negative mapping and weighted coordinate va...
+
friend std::ostream & operator<<(std::ostream &out, const Coordinate &coord)
Outputs the Coordinate object to an ostream.
+
Coordinate operator+(const Coordinate2D &obj) const
+
constexpr Coordinate()
Constructs a Coordinate object with zero values.
Definition coordinate.h:34
+
constexpr Coordinate(double x, double y, double z)
Constructs a Coordinate object with double values.
Definition coordinate.h:43
+
int32_t z
Definition coordinate.h:20
+
bool operator==(const Coordinate &obj) const
Checks if two Coordinate objects are equal.
+
+
+ + + + diff --git a/custom-alternative.css b/custom-alternative.css new file mode 100644 index 00000000..db4f14bf --- /dev/null +++ b/custom-alternative.css @@ -0,0 +1,54 @@ +html.alternative { + /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ + --primary-color: #AF7FE4; + --primary-dark-color: #9270E4; + --primary-light-color: #7aabd6; + --primary-lighter-color: #cae1f1; + --primary-lightest-color: #e9f1f8; + + /* page base colors */ + --page-background-color: white; + --page-foreground-color: #2c3e50; + --page-secondary-foreground-color: #67727e; + + + --border-radius-large: 22px; + --border-radius-small: 9px; + --border-radius-medium: 14px; + --spacing-small: 8px; + --spacing-medium: 14px; + --spacing-large: 19px; + + --top-height: 125px; + + --side-nav-background: #324067; + --side-nav-foreground: #F1FDFF; + --header-foreground: var(--side-nav-foreground); + --searchbar-background: var(--side-nav-foreground); + --searchbar-border-radius: var(--border-radius-medium); + --header-background: var(--side-nav-background); + --header-foreground: var(--side-nav-foreground); + + --toc-background: rgb(243, 240, 252); + --toc-foreground: var(--page-foreground-color); +} + +html.alternative.dark-mode { + color-scheme: dark; + + --primary-color: #AF7FE4; + --primary-dark-color: #9270E4; + --primary-light-color: #4779ac; + --primary-lighter-color: #191e21; + --primary-lightest-color: #191a1c; + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #3a3246; + --side-nav-background: #171D32; + --side-nav-foreground: #F1FDFF; + --toc-background: #20142C; + --searchbar-background: var(--page-background-color); + +} \ No newline at end of file diff --git a/custom.css b/custom.css new file mode 100644 index 00000000..98aeb2a9 --- /dev/null +++ b/custom.css @@ -0,0 +1,57 @@ +.github-corner svg { + fill: var(--primary-light-color); + color: var(--page-background-color); + width: 72px; + height: 72px; +} + +@media screen and (max-width: 767px) { + .github-corner svg { + width: 50px; + height: 50px; + } + #projectnumber { + margin-right: 22px; + } +} + +.alter-theme-button { + display: inline-block; + cursor: pointer; + background: var(--primary-color); + color: var(--page-background-color) !important; + border-radius: var(--border-radius-medium); + padding: var(--spacing-small) var(--spacing-medium); + text-decoration: none; +} + +.alter-theme-button:hover { + background: var(--primary-dark-color); +} + +html.dark-mode .darkmode_inverted_image img, /* < doxygen 1.9.3 */ +html.dark-mode .darkmode_inverted_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ { + filter: brightness(89%) hue-rotate(180deg) invert(); +} + +.bordered_image { + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + display: inline-block; + overflow: hidden; +} + +html.dark-mode .bordered_image img, /* < doxygen 1.9.3 */ +html.dark-mode .bordered_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ { + border-radius: var(--border-radius-small); +} + +.title_screenshot { + filter: drop-shadow(0px 3px 10px rgba(0,0,0,0.22)); + max-width: 500px; + margin: var(--spacing-large) 0; +} + +.title_screenshot .caption { + display: none; +} diff --git a/dir_cdf9b57cf5431a39f7bd8e99218db1c2.html b/dir_cdf9b57cf5431a39f7bd8e99218db1c2.html new file mode 100644 index 00000000..98885e56 --- /dev/null +++ b/dir_cdf9b57cf5431a39f7bd8e99218db1c2.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp Directory Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mcpp Directory Reference
+
+
+
+Directory dependency graph for mcpp:
+
+
+
+ + + + + + + + + + + + + + + +

+Files

 block.h
 BlockType class.
 
 chunk.h
 
 coordinate.h
 Coordinate class.
 
 heightmap.h
 
 mcpp.h
 MinecraftConnection class.
 
+
+
+ + + + diff --git a/dir_cdf9b57cf5431a39f7bd8e99218db1c2.js b/dir_cdf9b57cf5431a39f7bd8e99218db1c2.js new file mode 100644 index 00000000..bf03fa52 --- /dev/null +++ b/dir_cdf9b57cf5431a39f7bd8e99218db1c2.js @@ -0,0 +1,8 @@ +var dir_cdf9b57cf5431a39f7bd8e99218db1c2 = +[ + [ "block.h", "block_8h.html", "block_8h" ], + [ "chunk.h", "chunk_8h.html", "chunk_8h" ], + [ "coordinate.h", "coordinate_8h.html", "coordinate_8h" ], + [ "heightmap.h", "heightmap_8h.html", "heightmap_8h" ], + [ "mcpp.h", "mcpp_8h.html", "mcpp_8h" ] +]; \ No newline at end of file diff --git a/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.map b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.map new file mode 100644 index 00000000..b4b51e81 --- /dev/null +++ b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.map @@ -0,0 +1,4 @@ + + + + diff --git a/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.md5 b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.md5 new file mode 100644 index 00000000..b24d383e --- /dev/null +++ b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.md5 @@ -0,0 +1 @@ +84bab388c3ae937b758feff3744deaa0 \ No newline at end of file diff --git a/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.svg b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.svg new file mode 100644 index 00000000..80869931 --- /dev/null +++ b/dir_cdf9b57cf5431a39f7bd8e99218db1c2_dep.svg @@ -0,0 +1,29 @@ + + + + + + +include/mcpp + +clusterdir_d44c64559bbebec7f509842c48db8b23 + + +include + + + + + +dir_cdf9b57cf5431a39f7bd8e99218db1c2 + + +mcpp + + + + + diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html new file mode 100644 index 00000000..e6096450 --- /dev/null +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + mcpp: include Directory Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
include Directory Reference
+
+
+ + + + +

+Directories

 mcpp
 
+
+
+ + + + diff --git a/dir_d44c64559bbebec7f509842c48db8b23.js b/dir_d44c64559bbebec7f509842c48db8b23.js new file mode 100644 index 00000000..79d2c908 --- /dev/null +++ b/dir_d44c64559bbebec7f509842c48db8b23.js @@ -0,0 +1,4 @@ +var dir_d44c64559bbebec7f509842c48db8b23 = +[ + [ "mcpp", "dir_cdf9b57cf5431a39f7bd8e99218db1c2.html", "dir_cdf9b57cf5431a39f7bd8e99218db1c2" ] +]; \ No newline at end of file diff --git a/doc.svg b/doc.svg new file mode 100644 index 00000000..3a3097d3 --- /dev/null +++ b/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/docd.svg b/docd.svg new file mode 100644 index 00000000..6573c27b --- /dev/null +++ b/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/doxygen-awesome-css b/doxygen-awesome-css deleted file mode 160000 index f52933b3..00000000 --- a/doxygen-awesome-css +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f52933b3dbf6d4ab796c808d80f40f0057e027a0 diff --git a/doxygen-awesome-darkmode-toggle.js b/doxygen-awesome-darkmode-toggle.js new file mode 100644 index 00000000..f60df19a --- /dev/null +++ b/doxygen-awesome-darkmode-toggle.js @@ -0,0 +1,157 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +class DoxygenAwesomeDarkModeToggle extends HTMLElement { + // SVG icons from https://fonts.google.com/icons + // Licensed under the Apache 2.0 license: + // https://www.apache.org/licenses/LICENSE-2.0.html + static lightModeIcon = `` + static darkModeIcon = `` + static title = "Toggle Light/Dark Mode" + + static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode" + static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode" + + static _staticConstructor = function() { + DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.userPreference) + // Update the color scheme when the browsers preference changes + // without user interaction on the website. + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { + DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged() + }) + // Update the color scheme when the tab is made visible again. + // It is possible that the appearance was changed in another tab + // while this tab was in the background. + document.addEventListener("visibilitychange", visibilityState => { + if (document.visibilityState === 'visible') { + DoxygenAwesomeDarkModeToggle.onSystemPreferenceChanged() + } + }); + }() + + static init() { + $(function() { + $(document).ready(function() { + const toggleButton = document.createElement('doxygen-awesome-dark-mode-toggle') + toggleButton.title = DoxygenAwesomeDarkModeToggle.title + toggleButton.updateIcon() + + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { + toggleButton.updateIcon() + }) + document.addEventListener("visibilitychange", visibilityState => { + if (document.visibilityState === 'visible') { + toggleButton.updateIcon() + } + }); + + $(document).ready(function(){ + document.getElementById("MSearchBox").parentNode.appendChild(toggleButton) + }) + $(window).resize(function(){ + document.getElementById("MSearchBox").parentNode.appendChild(toggleButton) + }) + }) + }) + } + + constructor() { + super(); + this.onclick=this.toggleDarkMode + } + + /** + * @returns `true` for dark-mode, `false` for light-mode system preference + */ + static get systemPreference() { + return window.matchMedia('(prefers-color-scheme: dark)').matches + } + + /** + * @returns `true` for dark-mode, `false` for light-mode user preference + */ + static get userPreference() { + return (!DoxygenAwesomeDarkModeToggle.systemPreference && localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey)) || + (DoxygenAwesomeDarkModeToggle.systemPreference && !localStorage.getItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey)) + } + + static set userPreference(userPreference) { + DoxygenAwesomeDarkModeToggle.darkModeEnabled = userPreference + if(!userPreference) { + if(DoxygenAwesomeDarkModeToggle.systemPreference) { + localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey, true) + } else { + localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey) + } + } else { + if(!DoxygenAwesomeDarkModeToggle.systemPreference) { + localStorage.setItem(DoxygenAwesomeDarkModeToggle.prefersDarkModeInLightModeKey, true) + } else { + localStorage.removeItem(DoxygenAwesomeDarkModeToggle.prefersLightModeInDarkModeKey) + } + } + DoxygenAwesomeDarkModeToggle.onUserPreferenceChanged() + } + + static enableDarkMode(enable) { + if(enable) { + DoxygenAwesomeDarkModeToggle.darkModeEnabled = true + document.documentElement.classList.add("dark-mode") + document.documentElement.classList.remove("light-mode") + } else { + DoxygenAwesomeDarkModeToggle.darkModeEnabled = false + document.documentElement.classList.remove("dark-mode") + document.documentElement.classList.add("light-mode") + } + } + + static onSystemPreferenceChanged() { + DoxygenAwesomeDarkModeToggle.darkModeEnabled = DoxygenAwesomeDarkModeToggle.userPreference + DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled) + } + + static onUserPreferenceChanged() { + DoxygenAwesomeDarkModeToggle.enableDarkMode(DoxygenAwesomeDarkModeToggle.darkModeEnabled) + } + + toggleDarkMode() { + DoxygenAwesomeDarkModeToggle.userPreference = !DoxygenAwesomeDarkModeToggle.userPreference + this.updateIcon() + } + + updateIcon() { + if(DoxygenAwesomeDarkModeToggle.darkModeEnabled) { + this.innerHTML = DoxygenAwesomeDarkModeToggle.darkModeIcon + } else { + this.innerHTML = DoxygenAwesomeDarkModeToggle.lightModeIcon + } + } +} + +customElements.define("doxygen-awesome-dark-mode-toggle", DoxygenAwesomeDarkModeToggle); diff --git a/doxygen-awesome-fragment-copy-button.js b/doxygen-awesome-fragment-copy-button.js new file mode 100644 index 00000000..0f7c133d --- /dev/null +++ b/doxygen-awesome-fragment-copy-button.js @@ -0,0 +1,85 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2022 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +class DoxygenAwesomeFragmentCopyButton extends HTMLElement { + constructor() { + super(); + this.onclick=this.copyContent + } + static title = "Copy to clipboard" + static copyIcon = `` + static successIcon = `` + static successDuration = 980 + static init() { + $(function() { + $(document).ready(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const fragmentWrapper = document.createElement("div") + fragmentWrapper.className = "doxygen-awesome-fragment-wrapper" + const fragmentCopyButton = document.createElement("doxygen-awesome-fragment-copy-button") + fragmentCopyButton.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon + fragmentCopyButton.title = DoxygenAwesomeFragmentCopyButton.title + + fragment.parentNode.replaceChild(fragmentWrapper, fragment) + fragmentWrapper.appendChild(fragment) + fragmentWrapper.appendChild(fragmentCopyButton) + + } + } + }) + }) + } + + + copyContent() { + const content = this.previousSibling.cloneNode(true) + // filter out line number from file listings + content.querySelectorAll(".lineno, .ttc").forEach((node) => { + node.remove() + }) + let textContent = content.textContent + // remove trailing newlines that appear in file listings + let numberOfTrailingNewlines = 0 + while(textContent.charAt(textContent.length - (numberOfTrailingNewlines + 1)) == '\n') { + numberOfTrailingNewlines++; + } + textContent = textContent.substring(0, textContent.length - numberOfTrailingNewlines) + navigator.clipboard.writeText(textContent); + this.classList.add("success") + this.innerHTML = DoxygenAwesomeFragmentCopyButton.successIcon + window.setTimeout(() => { + this.classList.remove("success") + this.innerHTML = DoxygenAwesomeFragmentCopyButton.copyIcon + }, DoxygenAwesomeFragmentCopyButton.successDuration); + } +} + +customElements.define("doxygen-awesome-fragment-copy-button", DoxygenAwesomeFragmentCopyButton) diff --git a/doxygen-awesome-interactive-toc.js b/doxygen-awesome-interactive-toc.js new file mode 100644 index 00000000..9d583bf0 --- /dev/null +++ b/doxygen-awesome-interactive-toc.js @@ -0,0 +1,91 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2022 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +class DoxygenAwesomeInteractiveToc { + static topOffset = 38 + static hideMobileMenu = true + static headers = [] + + static init() { + window.addEventListener("load", () => { + let toc = document.querySelector(".contents > .toc") + if(toc) { + toc.classList.add("interactive") + if(!DoxygenAwesomeInteractiveToc.hideMobileMenu) { + toc.classList.add("open") + } + document.querySelector(".contents > .toc > h3")?.addEventListener("click", () => { + if(toc.classList.contains("open")) { + toc.classList.remove("open") + } else { + toc.classList.add("open") + } + }) + + document.querySelectorAll(".contents > .toc > ul a").forEach((node) => { + let id = node.getAttribute("href").substring(1) + DoxygenAwesomeInteractiveToc.headers.push({ + node: node, + headerNode: document.getElementById(id) + }) + + document.getElementById("doc-content")?.addEventListener("scroll",this.throttle(DoxygenAwesomeInteractiveToc.update, 100)) + }) + DoxygenAwesomeInteractiveToc.update() + } + }) + } + + static update() { + let active = DoxygenAwesomeInteractiveToc.headers[0]?.node + DoxygenAwesomeInteractiveToc.headers.forEach((header) => { + let position = header.headerNode.getBoundingClientRect().top + header.node.classList.remove("active") + header.node.classList.remove("aboveActive") + if(position < DoxygenAwesomeInteractiveToc.topOffset) { + active = header.node + active?.classList.add("aboveActive") + } + }) + active?.classList.add("active") + active?.classList.remove("aboveActive") + } + + static throttle(func, delay) { + let lastCall = 0; + return function (...args) { + const now = new Date().getTime(); + if (now - lastCall < delay) { + return; + } + lastCall = now; + return setTimeout(() => {func(...args)}, delay); + }; + } +} diff --git a/doxygen-awesome-paragraph-link.js b/doxygen-awesome-paragraph-link.js new file mode 100644 index 00000000..083c210d --- /dev/null +++ b/doxygen-awesome-paragraph-link.js @@ -0,0 +1,51 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2022 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +class DoxygenAwesomeParagraphLink { + // Icon from https://fonts.google.com/icons + // Licensed under the Apache 2.0 license: + // https://www.apache.org/licenses/LICENSE-2.0.html + static icon = `` + static title = "Permanent Link" + static init() { + $(function() { + $(document).ready(function() { + document.querySelectorAll(".contents a.anchor[id], .contents .groupheader > a[id]").forEach((node) => { + let anchorlink = document.createElement("a") + anchorlink.setAttribute("href", `#${node.getAttribute("id")}`) + anchorlink.setAttribute("title", DoxygenAwesomeParagraphLink.title) + anchorlink.classList.add("anchorlink") + node.classList.add("anchor") + anchorlink.innerHTML = DoxygenAwesomeParagraphLink.icon + node.parentElement.appendChild(anchorlink) + }) + }) + }) + } +} diff --git a/doxygen-awesome-sidebar-only-darkmode-toggle.css b/doxygen-awesome-sidebar-only-darkmode-toggle.css new file mode 100644 index 00000000..c06260f4 --- /dev/null +++ b/doxygen-awesome-sidebar-only-darkmode-toggle.css @@ -0,0 +1,40 @@ + +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +@media screen and (min-width: 768px) { + + #MSearchBox { + width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - var(--searchbar-height) - 1px); + } + + #MSearchField { + width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 66px - var(--searchbar-height)); + } +} diff --git a/doxygen-awesome-sidebar-only.css b/doxygen-awesome-sidebar-only.css new file mode 100644 index 00000000..40988f15 --- /dev/null +++ b/doxygen-awesome-sidebar-only.css @@ -0,0 +1,116 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + */ + +html { + /* side nav width. MUST be = `TREEVIEW_WIDTH`. + * Make sure it is wide enough to contain the page title (logo + title + version) + */ + --side-nav-fixed-width: 335px; + --menu-display: none; + + --top-height: 120px; + --toc-sticky-top: -25px; + --toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 25px); +} + +#projectname { + white-space: nowrap; +} + + +@media screen and (min-width: 768px) { + html { + --searchbar-background: var(--page-background-color); + } + + #side-nav { + min-width: var(--side-nav-fixed-width); + max-width: var(--side-nav-fixed-width); + top: var(--top-height); + overflow: visible; + } + + #nav-tree, #side-nav { + height: calc(100vh - var(--top-height)) !important; + } + + #nav-tree { + padding: 0; + } + + #top { + display: block; + border-bottom: none; + height: var(--top-height); + margin-bottom: calc(0px - var(--top-height)); + max-width: var(--side-nav-fixed-width); + overflow: hidden; + background: var(--side-nav-background); + } + #main-nav { + float: left; + padding-right: 0; + } + + .ui-resizable-handle { + cursor: default; + width: 1px !important; + background: var(--separator-color); + box-shadow: 0 calc(-2 * var(--top-height)) 0 0 var(--separator-color); + } + + #nav-path { + position: fixed; + right: 0; + left: var(--side-nav-fixed-width); + bottom: 0; + width: auto; + } + + #doc-content { + height: calc(100vh - 31px) !important; + padding-bottom: calc(3 * var(--spacing-large)); + padding-top: calc(var(--top-height) - 80px); + box-sizing: border-box; + margin-left: var(--side-nav-fixed-width) !important; + } + + #MSearchBox { + width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium))); + } + + #MSearchField { + width: calc(var(--side-nav-fixed-width) - calc(2 * var(--spacing-medium)) - 65px); + } + + #MSearchResultsWindow { + left: var(--spacing-medium) !important; + right: auto; + } +} diff --git a/doxygen-awesome-tabs.js b/doxygen-awesome-tabs.js new file mode 100644 index 00000000..e9d14f84 --- /dev/null +++ b/doxygen-awesome-tabs.js @@ -0,0 +1,90 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +class DoxygenAwesomeTabs { + + static init() { + window.addEventListener("load", () => { + document.querySelectorAll(".tabbed:not(:empty)").forEach((tabbed, tabbedIndex) => { + let tabLinkList = [] + tabbed.querySelectorAll(":scope > ul > li").forEach((tab, tabIndex) => { + tab.id = "tab_" + tabbedIndex + "_" + tabIndex + let header = tab.querySelector(".tab-title") + let tabLink = document.createElement("button") + tabLink.classList.add("tab-button") + tabLink.appendChild(header) + header.title = header.textContent + tabLink.addEventListener("click", () => { + tabbed.querySelectorAll(":scope > ul > li").forEach((tab) => { + tab.classList.remove("selected") + }) + tabLinkList.forEach((tabLink) => { + tabLink.classList.remove("active") + }) + tab.classList.add("selected") + tabLink.classList.add("active") + }) + tabLinkList.push(tabLink) + if(tabIndex == 0) { + tab.classList.add("selected") + tabLink.classList.add("active") + } + }) + let tabsOverview = document.createElement("div") + tabsOverview.classList.add("tabs-overview") + let tabsOverviewContainer = document.createElement("div") + tabsOverviewContainer.classList.add("tabs-overview-container") + tabLinkList.forEach((tabLink) => { + tabsOverview.appendChild(tabLink) + }) + tabsOverviewContainer.appendChild(tabsOverview) + tabbed.before(tabsOverviewContainer) + + function resize() { + let maxTabHeight = 0 + tabbed.querySelectorAll(":scope > ul > li").forEach((tab, tabIndex) => { + let visibility = tab.style.display + tab.style.display = "block" + maxTabHeight = Math.max(tab.offsetHeight, maxTabHeight) + tab.style.display = visibility + }) + tabbed.style.height = `${maxTabHeight + 10}px` + } + + resize() + new ResizeObserver(resize).observe(tabbed) + }) + }) + + } + + static resize(tabbed) { + + } +} \ No newline at end of file diff --git a/doxygen-awesome.css b/doxygen-awesome.css new file mode 100644 index 00000000..3c111c3e --- /dev/null +++ b/doxygen-awesome.css @@ -0,0 +1,2677 @@ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2023 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +html { + /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ + --primary-color: #1779c4; + --primary-dark-color: #335c80; + --primary-light-color: #70b1e9; + + /* page base colors */ + --page-background-color: #ffffff; + --page-foreground-color: #2f4153; + --page-secondary-foreground-color: #6f7e8e; + + /* color for all separators on the website: hr, borders, ... */ + --separator-color: #dedede; + + /* border radius for all rounded components. Will affect many components, like dropdowns, memitems, codeblocks, ... */ + --border-radius-large: 8px; + --border-radius-small: 4px; + --border-radius-medium: 6px; + + /* default spacings. Most components reference these values for spacing, to provide uniform spacing on the page. */ + --spacing-small: 5px; + --spacing-medium: 10px; + --spacing-large: 16px; + + /* default box shadow used for raising an element above the normal content. Used in dropdowns, search result, ... */ + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.075); + + --odd-color: rgba(0,0,0,.028); + + /* font-families. will affect all text on the website + * font-family: the normal font for text, headlines, menus + * font-family-monospace: used for preformatted text in memtitle, code, fragments + */ + --font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; + --font-family-monospace: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + + /* font sizes */ + --page-font-size: 15.6px; + --navigation-font-size: 14.4px; + --toc-font-size: 13.4px; + --code-font-size: 14px; /* affects code, fragment */ + --title-font-size: 22px; + + /* content text properties. These only affect the page content, not the navigation or any other ui elements */ + --content-line-height: 27px; + /* The content is centered and constraint in it's width. To make the content fill the whole page, set the variable to auto.*/ + --content-maxwidth: 1050px; + --table-line-height: 24px; + --toc-sticky-top: var(--spacing-medium); + --toc-width: 200px; + --toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 85px); + + /* colors for various content boxes: @warning, @note, @deprecated @bug */ + --warning-color: #faf3d8; + --warning-color-dark: #f3a600; + --warning-color-darker: #5f4204; + --note-color: #e4f3ff; + --note-color-dark: #1879C4; + --note-color-darker: #274a5c; + --todo-color: #e4dafd; + --todo-color-dark: #5b2bdd; + --todo-color-darker: #2a0d72; + --deprecated-color: #ecf0f3; + --deprecated-color-dark: #5b6269; + --deprecated-color-darker: #43454a; + --bug-color: #f8d1cc; + --bug-color-dark: #b61825; + --bug-color-darker: #75070f; + --invariant-color: #d8f1e3; + --invariant-color-dark: #44b86f; + --invariant-color-darker: #265532; + + /* blockquote colors */ + --blockquote-background: #f8f9fa; + --blockquote-foreground: #636568; + + /* table colors */ + --tablehead-background: #f1f1f1; + --tablehead-foreground: var(--page-foreground-color); + + /* menu-display: block | none + * Visibility of the top navigation on screens >= 768px. On smaller screen the menu is always visible. + * `GENERATE_TREEVIEW` MUST be enabled! + */ + --menu-display: block; + + --menu-focus-foreground: var(--page-background-color); + --menu-focus-background: var(--primary-color); + --menu-selected-background: rgba(0,0,0,.05); + + + --header-background: var(--page-background-color); + --header-foreground: var(--page-foreground-color); + + /* searchbar colors */ + --searchbar-background: var(--side-nav-background); + --searchbar-foreground: var(--page-foreground-color); + + /* searchbar size + * (`searchbar-width` is only applied on screens >= 768px. + * on smaller screens the searchbar will always fill the entire screen width) */ + --searchbar-height: 33px; + --searchbar-width: 210px; + --searchbar-border-radius: var(--searchbar-height); + + /* code block colors */ + --code-background: #f5f5f5; + --code-foreground: var(--page-foreground-color); + + /* fragment colors */ + --fragment-background: #F8F9FA; + --fragment-foreground: #37474F; + --fragment-keyword: #bb6bb2; + --fragment-keywordtype: #8258b3; + --fragment-keywordflow: #d67c3b; + --fragment-token: #438a59; + --fragment-comment: #969696; + --fragment-link: #5383d6; + --fragment-preprocessor: #46aaa5; + --fragment-linenumber-color: #797979; + --fragment-linenumber-background: #f4f4f5; + --fragment-linenumber-border: #e3e5e7; + --fragment-lineheight: 20px; + + /* sidebar navigation (treeview) colors */ + --side-nav-background: #fbfbfb; + --side-nav-foreground: var(--page-foreground-color); + --side-nav-arrow-opacity: 0; + --side-nav-arrow-hover-opacity: 0.9; + + --toc-background: var(--side-nav-background); + --toc-foreground: var(--side-nav-foreground); + + /* height of an item in any tree / collapsible table */ + --tree-item-height: 30px; + + --memname-font-size: var(--code-font-size); + --memtitle-font-size: 18px; + + --webkit-scrollbar-size: 7px; + --webkit-scrollbar-padding: 4px; + --webkit-scrollbar-color: var(--separator-color); + + --animation-duration: .12s +} + +@media screen and (max-width: 767px) { + html { + --page-font-size: 16px; + --navigation-font-size: 16px; + --toc-font-size: 15px; + --code-font-size: 15px; /* affects code, fragment */ + --title-font-size: 22px; + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.35); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; + } +} + +/* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */ +html.dark-mode { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.30); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; +} + +body { + color: var(--page-foreground-color); + background-color: var(--page-background-color); + font-size: var(--page-font-size); +} + +body, table, div, p, dl, #nav-tree .label, .title, +.sm-dox a, .sm-dox a:hover, .sm-dox a:focus, #projectname, +.SelectItem, #MSearchField, .navpath li.navelem a, +.navpath li.navelem a:hover, p.reference, p.definition, div.toc li, div.toc h3 { + font-family: var(--font-family); +} + +h1, h2, h3, h4, h5 { + margin-top: 1em; + font-weight: 600; + line-height: initial; +} + +p, div, table, dl, p.reference, p.definition { + font-size: var(--page-font-size); +} + +p.reference, p.definition { + color: var(--page-secondary-foreground-color); +} + +a:link, a:visited, a:hover, a:focus, a:active { + color: var(--primary-color) !important; + font-weight: 500; + background: none; +} + +a.anchor { + scroll-margin-top: var(--spacing-large); + display: block; +} + +/* + Title and top navigation + */ + +#top { + background: var(--header-background); + border-bottom: 1px solid var(--separator-color); +} + +@media screen and (min-width: 768px) { + #top { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + } +} + +#main-nav { + flex-grow: 5; + padding: var(--spacing-small) var(--spacing-medium); +} + +#titlearea { + width: auto; + padding: var(--spacing-medium) var(--spacing-large); + background: none; + color: var(--header-foreground); + border-bottom: none; +} + +@media screen and (max-width: 767px) { + #titlearea { + padding-bottom: var(--spacing-small); + } +} + +#titlearea table tbody tr { + height: auto !important; +} + +#projectname { + font-size: var(--title-font-size); + font-weight: 600; +} + +#projectnumber { + font-family: inherit; + font-size: 60%; +} + +#projectbrief { + font-family: inherit; + font-size: 80%; +} + +#projectlogo { + vertical-align: middle; +} + +#projectlogo img { + max-height: calc(var(--title-font-size) * 2); + margin-right: var(--spacing-small); +} + +.sm-dox, .tabs, .tabs2, .tabs3 { + background: none; + padding: 0; +} + +.tabs, .tabs2, .tabs3 { + border-bottom: 1px solid var(--separator-color); + margin-bottom: -1px; +} + +.main-menu-btn-icon, .main-menu-btn-icon:before, .main-menu-btn-icon:after { + background: var(--page-secondary-foreground-color); +} + +@media screen and (max-width: 767px) { + .sm-dox a span.sub-arrow { + background: var(--code-background); + } + + #main-menu a.has-submenu span.sub-arrow { + color: var(--page-secondary-foreground-color); + border-radius: var(--border-radius-medium); + } + + #main-menu a.has-submenu:hover span.sub-arrow { + color: var(--page-foreground-color); + } +} + +@media screen and (min-width: 768px) { + .sm-dox li, .tablist li { + display: var(--menu-display); + } + + .sm-dox a span.sub-arrow { + border-color: var(--header-foreground) transparent transparent transparent; + } + + .sm-dox a:hover span.sub-arrow { + border-color: var(--menu-focus-foreground) transparent transparent transparent; + } + + .sm-dox ul a span.sub-arrow { + border-color: transparent transparent transparent var(--page-foreground-color); + } + + .sm-dox ul a:hover span.sub-arrow { + border-color: transparent transparent transparent var(--menu-focus-foreground); + } +} + +.sm-dox ul { + background: var(--page-background-color); + box-shadow: var(--box-shadow); + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium) !important; + padding: var(--spacing-small); + animation: ease-out 150ms slideInMenu; +} + +@keyframes slideInMenu { + from { + opacity: 0; + transform: translate(0px, -2px); + } + + to { + opacity: 1; + transform: translate(0px, 0px); + } +} + +.sm-dox ul a { + color: var(--page-foreground-color) !important; + background: var(--page-background-color); + font-size: var(--navigation-font-size); +} + +.sm-dox>li>ul:after { + border-bottom-color: var(--page-background-color) !important; +} + +.sm-dox>li>ul:before { + border-bottom-color: var(--separator-color) !important; +} + +.sm-dox ul a:hover, .sm-dox ul a:active, .sm-dox ul a:focus { + font-size: var(--navigation-font-size) !important; + color: var(--menu-focus-foreground) !important; + text-shadow: none; + background-color: var(--menu-focus-background); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a, .sm-dox a:focus, .tablist li, .tablist li a, .tablist li.current a { + text-shadow: none; + background: transparent; + background-image: none !important; + color: var(--header-foreground) !important; + font-weight: normal; + font-size: var(--navigation-font-size); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a:focus { + outline: auto; +} + +.sm-dox a:hover, .sm-dox a:active, .tablist li a:hover { + text-shadow: none; + font-weight: normal; + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; + border-radius: var(--border-radius-small) !important; + font-size: var(--navigation-font-size); +} + +.tablist li.current { + border-radius: var(--border-radius-small); + background: var(--menu-selected-background); +} + +.tablist li { + margin: var(--spacing-small) 0 var(--spacing-small) var(--spacing-small); +} + +.tablist a { + padding: 0 var(--spacing-large); +} + + +/* + Search box + */ + +#MSearchBox { + height: var(--searchbar-height); + background: var(--searchbar-background); + border-radius: var(--searchbar-border-radius); + border: 1px solid var(--separator-color); + overflow: hidden; + width: var(--searchbar-width); + position: relative; + box-shadow: none; + display: block; + margin-top: 0; +} + +/* until Doxygen 1.9.4 */ +.left img#MSearchSelect { + left: 0; + user-select: none; + padding-left: 8px; +} + +/* Doxygen 1.9.5 */ +.left span#MSearchSelect { + left: 0; + user-select: none; + margin-left: 8px; + padding: 0; +} + +.left #MSearchSelect[src$=".png"] { + padding-left: 0 +} + +.SelectionMark { + user-select: none; +} + +.tabs .left #MSearchSelect { + padding-left: 0; +} + +.tabs #MSearchBox { + position: absolute; + right: var(--spacing-medium); +} + +@media screen and (max-width: 767px) { + .tabs #MSearchBox { + position: relative; + right: 0; + margin-left: var(--spacing-medium); + margin-top: 0; + } +} + +#MSearchSelectWindow, #MSearchResultsWindow { + z-index: 9999; +} + +#MSearchBox.MSearchBoxActive { + border-color: var(--primary-color); + box-shadow: inset 0 0 0 1px var(--primary-color); +} + +#main-menu > li:last-child { + margin-right: 0; +} + +@media screen and (max-width: 767px) { + #main-menu > li:last-child { + height: 50px; + } +} + +#MSearchField { + font-size: var(--navigation-font-size); + height: calc(var(--searchbar-height) - 2px); + background: transparent; + width: calc(var(--searchbar-width) - 64px); +} + +.MSearchBoxActive #MSearchField { + color: var(--searchbar-foreground); +} + +#MSearchSelect { + top: calc(calc(var(--searchbar-height) / 2) - 11px); +} + +#MSearchBox span.left, #MSearchBox span.right { + background: none; + background-image: none; +} + +#MSearchBox span.right { + padding-top: calc(calc(var(--searchbar-height) / 2) - 12px); + position: absolute; + right: var(--spacing-small); +} + +.tabs #MSearchBox span.right { + top: calc(calc(var(--searchbar-height) / 2) - 12px); +} + +@keyframes slideInSearchResults { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } +} + +#MSearchResultsWindow { + left: auto !important; + right: var(--spacing-medium); + border-radius: var(--border-radius-large); + border: 1px solid var(--separator-color); + transform: translate(0, 20px); + box-shadow: var(--box-shadow); + animation: ease-out 280ms slideInSearchResults; + background: var(--page-background-color); +} + +iframe#MSearchResults { + margin: 4px; +} + +iframe { + color-scheme: normal; +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) iframe#MSearchResults { + filter: invert() hue-rotate(180deg); + } +} + +html.dark-mode iframe#MSearchResults { + filter: invert() hue-rotate(180deg); +} + +#MSearchResults .SRPage { + background-color: transparent; +} + +#MSearchResults .SRPage .SREntry { + font-size: 10pt; + padding: var(--spacing-small) var(--spacing-medium); +} + +#MSearchSelectWindow { + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + box-shadow: var(--box-shadow); + background: var(--page-background-color); + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); +} + +#MSearchSelectWindow a.SelectItem { + font-size: var(--navigation-font-size); + line-height: var(--content-line-height); + margin: 0 var(--spacing-small); + border-radius: var(--border-radius-small); + color: var(--page-foreground-color) !important; + font-weight: normal; +} + +#MSearchSelectWindow a.SelectItem:hover { + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; +} + +@media screen and (max-width: 767px) { + #MSearchBox { + margin-top: var(--spacing-medium); + margin-bottom: var(--spacing-medium); + width: calc(100vw - 30px); + } + + #main-menu > li:last-child { + float: none !important; + } + + #MSearchField { + width: calc(100vw - 110px); + } + + @keyframes slideInSearchResultsMobile { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } + } + + #MSearchResultsWindow { + left: var(--spacing-medium) !important; + right: var(--spacing-medium); + overflow: auto; + transform: translate(0, 20px); + animation: ease-out 280ms slideInSearchResultsMobile; + width: auto !important; + } + + /* + * Overwrites for fixing the searchbox on mobile in doxygen 1.9.2 + */ + label.main-menu-btn ~ #searchBoxPos1 { + top: 3px !important; + right: 6px !important; + left: 45px; + display: flex; + } + + label.main-menu-btn ~ #searchBoxPos1 > #MSearchBox { + margin-top: 0; + margin-bottom: 0; + flex-grow: 2; + float: left; + } +} + +/* + Tree view + */ + +#side-nav { + padding: 0 !important; + background: var(--side-nav-background); + min-width: 8px; + max-width: 50vw; +} + +@media screen and (max-width: 767px) { + #side-nav { + display: none; + } + + #doc-content { + margin-left: 0 !important; + } +} + +#nav-tree { + background: transparent; + margin-right: 1px; +} + +#nav-tree .label { + font-size: var(--navigation-font-size); +} + +#nav-tree .item { + height: var(--tree-item-height); + line-height: var(--tree-item-height); +} + +#nav-tree .item > a:focus { + outline: none; +} + +#nav-sync { + bottom: 12px; + right: 12px; + top: auto !important; + user-select: none; +} + +#nav-tree .selected { + text-shadow: none; + background-image: none; + background-color: transparent; + position: relative; +} + +#nav-tree .selected::after { + content: ""; + position: absolute; + top: 1px; + bottom: 1px; + left: 0; + width: 4px; + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + background: var(--primary-color); +} + + +#nav-tree a { + color: var(--side-nav-foreground) !important; + font-weight: normal; +} + +#nav-tree a:focus { + outline-style: auto; +} + +#nav-tree .arrow { + opacity: var(--side-nav-arrow-opacity); + background: none; +} + +.arrow { + color: inherit; + cursor: pointer; + font-size: 45%; + vertical-align: middle; + margin-right: 2px; + font-family: serif; + height: auto; + text-align: right; +} + +#nav-tree div.item:hover .arrow, #nav-tree a:focus .arrow { + opacity: var(--side-nav-arrow-hover-opacity); +} + +#nav-tree .selected a { + color: var(--primary-color) !important; + font-weight: bolder; + font-weight: 600; +} + +.ui-resizable-e { + width: 4px; + background: transparent; + box-shadow: inset -1px 0 0 0 var(--separator-color); +} + +/* + Contents + */ + +div.header { + border-bottom: 1px solid var(--separator-color); + background-color: var(--page-background-color); + background-image: none; +} + +@media screen and (min-width: 1000px) { + #doc-content > div > div.contents, + .PageDoc > div.contents { + display: flex; + flex-direction: row-reverse; + flex-wrap: nowrap; + align-items: flex-start; + } + + div.contents .textblock { + min-width: 200px; + flex-grow: 1; + } +} + +div.contents, div.header .title, div.header .summary { + max-width: var(--content-maxwidth); +} + +div.contents, div.header .title { + line-height: initial; + margin: calc(var(--spacing-medium) + .2em) auto var(--spacing-medium) auto; +} + +div.header .summary { + margin: var(--spacing-medium) auto 0 auto; +} + +div.headertitle { + padding: 0; +} + +div.header .title { + font-weight: 600; + font-size: 225%; + padding: var(--spacing-medium) var(--spacing-large); + word-break: break-word; +} + +div.header .summary { + width: auto; + display: block; + float: none; + padding: 0 var(--spacing-large); +} + +td.memSeparator { + border-color: var(--separator-color); +} + +span.mlabel { + background: var(--primary-color); + border: none; + padding: 4px 9px; + border-radius: 12px; + margin-right: var(--spacing-medium); +} + +span.mlabel:last-of-type { + margin-right: 2px; +} + +div.contents { + padding: 0 var(--spacing-large); +} + +div.contents p, div.contents li { + line-height: var(--content-line-height); +} + +div.contents div.dyncontent { + margin: var(--spacing-medium) 0; +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) div.contents div.dyncontent img, + html:not(.light-mode) div.contents center img, + html:not(.light-mode) div.contents > table img, + html:not(.light-mode) div.contents div.dyncontent iframe, + html:not(.light-mode) div.contents center iframe, + html:not(.light-mode) div.contents table iframe, + html:not(.light-mode) div.contents .dotgraph iframe { + filter: brightness(89%) hue-rotate(180deg) invert(); + } +} + +html.dark-mode div.contents div.dyncontent img, +html.dark-mode div.contents center img, +html.dark-mode div.contents > table img, +html.dark-mode div.contents div.dyncontent iframe, +html.dark-mode div.contents center iframe, +html.dark-mode div.contents table iframe, +html.dark-mode div.contents .dotgraph iframe + { + filter: brightness(89%) hue-rotate(180deg) invert(); +} + +h2.groupheader { + border-bottom: 0px; + color: var(--page-foreground-color); + box-shadow: + 100px 0 var(--page-background-color), + -100px 0 var(--page-background-color), + 100px 0.75px var(--separator-color), + -100px 0.75px var(--separator-color), + 500px 0 var(--page-background-color), + -500px 0 var(--page-background-color), + 500px 0.75px var(--separator-color), + -500px 0.75px var(--separator-color), + 900px 0 var(--page-background-color), + -900px 0 var(--page-background-color), + 900px 0.75px var(--separator-color), + -900px 0.75px var(--separator-color), + 1400px 0 var(--page-background-color), + -1400px 0 var(--page-background-color), + 1400px 0.75px var(--separator-color), + -1400px 0.75px var(--separator-color), + 1900px 0 var(--page-background-color), + -1900px 0 var(--page-background-color), + 1900px 0.75px var(--separator-color), + -1900px 0.75px var(--separator-color); +} + +blockquote { + margin: 0 var(--spacing-medium) 0 var(--spacing-medium); + padding: var(--spacing-small) var(--spacing-large); + background: var(--blockquote-background); + color: var(--blockquote-foreground); + border-left: 0; + overflow: visible; + border-radius: var(--border-radius-medium); + overflow: visible; + position: relative; +} + +blockquote::before, blockquote::after { + font-weight: bold; + font-family: serif; + font-size: 360%; + opacity: .15; + position: absolute; +} + +blockquote::before { + content: "“"; + left: -10px; + top: 4px; +} + +blockquote::after { + content: "”"; + right: -8px; + bottom: -25px; +} + +blockquote p { + margin: var(--spacing-small) 0 var(--spacing-medium) 0; +} +.paramname, .paramname em { + font-weight: 600; + color: var(--primary-dark-color); +} + +.paramname > code { + border: 0; +} + +table.params .paramname { + font-weight: 600; + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + padding-right: var(--spacing-small); + line-height: var(--table-line-height); +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--primary-light-color); +} + +.alphachar a { + color: var(--page-foreground-color); +} + +.dotgraph { + max-width: 100%; + overflow-x: scroll; +} + +.dotgraph .caption { + position: sticky; + left: 0; +} + +/* Wrap Graphviz graphs with the `interactive_dotgraph` class if `INTERACTIVE_SVG = YES` */ +.interactive_dotgraph .dotgraph iframe { + max-width: 100%; +} + +/* + Table of Contents + */ + +div.contents .toc { + max-height: var(--toc-max-height); + min-width: var(--toc-width); + border: 0; + border-left: 1px solid var(--separator-color); + border-radius: 0; + background-color: var(--page-background-color); + box-shadow: none; + position: sticky; + top: var(--toc-sticky-top); + padding: 0 var(--spacing-large); + margin: var(--spacing-small) 0 var(--spacing-large) var(--spacing-large); +} + +div.toc h3 { + color: var(--toc-foreground); + font-size: var(--navigation-font-size); + margin: var(--spacing-large) 0 var(--spacing-medium) 0; +} + +div.toc li { + padding: 0; + background: none; + line-height: var(--toc-font-size); + margin: var(--toc-font-size) 0 0 0; +} + +div.toc li::before { + display: none; +} + +div.toc ul { + margin-top: 0 +} + +div.toc li a { + font-size: var(--toc-font-size); + color: var(--page-foreground-color) !important; + text-decoration: none; +} + +div.toc li a:hover, div.toc li a.active { + color: var(--primary-color) !important; +} + +div.toc li a.aboveActive { + color: var(--page-secondary-foreground-color) !important; +} + + +@media screen and (max-width: 999px) { + div.contents .toc { + max-height: 45vh; + float: none; + width: auto; + margin: 0 0 var(--spacing-medium) 0; + position: relative; + top: 0; + position: relative; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + background-color: var(--toc-background); + box-shadow: var(--box-shadow); + } + + div.contents .toc.interactive { + max-height: calc(var(--navigation-font-size) + 2 * var(--spacing-large)); + overflow: hidden; + } + + div.contents .toc > h3 { + -webkit-tap-highlight-color: transparent; + cursor: pointer; + position: sticky; + top: 0; + background-color: var(--toc-background); + margin: 0; + padding: var(--spacing-large) 0; + display: block; + } + + div.contents .toc.interactive > h3::before { + content: ""; + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + display: inline-block; + margin-right: var(--spacing-small); + margin-bottom: calc(var(--navigation-font-size) / 4); + transform: rotate(-90deg); + transition: transform var(--animation-duration) ease-out; + } + + div.contents .toc.interactive.open > h3::before { + transform: rotate(0deg); + } + + div.contents .toc.interactive.open { + max-height: 45vh; + overflow: auto; + transition: max-height 0.2s ease-in-out; + } + + div.contents .toc a, div.contents .toc a.active { + color: var(--primary-color) !important; + } + + div.contents .toc a:hover { + text-decoration: underline; + } +} + +/* + Code & Fragments + */ + +code, div.fragment, pre.fragment { + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + overflow: hidden; +} + +code { + display: inline; + background: var(--code-background); + color: var(--code-foreground); + padding: 2px 6px; +} + +div.fragment, pre.fragment { + margin: var(--spacing-medium) 0; + padding: calc(var(--spacing-large) - (var(--spacing-large) / 6)) var(--spacing-large); + background: var(--fragment-background); + color: var(--fragment-foreground); + overflow-x: auto; +} + +@media screen and (max-width: 767px) { + div.fragment, pre.fragment { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + } + + .contents > div.fragment, + .textblock > div.fragment, + .textblock > pre.fragment, + .textblock > .tabbed > ul > li > div.fragment, + .textblock > .tabbed > ul > li > pre.fragment, + .contents > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > pre.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + border-radius: 0; + border-left: 0; + } + + .textblock li > .fragment, + .textblock li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + } + + .memdoc li > .fragment, + .memdoc li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + } + + .textblock ul, .memdoc ul { + overflow: initial; + } + + .memdoc > div.fragment, + .memdoc > pre.fragment, + dl dd > div.fragment, + dl dd pre.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > div.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > pre.fragment, + dl dd > .doxygen-awesome-fragment-wrapper > div.fragment, + dl dd .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + border-radius: 0; + border-left: 0; + } +} + +code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size) !important; +} + +div.line:after { + margin-right: var(--spacing-medium); +} + +div.fragment .line, pre.fragment { + white-space: pre; + word-wrap: initial; + line-height: var(--fragment-lineheight); +} + +div.fragment span.keyword { + color: var(--fragment-keyword); +} + +div.fragment span.keywordtype { + color: var(--fragment-keywordtype); +} + +div.fragment span.keywordflow { + color: var(--fragment-keywordflow); +} + +div.fragment span.stringliteral { + color: var(--fragment-token) +} + +div.fragment span.comment { + color: var(--fragment-comment); +} + +div.fragment a.code { + color: var(--fragment-link) !important; +} + +div.fragment span.preprocessor { + color: var(--fragment-preprocessor); +} + +div.fragment span.lineno { + display: inline-block; + width: 27px; + border-right: none; + background: var(--fragment-linenumber-background); + color: var(--fragment-linenumber-color); +} + +div.fragment span.lineno a { + background: none; + color: var(--fragment-link) !important; +} + +div.fragment > .line:first-child .lineno { + box-shadow: -999999px 0px 0 999999px var(--fragment-linenumber-background), -999998px 0px 0 999999px var(--fragment-linenumber-border); + background-color: var(--fragment-linenumber-background) !important; +} + +div.line { + border-radius: var(--border-radius-small); +} + +div.line.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +/* + dl warning, attention, note, deprecated, bug, ... + */ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, dl.invariant, dl.pre, dl.post, dl.todo, dl.remark { + padding: var(--spacing-medium); + margin: var(--spacing-medium) 0; + color: var(--page-background-color); + overflow: hidden; + margin-left: 0; + border-radius: var(--border-radius-small); +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention { + background: var(--warning-color); + border-left: 8px solid var(--warning-color-dark); + color: var(--warning-color-darker); +} + +dl.warning dt, dl.attention dt { + color: var(--warning-color-dark); +} + +dl.note, dl.remark { + background: var(--note-color); + border-left: 8px solid var(--note-color-dark); + color: var(--note-color-darker); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-dark); +} + +dl.todo { + background: var(--todo-color); + border-left: 8px solid var(--todo-color-dark); + color: var(--todo-color-darker); +} + +dl.todo dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug { + background: var(--bug-color); + border-left: 8px solid var(--bug-color-dark); + color: var(--bug-color-darker); +} + +dl.bug dt a { + color: var(--bug-color-dark) !important; +} + +dl.deprecated { + background: var(--deprecated-color); + border-left: 8px solid var(--deprecated-color-dark); + color: var(--deprecated-color-darker); +} + +dl.deprecated dt a { + color: var(--deprecated-color-dark) !important; +} + +dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color); + border-left: 8px solid var(--invariant-color-dark); + color: var(--invariant-color-darker); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-dark); +} + +/* + memitem + */ + +div.memdoc, div.memproto, h2.memtitle { + box-shadow: none; + background-image: none; + border: none; +} + +div.memdoc { + padding: 0 var(--spacing-medium); + background: var(--page-background-color); +} + +h2.memtitle, div.memitem { + border: 1px solid var(--separator-color); + box-shadow: var(--box-shadow); +} + +h2.memtitle { + box-shadow: 0px var(--spacing-medium) 0 -1px var(--fragment-background), var(--box-shadow); +} + +div.memitem { + transition: none; +} + +div.memproto, h2.memtitle { + background: var(--fragment-background); +} + +h2.memtitle { + font-weight: 500; + font-size: var(--memtitle-font-size); + font-family: var(--font-family-monospace); + border-bottom: none; + border-top-left-radius: var(--border-radius-medium); + border-top-right-radius: var(--border-radius-medium); + word-break: break-all; + position: relative; +} + +h2.memtitle:after { + content: ""; + display: block; + background: var(--fragment-background); + height: var(--spacing-medium); + bottom: calc(0px - var(--spacing-medium)); + left: 0; + right: -14px; + position: absolute; + border-top-right-radius: var(--border-radius-medium); +} + +h2.memtitle > span.permalink { + font-size: inherit; +} + +h2.memtitle > span.permalink > a { + text-decoration: none; + padding-left: 3px; + margin-right: -4px; + user-select: none; + display: inline-block; + margin-top: -6px; +} + +h2.memtitle > span.permalink > a:hover { + color: var(--primary-dark-color) !important; +} + +a:target + h2.memtitle, a:target + h2.memtitle + div.memitem { + border-color: var(--primary-light-color); +} + +div.memitem { + border-top-right-radius: var(--border-radius-medium); + border-bottom-right-radius: var(--border-radius-medium); + border-bottom-left-radius: var(--border-radius-medium); + overflow: hidden; + display: block !important; +} + +div.memdoc { + border-radius: 0; +} + +div.memproto { + border-radius: 0 var(--border-radius-small) 0 0; + overflow: auto; + border-bottom: 1px solid var(--separator-color); + padding: var(--spacing-medium); + margin-bottom: -1px; +} + +div.memtitle { + border-top-right-radius: var(--border-radius-medium); + border-top-left-radius: var(--border-radius-medium); +} + +div.memproto table.memname { + font-family: var(--font-family-monospace); + color: var(--page-foreground-color); + font-size: var(--memname-font-size); + text-shadow: none; +} + +div.memproto div.memtemplate { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--memname-font-size); + margin-left: 2px; + text-shadow: none; +} + +table.mlabels, table.mlabels > tbody { + display: block; +} + +td.mlabels-left { + width: auto; +} + +td.mlabels-right { + margin-top: 3px; + position: sticky; + left: 0; +} + +table.mlabels > tbody > tr:first-child { + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + +.memname, .memitem span.mlabels { + margin: 0 +} + +/* + reflist + */ + +dl.reflist { + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-medium); + border: 1px solid var(--separator-color); + overflow: hidden; + padding: 0; +} + + +dl.reflist dt, dl.reflist dd { + box-shadow: none; + text-shadow: none; + background-image: none; + border: none; + padding: 12px; +} + + +dl.reflist dt { + font-weight: 500; + border-radius: 0; + background: var(--code-background); + border-bottom: 1px solid var(--separator-color); + color: var(--page-foreground-color) +} + + +dl.reflist dd { + background: none; +} + +/* + Table + */ + +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname), +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: inline-block; + max-width: 100%; +} + +.contents > table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname):not(.classindex) { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); +} + +table.fieldtable, +table.markdownTable tbody, +table.doxtable tbody { + border: none; + margin: var(--spacing-medium) 0; + box-shadow: 0 0 0 1px var(--separator-color); + border-radius: var(--border-radius-small); +} + +table.markdownTable, table.doxtable, table.fieldtable { + padding: 1px; +} + +table.doxtable caption { + display: block; +} + +table.fieldtable { + border-collapse: collapse; + width: 100%; +} + +th.markdownTableHeadLeft, +th.markdownTableHeadRight, +th.markdownTableHeadCenter, +th.markdownTableHeadNone, +table.doxtable th { + background: var(--tablehead-background); + color: var(--tablehead-foreground); + font-weight: 600; + font-size: var(--page-font-size); +} + +th.markdownTableHeadLeft:first-child, +th.markdownTableHeadRight:first-child, +th.markdownTableHeadCenter:first-child, +th.markdownTableHeadNone:first-child, +table.doxtable tr th:first-child { + border-top-left-radius: var(--border-radius-small); +} + +th.markdownTableHeadLeft:last-child, +th.markdownTableHeadRight:last-child, +th.markdownTableHeadCenter:last-child, +th.markdownTableHeadNone:last-child, +table.doxtable tr th:last-child { + border-top-right-radius: var(--border-radius-small); +} + +table.markdownTable td, +table.markdownTable th, +table.fieldtable td, +table.fieldtable th, +table.doxtable td, +table.doxtable th { + border: 1px solid var(--separator-color); + padding: var(--spacing-small) var(--spacing-medium); +} + +table.markdownTable td:last-child, +table.markdownTable th:last-child, +table.fieldtable td:last-child, +table.fieldtable th:last-child, +table.doxtable td:last-child, +table.doxtable th:last-child { + border-right: none; +} + +table.markdownTable td:first-child, +table.markdownTable th:first-child, +table.fieldtable td:first-child, +table.fieldtable th:first-child, +table.doxtable td:first-child, +table.doxtable th:first-child { + border-left: none; +} + +table.markdownTable tr:first-child td, +table.markdownTable tr:first-child th, +table.fieldtable tr:first-child td, +table.fieldtable tr:first-child th, +table.doxtable tr:first-child td, +table.doxtable tr:first-child th { + border-top: none; +} + +table.markdownTable tr:last-child td, +table.markdownTable tr:last-child th, +table.fieldtable tr:last-child td, +table.fieldtable tr:last-child th, +table.doxtable tr:last-child td, +table.doxtable tr:last-child th { + border-bottom: none; +} + +table.markdownTable tr, table.doxtable tr { + border-bottom: 1px solid var(--separator-color); +} + +table.markdownTable tr:last-child, table.doxtable tr:last-child { + border-bottom: none; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) { + display: block; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: table; + width: 100%; +} + +table.fieldtable th { + font-size: var(--page-font-size); + font-weight: 600; + background-image: none; + background-color: var(--tablehead-background); + color: var(--tablehead-foreground); +} + +table.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fielddoc, .fieldtable th { + border-bottom: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); +} + +table.fieldtable tr:last-child td:first-child { + border-bottom-left-radius: var(--border-radius-small); +} + +table.fieldtable tr:last-child td:last-child { + border-bottom-right-radius: var(--border-radius-small); +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +table.memberdecls { + display: block; + -webkit-tap-highlight-color: transparent; +} + +table.memberdecls tr[class^='memitem'] { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); +} + +table.memberdecls tr[class^='memitem'] .memTemplParams { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + color: var(--primary-dark-color); + white-space: normal; +} + +table.memberdecls .memItemLeft, +table.memberdecls .memItemRight, +table.memberdecls .memTemplItemLeft, +table.memberdecls .memTemplItemRight, +table.memberdecls .memTemplParams { + transition: none; + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + background-color: var(--fragment-background); +} + +table.memberdecls .memTemplItemLeft, +table.memberdecls .memTemplItemRight { + padding-top: 2px; +} + +table.memberdecls .memTemplParams { + border-bottom: 0; + border-left: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + padding-bottom: var(--spacing-small); +} + +table.memberdecls .memTemplItemLeft { + border-radius: 0 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + border-top: 0; +} + +table.memberdecls .memTemplItemRight { + border-radius: 0 0 var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-left: 0; + border-top: 0; +} + +table.memberdecls .memItemLeft { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + padding-left: var(--spacing-medium); + padding-right: 0; +} + +table.memberdecls .memItemRight { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-right: var(--spacing-medium); + padding-left: 0; + +} + +table.memberdecls .mdescLeft, table.memberdecls .mdescRight { + background: none; + color: var(--page-foreground-color); + padding: var(--spacing-small) 0; +} + +table.memberdecls .memItemLeft, +table.memberdecls .memTemplItemLeft { + padding-right: var(--spacing-medium); +} + +table.memberdecls .memSeparator { + background: var(--page-background-color); + height: var(--spacing-large); + border: 0; + transition: none; +} + +table.memberdecls .groupheader { + margin-bottom: var(--spacing-large); +} + +table.memberdecls .inherit_header td { + padding: 0 0 var(--spacing-medium) 0; + text-indent: -12px; + color: var(--page-secondary-foreground-color); +} + +table.memberdecls img[src="closed.png"], +table.memberdecls img[src="open.png"], +div.dynheader img[src="open.png"], +div.dynheader img[src="closed.png"] { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + margin-top: 8px; + display: block; + float: left; + margin-left: -10px; + transition: transform var(--animation-duration) ease-out; +} + +table.memberdecls img { + margin-right: 10px; +} + +table.memberdecls img[src="closed.png"], +div.dynheader img[src="closed.png"] { + transform: rotate(-90deg); + +} + +.compoundTemplParams { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--code-font-size); +} + +@media screen and (max-width: 767px) { + + table.memberdecls .memItemLeft, + table.memberdecls .memItemRight, + table.memberdecls .mdescLeft, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemLeft, + table.memberdecls .memTemplItemRight, + table.memberdecls .memTemplParams { + display: block; + text-align: left; + padding-left: var(--spacing-large); + margin: 0 calc(0px - var(--spacing-large)) 0 calc(0px - var(--spacing-large)); + border-right: none; + border-left: none; + border-radius: 0; + white-space: normal; + } + + table.memberdecls .memItemLeft, + table.memberdecls .mdescLeft, + table.memberdecls .memTemplItemLeft { + border-bottom: 0; + padding-bottom: 0; + } + + table.memberdecls .memTemplItemLeft { + padding-top: 0; + } + + table.memberdecls .mdescLeft { + margin-bottom: calc(0px - var(--page-font-size)); + } + + table.memberdecls .memItemRight, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemRight { + border-top: 0; + padding-top: 0; + padding-right: var(--spacing-large); + overflow-x: auto; + } + + table.memberdecls tr[class^='memitem']:not(.inherit) { + display: block; + width: calc(100vw - 2 * var(--spacing-large)); + } + + table.memberdecls .mdescRight { + color: var(--page-foreground-color); + } + + table.memberdecls tr.inherit { + visibility: hidden; + } + + table.memberdecls tr[style="display: table-row;"] { + display: block !important; + visibility: visible; + width: calc(100vw - 2 * var(--spacing-large)); + animation: fade .5s; + } + + @keyframes fade { + 0% { + opacity: 0; + max-height: 0; + } + + 100% { + opacity: 1; + max-height: 200px; + } + } +} + + +/* + Horizontal Rule + */ + +hr { + margin-top: var(--spacing-large); + margin-bottom: var(--spacing-large); + height: 1px; + background-color: var(--separator-color); + border: 0; +} + +.contents hr { + box-shadow: 100px 0 var(--separator-color), + -100px 0 var(--separator-color), + 500px 0 var(--separator-color), + -500px 0 var(--separator-color), + 900px 0 var(--separator-color), + -900px 0 var(--separator-color), + 1400px 0 var(--separator-color), + -1400px 0 var(--separator-color), + 1900px 0 var(--separator-color), + -1900px 0 var(--separator-color); +} + +.contents img, .contents .center, .contents center, .contents div.image object { + max-width: 100%; + overflow: auto; +} + +@media screen and (max-width: 767px) { + .contents .dyncontent > .center, .contents > center { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); + } +} + +/* + Directories + */ +div.directory { + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + width: auto; +} + +table.directory { + font-family: var(--font-family); + font-size: var(--page-font-size); + font-weight: normal; + width: 100%; +} + +table.directory td.entry, table.directory td.desc { + padding: calc(var(--spacing-small) / 2) var(--spacing-small); + line-height: var(--table-line-height); +} + +table.directory tr.even td:last-child { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; +} + +table.directory tr.even td:first-child { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); +} + +table.directory tr.even:last-child td:last-child { + border-radius: 0 var(--border-radius-small) 0 0; +} + +table.directory tr.even:last-child td:first-child { + border-radius: var(--border-radius-small) 0 0 0; +} + +table.directory td.desc { + min-width: 250px; +} + +table.directory tr.even { + background-color: var(--odd-color); +} + +table.directory tr.odd { + background-color: transparent; +} + +.icona { + width: auto; + height: auto; + margin: 0 var(--spacing-small); +} + +.icon { + background: var(--primary-color); + border-radius: var(--border-radius-small); + font-size: var(--page-font-size); + padding: calc(var(--page-font-size) / 5); + line-height: var(--page-font-size); + transform: scale(0.8); + height: auto; + width: var(--page-font-size); + user-select: none; +} + +.iconfopen, .icondoc, .iconfclosed { + background-position: center; + margin-bottom: 0; + height: var(--table-line-height); +} + +.icondoc { + filter: saturate(0.2); +} + +@media screen and (max-width: 767px) { + div.directory { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) .iconfopen, html:not(.light-mode) .iconfclosed { + filter: hue-rotate(180deg) invert(); + } +} + +html.dark-mode .iconfopen, html.dark-mode .iconfclosed { + filter: hue-rotate(180deg) invert(); +} + +/* + Class list + */ + +.classindex dl.odd { + background: var(--odd-color); + border-radius: var(--border-radius-small); +} + +.classindex dl.even { + background-color: transparent; +} + +/* + Class Index Doxygen 1.8 +*/ + +table.classindex { + margin-left: 0; + margin-right: 0; + width: 100%; +} + +table.classindex table div.ah { + background-image: none; + background-color: initial; + border-color: var(--separator-color); + color: var(--page-foreground-color); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-large); + padding: var(--spacing-small); +} + +div.qindex { + background-color: var(--odd-color); + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + padding: var(--spacing-small) 0; +} + +/* + Footer and nav-path + */ + +#nav-path { + width: 100%; +} + +#nav-path ul { + background-image: none; + background: var(--page-background-color); + border: none; + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + border-bottom: 0; + box-shadow: 0 0.75px 0 var(--separator-color); + font-size: var(--navigation-font-size); +} + +img.footer { + width: 60px; +} + +.navpath li.footer { + color: var(--page-secondary-foreground-color); +} + +address.footer { + color: var(--page-secondary-foreground-color); + margin-bottom: var(--spacing-large); +} + +#nav-path li.navelem { + background-image: none; + display: flex; + align-items: center; +} + +.navpath li.navelem a { + text-shadow: none; + display: inline-block; + color: var(--primary-color) !important; +} + +.navpath li.navelem b { + color: var(--primary-dark-color); + font-weight: 500; +} + +li.navelem { + padding: 0; + margin-left: -8px; +} + +li.navelem:first-child { + margin-left: var(--spacing-large); +} + +li.navelem:first-child:before { + display: none; +} + +#nav-path li.navelem:after { + content: ''; + border: 5px solid var(--page-background-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(4.2); + z-index: 10; + margin-left: 6px; +} + +#nav-path li.navelem:before { + content: ''; + border: 5px solid var(--separator-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(3.2); + margin-right: var(--spacing-small); +} + +.navpath li.navelem a:hover { + color: var(--primary-color); +} + +/* + Scrollbars for Webkit +*/ + +#nav-tree::-webkit-scrollbar, +div.fragment::-webkit-scrollbar, +pre.fragment::-webkit-scrollbar, +div.memproto::-webkit-scrollbar, +.contents center::-webkit-scrollbar, +.contents .center::-webkit-scrollbar, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar, +div.contents .toc::-webkit-scrollbar, +.contents .dotgraph::-webkit-scrollbar, +.contents .tabs-overview-container::-webkit-scrollbar { + background: transparent; + width: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + height: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); +} + +#nav-tree::-webkit-scrollbar-thumb, +div.fragment::-webkit-scrollbar-thumb, +pre.fragment::-webkit-scrollbar-thumb, +div.memproto::-webkit-scrollbar-thumb, +.contents center::-webkit-scrollbar-thumb, +.contents .center::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-thumb, +div.contents .toc::-webkit-scrollbar-thumb, +.contents .dotgraph::-webkit-scrollbar-thumb, +.contents .tabs-overview-container::-webkit-scrollbar-thumb { + background-color: transparent; + border: var(--webkit-scrollbar-padding) solid transparent; + border-radius: calc(var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + background-clip: padding-box; +} + +#nav-tree:hover::-webkit-scrollbar-thumb, +div.fragment:hover::-webkit-scrollbar-thumb, +pre.fragment:hover::-webkit-scrollbar-thumb, +div.memproto:hover::-webkit-scrollbar-thumb, +.contents center:hover::-webkit-scrollbar-thumb, +.contents .center:hover::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody:hover::-webkit-scrollbar-thumb, +div.contents .toc:hover::-webkit-scrollbar-thumb, +.contents .dotgraph:hover::-webkit-scrollbar-thumb, +.contents .tabs-overview-container:hover::-webkit-scrollbar-thumb { + background-color: var(--webkit-scrollbar-color); +} + +#nav-tree::-webkit-scrollbar-track, +div.fragment::-webkit-scrollbar-track, +pre.fragment::-webkit-scrollbar-track, +div.memproto::-webkit-scrollbar-track, +.contents center::-webkit-scrollbar-track, +.contents .center::-webkit-scrollbar-track, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-track, +div.contents .toc::-webkit-scrollbar-track, +.contents .dotgraph::-webkit-scrollbar-track, +.contents .tabs-overview-container::-webkit-scrollbar-track { + background: transparent; +} + +#nav-tree::-webkit-scrollbar-corner { + background-color: var(--side-nav-background); +} + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc { + overflow-x: auto; + overflow-x: overlay; +} + +#nav-tree { + overflow-x: auto; + overflow-y: auto; + overflow-y: overlay; +} + +/* + Scrollbars for Firefox +*/ + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc, +.contents .dotgraph, +.contents .tabs-overview-container { + scrollbar-width: thin; +} + +/* + Optional Dark mode toggle button +*/ + +doxygen-awesome-dark-mode-toggle { + display: inline-block; + margin: 0 0 0 var(--spacing-small); + padding: 0; + width: var(--searchbar-height); + height: var(--searchbar-height); + background: none; + border: none; + border-radius: var(--searchbar-height); + vertical-align: middle; + text-align: center; + line-height: var(--searchbar-height); + font-size: 22px; + display: flex; + align-items: center; + justify-content: center; + user-select: none; + cursor: pointer; +} + +doxygen-awesome-dark-mode-toggle > svg { + transition: transform var(--animation-duration) ease-in-out; +} + +doxygen-awesome-dark-mode-toggle:active > svg { + transform: scale(.5); +} + +doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.03); +} + +html.dark-mode doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.18); +} + +/* + Optional fragment copy button +*/ +.doxygen-awesome-fragment-wrapper { + position: relative; +} + +doxygen-awesome-fragment-copy-button { + opacity: 0; + background: var(--fragment-background); + width: 28px; + height: 28px; + position: absolute; + right: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + top: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + border: 1px solid var(--fragment-foreground); + cursor: pointer; + border-radius: var(--border-radius-small); + display: flex; + justify-content: center; + align-items: center; +} + +.doxygen-awesome-fragment-wrapper:hover doxygen-awesome-fragment-copy-button, doxygen-awesome-fragment-copy-button.success { + opacity: .28; +} + +doxygen-awesome-fragment-copy-button:hover, doxygen-awesome-fragment-copy-button.success { + opacity: 1 !important; +} + +doxygen-awesome-fragment-copy-button:active:not([class~=success]) svg { + transform: scale(.91); +} + +doxygen-awesome-fragment-copy-button svg { + fill: var(--fragment-foreground); + width: 18px; + height: 18px; +} + +doxygen-awesome-fragment-copy-button.success svg { + fill: rgb(14, 168, 14); +} + +doxygen-awesome-fragment-copy-button.success { + border-color: rgb(14, 168, 14); +} + +@media screen and (max-width: 767px) { + .textblock > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .textblock li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + dl dd > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button { + right: 0; + } +} + +/* + Optional paragraph link button +*/ + +a.anchorlink { + font-size: 90%; + margin-left: var(--spacing-small); + color: var(--page-foreground-color) !important; + text-decoration: none; + opacity: .15; + display: none; + transition: opacity var(--animation-duration) ease-in-out, color var(--animation-duration) ease-in-out; +} + +a.anchorlink svg { + fill: var(--page-foreground-color); +} + +h3 a.anchorlink svg, h4 a.anchorlink svg { + margin-bottom: -3px; + margin-top: -4px; +} + +a.anchorlink:hover { + opacity: .45; +} + +h2:hover a.anchorlink, h1:hover a.anchorlink, h3:hover a.anchorlink, h4:hover a.anchorlink { + display: inline-block; +} + +/* + Optional tab feature +*/ + +.tabbed > ul { + padding-inline-start: 0px; + margin: 0; + padding: var(--spacing-small) 0; +} + +.tabbed > ul > li { + display: none; +} + +.tabbed > ul > li.selected { + display: block; +} + +.tabs-overview-container { + overflow-x: auto; + display: block; + overflow-y: visible; +} + +.tabs-overview { + border-bottom: 1px solid var(--separator-color); + display: flex; + flex-direction: row; +} + +@media screen and (max-width: 767px) { + .tabs-overview-container { + margin: 0 calc(0px - var(--spacing-large)); + } + .tabs-overview { + padding: 0 var(--spacing-large) + } +} + +.tabs-overview button.tab-button { + color: var(--page-foreground-color); + margin: 0; + border: none; + background: transparent; + padding: calc(var(--spacing-large) / 2) 0; + display: inline-block; + font-size: var(--page-font-size); + cursor: pointer; + box-shadow: 0 1px 0 0 var(--separator-color); + position: relative; + + -webkit-tap-highlight-color: transparent; +} + +.tabs-overview button.tab-button .tab-title::before { + display: block; + content: attr(title); + font-weight: 600; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.tabs-overview button.tab-button .tab-title { + float: left; + white-space: nowrap; + font-weight: normal; + padding: calc(var(--spacing-large) / 2) var(--spacing-large); + border-radius: var(--border-radius-medium); + transition: background-color var(--animation-duration) ease-in-out, font-weight var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button:not(:last-child) .tab-title { + box-shadow: 8px 0 0 -7px var(--separator-color); +} + +.tabs-overview button.tab-button:hover .tab-title { + background: var(--separator-color); + box-shadow: none; +} + +.tabs-overview button.tab-button.active .tab-title { + font-weight: 600; +} + +.tabs-overview button.tab-button::after { + content: ''; + display: block; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 0; + width: 0%; + margin: 0 auto; + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + background-color: var(--primary-color); + transition: width var(--animation-duration) ease-in-out, height var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button.active::after { + width: 100%; + box-sizing: border-box; + height: 3px; +} + + +/* + Navigation Buttons +*/ + +.section_buttons:not(:empty) { + margin-top: calc(var(--spacing-large) * 3); +} + +.section_buttons table.markdownTable { + display: block; + width: 100%; +} + +.section_buttons table.markdownTable tbody { + display: table !important; + width: 100%; + box-shadow: none; + border-spacing: 10px; +} + +.section_buttons table.markdownTable td { + padding: 0; +} + +.section_buttons table.markdownTable th { + display: none; +} + +.section_buttons table.markdownTable tr.markdownTableHead { + border: none; +} + +.section_buttons tr th, .section_buttons tr td { + background: none; + border: none; + padding: var(--spacing-large) 0 var(--spacing-small); +} + +.section_buttons a { + display: inline-block; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + color: var(--page-secondary-foreground-color) !important; + text-decoration: none; + transition: color var(--animation-duration) ease-in-out, background-color var(--animation-duration) ease-in-out; +} + +.section_buttons a:hover { + color: var(--page-foreground-color) !important; + background-color: var(--odd-color); +} + +.section_buttons tr td.markdownTableBodyLeft a { + padding: var(--spacing-medium) var(--spacing-large) var(--spacing-medium) calc(var(--spacing-large) / 2); +} + +.section_buttons tr td.markdownTableBodyRight a { + padding: var(--spacing-medium) calc(var(--spacing-large) / 2) var(--spacing-medium) var(--spacing-large); +} + +.section_buttons tr td.markdownTableBodyLeft a::before, +.section_buttons tr td.markdownTableBodyRight a::after { + color: var(--page-secondary-foreground-color) !important; + display: inline-block; + transition: color .08s ease-in-out, transform .09s ease-in-out; +} + +.section_buttons tr td.markdownTableBodyLeft a::before { + content: '〈'; + padding-right: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyRight a::after { + content: '〉'; + padding-left: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyLeft a:hover::before { + color: var(--page-foreground-color) !important; + transform: translateX(-3px); +} + +.section_buttons tr td.markdownTableBodyRight a:hover::after { + color: var(--page-foreground-color) !important; + transform: translateX(3px); +} + +@media screen and (max-width: 450px) { + .section_buttons a { + width: 100%; + box-sizing: border-box; + } + + .section_buttons tr td:nth-of-type(1).markdownTableBodyLeft a { + border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium); + border-right: none; + } + + .section_buttons tr td:nth-of-type(2).markdownTableBodyRight a { + border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0; + } +} diff --git a/doxygen.css b/doxygen.css new file mode 100644 index 00000000..181e2886 --- /dev/null +++ b/doxygen.css @@ -0,0 +1,1685 @@ +/* The standard CSS for doxygen 1.9.8*/ + +body { + background-color: white; + color: black; +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: Roboto,sans-serif; + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-weight: 400; + font-size: 14px; + font-family: Roboto,sans-serif; + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid #1F92FF; + color: #003B72; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: white; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: white; +} + +.classindex dl.odd { + background-color: #F1F8FF; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #004789; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #0057A9; +} + +a:hover { + text-decoration: underline; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #0057A9; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #0057A9; +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #8DC8FF; + background-color: #F8FBFF; + color: black; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + color: black; + background-color: #F8FBFF; + border: 1px solid #8DC8FF; +} + +div.line { + font-family: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid #00FF00; + color: black; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: #0057A9; + background-color: #D8D8D8; +} + +span.lineno a:hover { + color: #0057A9; + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: 104px; +} + +.compoundTemplParams { + color: #0057A9; + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000; +} + +span.keywordtype { + color: #604020; +} + +span.keywordflow { + color: #E08000; +} + +span.comment { + color: #800000; +} + +span.preprocessor { + color: #806020; +} + +span.stringliteral { + color: #002080; +} + +span.charliteral { + color: #008080; +} + +span.xmlcdata { + color: black; +} + +span.vhdldigit { + color: #FF00FF; +} + +span.vhdlchar { + color: #000000; +} + +span.vhdlkeyword { + color: #700070; +} + +span.vhdllogic { + color: #FF0000; +} + +blockquote { + background-color: #EFF7FF; + border-left: 2px solid #43A4FF; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #002E5A; +} + +th.dirtab { + background-color: #003E78; + color: #FFFFFF; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #005DB5; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F3F9FE; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #BDDFFF; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #0057A9; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #59AEFF; + border-left: 1px solid #59AEFF; + border-right: 1px solid #59AEFF; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #C6E3FE; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #0057A9; + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #59AEFF; + border-left: 1px solid #59AEFF; + border-right: 1px solid #59AEFF; + padding: 6px 0px 6px 0px; + color: #002344; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #C0E0FF; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #59AEFF; + border-left: 1px solid #59AEFF; + border-right: 1px solid #59AEFF; + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: white; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #0081FA; + border-top:1px solid #0067C9; + border-left:1px solid #0067C9; + border-right:1px solid #8DC8FF; + border-bottom:1px solid #8DC8FF; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #43A4FF; + border-bottom: 1px solid #43A4FF; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: #F1F8FF; +} + +.directory tr.even { + padding-left: 6px; + background-color: white; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #004789; +} + +.arrow { + color: #43A4FF; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial,Helvetica; + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #0081FA; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.svg'); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.svg'); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.svg'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #002A52; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #002E5A; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #003E78; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid #59AEFF; + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #59AEFF; + border-bottom: 1px solid #59AEFF; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #59AEFF; +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: url('nav_f.png'); + background-repeat:repeat-x; + background-color: #C6E3FE; + font-size: 90%; + color: #002344; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #59AEFF; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#00274D; + border:solid 1px #88C5FF; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #003C74; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #00274D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: white; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: #002A52; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F3F9FE; + margin: 0px; + border-bottom: 1px solid #8DC8FF; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: Tahoma,Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font-size: 90%; + font-family: Tahoma,Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% Tahoma,Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #0067C9; + background-color: white; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#00376A; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #EAF5FE; + border: 1px solid #B2DAFF; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("data:image/svg+xml;utf8,&%238595;") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,'DejaVu Sans',Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Verdana,'DejaVu Sans',Geneva,sans-serif; + color: #0057A9; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 15px; +} + +div.toc li.level4 { + margin-left: 15px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: black; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: #0057A9; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: Roboto,sans-serif; + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: white; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: gray; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: white; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: gray; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: gray; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: gray; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: gray; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: gray; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #002E5A; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #003E78; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd, samp +{ + display: inline-block; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + diff --git a/doxygen.svg b/doxygen.svg new file mode 100644 index 00000000..2bfeb738 --- /dev/null +++ b/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js new file mode 100644 index 00000000..ee3f142f --- /dev/null +++ b/dynsections.js @@ -0,0 +1,192 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + var id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + var start = $(this).attr('data-start'); + var end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + var line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); +} + +/* @license-end */ diff --git a/example/.clang-tidy b/example/.clang-tidy deleted file mode 100644 index 53d6da30..00000000 --- a/example/.clang-tidy +++ /dev/null @@ -1 +0,0 @@ -Checks: "-*" diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 7c3fe08f..00000000 --- a/example/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Examples -A few small examples to show the capabilities of `mcpp`. - -They should be compilable with something along the lines of `g++ -std=c++17 -o example example.cpp -lmcpp` -after you have installed the library. - -Feel free to open a PR if you have an interesting usecase to include as part of the examples. diff --git a/example/game-of-life/README.md b/example/game-of-life/README.md deleted file mode 100644 index 5eed4a87..00000000 --- a/example/game-of-life/README.md +++ /dev/null @@ -1,23 +0,0 @@ -## Conway's game of life - -Run with any of the following: - -`./game_of_life` -> 40x40 -> -`./game_of_life 20` -> 20x20 -> -`./game_of_life 20 30` -> 20x30 - -Controls are as follows: - -- play: GREEN CONCRETE -- pause: RED CONCRETE -- dead: BLACK CONCRETE -- alive: WHITE CONCRETE -- speed up: YELLOW CONCRETE -- slow down: BLUE CONCRETE -- randomise: PINK CONCRETE -- clear: BARRIER diff --git a/example/game-of-life/game_of_life.cpp b/example/game-of-life/game_of_life.cpp deleted file mode 100644 index f66793a9..00000000 --- a/example/game-of-life/game_of_life.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// Conway's game of life -#include -#include -#include - -class Life { -private: - int width, depth; - int** game; // 1 is active - bool isRunning; - int delay; - - const mcpp::BlockType PLAY_BLOCK = mcpp::Blocks::GREEN_CONCRETE; - const mcpp::BlockType PAUSE_BLOCK = mcpp::Blocks::RED_CONCRETE; - const mcpp::BlockType DEAD_BLOCK = mcpp::Blocks::BLACK_CONCRETE; - const mcpp::BlockType ALIVE_BLOCK = mcpp::Blocks::WHITE_CONCRETE; - const mcpp::BlockType SPEED_BLOCK = mcpp::Blocks::YELLOW_CONCRETE; - const mcpp::BlockType SLOW_BLOCK = mcpp::Blocks::BLUE_CONCRETE; - const mcpp::BlockType RANDOM_BLOCK = mcpp::Blocks::PINK_CONCRETE; - const mcpp::BlockType CLEAR_BLOCK = mcpp::Blocks::BARRIER; - - mcpp::Coordinate buildPosition, bounds, upperBuildPosition, upperBounds; - - mcpp::MinecraftConnection mc; - - int GetNeighbors(int x, int y); - -public: - Life(int width, int depth); - ~Life(); - - void Update(); - - void Pause() { isRunning = false; }; - void Play() { isRunning = true; }; - void Delay() { std::this_thread::sleep_for(std::chrono::milliseconds(delay)); }; -}; - -int main(int argc, char* argv[]) { - int width = 40; - int depth = 40; - if (argc >= 2) { - width = atoi(argv[1]); - depth = atoi(argv[1]); - } - if (argc >= 3) { - depth = atoi(argv[2]); - } - - Life life(width, depth); - - while (true) - life.Update(); - - return 0; -} - -Life::Life(int width, int depth) : width(width), depth(depth), isRunning(false), delay(250) { - buildPosition = mc.getPlayerPosition(); - buildPosition.y -= 5; - buildPosition.x -= width / 2; - buildPosition.z -= depth / 2; - - bounds = - mcpp::Coordinate(buildPosition.x + width - 1, buildPosition.y, buildPosition.z + depth - 1); - upperBounds = mcpp::Coordinate(buildPosition.x + width - 1, buildPosition.y + 1, - buildPosition.z + depth - 1); - upperBuildPosition = mcpp::Coordinate(buildPosition.x, buildPosition.y + 1, buildPosition.z); - - game = new int*[width]; - for (int x = 0; x < width; x++) { - game[x] = new int[depth]; - for (int y = 0; y < depth; y++) { - game[x][y] = 0; - } - } - - mc.doCommand("clear @p"); - mc.doCommand("give @p minecraft:white_concrete"); - mc.doCommand("give @p minecraft:black_concrete"); - mc.doCommand("give @p minecraft:green_concrete"); - mc.doCommand("give @p minecraft:red_concrete"); - mc.doCommand("give @p minecraft:yellow_concrete"); - mc.doCommand("give @p minecraft:blue_concrete"); - mc.doCommand("give @p minecraft:pink_concrete"); - mc.doCommand("give @p minecraft:barrier"); -} - -Life::~Life() { - for (int x = 0; x < width; x++) { - delete[] game[x]; - } - delete[] game; -} - -void Life::Update() { - // check for actions - mcpp::Chunk chunk = mc.getBlocks(upperBuildPosition, upperBounds); - for (int x = 0; x < width; x++) { - for (int z = 0; z < depth; z++) { - mcpp::BlockType block = chunk.get(x, 0, z); - - mcpp::Coordinate position(upperBuildPosition.x + x, upperBuildPosition.y, - upperBuildPosition.z + z); - if (block != mcpp::Blocks::AIR) { - mc.setBlock(position, mcpp::Blocks::AIR); - } - - if (block == PLAY_BLOCK) { - Play(); - mc.postToChat("Playing"); - } else if (block == PAUSE_BLOCK) { - Pause(); - mc.postToChat("Pausing"); - } else if (block == ALIVE_BLOCK) { - game[x][z] = 1; - } else if (block == DEAD_BLOCK) { - game[x][z] = 0; - } else if (block == SPEED_BLOCK) { - delay = std::max(delay / 2, 1); - mc.postToChat("Speeding up"); - } else if (block == SLOW_BLOCK) { - delay *= 2; - mc.postToChat("Slowing down"); - } else if (block == RANDOM_BLOCK) { - for (int x = 0; x < width; x++) { - for (int z = 0; z < depth; z++) { - game[x][z] = rand() % 2; - } - } - mc.postToChat("Randomizing"); - } else if (block == CLEAR_BLOCK) { - for (int x = 0; x < width; x++) { - for (int z = 0; z < depth; z++) { - game[x][z] = 0; - } - } - mc.postToChat("Clearing"); - } - } - } - - if (isRunning) { - // neighbor counts - int** neighbors = new int*[width]; - for (int x = 0; x < width; x++) { - neighbors[x] = new int[depth]; - for (int y = 0; y < depth; y++) { - neighbors[x][y] = GetNeighbors(x, y); - } - } - - // next generation state - for (int x = 0; x < width; x++) { - for (int z = 0; z < depth; z++) { - if (game[x][z] == 1) { - if (neighbors[x][z] < 2) { - game[x][z] = 0; - } else if (neighbors[x][z] > 3) { - game[x][z] = 0; - } - } else if (neighbors[x][z] == 3) { - game[x][z] = 1; - } - } - } - - for (int x = 0; x < width; x++) { - delete[] neighbors[x]; - } - delete[] neighbors; - } - - // draw - mc.setBlocks(buildPosition, bounds, DEAD_BLOCK); - for (int x = 0; x < width; x++) { - for (int z = 0; z < depth; z++) { - mcpp::Coordinate position(buildPosition.x + x, buildPosition.y, buildPosition.z + z); - if (game[x][z] == 1) { - mc.setBlock(position, ALIVE_BLOCK); - } - } - } - - Delay(); -} - -int Life::GetNeighbors(int x, int y) { - int alive = 0; - - int neighbors[8][2] = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; - - for (int i = 0; i < 8; i++) { - int nx = x + neighbors[i][0]; - int ny = y + neighbors[i][1]; - - if (nx >= 0 && nx < width && ny >= 0 && ny < depth && game[nx][ny] == 1) { - alive++; - } - } - - return alive; -} \ No newline at end of file diff --git a/example/hello_minecraft.cpp b/example/hello_minecraft.cpp deleted file mode 100644 index 19fcb0bd..00000000 --- a/example/hello_minecraft.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -using namespace mcpp; - -int main() { - MinecraftConnection mc; - - // Post chat to Minecraft - mc.postToChat("Hello, Minecraft!"); -} diff --git a/example/minesweeper/README.md b/example/minesweeper/README.md deleted file mode 100644 index 93ff5662..00000000 --- a/example/minesweeper/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## Minesweeper -This is a working version of minesweeper in minecraft using `mcpp` and c++. - -It should be compilable with something along the lines of `g++ -std=c++17 - Wall -o minesweeper minesweeper.cpp -lmcpp` -after you have installed the library. - -To install the attached resource pack `minesweeper_resource_pack.zip` into your minecraft resourcepack folder. -To find your resource pack folder go into minecraft and follow the steps -Escape - Options - Resource Packs - Open Pack Folder -Once opened move the .zip into the folder, and back into minecraft select it from the available packs list - -The game is played by launching the compiled code and originates from the player deleting only blocks where it -requires to place blocks. It is recommended to run the code while flying in the air to avoid clipping issues. -The code continues to loop until either you win, lose or place a barrier block on the board. - -The games size and mine count can be modified by changing the following values from the top of the Minesweeper class -before recompiling - `const int X_SIZE = 10;` - `const int Z_SIZE = 10;` - `const int MINE_COUNT = 20;` \ No newline at end of file diff --git a/example/minesweeper/minesweeper.cpp b/example/minesweeper/minesweeper.cpp deleted file mode 100644 index e43ff06f..00000000 --- a/example/minesweeper/minesweeper.cpp +++ /dev/null @@ -1,424 +0,0 @@ -#include -#include -#include -#include - -#define clear mcpp::Blocks::TNT -#define flag mcpp::Blocks::SEA_LANTERN -#define uncleared mcpp::Blocks::LIGHT_GRAY_CONCRETE -#define quit mcpp::Blocks::BARRIER -#define air mcpp::Blocks::AIR -#define goodmine mcpp::Blocks::EMERALD_BLOCK -#define badflag mcpp::Blocks::GLOWSTONE -#define badmine mcpp::Blocks::MAGMA_BLOCK - -class Minesweeper { -private: - const int X_SIZE = 10; - const int Z_SIZE = 10; - const int MINE_COUNT = 20; - - int*** field; - int clearstowin; - int flagsleft; - bool playing; - bool firstclick; - - std::vector blocks; - std::vector numbers; - - mcpp::MinecraftConnection mc; - mcpp::Coordinate origin; - mcpp::Coordinate cornerOrigin; - mcpp::Coordinate cornerOpposite; - mcpp::Coordinate printer; - mcpp::Coordinate displayclearsorigin; - mcpp::Coordinate displayflagsorigin; - -public: - Minesweeper(); - bool Playing(); - void Flag(int x, int z); - void Clear(int x, int z); - void ZeroClear(int x, int z); - void Reveal(); - void FirstClickProtection(int x, int z); - void UpdateDisplays(); - void MakeMines(int minecount, int x, int z); - void GenerateBoard(); - void ResetField(); - bool GameLoop(); -}; - -int main() { - Minesweeper ms; - ms.GameLoop(); - std::cout << "Done" << std::endl; -} - -bool Minesweeper::GameLoop() { - while (Playing()) { - // std::cout<<"Tick"< 10 || fabs(playerpos.z - origin.z) - Z_SIZE > 10) { - mc.postToChat("Left player area. Quitting."); - finish = false; - } - } - return false; -} - -Minesweeper::Minesweeper() { - // field[X_SIZE][Z_SIZE][STATE] - // State [0] values 0-9 representing how many mines around it, 9=mine - // State [1] (0) = none (1) = flag (2) = cleared - field = new int**[X_SIZE]; - for (int i = 0; i < X_SIZE; i++) { - field[i] = new int*[Z_SIZE]; - for (int j = 0; j < Z_SIZE; j++) { - field[i][j] = new int[2]{0, 0}; - } - } - // Block Representations numbers 0-9 - blocks = {mcpp::Blocks::WHITE_CONCRETE, mcpp::Blocks::LIGHT_BLUE_CONCRETE, - mcpp::Blocks::CYAN_CONCRETE, mcpp::Blocks::GREEN_CONCRETE, - mcpp::Blocks::LIME_CONCRETE, mcpp::Blocks::YELLOW_CONCRETE, - mcpp::Blocks::ORANGE_CONCRETE, mcpp::Blocks::RED_CONCRETE, - mcpp::Blocks::BROWN_CONCRETE, mcpp::Blocks::TNT}; - - numbers = {mcpp::Blocks::WHITE_WOOL, mcpp::Blocks::LIGHT_BLUE_WOOL, mcpp::Blocks::CYAN_WOOL, - mcpp::Blocks::GREEN_WOOL, mcpp::Blocks::LIME_WOOL, mcpp::Blocks::YELLOW_WOOL, - mcpp::Blocks::ORANGE_WOOL, mcpp::Blocks::RED_WOOL, mcpp::Blocks::BROWN_WOOL, - mcpp::Blocks::BLACK_WOOL}; - - // Gives player items to play - mc.doCommand("gamerule sendCommandFeedback false"); - mc.doCommand("clear @p"); - mc.doCommand("give @p tnt"); - mc.doCommand("give @p sea_lantern"); - mc.doCommand("give @p barrier"); - mc.doCommand("gamerule sendCommandFeedback true"); - // Lets player know how to play - mc.postToChat("The TNT/Mine clears the spot below"); - mc.postToChat("The Sea_Lantern/Flag flags the spot below"); - mc.postToChat("The barrier exits the game"); - mc.postToChat("To play, place blocks above the board"); - - // Builds board - origin = mc.getPlayerTilePosition(); - GenerateBoard(); - - // Prints the legend - printer = origin; - printer.z--; - printer.y++; - for (int i = 0; i <= 9; i++) { - mc.setBlock(printer, blocks[i]); - printer.x++; - } - mc.setBlock(printer, flag); - printer.y++; - mc.setBlock(printer, badflag); - printer.x--; - mc.setBlock(printer, goodmine); - printer.y++; - mc.setBlock(printer, badmine); - - // Sets the display origins and keys - displayclearsorigin = origin; - displayclearsorigin.z--; - displayclearsorigin.y += 3; - mc.setBlock(displayclearsorigin, uncleared); - displayclearsorigin.x++; - - displayflagsorigin = displayclearsorigin; - displayflagsorigin.x += 4; - mc.setBlock(displayflagsorigin, flag); - displayflagsorigin.x++; -} - -bool Minesweeper::Playing() { - mcpp::Chunk choices = mc.getBlocks(cornerOrigin, cornerOpposite); - for (int x = 0; x < X_SIZE; x++) { - for (int z = 0; z < Z_SIZE; z++) { - printer.x = origin.x + x; - printer.z = origin.z + z; - printer.y = origin.y; // Set printer pos - - if (choices.get(x, 0, z) == clear) { - Clear(x, z); - } else if (choices.get(x, 0, z) == flag) { - Flag(x, z); - } else if (choices.get(x, 0, z) == quit) { - playing = false; - printer.y++; - mc.setBlock(printer, air); - mc.postToChat("Quitting"); - } - } - } - - if (clearstowin == 0) { - mc.postToChat("YOU WIN!!"); - playing = false; - } - - return playing; -} - -void Minesweeper::Flag(int x, int z) { - if (field[x][z][1] == 0) { - field[x][z][1] = 1; - flagsleft--; - mc.setBlock(printer, flag); - } else if (field[x][z][1] == 1) { - field[x][z][1] = 0; - flagsleft++; - mc.setBlock(printer, uncleared); - } - - printer.y++; - mc.setBlock(printer, air); -} - -void Minesweeper::Clear(int x, int z) { - if (field[x][z][1] == 0) { - - mc.setBlock(printer, blocks[field[x][z][0]]); - - if (field[x][z][0] == 9) { // If a mine, you loose - if (firstclick) { - firstclick = false; - FirstClickProtection(x, z); - Clear(x, z); - } else { - mc.postToChat("GAMEOVER!"); - playing = false; - } - } else if (field[x][z][0] == 0) { // If zero add location to a stack - ZeroClear(x, z); - } - - if (field[x][z][1] != 2) { - clearstowin--; - } - - field[x][z][1] = 2; - firstclick = false; - } - - printer.y++; // removes block above the board - mc.setBlock(printer, air); -} - -void Minesweeper::ZeroClear(int x, int z) { - std::vector stack = {new int[2]{x, z}}; - size_t pos = 0; - - while (pos < stack.size()) { - int* zeroCoordinate = stack.at(pos); - int xC = zeroCoordinate[0]; - int zC = zeroCoordinate[1]; - for (int xo = -1; xo <= 1; xo++) { - for (int zo = -1; zo <= 1; zo++) { - if (xC + xo >= 0 && xC + xo < X_SIZE && zC + zo >= 0 && zC + zo < Z_SIZE) { - - if (field[xC + xo][zC + zo][0] == 0 && field[xC + xo][zC + zo][1] != 2) { - stack.push_back(new int[2]{xC + xo, zC + zo}); - } - - printer.x = origin.x + xC + xo; - printer.z = origin.z + zC + zo; - mc.setBlock(printer, blocks[field[xC + xo][zC + zo][0]]); - - if (field[xC + xo][zC + zo][1] != 2) { - clearstowin--; - } - - field[xC + xo][zC + zo][1] = 2; - } - } - } - pos++; - } -} - -void Minesweeper::Reveal() { - printer = origin; - for (int x = 0; x < X_SIZE; x++) { // Steps through the whole board - for (int z = 0; z < Z_SIZE; z++) { // shows what you did correctly and - if (field[x][z][0] == 9) { // incorrectly - if (field[x][z][1] == 1) { - mc.setBlock(printer, goodmine); - } else if (field[x][z][1] == 0) { - mc.setBlock(printer, clear); - } else { - mc.setBlock(printer, badmine); - } - } else if (field[x][z][1] == 1) { - mc.setBlock(printer, badflag); - } - printer.z++; - } - printer.z = origin.z; - printer.x++; - } -} - -void Minesweeper::FirstClickProtection(int x, int z) { - mc.postToChat("Saved, Would have been a mine"); - field[x][z][0] = 1; - - for (int xo = -1; xo <= 1; xo++) { - for (int zo = -1; zo <= 1; zo++) { - if (field[x + xo][z + zo][0] == 9) { - field[x][z][0]++; - } else { - field[x + xo][z + zo][0]--; - } - } - } - - MakeMines(1, x, z); -} - -void Minesweeper::UpdateDisplays() { - printer = displayclearsorigin; - printer.x += 3; - mc.setBlocks(printer, displayclearsorigin, air); - printer.x -= 3; - - if (clearstowin >= 1000) { - mc.setBlock(printer, numbers[clearstowin / 1000]); - printer.x++; - } - if (clearstowin >= 100) { - mc.setBlock(printer, numbers[(clearstowin % 1000) / 100]); - printer.x++; - } - if (clearstowin >= 10) { - mc.setBlock(printer, numbers[(clearstowin % 100) / 10]); - printer.x++; - } - if (clearstowin >= 1) { - mc.setBlock(printer, numbers[clearstowin % 10]); - printer.x++; - } - - printer = displayflagsorigin; - printer.x += 2; - mc.setBlocks(printer, displayflagsorigin, air); - printer.x -= 2; - if (flagsleft >= 1000) { - mc.setBlock(printer, numbers[flagsleft / 1000]); - printer.x++; - } - if (flagsleft >= 100) { - mc.setBlock(printer, numbers[(flagsleft % 1000) / 100]); - printer.x++; - } - if (flagsleft >= 10) { - mc.setBlock(printer, numbers[(flagsleft % 100) / 10]); - printer.x++; - } - if (flagsleft >= 1) { - mc.setBlock(printer, numbers[flagsleft % 10]); - printer.x++; - } -} - -void Minesweeper::MakeMines(int mineamount, int xS, int zS) { - for (int mines = 0; mines < mineamount; mines++) { - int x = rand() % X_SIZE; - int z = rand() % Z_SIZE; - - if (field[x][z][0] != 9 && (x != xS || z != zS)) { - field[x][z][0] = 9; - - for (int xOfset = -1; xOfset <= 1; xOfset++) { - if (x + xOfset >= 0 && x + xOfset < X_SIZE) { - for (int zOfset = -1; zOfset <= 1; zOfset++) { - if (z + zOfset >= 0 && z + zOfset < Z_SIZE) { - if (field[x + xOfset][z + zOfset][0] != 9) { - field[x + xOfset][z + zOfset][0]++; - } - } - } - } - } - } else { // If a mine is already in the place make another mine - mines--; - } - } -} - -void Minesweeper::GenerateBoard() { - // Resets Field - ResetField(); - - cornerOrigin = origin; - cornerOpposite = origin; - cornerOpposite.x += X_SIZE - 1; - cornerOpposite.z += Z_SIZE - 1; - mc.setBlocks(cornerOrigin, cornerOpposite, uncleared); - - // Moves corners up for later use in grabbing game area; - cornerOpposite.y++; - cornerOrigin.y++; - - // Generates mines and increases values around mines by 1 - srand(time(nullptr)); - MakeMines(MINE_COUNT, -1, -1); - // This value counts down until you are finished clearing the field - clearstowin = X_SIZE * Z_SIZE - MINE_COUNT; - - // Defaults bools - playing = true; - firstclick = true; - - // Defaults - flagsleft = MINE_COUNT; -} - -void Minesweeper::ResetField() { - for (int x = 0; x < X_SIZE; x++) { - for (int z = 0; z < Z_SIZE; z++) { - field[x][z][0] = 0; - field[x][z][1] = 0; - } - } -} diff --git a/example/minesweeper/minesweeper_resource_pack.zip b/example/minesweeper/minesweeper_resource_pack.zip deleted file mode 100644 index 09ef9e9a..00000000 Binary files a/example/minesweeper/minesweeper_resource_pack.zip and /dev/null differ diff --git a/example/model-generation/README.md b/example/model-generation/README.md deleted file mode 100644 index 74442c4e..00000000 --- a/example/model-generation/README.md +++ /dev/null @@ -1,19 +0,0 @@ -## Models - -`obj-mc.cpp` - -### Usage - -Using Blender or any other 3d modeling software, convert your model to a .obj file. - -Additionally, the models cannot use quads, so in Blender, triangulate the model using ctrl/command + t - -Run `./obj-mc filename.obj scale` - -> Scale is the max size of any dimension - -### Examples - -`./obj-mc blender-monkey.obj 50` - -Blender Monkey \ No newline at end of file diff --git a/example/model-generation/blender-monkey.png b/example/model-generation/blender-monkey.png deleted file mode 100644 index 8c6b85d0..00000000 Binary files a/example/model-generation/blender-monkey.png and /dev/null differ diff --git a/example/model-generation/obj-mc.cpp b/example/model-generation/obj-mc.cpp deleted file mode 100644 index a25c852e..00000000 --- a/example/model-generation/obj-mc.cpp +++ /dev/null @@ -1,217 +0,0 @@ -#include -#include -#include -#include -#include -#include - -struct Vec3 { - float x, y, z; -}; - -struct Face { - int first, second, third; -}; - -class Model { -public: - Model(const std::string& filename); - ~Model() { - if (_file.is_open()) { - _file.close(); - } - } - - void BuildModel(mcpp::MinecraftConnection& mc); - void BuildPointCloud(mcpp::MinecraftConnection& mc); - - void Scale(int scale); - void SetPosition(mcpp::Coordinate position); - -private: - bool IsWithin(Vec3& position); - - Vec3 sub(Vec3 a, Vec3 b); - float dot(Vec3 a, Vec3 b); - Vec3 cross(Vec3 a, Vec3 b); - - std::ifstream _file; - - std::vector _vertices; - std::vector _faces; - - mcpp::Coordinate _position; -}; - -int main(int argc, char* argv[]) { - if (argc < 3) { - std::cerr << "Usage: " << argv[0] << " filename.obj scale" << std::endl; - return 1; - } - - std::string filename = argv[1]; - int scale = std::stoi(argv[2]); - - mcpp::MinecraftConnection mc; - - Model* model = new Model(filename); - model->SetPosition(mc.getPlayerPosition()); - model->Scale(scale); - model->BuildModel(mc); // Fills the model - model->BuildPointCloud(mc); // Places blocks at vertices - - return 0; -} - -Model::Model(const std::string& filename) { - _file.open(filename, std::ios::binary); - if (!_file.is_open()) { - throw std::runtime_error("Error opening file"); - } - - std::string line; - while (std::getline(_file, line)) { - if (line.substr(0, 2) == "v ") { - Vec3 vertex; - std::sscanf(line.c_str(), "v %f %f %f", &vertex.x, &vertex.y, &vertex.z); - _vertices.push_back(vertex); - } else if (line.substr(0, 2) == "f ") { - Face face; - if (line.find(std::string("//")) != std::string::npos) { - std::sscanf(line.c_str(), "f %d//%*d %d//%*d %d//%*d", &face.first, &face.second, - &face.third); - } else if (line.find(std::string("/")) != std::string::npos) { - std::sscanf(line.c_str(), "f %d/%*d/%*d %d/%*d/%*d %d/%*d/%*d", &face.first, &face.second, - &face.third); - } else { - std::sscanf(line.c_str(), "f %d %d %d", &face.first, &face.second, &face.third); - } - - _faces.push_back(face); - } - } -} - -void Model::Scale(int scale) { - Vec3 min; - Vec3 max; - min.x = min.y = min.z = std::numeric_limits::max(); - max.x = max.y = max.z = std::numeric_limits::lowest(); - - for (const Vec3& vertex : _vertices) { - min.x = std::min(min.x, vertex.x); - min.y = std::min(min.y, vertex.y); - min.z = std::min(min.z, vertex.z); - - max.x = std::max(max.x, vertex.x); - max.y = std::max(max.y, vertex.y); - max.z = std::max(max.z, vertex.z); - } - - float size = std::max(max.x - min.x, std::max(max.y - min.y, max.z - min.z)); - for (Vec3& vertex : _vertices) { - vertex.x = (vertex.x - min.x) / size * scale; - vertex.y = (vertex.y - min.y) / size * scale; - vertex.z = (vertex.z - min.z) / size * scale; - } -} - -void Model::BuildPointCloud(mcpp::MinecraftConnection& mc) { - for (const Vec3& vertex : _vertices) { - mcpp::Coordinate blockPosition = - mcpp::Coordinate(_position.x + vertex.x, _position.y + vertex.y, _position.z + vertex.z); - mc.setBlock(blockPosition, mcpp::Blocks::GRAY_WOOL); - } -} - -void Model::BuildModel(mcpp::MinecraftConnection& mc) { - Vec3 min; - Vec3 max; - min.x = min.y = min.z = std::numeric_limits::max(); - max.x = max.y = max.z = std::numeric_limits::lowest(); - - for (const Vec3& vertex : _vertices) { - min.x = std::min(min.x, vertex.x); - min.y = std::min(min.y, vertex.y); - min.z = std::min(min.z, vertex.z); - - max.x = std::max(max.x, vertex.x); - max.y = std::max(max.y, vertex.y); - max.z = std::max(max.z, vertex.z); - } - - for (int x = min.x; x < max.x; x++) { - for (int y = min.y; y < max.y; y++) { - for (int z = min.z; z < max.z; z++) { - Vec3 position = {(float)x, (float)y, (float)z}; - if (IsWithin(position)) { - mcpp::Coordinate blockPosition = - mcpp::Coordinate(_position.x + x, _position.y + y, _position.z + z); - mc.setBlock(blockPosition, mcpp::Blocks::GRAY_CONCRETE); - } - } - } - } -} - -bool Model::IsWithin(Vec3& position) { - const float EpsilonFloat = 0.0000001; - const Vec3 directions[4] = {{0.0, 1.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}; - - int crosses = 0; - - for (Vec3 direction : directions) { - int intersects = 0; - - for (const Face& face : _faces) { - // 1 based indexing -.- - Vec3 v1 = _vertices[face.first - 1]; - Vec3 v2 = _vertices[face.second - 1]; - Vec3 v3 = _vertices[face.third - 1]; - - Vec3 edge1 = sub(v2, v1); - Vec3 edge2 = sub(v3, v1); - - Vec3 h = cross(direction, edge2); - float det = dot(edge1, h); - - if (std::abs(det) < EpsilonFloat) - continue; // parallel - - float f = 1.0 / det; - Vec3 s = sub(position, v1); - float u = f * dot(s, h); - - if (u < 0.0 || u > 1.0) - continue; // outside face - - Vec3 q = cross(s, edge1); - float v = f * dot(direction, q); - - if (v < 0.0 || u + v > 1.0) - continue; // outside face - - float t = f * dot(edge2, q); - - if (t > EpsilonFloat) - intersects++; - } - - if (intersects % 2 == 1) - crosses++; - } - - return (crosses >= 2); -} - -Vec3 Model::sub(Vec3 a, Vec3 b) { return Vec3{a.x - b.x, a.y - b.y, a.z - b.z}; } -float Model::dot(Vec3 a, Vec3 b) { return a.x * b.x + a.y * b.y + a.z * b.z; } -Vec3 Model::cross(Vec3 a, Vec3 b) { - return Vec3{a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x}; -} - -void Model::SetPosition(mcpp::Coordinate position) { - _position = position; - _position.x += 16; - _position.z += 16; -}; diff --git a/example/pyramid.cpp b/example/pyramid.cpp deleted file mode 100644 index 78d61c02..00000000 --- a/example/pyramid.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include - -// Change location here -mcpp::Coordinate ORIGIN{0, 0, 0}; -int PYRAMID_HEIGHT = 50; - -// Can declare globally -mcpp::MinecraftConnection mc; - -void make_ring(mcpp::Coordinate base_pt, int side_len) { - // Flat plane - mc.setBlocks(base_pt, base_pt + mcpp::Coordinate(side_len, 0, side_len), mcpp::Blocks::SANDSTONE); - - // Air inside to make border - base_pt = base_pt + mcpp::Coordinate(1, 0, 1); - mc.setBlocks(base_pt, base_pt + mcpp::Coordinate(side_len - 2, 0, side_len - 2), - mcpp::Blocks::AIR); -} - -int main() { - int pyramid_base_len = PYRAMID_HEIGHT * 2; - - // Get heights of build area - mcpp::HeightMap heights = - mc.getHeights(ORIGIN, ORIGIN + mcpp::Coordinate(pyramid_base_len, 0, pyramid_base_len)); - - // Use minimum height of the area as the lowest point on the pyramid - int min_height = *std::min_element(heights.begin(), heights.end()); - - // Build rings, diminishing up to pyramid height - mcpp::Coordinate base_pt = heights.base_pt().with_height(min_height); - int side_len = pyramid_base_len; - for (int i = 0; i < PYRAMID_HEIGHT; i++) { - make_ring(base_pt + mcpp::Coordinate(i, i, i), side_len - (i * 2)); - } -} diff --git a/example/video-generation/README.md b/example/video-generation/README.md deleted file mode 100644 index 4cb4c3e0..00000000 --- a/example/video-generation/README.md +++ /dev/null @@ -1,24 +0,0 @@ -## Videos - -`video-mc.cpp` -> Requires ffmpeg installed - -### Usage - -Using ffmpeg, convert an mp4 to a rgb file. To do so run `ffmpeg -i filename.mp4 -f rawvideo -pix_fmt rgb24 filename.rgb` - -Run `./video-mc filename.rgb width height scale frame_rate` - -> Scale is used to divide the image size - -### Examples - -`./video-mc rick-roll.rgb 640 480 16 24` - -`./video-mc bad-apple.rgb 320 240 5 30` - -Rick RollBad Apple - -YouTube video: - -[![BAD APPLE!!](https://img.youtube.com/vi/FUt5WGvXZw0/0.jpg)](https://www.youtube.com/watch?v=FUt5WGvXZw0) diff --git a/example/video-generation/bad-apple.png b/example/video-generation/bad-apple.png deleted file mode 100644 index f7d564fd..00000000 Binary files a/example/video-generation/bad-apple.png and /dev/null differ diff --git a/example/video-generation/rick-roll.png b/example/video-generation/rick-roll.png deleted file mode 100644 index c9c6e331..00000000 Binary files a/example/video-generation/rick-roll.png and /dev/null differ diff --git a/example/video-generation/video-mc.cpp b/example/video-generation/video-mc.cpp deleted file mode 100644 index 822b5c0d..00000000 --- a/example/video-generation/video-mc.cpp +++ /dev/null @@ -1,227 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -struct Pixel { - uint8_t r, g, b; -}; - -class Video { -public: - Video(const std::string& filename, int width, int height, int scaleFactor, int frameRate); - ~Video() { - if (_file.is_open()) { - _file.close(); - } - } - - void Play(mcpp::MinecraftConnection& mc); - -private: - void DisplayFrame(size_t index, mcpp::MinecraftConnection& mc); - mcpp::BlockType GetBestBlock(const Pixel& pixel); - - std::ifstream _file; - std::vector> _frames; - - int _width; - int _height; - int _scaleFactor; - int _frameRate; - int _frameDelay; - int _frameSize; - - mcpp::Coordinate _position; - std::vector _options; - std::vector _optionColors; -}; - -int main(int argc, char* argv[]) { - if (argc < 6) { - std::cerr << "Usage: " << argv[0] << " filename.rgb width height scale frame_rate" << std::endl; - return 1; - } - - std::string filename = argv[1]; - if (filename.find(".mp4") != std::string::npos) { - std::cerr << "Be sure to convert mp4 files to rgb files before use." << std::endl - << "Usage: ffmpeg -i filename.mp4 -f rawvideo -pix_fmt rgb24 " - "filename.rgb" - << std::endl; - return 1; - } - - int width = std::stoi(argv[2]); - int height = std::stoi(argv[3]); - int scaleFactor = std::stoi(argv[4]); - int frameRate = std::stoi(argv[5]); - - mcpp::MinecraftConnection mc; - - Video* video = new Video(filename, width, height, scaleFactor, frameRate); - video->Play(mc); - - return 0; -} - -Video::Video(const std::string& filename, int width, int height, int scaleFactor, int frameRate) - : _width(width), _height(height), _scaleFactor(scaleFactor), _frameRate(frameRate), - _frameDelay(1000 / _frameRate), _frameSize(_width * _height * 3) { - _file.open(filename, std::ios::binary); - if (!_file.is_open()) { - throw std::runtime_error("Error opening file"); - } - - while (_file) { - std::vector frame; - frame.resize(_width * _height); - _file.read(reinterpret_cast(frame.data()), _frameSize); - - if (_file.gcount() == _frameSize) { - _frames.push_back(frame); - } else { - break; - } - } -} - -void Video::Play(mcpp::MinecraftConnection& mc) { - _options.push_back(mcpp::Blocks::RED_CONCRETE); - _options.push_back(mcpp::Blocks::BLUE_CONCRETE); - _options.push_back(mcpp::Blocks::CYAN_CONCRETE); - _options.push_back(mcpp::Blocks::GRAY_CONCRETE); - _options.push_back(mcpp::Blocks::LIME_CONCRETE); - _options.push_back(mcpp::Blocks::PINK_CONCRETE); - _options.push_back(mcpp::Blocks::BLACK_CONCRETE); - _options.push_back(mcpp::Blocks::BROWN_CONCRETE); - _options.push_back(mcpp::Blocks::GREEN_CONCRETE); - _options.push_back(mcpp::Blocks::WHITE_CONCRETE); - _options.push_back(mcpp::Blocks::ORANGE_CONCRETE); - _options.push_back(mcpp::Blocks::PURPLE_CONCRETE); - _options.push_back(mcpp::Blocks::YELLOW_CONCRETE); - _options.push_back(mcpp::Blocks::MAGENTA_CONCRETE); - _options.push_back(mcpp::Blocks::LIGHT_BLUE_CONCRETE); - _options.push_back(mcpp::Blocks::LIGHT_GRAY_CONCRETE); - - _options.push_back(mcpp::Blocks::RED_WOOL); - _options.push_back(mcpp::Blocks::BLUE_WOOL); - _options.push_back(mcpp::Blocks::CYAN_WOOL); - _options.push_back(mcpp::Blocks::GRAY_WOOL); - _options.push_back(mcpp::Blocks::LIME_WOOL); - _options.push_back(mcpp::Blocks::PINK_WOOL); - _options.push_back(mcpp::Blocks::BLACK_WOOL); - _options.push_back(mcpp::Blocks::BROWN_WOOL); - _options.push_back(mcpp::Blocks::GREEN_WOOL); - _options.push_back(mcpp::Blocks::WHITE_WOOL); - _options.push_back(mcpp::Blocks::ORANGE_WOOL); - _options.push_back(mcpp::Blocks::PURPLE_WOOL); - _options.push_back(mcpp::Blocks::YELLOW_WOOL); - _options.push_back(mcpp::Blocks::MAGENTA_WOOL); - _options.push_back(mcpp::Blocks::LIGHT_BLUE_WOOL); - _options.push_back(mcpp::Blocks::LIGHT_GRAY_WOOL); - - _optionColors.push_back(Pixel{142, 33, 33}); // RED CONCRETE - _optionColors.push_back(Pixel{45, 47, 143}); // BLUE CONCRETE - _optionColors.push_back(Pixel{21, 119, 136}); // CYAN CONCRETE - _optionColors.push_back(Pixel{55, 58, 62}); // GRAY CONCRETE - _optionColors.push_back(Pixel{94, 169, 24}); // LIME CONCRETE - _optionColors.push_back(Pixel{213, 101, 143}); // PINK CONCRETE - _optionColors.push_back(Pixel{8, 10, 15}); // BLACK CONCRETE - _optionColors.push_back(Pixel{96, 60, 32}); // BROWN CONCRETE - _optionColors.push_back(Pixel{73, 91, 36}); // GREEN CONCRETE - _optionColors.push_back(Pixel{255, 255, 255}); // WHITE CONCRETE - _optionColors.push_back(Pixel{224, 97, 1}); // ORANGE CONCRETE - _optionColors.push_back(Pixel{100, 32, 156}); // PURPLE CONCRETE - _optionColors.push_back(Pixel{241, 175, 21}); // YELLOW CONCRETE - _optionColors.push_back(Pixel{169, 48, 159}); // MAGENTA CONCRETE - _optionColors.push_back(Pixel{36, 137, 199}); // LIGHT BLUE CONCRETE - _optionColors.push_back(Pixel{125, 125, 115}); // LIGHT GRAY CONCRETE - - _optionColors.push_back(Pixel{158, 43, 39}); // RED WOOL - _optionColors.push_back(Pixel{37, 49, 147}); // BLUE WOOL - _optionColors.push_back(Pixel{38, 113, 145}); // CYAN WOOL - _optionColors.push_back(Pixel{65, 65, 65}); // GRAY WOOL - _optionColors.push_back(Pixel{57, 186, 46}); // LIME WOOL - _optionColors.push_back(Pixel{217, 129, 153}); // PINK WOOL - _optionColors.push_back(Pixel{24, 20, 20}); // BLACK WOOL - _optionColors.push_back(Pixel{86, 51, 28}); // BROWN WOOL - _optionColors.push_back(Pixel{54, 75, 24}); // GREEN WOOL - _optionColors.push_back(Pixel{228, 228, 228}); // WHITE WOOL - _optionColors.push_back(Pixel{235, 126, 54}); // ORANGE WOOL - _optionColors.push_back(Pixel{126, 52, 191}); // PURPLE WOOL - _optionColors.push_back(Pixel{194, 181, 28}); // YELLOW WOOL - _optionColors.push_back(Pixel{190, 73, 201}); // MAGENTA WOOL - _optionColors.push_back(Pixel{228, 236, 253}); // LIGHT BLUE WOOL - _optionColors.push_back(Pixel{160, 167, 167}); // LIGHT GRAY WOOL - - _position = mc.getPlayerPosition(); - _position.y += (_height / _scaleFactor) / 2; - _position.z -= std::max((_width / _scaleFactor) / 2, (_height / _scaleFactor) / 2); - _position.x += std::min((_width / _scaleFactor) / 2, 16); - - for (size_t i = 0; i < _frames.size(); i++) { - DisplayFrame(i, mc); - std::this_thread::sleep_for(std::chrono::milliseconds(_frameDelay)); - } -} - -void Video::DisplayFrame(size_t index, mcpp::MinecraftConnection& mc) { - if (index < _frames.size()) { - const std::vector& frame = _frames[index]; - - if (!frame.empty()) { - for (size_t i = 0; i < frame.size(); i += _scaleFactor) { - const Pixel& pixel = frame[i]; - if (index > 0) { - const Pixel& lastPixel = _frames[index - 1][i]; - if (pixel.r == lastPixel.r && pixel.g == lastPixel.g && pixel.b == lastPixel.b) { - continue; - } - } - - mcpp::BlockType blockType = GetBestBlock(pixel); - - mcpp::Coordinate pixelPosition = mcpp::Coordinate(_position); - pixelPosition.z += (i % _width) / _scaleFactor; - pixelPosition.y -= (i / _width) / _scaleFactor; - - mc.setBlock(pixelPosition, blockType); - } - } - } -} - -mcpp::BlockType Video::GetBestBlock(const Pixel& pixel) { - int r = pixel.r; - int g = pixel.g; - int b = pixel.b; - - int minDistance = 256; - int closestOption = -1; - - for (size_t i = 0; i < _optionColors.size(); i++) { - int dr = std::abs(r - _optionColors[i].r); - int dg = std::abs(g - _optionColors[i].g); - int db = std::abs(b - _optionColors[i].b); - - int distance = std::sqrt(dr * dr + dg * dg + db * db); - - if (distance < minDistance) { - minDistance = distance; - closestOption = i; - } - } - - if (closestOption != -1) { - return _options[closestOption]; - } else { - std::cerr << "Color error" << std::endl; - } - - return mcpp::Blocks::GLASS; // fallback; shouldn't happen -} diff --git a/files.html b/files.html new file mode 100644 index 00000000..1f2b8d19 --- /dev/null +++ b/files.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: File List + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
[detail level 123]
+ + + + + + + +
  include
  mcpp
 block.hBlockType class
 chunk.h
 coordinate.hCoordinate class
 heightmap.h
 mcpp.hMinecraftConnection class
+
+
+
+ + + + diff --git a/files_dup.js b/files_dup.js new file mode 100644 index 00000000..f1749d90 --- /dev/null +++ b/files_dup.js @@ -0,0 +1,4 @@ +var files_dup = +[ + [ "include", "dir_d44c64559bbebec7f509842c48db8b23.html", "dir_d44c64559bbebec7f509842c48db8b23" ] +]; \ No newline at end of file diff --git a/folderclosed.svg b/folderclosed.svg new file mode 100644 index 00000000..3fe1ba6e --- /dev/null +++ b/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/folderclosedd.svg b/folderclosedd.svg new file mode 100644 index 00000000..2c15e7e2 --- /dev/null +++ b/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/folderopen.svg b/folderopen.svg new file mode 100644 index 00000000..923a0c20 --- /dev/null +++ b/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/folderopend.svg b/folderopend.svg new file mode 100644 index 00000000..c5f2bbff --- /dev/null +++ b/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/functions.html b/functions.html new file mode 100644 index 00000000..b753d4a2 --- /dev/null +++ b/functions.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- a -

+
+
+ + + + diff --git a/functions_b.html b/functions_b.html new file mode 100644 index 00000000..c1e169b1 --- /dev/null +++ b/functions_b.html @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- b -

+
+
+ + + + diff --git a/functions_c.html b/functions_c.html new file mode 100644 index 00000000..c656bc74 --- /dev/null +++ b/functions_c.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- c -

+
+
+ + + + diff --git a/functions_d.html b/functions_d.html new file mode 100644 index 00000000..5307a85d --- /dev/null +++ b/functions_d.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- d -

+
+
+ + + + diff --git a/functions_dup.js b/functions_dup.js new file mode 100644 index 00000000..9340bf3f --- /dev/null +++ b/functions_dup.js @@ -0,0 +1,28 @@ +var functions_dup = +[ + [ "a", "functions.html", null ], + [ "b", "functions_b.html", null ], + [ "c", "functions_c.html", null ], + [ "d", "functions_d.html", null ], + [ "e", "functions_e.html", null ], + [ "f", "functions_f.html", null ], + [ "g", "functions_g.html", null ], + [ "h", "functions_h.html", null ], + [ "i", "functions_i.html", null ], + [ "j", "functions_j.html", null ], + [ "l", "functions_l.html", null ], + [ "m", "functions_m.html", null ], + [ "n", "functions_n.html", null ], + [ "o", "functions_o.html", null ], + [ "p", "functions_p.html", null ], + [ "q", "functions_q.html", null ], + [ "r", "functions_r.html", null ], + [ "s", "functions_s.html", null ], + [ "t", "functions_t.html", null ], + [ "v", "functions_v.html", null ], + [ "w", "functions_w.html", null ], + [ "x", "functions_x.html", null ], + [ "y", "functions_y.html", null ], + [ "z", "functions_z.html", null ], + [ "~", "functions_~.html", null ] +]; \ No newline at end of file diff --git a/functions_e.html b/functions_e.html new file mode 100644 index 00000000..5439014c --- /dev/null +++ b/functions_e.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- e -

+
+
+ + + + diff --git a/functions_f.html b/functions_f.html new file mode 100644 index 00000000..11518703 --- /dev/null +++ b/functions_f.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- f -

+
+
+ + + + diff --git a/functions_func.html b/functions_func.html new file mode 100644 index 00000000..0f598abb --- /dev/null +++ b/functions_func.html @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Functions + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all functions with links to the classes they belong to:
+ +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- i -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- s -

+ + +

- w -

+ + +

- x -

+ + +

- y -

+ + +

- z -

+ + +

- ~ -

+
+
+ + + + diff --git a/functions_g.html b/functions_g.html new file mode 100644 index 00000000..ea2770eb --- /dev/null +++ b/functions_g.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- g -

+
+
+ + + + diff --git a/functions_h.html b/functions_h.html new file mode 100644 index 00000000..8d351e9b --- /dev/null +++ b/functions_h.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- h -

+
+
+ + + + diff --git a/functions_i.html b/functions_i.html new file mode 100644 index 00000000..2606430a --- /dev/null +++ b/functions_i.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- i -

+
+
+ + + + diff --git a/functions_j.html b/functions_j.html new file mode 100644 index 00000000..895206f8 --- /dev/null +++ b/functions_j.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- j -

+
+
+ + + + diff --git a/functions_l.html b/functions_l.html new file mode 100644 index 00000000..d6778364 --- /dev/null +++ b/functions_l.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- l -

+
+
+ + + + diff --git a/functions_m.html b/functions_m.html new file mode 100644 index 00000000..a481ac94 --- /dev/null +++ b/functions_m.html @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- m -

+
+
+ + + + diff --git a/functions_n.html b/functions_n.html new file mode 100644 index 00000000..8a7f93fb --- /dev/null +++ b/functions_n.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- n -

+
+
+ + + + diff --git a/functions_o.html b/functions_o.html new file mode 100644 index 00000000..e2dae920 --- /dev/null +++ b/functions_o.html @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- o -

+
+
+ + + + diff --git a/functions_p.html b/functions_p.html new file mode 100644 index 00000000..c80eec58 --- /dev/null +++ b/functions_p.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- p -

+
+
+ + + + diff --git a/functions_q.html b/functions_q.html new file mode 100644 index 00000000..a05d09ce --- /dev/null +++ b/functions_q.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- q -

+
+
+ + + + diff --git a/functions_r.html b/functions_r.html new file mode 100644 index 00000000..40b88564 --- /dev/null +++ b/functions_r.html @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- r -

+
+
+ + + + diff --git a/functions_rela.html b/functions_rela.html new file mode 100644 index 00000000..1bd2bbbb --- /dev/null +++ b/functions_rela.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Related Symbols + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ + + + diff --git a/functions_s.html b/functions_s.html new file mode 100644 index 00000000..8227c0b2 --- /dev/null +++ b/functions_s.html @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- s -

+
+
+ + + + diff --git a/functions_t.html b/functions_t.html new file mode 100644 index 00000000..2508fc09 --- /dev/null +++ b/functions_t.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- t -

+
+
+ + + + diff --git a/functions_type.html b/functions_type.html new file mode 100644 index 00000000..c9028a7e --- /dev/null +++ b/functions_type.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Typedefs + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ + + + + + diff --git a/functions_v.html b/functions_v.html new file mode 100644 index 00000000..2fd9ce92 --- /dev/null +++ b/functions_v.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- v -

+
+
+ + + + diff --git a/functions_vars.html b/functions_vars.html new file mode 100644 index 00000000..d68d8bc1 --- /dev/null +++ b/functions_vars.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- a -

+
+
+ + + + diff --git a/functions_vars.js b/functions_vars.js new file mode 100644 index 00000000..71d6e00c --- /dev/null +++ b/functions_vars.js @@ -0,0 +1,27 @@ +var functions_vars = +[ + [ "a", "functions_vars.html", null ], + [ "b", "functions_vars_b.html", null ], + [ "c", "functions_vars_c.html", null ], + [ "d", "functions_vars_d.html", null ], + [ "e", "functions_vars_e.html", null ], + [ "f", "functions_vars_f.html", null ], + [ "g", "functions_vars_g.html", null ], + [ "h", "functions_vars_h.html", null ], + [ "i", "functions_vars_i.html", null ], + [ "j", "functions_vars_j.html", null ], + [ "l", "functions_vars_l.html", null ], + [ "m", "functions_vars_m.html", null ], + [ "n", "functions_vars_n.html", null ], + [ "o", "functions_vars_o.html", null ], + [ "p", "functions_vars_p.html", null ], + [ "q", "functions_vars_q.html", null ], + [ "r", "functions_vars_r.html", null ], + [ "s", "functions_vars_s.html", null ], + [ "t", "functions_vars_t.html", null ], + [ "v", "functions_vars_v.html", null ], + [ "w", "functions_vars_w.html", null ], + [ "x", "functions_vars_x.html", null ], + [ "y", "functions_vars_y.html", null ], + [ "z", "functions_vars_z.html", null ] +]; \ No newline at end of file diff --git a/functions_vars_b.html b/functions_vars_b.html new file mode 100644 index 00000000..285a0680 --- /dev/null +++ b/functions_vars_b.html @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- b -

+
+
+ + + + diff --git a/functions_vars_c.html b/functions_vars_c.html new file mode 100644 index 00000000..a8178841 --- /dev/null +++ b/functions_vars_c.html @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- c -

+
+
+ + + + diff --git a/functions_vars_d.html b/functions_vars_d.html new file mode 100644 index 00000000..6f3a7dea --- /dev/null +++ b/functions_vars_d.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- d -

+
+
+ + + + diff --git a/functions_vars_e.html b/functions_vars_e.html new file mode 100644 index 00000000..324bd94b --- /dev/null +++ b/functions_vars_e.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- e -

+
+
+ + + + diff --git a/functions_vars_f.html b/functions_vars_f.html new file mode 100644 index 00000000..413f2509 --- /dev/null +++ b/functions_vars_f.html @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- f -

+
+
+ + + + diff --git a/functions_vars_g.html b/functions_vars_g.html new file mode 100644 index 00000000..8f07f254 --- /dev/null +++ b/functions_vars_g.html @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- g -

+
+
+ + + + diff --git a/functions_vars_h.html b/functions_vars_h.html new file mode 100644 index 00000000..f3baaf33 --- /dev/null +++ b/functions_vars_h.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- h -

+
+
+ + + + diff --git a/functions_vars_i.html b/functions_vars_i.html new file mode 100644 index 00000000..90d8063e --- /dev/null +++ b/functions_vars_i.html @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- i -

+
+
+ + + + diff --git a/functions_vars_j.html b/functions_vars_j.html new file mode 100644 index 00000000..b2f58b96 --- /dev/null +++ b/functions_vars_j.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- j -

+
+
+ + + + diff --git a/functions_vars_l.html b/functions_vars_l.html new file mode 100644 index 00000000..0a0f8cda --- /dev/null +++ b/functions_vars_l.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- l -

+
+
+ + + + diff --git a/functions_vars_m.html b/functions_vars_m.html new file mode 100644 index 00000000..169f63a0 --- /dev/null +++ b/functions_vars_m.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- m -

+
+
+ + + + diff --git a/functions_vars_n.html b/functions_vars_n.html new file mode 100644 index 00000000..14691b89 --- /dev/null +++ b/functions_vars_n.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- n -

+
+
+ + + + diff --git a/functions_vars_o.html b/functions_vars_o.html new file mode 100644 index 00000000..88065873 --- /dev/null +++ b/functions_vars_o.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- o -

+
+
+ + + + diff --git a/functions_vars_p.html b/functions_vars_p.html new file mode 100644 index 00000000..1211831e --- /dev/null +++ b/functions_vars_p.html @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- p -

+
+
+ + + + diff --git a/functions_vars_q.html b/functions_vars_q.html new file mode 100644 index 00000000..43616856 --- /dev/null +++ b/functions_vars_q.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- q -

+
+
+ + + + diff --git a/functions_vars_r.html b/functions_vars_r.html new file mode 100644 index 00000000..7cdbb3ed --- /dev/null +++ b/functions_vars_r.html @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- r -

+
+
+ + + + diff --git a/functions_vars_s.html b/functions_vars_s.html new file mode 100644 index 00000000..6e487615 --- /dev/null +++ b/functions_vars_s.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- s -

+
+
+ + + + diff --git a/functions_vars_t.html b/functions_vars_t.html new file mode 100644 index 00000000..7545b879 --- /dev/null +++ b/functions_vars_t.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- t -

+
+
+ + + + diff --git a/functions_vars_v.html b/functions_vars_v.html new file mode 100644 index 00000000..1c91ebfb --- /dev/null +++ b/functions_vars_v.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- v -

+
+
+ + + + diff --git a/functions_vars_w.html b/functions_vars_w.html new file mode 100644 index 00000000..cc01e0c0 --- /dev/null +++ b/functions_vars_w.html @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- w -

+
+
+ + + + diff --git a/functions_vars_x.html b/functions_vars_x.html new file mode 100644 index 00000000..0c0a68f8 --- /dev/null +++ b/functions_vars_x.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- x -

+
+
+ + + + diff --git a/functions_vars_y.html b/functions_vars_y.html new file mode 100644 index 00000000..f1d7222f --- /dev/null +++ b/functions_vars_y.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- y -

+
+
+ + + + diff --git a/functions_vars_z.html b/functions_vars_z.html new file mode 100644 index 00000000..7d9219e3 --- /dev/null +++ b/functions_vars_z.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members - Variables + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all variables with links to the classes they belong to:
+ +

- z -

+
+
+ + + + diff --git a/functions_w.html b/functions_w.html new file mode 100644 index 00000000..fd529289 --- /dev/null +++ b/functions_w.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- w -

+
+
+ + + + diff --git a/functions_x.html b/functions_x.html new file mode 100644 index 00000000..cdae2963 --- /dev/null +++ b/functions_x.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- x -

+
+
+ + + + diff --git a/functions_y.html b/functions_y.html new file mode 100644 index 00000000..b3aea630 --- /dev/null +++ b/functions_y.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- y -

+
+
+ + + + diff --git a/functions_z.html b/functions_z.html new file mode 100644 index 00000000..2bfb106e --- /dev/null +++ b/functions_z.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- z -

+
+
+ + + + diff --git a/functions_~.html b/functions_~.html new file mode 100644 index 00000000..7a1cda33 --- /dev/null +++ b/functions_~.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + mcpp: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all class members with links to the classes they belong to:
+ +

- ~ -

+
+
+ + + + diff --git a/graph_legend.html b/graph_legend.html new file mode 100644 index 00000000..0f1dd652 --- /dev/null +++ b/graph_legend.html @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + mcpp: Graph Legend + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

/*! Invisible class because of truncation */
+
class Invisible { };
+
+
/*! Truncated class, inheritance relation is hidden */
+
class Truncated : public Invisible { };
+
+
/* Class not documented with doxygen comments */
+
class Undocumented { };
+
+
/*! Class that is inherited using public inheritance */
+
class PublicBase : public Truncated { };
+
+
/*! A template class */
+
template<class T> class Templ { };
+
+
/*! Class that is inherited using protected inheritance */
+
class ProtectedBase { };
+
+
/*! Class that is inherited using private inheritance */
+
class PrivateBase { };
+
+
/*! Class that is used by the Inherited class */
+
class Used { };
+
+
/*! Super class that inherits a number of other classes */
+
class Inherited : public PublicBase,
+
protected ProtectedBase,
+
private PrivateBase,
+
public Undocumented,
+
public Templ<int>
+
{
+
private:
+
Used *m_usedClass;
+
};
+

This will result in the following graph:

+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a gray border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance.
  • +
+
+
+ + + + diff --git a/graph_legend.md5 b/graph_legend.md5 new file mode 100644 index 00000000..da515da9 --- /dev/null +++ b/graph_legend.md5 @@ -0,0 +1 @@ +f74606a252eb303675caf37987d0b7af \ No newline at end of file diff --git a/graph_legend.svg b/graph_legend.svg new file mode 100644 index 00000000..f90d1bfb --- /dev/null +++ b/graph_legend.svg @@ -0,0 +1,167 @@ + + + + + + +Graph Legend + + +Node9 + + +Inherited + + + + + +Node10 + + +PublicBase + + + + + +Node10->Node9 + + + + + + + + +Node11 + + +Truncated + + + + + +Node11->Node10 + + + + + + + + +Node13 + + +ProtectedBase + + + + + +Node13->Node9 + + + + + + + + +Node14 + + +PrivateBase + + + + + +Node14->Node9 + + + + + + + + +Node15 + + +Undocumented + + + + + +Node15->Node9 + + + + + + + + +Node16 + + +Templ< int > + + + + + +Node16->Node9 + + + + + + + + +Node17 + + +Templ< T > + + + + + +Node17->Node16 + + + + + +< int > + + + +Node18 + + +Used + + + + + +Node18->Node9 + + + + + +m_usedClass + + + diff --git a/heightmap_8h.html b/heightmap_8h.html new file mode 100644 index 00000000..d280d98a --- /dev/null +++ b/heightmap_8h.html @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/heightmap.h File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
heightmap.h File Reference
+
+
+
#include "coordinate.h"
+#include <cstdint>
+#include <memory>
+#include <vector>
+
+Include dependency graph for heightmap.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+
+
+

Go to the source code of this file.

+ + + + + + + + + + +

+Classes

struct  mcpp::HeightMap
 
struct  mcpp::HeightMap::Iterator
 An iterator for the HeightMap structure. More...
 
struct  mcpp::HeightMap::ConstIterator
 An iterator for the const HeightMap structure. More...
 
+ + + + +

+Namespaces

namespace  mcpp
 Namespace containing all the the mcpp library classes.
 
+
+
+ + + + diff --git a/heightmap_8h.js b/heightmap_8h.js new file mode 100644 index 00000000..6e3464c1 --- /dev/null +++ b/heightmap_8h.js @@ -0,0 +1,6 @@ +var heightmap_8h = +[ + [ "mcpp::HeightMap", "structmcpp_1_1_height_map.html", "structmcpp_1_1_height_map" ], + [ "mcpp::HeightMap::Iterator", "structmcpp_1_1_height_map_1_1_iterator.html", "structmcpp_1_1_height_map_1_1_iterator" ], + [ "mcpp::HeightMap::ConstIterator", "structmcpp_1_1_height_map_1_1_const_iterator.html", "structmcpp_1_1_height_map_1_1_const_iterator" ] +]; \ No newline at end of file diff --git a/heightmap_8h__dep__incl.map b/heightmap_8h__dep__incl.map new file mode 100644 index 00000000..b0016b85 --- /dev/null +++ b/heightmap_8h__dep__incl.map @@ -0,0 +1,5 @@ + + + + + diff --git a/heightmap_8h__dep__incl.md5 b/heightmap_8h__dep__incl.md5 new file mode 100644 index 00000000..0db1ea3f --- /dev/null +++ b/heightmap_8h__dep__incl.md5 @@ -0,0 +1 @@ +c2d2c8a1d127984069007b89a15d5fae \ No newline at end of file diff --git a/heightmap_8h__dep__incl.svg b/heightmap_8h__dep__incl.svg new file mode 100644 index 00000000..e18c514d --- /dev/null +++ b/heightmap_8h__dep__incl.svg @@ -0,0 +1,39 @@ + + + + + + +include/mcpp/heightmap.h + + +Node1 + + +include/mcpp/heightmap.h + + + + + +Node2 + + +include/mcpp/mcpp.h + + + + + +Node1->Node2 + + + + + + + + diff --git a/heightmap_8h__incl.map b/heightmap_8h__incl.map new file mode 100644 index 00000000..5bc354dd --- /dev/null +++ b/heightmap_8h__incl.map @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/heightmap_8h__incl.md5 b/heightmap_8h__incl.md5 new file mode 100644 index 00000000..fdece5e0 --- /dev/null +++ b/heightmap_8h__incl.md5 @@ -0,0 +1 @@ +692d24d65bc2ed3155b404bba748698c \ No newline at end of file diff --git a/heightmap_8h__incl.svg b/heightmap_8h__incl.svg new file mode 100644 index 00000000..3d9ef478 --- /dev/null +++ b/heightmap_8h__incl.svg @@ -0,0 +1,111 @@ + + + + + + +include/mcpp/heightmap.h + + +Node1 + + +include/mcpp/heightmap.h + + + + + +Node2 + + +coordinate.h + + + + + +Node1->Node2 + + + + + + + + +Node4 + + +cstdint + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +memory + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +vector + + + + + +Node1->Node6 + + + + + + + + +Node3 + + +ostream + + + + + +Node2->Node3 + + + + + + + + diff --git a/heightmap_8h_source.html b/heightmap_8h_source.html new file mode 100644 index 00000000..bc79d093 --- /dev/null +++ b/heightmap_8h_source.html @@ -0,0 +1,332 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/heightmap.h Source File + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
heightmap.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2
+
3#include "coordinate.h"
+
4#include <cstdint>
+
5#include <memory>
+
6#include <vector>
+
7
+
8namespace mcpp {
+
+
13struct HeightMap {
+
14private:
+
15 Coordinate2D _base_pt;
+
16 uint16_t _x_len;
+
17 uint16_t _z_len;
+
18 std::unique_ptr<int16_t[]> _raw_heights;
+
19
+
20public:
+
21 // Constructors and assignment
+
22 HeightMap(const Coordinate2D& loc1, const Coordinate2D& loc2,
+
23 const std::vector<int16_t>& heights);
+
24 ~HeightMap() = default;
+
25
+
+
26 HeightMap(const HeightMap& other)
+
27 : _base_pt(other._base_pt), _x_len(other._x_len), _z_len(other._z_len) {
+
28 size_t size = _x_len * _z_len;
+
29 // Allocate memory and copy the heights
+
30 _raw_heights.reset(new int16_t[size]);
+
31 std::copy(other._raw_heights.get(), other._raw_heights.get() + size, _raw_heights.get());
+
32 }
+
+
33
+
34 HeightMap(HeightMap&& other) noexcept = default;
+ +
36 HeightMap& operator=(HeightMap&& other) = default;
+
37
+
45 int16_t get(int x, int z) const;
+
46
+
52 int16_t get_worldspace(const Coordinate2D& loc) const;
+
53
+
59 void fill_coord(Coordinate& out) const;
+
60
+
65 uint16_t x_len() const;
+
66
+
71 uint16_t z_len() const;
+
72
+ +
78
+
+
85 struct Iterator {
+
86 using iterator_category = std::forward_iterator_tag;
+
87 using difference_type = std::ptrdiff_t;
+
88 using value_type = int16_t;
+
89 using pointer = int16_t*;
+
90 using reference = int16_t&;
+
91
+
97 Iterator(pointer ptr) : m_ptr(ptr) {}
+
98
+
105 reference operator*() const { return *m_ptr; }
+
106
+
112 pointer operator->() { return m_ptr; }
+
113
+
+ +
121 m_ptr++;
+
122 return *this;
+
123 }
+
+
124
+
+ +
134 Iterator tmp = *this;
+
135 ++(*this);
+
136 return tmp;
+
137 }
+
+
138
+
147 friend bool operator==(const Iterator& a, const Iterator& b) { return a.m_ptr == b.m_ptr; };
+
148
+
157 friend bool operator!=(const Iterator& a, const Iterator& b) { return a.m_ptr != b.m_ptr; };
+
158
+
159 private:
+
160 pointer m_ptr;
+
161 };
+
+
162
+
+ +
170 using iterator_category = std::forward_iterator_tag;
+
171 using difference_type = std::ptrdiff_t;
+
172 using value_type = int16_t;
+
173 using pointer = const int16_t*;
+
174 using reference = const int16_t&;
+
175
+
181 ConstIterator(pointer ptr) : m_ptr(ptr) {}
+
182
+
189 reference operator*() const { return *m_ptr; }
+
190
+
196 pointer operator->() { return m_ptr; }
+
197
+
+ +
205 m_ptr++;
+
206 return *this;
+
207 }
+
+
208
+
+ +
218 ConstIterator tmp = *this;
+
219 ++(*this);
+
220 return tmp;
+
221 }
+
+
222
+
+
231 friend bool operator==(const ConstIterator& a, const ConstIterator& b) {
+
232 return a.m_ptr == b.m_ptr;
+
233 };
+
+
234
+
+
243 friend bool operator!=(const ConstIterator& a, const ConstIterator& b) {
+
244 return a.m_ptr != b.m_ptr;
+
245 };
+
+
246
+
247 private:
+
248 pointer m_ptr;
+
249 };
+
+
250
+
251 Iterator begin() { return Iterator(&_raw_heights[0]); }
+
252 Iterator end() { return Iterator(&_raw_heights[_x_len * _z_len]); }
+
253 ConstIterator begin() const { return ConstIterator(&_raw_heights[0]); }
+
254 ConstIterator end() const { return ConstIterator(&_raw_heights[_x_len * _z_len]); }
+
255};
+
+
256
+
257} // namespace mcpp
+
Coordinate class.
+
Namespace containing all the the mcpp library classes.
Definition block.h:10
+
Height-agnostic coordinate class.
Definition coordinate.h:107
+
Definition coordinate.h:17
+
An iterator for the const HeightMap structure.
Definition heightmap.h:169
+
const int16_t & reference
Definition heightmap.h:174
+
ConstIterator(pointer ptr)
Constructs an iterator at the given pointer position.
Definition heightmap.h:181
+
ConstIterator operator++(int)
Post-increment operator. Advances the iterator to the next position.
Definition heightmap.h:217
+
int16_t value_type
Definition heightmap.h:172
+
reference operator*() const
Dereference the iterator to access the value at the current position.
Definition heightmap.h:189
+
ConstIterator & operator++()
Pre-increment operator. Advances the iterator to the next position.
Definition heightmap.h:204
+
friend bool operator==(const ConstIterator &a, const ConstIterator &b)
Equality comparison operator.
Definition heightmap.h:231
+
friend bool operator!=(const ConstIterator &a, const ConstIterator &b)
Inequality comparison operator.
Definition heightmap.h:243
+
std::forward_iterator_tag iterator_category
Definition heightmap.h:170
+
const int16_t * pointer
Definition heightmap.h:173
+
pointer operator->()
Access the pointer to the current element.
Definition heightmap.h:196
+
std::ptrdiff_t difference_type
Definition heightmap.h:171
+
An iterator for the HeightMap structure.
Definition heightmap.h:85
+
int16_t value_type
Definition heightmap.h:88
+
int16_t & reference
Definition heightmap.h:90
+
friend bool operator!=(const Iterator &a, const Iterator &b)
Inequality comparison operator.
Definition heightmap.h:157
+
int16_t * pointer
Definition heightmap.h:89
+
Iterator & operator++()
Pre-increment operator. Advances the iterator to the next position.
Definition heightmap.h:120
+
pointer operator->()
Access the pointer to the current element.
Definition heightmap.h:112
+
Iterator operator++(int)
Post-increment operator. Advances the iterator to the next position.
Definition heightmap.h:133
+
std::forward_iterator_tag iterator_category
Definition heightmap.h:86
+
reference operator*() const
Dereference the iterator to access the value at the current position.
Definition heightmap.h:105
+
Iterator(pointer ptr)
Constructs an iterator at the given pointer position.
Definition heightmap.h:97
+
friend bool operator==(const Iterator &a, const Iterator &b)
Equality comparison operator.
Definition heightmap.h:147
+
std::ptrdiff_t difference_type
Definition heightmap.h:87
+
Definition heightmap.h:13
+
HeightMap(HeightMap &&other) noexcept=default
+
uint16_t x_len() const
+
uint16_t z_len() const
+
void fill_coord(Coordinate &out) const
+
Iterator begin()
Definition heightmap.h:251
+
ConstIterator end() const
Definition heightmap.h:254
+
~HeightMap()=default
+
HeightMap(const Coordinate2D &loc1, const Coordinate2D &loc2, const std::vector< int16_t > &heights)
+
ConstIterator begin() const
Definition heightmap.h:253
+
Coordinate2D base_pt() const
+
int16_t get(int x, int z) const
+
Iterator end()
Definition heightmap.h:252
+
HeightMap & operator=(HeightMap &&other)=default
+
int16_t get_worldspace(const Coordinate2D &loc) const
+
HeightMap(const HeightMap &other)
Definition heightmap.h:26
+
HeightMap & operator=(const HeightMap &other)
+
+
+ + + + diff --git a/include/mcpp/block.h b/include/mcpp/block.h deleted file mode 100644 index 747ae117..00000000 --- a/include/mcpp/block.h +++ /dev/null @@ -1,518 +0,0 @@ -#pragma once - -#include -#include - -/** - * @file - * @brief BlockType class - */ -namespace mcpp { -class BlockType { -public: - uint8_t id; // NOLINT - uint8_t mod; // NOLINT - - // NOLINTNEXTLINE - constexpr BlockType(uint8_t id = 0, uint8_t mod = 0) : id(id), mod(mod){}; - - /** - * @brief Equality comparison operator. - * - * Watch out as this also compares the BlockType.mod element of the block, - * so some equalities may behave in unexpected ways e.g. rotated stairs - * - * @param other The BlockType to compare with the current instance. - * - * @return True if the two BlockType instances are not equal, false - * otherwise. - */ - bool operator==(const BlockType& other) const; - - /** - * @brief Inequality comparison operator. - * - * Watch out as this also compares the BlockType.mod element of the block, - * so some equalities may behave in unexpected ways e.g. rotated stairs - * - * @param other The BlockType to compare with the current instance. - * @return True if the two BlockType instances are not equal, false - * otherwise. - */ - bool operator!=(const BlockType& other) const; - - /** - * @brief Stream insertion operator for outputting the BlockType to an - * output stream. - * - * @param out The output stream to write to. - * @param block The BlockType instance to output. - * @return A reference to the output stream after the block information has - * been inserted. - */ - friend std::ostream& operator<<(std::ostream& out, const BlockType& block); - - /** - * Returns a new BlockType with the same id and specified modifier, useful - * for rotations etc. - * - * @param modifier New modifier for the BlockType - * @return New BlockType object with the specified modifier - */ - [[nodiscard]] BlockType with_mod(uint8_t modifier) const; -}; - -// Using script to extract ids from https://minecraft-ids.grahamedgecombe.com/ - -/** - * @struct Blocks - * Struct of static block objects that allows for a "search" of sorts, callable - * using Blocks::TYPE after importing - */ -struct Blocks { - // NOLINTBEGIN - static constexpr BlockType AIR = BlockType(0); - static constexpr BlockType STONE = BlockType(1); - static constexpr BlockType GRANITE = BlockType(1, 1); - static constexpr BlockType POLISHED_GRANITE = BlockType(1, 2); - static constexpr BlockType DIORITE = BlockType(1, 3); - static constexpr BlockType POLISHED_DIORITE = BlockType(1, 4); - static constexpr BlockType ANDESITE = BlockType(1, 5); - static constexpr BlockType POLISHED_ANDESITE = BlockType(1, 6); - static constexpr BlockType GRASS = BlockType(2); - static constexpr BlockType DIRT = BlockType(3); - static constexpr BlockType COARSE_DIRT = BlockType(3, 1); - static constexpr BlockType PODZOL = BlockType(3, 2); - static constexpr BlockType COBBLESTONE = BlockType(4); - static constexpr BlockType OAK_WOOD_PLANK = BlockType(5); - static constexpr BlockType SPRUCE_WOOD_PLANK = BlockType(5, 1); - static constexpr BlockType BIRCH_WOOD_PLANK = BlockType(5, 2); - static constexpr BlockType JUNGLE_WOOD_PLANK = BlockType(5, 3); - static constexpr BlockType ACACIA_WOOD_PLANK = BlockType(5, 4); - static constexpr BlockType DARK_OAK_WOOD_PLANK = BlockType(5, 5); - static constexpr BlockType OAK_SAPLING = BlockType(6); - static constexpr BlockType SPRUCE_SAPLING = BlockType(6, 1); - static constexpr BlockType BIRCH_SAPLING = BlockType(6, 2); - static constexpr BlockType JUNGLE_SAPLING = BlockType(6, 3); - static constexpr BlockType ACACIA_SAPLING = BlockType(6, 4); - static constexpr BlockType DARK_OAK_SAPLING = BlockType(6, 5); - static constexpr BlockType BEDROCK = BlockType(7); - static constexpr BlockType FLOWING_WATER = BlockType(8); - static constexpr BlockType STILL_WATER = BlockType(9); - static constexpr BlockType FLOWING_LAVA = BlockType(10); - static constexpr BlockType STILL_LAVA = BlockType(11); - static constexpr BlockType SAND = BlockType(12); - static constexpr BlockType RED_SAND = BlockType(12, 1); - static constexpr BlockType GRAVEL = BlockType(13); - static constexpr BlockType GOLD_ORE = BlockType(14); - static constexpr BlockType IRON_ORE = BlockType(15); - static constexpr BlockType COAL_ORE = BlockType(16); - static constexpr BlockType OAK_WOOD = BlockType(17); - static constexpr BlockType SPRUCE_WOOD = BlockType(17, 1); - static constexpr BlockType BIRCH_WOOD = BlockType(17, 2); - static constexpr BlockType JUNGLE_WOOD = BlockType(17, 3); - static constexpr BlockType OAK_LEAVES = BlockType(18); - static constexpr BlockType SPRUCE_LEAVES = BlockType(18, 1); - static constexpr BlockType BIRCH_LEAVES = BlockType(18, 2); - static constexpr BlockType JUNGLE_LEAVES = BlockType(18, 3); - static constexpr BlockType SPONGE = BlockType(19); - static constexpr BlockType WET_SPONGE = BlockType(19, 1); - static constexpr BlockType GLASS = BlockType(20); - static constexpr BlockType LAPIS_LAZULI_ORE = BlockType(21); - static constexpr BlockType LAPIS_LAZULI_BLOCK = BlockType(22); - static constexpr BlockType DISPENSER = BlockType(23); - static constexpr BlockType SANDSTONE = BlockType(24); - static constexpr BlockType CHISELED_SANDSTONE = BlockType(24, 1); - static constexpr BlockType SMOOTH_SANDSTONE = BlockType(24, 2); - static constexpr BlockType NOTE_BLOCK = BlockType(25); - static constexpr BlockType BED = BlockType(26); - static constexpr BlockType POWERED_RAIL = BlockType(27); - static constexpr BlockType DETECTOR_RAIL = BlockType(28); - static constexpr BlockType STICKY_PISTON = BlockType(29); - static constexpr BlockType COBWEB = BlockType(30); - static constexpr BlockType DEAD_SHRUB = BlockType(31); - static constexpr BlockType TALL_GRASS = BlockType(31, 1); - static constexpr BlockType FERN = BlockType(31, 2); - static constexpr BlockType DEAD_BUSH = BlockType(32); - static constexpr BlockType PISTON = BlockType(33); - static constexpr BlockType PISTON_HEAD = BlockType(34); - static constexpr BlockType WHITE_WOOL = BlockType(35); - static constexpr BlockType ORANGE_WOOL = BlockType(35, 1); - static constexpr BlockType MAGENTA_WOOL = BlockType(35, 2); - static constexpr BlockType LIGHT_BLUE_WOOL = BlockType(35, 3); - static constexpr BlockType YELLOW_WOOL = BlockType(35, 4); - static constexpr BlockType LIME_WOOL = BlockType(35, 5); - static constexpr BlockType PINK_WOOL = BlockType(35, 6); - static constexpr BlockType GRAY_WOOL = BlockType(35, 7); - static constexpr BlockType LIGHT_GRAY_WOOL = BlockType(35, 8); - static constexpr BlockType CYAN_WOOL = BlockType(35, 9); - static constexpr BlockType PURPLE_WOOL = BlockType(35, 10); - static constexpr BlockType BLUE_WOOL = BlockType(35, 11); - static constexpr BlockType BROWN_WOOL = BlockType(35, 12); - static constexpr BlockType GREEN_WOOL = BlockType(35, 13); - static constexpr BlockType RED_WOOL = BlockType(35, 14); - static constexpr BlockType BLACK_WOOL = BlockType(35, 15); - static constexpr BlockType DANDELION = BlockType(37); - static constexpr BlockType POPPY = BlockType(38); - static constexpr BlockType BLUE_ORCHID = BlockType(38, 1); - static constexpr BlockType ALLIUM = BlockType(38, 2); - static constexpr BlockType AZURE_BLUET = BlockType(38, 3); - static constexpr BlockType RED_TULIP = BlockType(38, 4); - static constexpr BlockType ORANGE_TULIP = BlockType(38, 5); - static constexpr BlockType WHITE_TULIP = BlockType(38, 6); - static constexpr BlockType PINK_TULIP = BlockType(38, 7); - static constexpr BlockType OXEYE_DAISY = BlockType(38, 8); - static constexpr BlockType BROWN_MUSHROOM = BlockType(39); - static constexpr BlockType RED_MUSHROOM = BlockType(40); - static constexpr BlockType GOLD_BLOCK = BlockType(41); - static constexpr BlockType IRON_BLOCK = BlockType(42); - static constexpr BlockType DOUBLE_STONE_SLAB = BlockType(43); - static constexpr BlockType DOUBLE_SANDSTONE_SLAB = BlockType(43, 1); - static constexpr BlockType DOUBLE_WOODEN_SLAB = BlockType(43, 2); - static constexpr BlockType DOUBLE_COBBLESTONE_SLAB = BlockType(43, 3); - static constexpr BlockType DOUBLE_BRICK_SLAB = BlockType(43, 4); - static constexpr BlockType DOUBLE_STONE_BRICK_SLAB = BlockType(43, 5); - static constexpr BlockType DOUBLE_NETHER_BRICK_SLAB = BlockType(43, 6); - static constexpr BlockType DOUBLE_QUARTZ_SLAB = BlockType(43, 7); - static constexpr BlockType STONE_SLAB = BlockType(44); - static constexpr BlockType SANDSTONE_SLAB = BlockType(44, 1); - static constexpr BlockType WOODEN_SLAB = BlockType(44, 2); - static constexpr BlockType COBBLESTONE_SLAB = BlockType(44, 3); - static constexpr BlockType BRICK_SLAB = BlockType(44, 4); - static constexpr BlockType STONE_BRICK_SLAB = BlockType(44, 5); - static constexpr BlockType NETHER_BRICK_SLAB = BlockType(44, 6); - static constexpr BlockType QUARTZ_SLAB = BlockType(44, 7); - static constexpr BlockType BRICKS = BlockType(45); - static constexpr BlockType TNT = BlockType(46); - static constexpr BlockType BOOKSHELF = BlockType(47); - static constexpr BlockType MOSS_STONE = BlockType(48); - static constexpr BlockType OBSIDIAN = BlockType(49); - static constexpr BlockType TORCH = BlockType(50); - static constexpr BlockType FIRE = BlockType(51); - static constexpr BlockType MONSTER_SPAWNER = BlockType(52); - static constexpr BlockType OAK_WOOD_STAIRS = BlockType(53); - static constexpr BlockType CHEST = BlockType(54); - static constexpr BlockType REDSTONE_WIRE = BlockType(55); - static constexpr BlockType DIAMOND_ORE = BlockType(56); - static constexpr BlockType DIAMOND_BLOCK = BlockType(57); - static constexpr BlockType CRAFTING_TABLE = BlockType(58); - static constexpr BlockType WHEAT_CROPS = BlockType(59); - static constexpr BlockType FARMLAND = BlockType(60); - static constexpr BlockType FURNACE = BlockType(61); - static constexpr BlockType BURNING_FURNACE = BlockType(62); - static constexpr BlockType STANDING_SIGN_BLOCK = BlockType(63); - static constexpr BlockType OAK_DOOR_BLOCK = BlockType(64); - static constexpr BlockType LADDER = BlockType(65); - static constexpr BlockType RAIL = BlockType(66); - static constexpr BlockType COBBLESTONE_STAIRS = BlockType(67); - static constexpr BlockType WALLMOUNTED_SIGN_BLOCK = BlockType(68); - static constexpr BlockType LEVER = BlockType(69); - static constexpr BlockType STONE_PRESSURE_PLATE = BlockType(70); - static constexpr BlockType IRON_DOOR_BLOCK = BlockType(71); - static constexpr BlockType WOODEN_PRESSURE_PLATE = BlockType(72); - static constexpr BlockType REDSTONE_ORE = BlockType(73); - static constexpr BlockType GLOWING_REDSTONE_ORE = BlockType(74); - static constexpr BlockType REDSTONE_TORCH_OFF = BlockType(75); - static constexpr BlockType REDSTONE_TORCH_ON = BlockType(76); - static constexpr BlockType STONE_BUTTON = BlockType(77); - static constexpr BlockType SNOW = BlockType(78); - static constexpr BlockType ICE = BlockType(79); - static constexpr BlockType SNOW_BLOCK = BlockType(80); - static constexpr BlockType CACTUS = BlockType(81); - static constexpr BlockType CLAY = BlockType(82); - static constexpr BlockType SUGAR_CANES = BlockType(83); - static constexpr BlockType JUKEBOX = BlockType(84); - static constexpr BlockType OAK_FENCE = BlockType(85); - static constexpr BlockType PUMPKIN = BlockType(86); - static constexpr BlockType NETHERRACK = BlockType(87); - static constexpr BlockType SOUL_SAND = BlockType(88); - static constexpr BlockType GLOWSTONE = BlockType(89); - static constexpr BlockType NETHER_PORTAL = BlockType(90); - static constexpr BlockType JACK_OLANTERN = BlockType(91); - static constexpr BlockType CAKE_BLOCK = BlockType(92); - static constexpr BlockType REDSTONE_REPEATER_BLOCK_OFF = BlockType(93); - static constexpr BlockType REDSTONE_REPEATER_BLOCK_ON = BlockType(94); - static constexpr BlockType WHITE_STAINED_GLASS = BlockType(95); - static constexpr BlockType ORANGE_STAINED_GLASS = BlockType(95, 1); - static constexpr BlockType MAGENTA_STAINED_GLASS = BlockType(95, 2); - static constexpr BlockType LIGHT_BLUE_STAINED_GLASS = BlockType(95, 3); - static constexpr BlockType YELLOW_STAINED_GLASS = BlockType(95, 4); - static constexpr BlockType LIME_STAINED_GLASS = BlockType(95, 5); - static constexpr BlockType PINK_STAINED_GLASS = BlockType(95, 6); - static constexpr BlockType GRAY_STAINED_GLASS = BlockType(95, 7); - static constexpr BlockType LIGHT_GRAY_STAINED_GLASS = BlockType(95, 8); - static constexpr BlockType CYAN_STAINED_GLASS = BlockType(95, 9); - static constexpr BlockType PURPLE_STAINED_GLASS = BlockType(95, 10); - static constexpr BlockType BLUE_STAINED_GLASS = BlockType(95, 11); - static constexpr BlockType BROWN_STAINED_GLASS = BlockType(95, 12); - static constexpr BlockType GREEN_STAINED_GLASS = BlockType(95, 13); - static constexpr BlockType RED_STAINED_GLASS = BlockType(95, 14); - static constexpr BlockType BLACK_STAINED_GLASS = BlockType(95, 15); - static constexpr BlockType WOODEN_TRAPDOOR = BlockType(96); - static constexpr BlockType STONE_MONSTER_EGG = BlockType(97); - static constexpr BlockType COBBLESTONE_MONSTER_EGG = BlockType(97, 1); - static constexpr BlockType STONE_BRICK_MONSTER_EGG = BlockType(97, 2); - static constexpr BlockType MOSSY_STONE_BRICK_MONSTER_EGG = BlockType(97, 3); - static constexpr BlockType CRACKED_STONE_BRICK_MONSTER_EGG = BlockType(97, 4); - static constexpr BlockType CHISELED_STONE_BRICK_MONSTER_EGG = BlockType(97, 5); - static constexpr BlockType STONE_BRICKS = BlockType(98); - static constexpr BlockType MOSSY_STONE_BRICKS = BlockType(98, 1); - static constexpr BlockType CRACKED_STONE_BRICKS = BlockType(98, 2); - static constexpr BlockType CHISELED_STONE_BRICKS = BlockType(98, 3); - static constexpr BlockType BROWN_MUSHROOM_BLOCK = BlockType(99); - static constexpr BlockType RED_MUSHROOM_BLOCK = BlockType(100); - static constexpr BlockType IRON_BARS = BlockType(101); - static constexpr BlockType GLASS_PANE = BlockType(102); - static constexpr BlockType MELON_BLOCK = BlockType(103); - static constexpr BlockType PUMPKIN_STEM = BlockType(104); - static constexpr BlockType MELON_STEM = BlockType(105); - static constexpr BlockType VINES = BlockType(106); - static constexpr BlockType OAK_FENCE_GATE = BlockType(107); - static constexpr BlockType BRICK_STAIRS = BlockType(108); - static constexpr BlockType STONE_BRICK_STAIRS = BlockType(109); - static constexpr BlockType MYCELIUM = BlockType(110); - static constexpr BlockType LILY_PAD = BlockType(111); - static constexpr BlockType NETHER_BRICK = BlockType(112); - static constexpr BlockType NETHER_BRICK_FENCE = BlockType(113); - static constexpr BlockType NETHER_BRICK_STAIRS = BlockType(114); - static constexpr BlockType NETHER_WART = BlockType(115); - static constexpr BlockType ENCHANTMENT_TABLE = BlockType(116); - static constexpr BlockType BREWING_STAND = BlockType(117); - static constexpr BlockType CAULDRON = BlockType(118); - static constexpr BlockType END_PORTAL = BlockType(119); - static constexpr BlockType END_PORTAL_FRAME = BlockType(120); - static constexpr BlockType END_STONE = BlockType(121); - static constexpr BlockType DRAGON_EGG = BlockType(122); - static constexpr BlockType REDSTONE_LAMP_INACTIVE = BlockType(123); - static constexpr BlockType REDSTONE_LAMP_ACTIVE = BlockType(124); - static constexpr BlockType DOUBLE_OAK_WOOD_SLAB = BlockType(125); - static constexpr BlockType DOUBLE_SPRUCE_WOOD_SLAB = BlockType(125, 1); - static constexpr BlockType DOUBLE_BIRCH_WOOD_SLAB = BlockType(125, 2); - static constexpr BlockType DOUBLE_JUNGLE_WOOD_SLAB = BlockType(125, 3); - static constexpr BlockType DOUBLE_ACACIA_WOOD_SLAB = BlockType(125, 4); - static constexpr BlockType DOUBLE_DARK_OAK_WOOD_SLAB = BlockType(125, 5); - static constexpr BlockType OAK_WOOD_SLAB = BlockType(126); - static constexpr BlockType SPRUCE_WOOD_SLAB = BlockType(126, 1); - static constexpr BlockType BIRCH_WOOD_SLAB = BlockType(126, 2); - static constexpr BlockType JUNGLE_WOOD_SLAB = BlockType(126, 3); - static constexpr BlockType ACACIA_WOOD_SLAB = BlockType(126, 4); - static constexpr BlockType DARK_OAK_WOOD_SLAB = BlockType(126, 5); - static constexpr BlockType COCOA = BlockType(127); - static constexpr BlockType SANDSTONE_STAIRS = BlockType(128); - static constexpr BlockType EMERALD_ORE = BlockType(129); - static constexpr BlockType ENDER_CHEST = BlockType(130); - static constexpr BlockType TRIPWIRE_HOOK = BlockType(131); - static constexpr BlockType TRIPWIRE = BlockType(132); - static constexpr BlockType EMERALD_BLOCK = BlockType(133); - static constexpr BlockType SPRUCE_WOOD_STAIRS = BlockType(134); - static constexpr BlockType BIRCH_WOOD_STAIRS = BlockType(135); - static constexpr BlockType JUNGLE_WOOD_STAIRS = BlockType(136); - static constexpr BlockType COMMAND_BLOCK = BlockType(137); - static constexpr BlockType BEACON = BlockType(138); - static constexpr BlockType COBBLESTONE_WALL = BlockType(139); - static constexpr BlockType MOSSY_COBBLESTONE_WALL = BlockType(139, 1); - static constexpr BlockType FLOWER_POT = BlockType(140); - static constexpr BlockType CARROTS = BlockType(141); - static constexpr BlockType POTATOES = BlockType(142); - static constexpr BlockType WOODEN_BUTTON = BlockType(143); - static constexpr BlockType MOB_HEAD = BlockType(144); - static constexpr BlockType ANVIL = BlockType(145); - static constexpr BlockType TRAPPED_CHEST = BlockType(146); - static constexpr BlockType WEIGHTED_PRESSURE_PLATE_LIGHT = BlockType(147); - static constexpr BlockType WEIGHTED_PRESSURE_PLATE_HEAVY = BlockType(148); - static constexpr BlockType REDSTONE_COMPARATOR_INACTIVE = BlockType(149); - static constexpr BlockType REDSTONE_COMPARATOR_ACTIVE = BlockType(150); - static constexpr BlockType DAYLIGHT_SENSOR = BlockType(151); - static constexpr BlockType REDSTONE_BLOCK = BlockType(152); - static constexpr BlockType NETHER_QUARTZ_ORE = BlockType(153); - static constexpr BlockType HOPPER = BlockType(154); - static constexpr BlockType QUARTZ_BLOCK = BlockType(155); - static constexpr BlockType CHISELED_QUARTZ_BLOCK = BlockType(155, 1); - static constexpr BlockType PILLAR_QUARTZ_BLOCK = BlockType(155, 2); - static constexpr BlockType QUARTZ_STAIRS = BlockType(156); - static constexpr BlockType ACTIVATOR_RAIL = BlockType(157); - static constexpr BlockType DROPPER = BlockType(158); - static constexpr BlockType WHITE_HARDENED_CLAY = BlockType(159); - static constexpr BlockType ORANGE_HARDENED_CLAY = BlockType(159, 1); - static constexpr BlockType MAGENTA_HARDENED_CLAY = BlockType(159, 2); - static constexpr BlockType LIGHT_BLUE_HARDENED_CLAY = BlockType(159, 3); - static constexpr BlockType YELLOW_HARDENED_CLAY = BlockType(159, 4); - static constexpr BlockType LIME_HARDENED_CLAY = BlockType(159, 5); - static constexpr BlockType PINK_HARDENED_CLAY = BlockType(159, 6); - static constexpr BlockType GRAY_HARDENED_CLAY = BlockType(159, 7); - static constexpr BlockType LIGHT_GRAY_HARDENED_CLAY = BlockType(159, 8); - static constexpr BlockType CYAN_HARDENED_CLAY = BlockType(159, 9); - static constexpr BlockType PURPLE_HARDENED_CLAY = BlockType(159, 10); - static constexpr BlockType BLUE_HARDENED_CLAY = BlockType(159, 11); - static constexpr BlockType BROWN_HARDENED_CLAY = BlockType(159, 12); - static constexpr BlockType GREEN_HARDENED_CLAY = BlockType(159, 13); - static constexpr BlockType RED_HARDENED_CLAY = BlockType(159, 14); - static constexpr BlockType BLACK_HARDENED_CLAY = BlockType(159, 15); - static constexpr BlockType WHITE_STAINED_GLASS_PANE = BlockType(160); - static constexpr BlockType ORANGE_STAINED_GLASS_PANE = BlockType(160, 1); - static constexpr BlockType MAGENTA_STAINED_GLASS_PANE = BlockType(160, 2); - static constexpr BlockType LIGHT_BLUE_STAINED_GLASS_PANE = BlockType(160, 3); - static constexpr BlockType YELLOW_STAINED_GLASS_PANE = BlockType(160, 4); - static constexpr BlockType LIME_STAINED_GLASS_PANE = BlockType(160, 5); - static constexpr BlockType PINK_STAINED_GLASS_PANE = BlockType(160, 6); - static constexpr BlockType GRAY_STAINED_GLASS_PANE = BlockType(160, 7); - static constexpr BlockType LIGHT_GRAY_STAINED_GLASS_PANE = BlockType(160, 8); - static constexpr BlockType CYAN_STAINED_GLASS_PANE = BlockType(160, 9); - static constexpr BlockType PURPLE_STAINED_GLASS_PANE = BlockType(160, 10); - static constexpr BlockType BLUE_STAINED_GLASS_PANE = BlockType(160, 11); - static constexpr BlockType BROWN_STAINED_GLASS_PANE = BlockType(160, 12); - static constexpr BlockType GREEN_STAINED_GLASS_PANE = BlockType(160, 13); - static constexpr BlockType RED_STAINED_GLASS_PANE = BlockType(160, 14); - static constexpr BlockType BLACK_STAINED_GLASS_PANE = BlockType(160, 15); - static constexpr BlockType ACACIA_LEAVES = BlockType(161); - static constexpr BlockType DARK_OAK_LEAVES = BlockType(161, 1); - static constexpr BlockType ACACIA_WOOD = BlockType(162); - static constexpr BlockType DARK_OAK_WOOD = BlockType(162, 1); - static constexpr BlockType ACACIA_WOOD_STAIRS = BlockType(163); - static constexpr BlockType DARK_OAK_WOOD_STAIRS = BlockType(164); - static constexpr BlockType SLIME_BLOCK = BlockType(165); - static constexpr BlockType BARRIER = BlockType(166); - static constexpr BlockType IRON_TRAPDOOR = BlockType(167); - static constexpr BlockType PRISMARINE = BlockType(168); - static constexpr BlockType PRISMARINE_BRICKS = BlockType(168, 1); - static constexpr BlockType DARK_PRISMARINE = BlockType(168, 2); - static constexpr BlockType SEA_LANTERN = BlockType(169); - static constexpr BlockType HAY_BALE = BlockType(170); - static constexpr BlockType WHITE_CARPET = BlockType(171); - static constexpr BlockType ORANGE_CARPET = BlockType(171, 1); - static constexpr BlockType MAGENTA_CARPET = BlockType(171, 2); - static constexpr BlockType LIGHT_BLUE_CARPET = BlockType(171, 3); - static constexpr BlockType YELLOW_CARPET = BlockType(171, 4); - static constexpr BlockType LIME_CARPET = BlockType(171, 5); - static constexpr BlockType PINK_CARPET = BlockType(171, 6); - static constexpr BlockType GRAY_CARPET = BlockType(171, 7); - static constexpr BlockType LIGHT_GRAY_CARPET = BlockType(171, 8); - static constexpr BlockType CYAN_CARPET = BlockType(171, 9); - static constexpr BlockType PURPLE_CARPET = BlockType(171, 10); - static constexpr BlockType BLUE_CARPET = BlockType(171, 11); - static constexpr BlockType BROWN_CARPET = BlockType(171, 12); - static constexpr BlockType GREEN_CARPET = BlockType(171, 13); - static constexpr BlockType RED_CARPET = BlockType(171, 14); - static constexpr BlockType BLACK_CARPET = BlockType(171, 15); - static constexpr BlockType HARDENED_CLAY = BlockType(172); - static constexpr BlockType BLOCK_OF_COAL = BlockType(173); - static constexpr BlockType PACKED_ICE = BlockType(174); - static constexpr BlockType SUNFLOWER = BlockType(175); - static constexpr BlockType LILAC = BlockType(175, 1); - static constexpr BlockType DOUBLE_TALLGRASS = BlockType(175, 2); - static constexpr BlockType LARGE_FERN = BlockType(175, 3); - static constexpr BlockType ROSE_BUSH = BlockType(175, 4); - static constexpr BlockType PEONY = BlockType(175, 5); - static constexpr BlockType FREESTANDING_BANNER = BlockType(176); - static constexpr BlockType WALLMOUNTED_BANNER = BlockType(177); - static constexpr BlockType INVERTED_DAYLIGHT_SENSOR = BlockType(178); - static constexpr BlockType RED_SANDSTONE = BlockType(179); - static constexpr BlockType CHISELED_RED_SANDSTONE = BlockType(179, 1); - static constexpr BlockType SMOOTH_RED_SANDSTONE = BlockType(179, 2); - static constexpr BlockType RED_SANDSTONE_STAIRS = BlockType(180); - static constexpr BlockType DOUBLE_RED_SANDSTONE_SLAB = BlockType(181); - static constexpr BlockType RED_SANDSTONE_SLAB = BlockType(182); - static constexpr BlockType SPRUCE_FENCE_GATE = BlockType(183); - static constexpr BlockType BIRCH_FENCE_GATE = BlockType(184); - static constexpr BlockType JUNGLE_FENCE_GATE = BlockType(185); - static constexpr BlockType DARK_OAK_FENCE_GATE = BlockType(186); - static constexpr BlockType ACACIA_FENCE_GATE = BlockType(187); - static constexpr BlockType SPRUCE_FENCE = BlockType(188); - static constexpr BlockType BIRCH_FENCE = BlockType(189); - static constexpr BlockType JUNGLE_FENCE = BlockType(190); - static constexpr BlockType DARK_OAK_FENCE = BlockType(191); - static constexpr BlockType ACACIA_FENCE = BlockType(192); - static constexpr BlockType SPRUCE_DOOR_BLOCK = BlockType(193); - static constexpr BlockType BIRCH_DOOR_BLOCK = BlockType(194); - static constexpr BlockType JUNGLE_DOOR_BLOCK = BlockType(195); - static constexpr BlockType ACACIA_DOOR_BLOCK = BlockType(196); - static constexpr BlockType DARK_OAK_DOOR_BLOCK = BlockType(197); - static constexpr BlockType END_ROD = BlockType(198); - static constexpr BlockType CHORUS_PLANT = BlockType(199); - static constexpr BlockType CHORUS_FLOWER = BlockType(200); - static constexpr BlockType PURPUR_BLOCK = BlockType(201); - static constexpr BlockType PURPUR_PILLAR = BlockType(202); - static constexpr BlockType PURPUR_STAIRS = BlockType(203); - static constexpr BlockType PURPUR_DOUBLE_SLAB = BlockType(204); - static constexpr BlockType PURPUR_SLAB = BlockType(205); - static constexpr BlockType END_STONE_BRICKS = BlockType(206); - static constexpr BlockType BEETROOT_BLOCK = BlockType(207); - static constexpr BlockType GRASS_PATH = BlockType(208); - static constexpr BlockType END_GATEWAY = BlockType(209); - static constexpr BlockType REPEATING_COMMAND_BLOCK = BlockType(210); - static constexpr BlockType CHAIN_COMMAND_BLOCK = BlockType(211); - static constexpr BlockType FROSTED_ICE = BlockType(212); - static constexpr BlockType MAGMA_BLOCK = BlockType(213); - static constexpr BlockType NETHER_WART_BLOCK = BlockType(214); - static constexpr BlockType RED_NETHER_BRICK = BlockType(215); - static constexpr BlockType BONE_BLOCK = BlockType(216); - static constexpr BlockType STRUCTURE_VOID = BlockType(217); - static constexpr BlockType OBSERVER = BlockType(218); - static constexpr BlockType WHITE_SHULKER_BOX = BlockType(219); - static constexpr BlockType ORANGE_SHULKER_BOX = BlockType(220); - static constexpr BlockType MAGENTA_SHULKER_BOX = BlockType(221); - static constexpr BlockType LIGHT_BLUE_SHULKER_BOX = BlockType(222); - static constexpr BlockType YELLOW_SHULKER_BOX = BlockType(223); - static constexpr BlockType LIME_SHULKER_BOX = BlockType(224); - static constexpr BlockType PINK_SHULKER_BOX = BlockType(225); - static constexpr BlockType GRAY_SHULKER_BOX = BlockType(226); - static constexpr BlockType LIGHT_GRAY_SHULKER_BOX = BlockType(227); - static constexpr BlockType CYAN_SHULKER_BOX = BlockType(228); - static constexpr BlockType PURPLE_SHULKER_BOX = BlockType(229); - static constexpr BlockType BLUE_SHULKER_BOX = BlockType(230); - static constexpr BlockType BROWN_SHULKER_BOX = BlockType(231); - static constexpr BlockType GREEN_SHULKER_BOX = BlockType(232); - static constexpr BlockType RED_SHULKER_BOX = BlockType(233); - static constexpr BlockType BLACK_SHULKER_BOX = BlockType(234); - static constexpr BlockType WHITE_GLAZED_TERRACOTTA = BlockType(235); - static constexpr BlockType ORANGE_GLAZED_TERRACOTTA = BlockType(236); - static constexpr BlockType MAGENTA_GLAZED_TERRACOTTA = BlockType(237); - static constexpr BlockType LIGHT_BLUE_GLAZED_TERRACOTTA = BlockType(238); - static constexpr BlockType YELLOW_GLAZED_TERRACOTTA = BlockType(239); - static constexpr BlockType LIME_GLAZED_TERRACOTTA = BlockType(240); - static constexpr BlockType PINK_GLAZED_TERRACOTTA = BlockType(241); - static constexpr BlockType GRAY_GLAZED_TERRACOTTA = BlockType(242); - static constexpr BlockType LIGHT_GRAY_GLAZED_TERRACOTTA = BlockType(243); - static constexpr BlockType CYAN_GLAZED_TERRACOTTA = BlockType(244); - static constexpr BlockType PURPLE_GLAZED_TERRACOTTA = BlockType(245); - static constexpr BlockType BLUE_GLAZED_TERRACOTTA = BlockType(246); - static constexpr BlockType BROWN_GLAZED_TERRACOTTA = BlockType(247); - static constexpr BlockType GREEN_GLAZED_TERRACOTTA = BlockType(248); - static constexpr BlockType RED_GLAZED_TERRACOTTA = BlockType(249); - static constexpr BlockType BLACK_GLAZED_TERRACOTTA = BlockType(250); - static constexpr BlockType WHITE_CONCRETE = BlockType(251); - static constexpr BlockType ORANGE_CONCRETE = BlockType(251, 1); - static constexpr BlockType MAGENTA_CONCRETE = BlockType(251, 2); - static constexpr BlockType LIGHT_BLUE_CONCRETE = BlockType(251, 3); - static constexpr BlockType YELLOW_CONCRETE = BlockType(251, 4); - static constexpr BlockType LIME_CONCRETE = BlockType(251, 5); - static constexpr BlockType PINK_CONCRETE = BlockType(251, 6); - static constexpr BlockType GRAY_CONCRETE = BlockType(251, 7); - static constexpr BlockType LIGHT_GRAY_CONCRETE = BlockType(251, 8); - static constexpr BlockType CYAN_CONCRETE = BlockType(251, 9); - static constexpr BlockType PURPLE_CONCRETE = BlockType(251, 10); - static constexpr BlockType BLUE_CONCRETE = BlockType(251, 11); - static constexpr BlockType BROWN_CONCRETE = BlockType(251, 12); - static constexpr BlockType GREEN_CONCRETE = BlockType(251, 13); - static constexpr BlockType RED_CONCRETE = BlockType(251, 14); - static constexpr BlockType BLACK_CONCRETE = BlockType(251, 15); - static constexpr BlockType WHITE_CONCRETE_POWDER = BlockType(252); - static constexpr BlockType ORANGE_CONCRETE_POWDER = BlockType(252, 1); - static constexpr BlockType MAGENTA_CONCRETE_POWDER = BlockType(252, 2); - static constexpr BlockType LIGHT_BLUE_CONCRETE_POWDER = BlockType(252, 3); - static constexpr BlockType YELLOW_CONCRETE_POWDER = BlockType(252, 4); - static constexpr BlockType LIME_CONCRETE_POWDER = BlockType(252, 5); - static constexpr BlockType PINK_CONCRETE_POWDER = BlockType(252, 6); - static constexpr BlockType GRAY_CONCRETE_POWDER = BlockType(252, 7); - static constexpr BlockType LIGHT_GRAY_CONCRETE_POWDER = BlockType(252, 8); - static constexpr BlockType CYAN_CONCRETE_POWDER = BlockType(252, 9); - static constexpr BlockType PURPLE_CONCRETE_POWDER = BlockType(252, 10); - static constexpr BlockType BLUE_CONCRETE_POWDER = BlockType(252, 11); - static constexpr BlockType BROWN_CONCRETE_POWDER = BlockType(252, 12); - static constexpr BlockType GREEN_CONCRETE_POWDER = BlockType(252, 13); - static constexpr BlockType RED_CONCRETE_POWDER = BlockType(252, 14); - static constexpr BlockType BLACK_CONCRETE_POWDER = BlockType(252, 15); - static constexpr BlockType STRUCTURE_BLOCK = BlockType(255); - // NOLINTEND -}; -} // namespace mcpp diff --git a/include/mcpp/chunk.h b/include/mcpp/chunk.h deleted file mode 100644 index cbbe0258..00000000 --- a/include/mcpp/chunk.h +++ /dev/null @@ -1,262 +0,0 @@ -#pragma once - -#include "block.h" -#include "coordinate.h" -#include -#include - -namespace mcpp { -/** - * Stores a 3D cuboid of BlockTypes while preserving their relative location to - * the base point they were gathered at and each other. - */ -struct Chunk { -private: - Coordinate _base_pt; - uint16_t _x_len; - uint16_t _y_len; - uint16_t _z_len; - std::unique_ptr _raw_data; - -public: - // Constructors and assignment - Chunk(const Coordinate& loc1, const Coordinate& loc2, const std::vector& block_list); - ~Chunk() = default; - - Chunk(const Chunk& other) - : _base_pt(other._base_pt), _x_len(other._x_len), _y_len(other._y_len), _z_len(other._z_len) { - size_t size = _x_len * _y_len * _z_len; - _raw_data.reset(new BlockType[size]); - std::copy(other._raw_data.get(), other._raw_data.get() + size, _raw_data.get()); - } - - Chunk(Chunk&& other) noexcept = default; - Chunk& operator=(const Chunk& other); - Chunk& operator=(Chunk&& other) = default; - - /** - * Accesses the Minecraft block at absolute position pos and returns its - * BlockType if it is in the included area. - * @param pos: Abolute position in the Minecraft world to query BlockType - * for - * @return BlockType at specified location - */ - BlockType get_worldspace(const Coordinate& pos) const; - - /** - * Local equivalent of get_worldspace, equivalent to a 3D array access of - * the internal data. - * @param x: x element of array access - * @param y: y element of array access - * @param z: z element of array access - * @return BlockType at specified location - */ - BlockType get(int x, int y, int z) const; - - /** - * Gets the x length of the Chunk. - * @return x length of the Chunk - */ - uint16_t x_len() const; - - /** - * Gets the y length of the Chunk. - * @return y length of the Chunk - */ - uint16_t y_len() const; - - /** - * Gets the z length of the Chunk. - * @return z length of the Chunk - */ - uint16_t z_len() const; - - /** - * Gets the minimum coordinate in the Chunk. - * @return the minimum coordinate in the Chunk - */ - Coordinate base_pt() const; - - /** - * @brief An iterator for the Chunk's 3D block data. - * - * This iterator allows for range-based for loops and standard iterator - * operations over the 3D block data stored within a Chunk. It provides a - * linear interface to traverse the 3D grid of blocks, enabling sequential - * access to the elements stored in the chunk. - */ - struct Iterator { - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = BlockType; - using pointer = BlockType*; - using reference = BlockType&; - - /** - * @brief Constructs an iterator at the given pointer position. - * - * @param ptr Pointer to the position in the height array. - */ - Iterator(pointer ptr) : m_ptr(ptr) {} - - /** - * @brief Dereference the iterator to access the value at the current - * position. - * - * @return Reference to the current element. - */ - reference operator*() const { return *m_ptr; } - - /** - * @brief Access the pointer to the current element. - * - * @return Pointer to the current element. - */ - pointer operator->() { return m_ptr; } - - /** - * @brief Pre-increment operator. Advances the iterator to the next - * position. - * - * @return Reference to the updated iterator. - */ - Iterator& operator++() { - m_ptr++; - return *this; - } - - /** - * @brief Post-increment operator. Advances the iterator to the next - * position. - * - * @param int Unused dummy parameter to differentiate from prefix - * increment. - * @return Iterator to the original position before incrementing. - */ - Iterator operator++(int) { - Iterator tmp = *this; - ++(*this); - return tmp; - } - - /** - * @brief Equality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if both iterators point to the same position, false - * otherwise. - */ - friend bool operator==(const Iterator& a, const Iterator& b) { return a.m_ptr == b.m_ptr; }; - - /** - * @brief Inequality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if iterators point to different positions, false - * otherwise. - */ - friend bool operator!=(const Iterator& a, const Iterator& b) { return a.m_ptr != b.m_ptr; }; - - private: - pointer m_ptr; - }; - - /** - * @brief An iterator for the const Chunk's 3D block data. - * - * This iterator allows for range-based for loops and standard const - * iterator operations over the 3D block data stored within a Chunk. It - * provides a linear interface to traverse the 3D grid of blocks, enabling - * sequential immutable access to the elements stored in the chunk. - */ - struct ConstIterator { - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = BlockType; - using pointer = const BlockType*; - using reference = const BlockType&; - - /** - * @brief Constructs an iterator at the given pointer position. - * - * @param ptr Pointer to the position in the height array. - */ - ConstIterator(pointer ptr) : m_ptr(ptr) {} - - /** - * @brief Dereference the iterator to access the value at the current - * position. - * - * @return Reference to the current element. - */ - reference operator*() const { return *m_ptr; } - - /** - * @brief Access the pointer to the current element. - * - * @return Pointer to the current element. - */ - pointer operator->() { return m_ptr; } - - /** - * @brief Pre-increment operator. Advances the iterator to the next - * position. - * - * @return Reference to the updated iterator. - */ - ConstIterator& operator++() { - m_ptr++; - return *this; - } - - /** - * @brief Post-increment operator. Advances the iterator to the next - * position. - * - * @param int Unused dummy parameter to differentiate from prefix - * increment. - * @return Iterator to the original position before incrementing. - */ - ConstIterator operator++(int) { - ConstIterator tmp = *this; - ++(*this); - return tmp; - } - - /** - * @brief Equality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if both iterators point to the same position, false - * otherwise. - */ - friend bool operator==(const ConstIterator& a, const ConstIterator& b) { - return a.m_ptr == b.m_ptr; - }; - - /** - * @brief Inequality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if iterators point to different positions, false - * otherwise. - */ - friend bool operator!=(const ConstIterator& a, const ConstIterator& b) { - return a.m_ptr != b.m_ptr; - }; - - private: - pointer m_ptr; - }; - - // Iterators - Iterator begin() { return Iterator(&_raw_data[0]); } - Iterator end() { return Iterator(&_raw_data[_x_len * _y_len * _z_len]); } - ConstIterator begin() const { return ConstIterator(&_raw_data[0]); } - ConstIterator end() const { return ConstIterator(&_raw_data[_x_len * _y_len * _z_len]); } -}; -} // namespace mcpp diff --git a/include/mcpp/coordinate.h b/include/mcpp/coordinate.h deleted file mode 100644 index 3ab11860..00000000 --- a/include/mcpp/coordinate.h +++ /dev/null @@ -1,209 +0,0 @@ -#pragma once - -#include - -/** @file - * @brief Coordinate class. - * - */ -namespace mcpp { - -struct Coordinate2D; - -/** - * Represented using integers since sub-unit coordinates are not of particular - * relevance. Allows for operations such as addition between coordinates. - */ -struct Coordinate { - int32_t x; - int32_t y; - int32_t z; - - /** - * @brief Constructs a Coordinate object with integer values. - * - * @param x The x-coordinate. - * @param y The y-coordinate. - * @param z The z-coordinate. - */ - constexpr Coordinate(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z) {} - - /** - * @brief Constructs a Coordinate object with zero values. - */ - constexpr Coordinate() : x(0), y(0), z(0) {} - - /** - * @brief Constructs a Coordinate object with double values. - * - * @param x The x-coordinate as a double. - * @param y The y-coordinate as a double. - * @param z The z-coordinate as a double. - */ - constexpr Coordinate(double x, double y, double z) - : x(static_cast(x)), y(static_cast(y)), z(static_cast(z)) {} - - /** - * @brief Adds two Coordinate objects. - * - * @param obj The Coordinate object to add. - * @return A new Coordinate object representing the sum of the two - * coordinates. - */ - Coordinate operator+(const Coordinate& obj) const; - - Coordinate operator+(const Coordinate2D& obj) const; - - /** - * @brief Checks if two Coordinate objects are equal. - * - * @param obj The Coordinate object to compare with. - * @return True if the coordinates are equal, false otherwise. - */ - bool operator==(const Coordinate& obj) const; - - /** - * @brief Checks if two Coordinate objects are not equal. - * - * @param obj The Coordinate object to compare with. - * @return True if the coordinates are not equal, false otherwise. - */ - bool operator!=(const Coordinate& obj) const; - - /** - * @brief Subtracts one Coordinate object from another. - * - * @param obj The Coordinate object to subtract. - * @return A new Coordinate object representing the difference between the - * two coordinates. - */ - Coordinate operator-(const Coordinate& obj) const; - - /** - * @brief Implements hash algorithm for Coordinate object using non-negative - * mapping and weighted coordinate values. - * - * @param obj The Coordinate object to hash. - * @return Hash of Coordinate object. - */ - std::size_t operator()(const Coordinate& obj) const; - - /** - * @brief Outputs the Coordinate object to an ostream. - * - * @param out The output stream. - * @param coord The Coordinate object to output. - * @return The output stream with the Coordinate object's values. - */ - friend std::ostream& operator<<(std::ostream& out, const Coordinate& coord); -}; - -/** - * @brief Height-agnostic coordinate class. - * - * Represented using integers since sub-unit coordinates are not of particular - * relevance. Allows for operations such as addition between flat coordinates. - */ -struct Coordinate2D { - /** - * @brief Constructs a Coordinate2D object with integer values. - * - * @param x The x-coordinate. - * @param z The z-coordinate. - */ - constexpr Coordinate2D(int x, int z) : x(x), z(z) {} - - /** - * @brief Constructs a Coordinate2D object with zero values. - */ - constexpr Coordinate2D() : x(0), z(0) {} - - /** - * @brief Constructs a Coordinate2D object with double values. - * - * @param x The x-coordinate as a double. - * @param z The z-coordinate as a double. - */ - constexpr Coordinate2D(double x, double z) : x(static_cast(x)), z(static_cast(z)) {} - - /** - * @brief Constructs a Coordinate2D object from a Coordinate object. - * - * @param coord The Coordinate object. - */ - constexpr Coordinate2D(const Coordinate& coord) : x(coord.x), z(coord.z) {} - - /** - * @brief Constructs a Coordinate object from a Coordinate2D object and a - * y value. - * - * @param coord The Coordinate2D object. - * @param y The y value. - */ - Coordinate with_height(int y) const; - - /** - * @brief Adds two Coordinate2D objects. - * - * @param obj The Coordinate2D object to add. - * @return A new Coordinate2D object representing the sum of the two - * coordinates. - */ - Coordinate2D operator+(const Coordinate2D& obj) const; - - /** - * @brief Checks if two Coordinate2D objects are equal. - * - * @param obj The Coordinate2D object to compare with. - * @return True if the flat coordinates are equal, false otherwise. - */ - bool operator==(const Coordinate2D& obj) const; - - /** - * @brief Checks if two Coordinate2D objects are not equal. - * - * @param obj The Coordinate2D object to compare with. - * @return True if the flat coordinates are not equal, false otherwise. - */ - bool operator!=(const Coordinate2D& obj) const; - - /** - * @brief Subtracts one Coordinate2D object from another. - * - * @param obj The Coordinate2D object to subtract. - * @return A new Coordinate2D object representing the difference between - * the two coordinates. - */ - Coordinate2D operator-(const Coordinate2D& obj) const; - - /** - * @brief Implements hash algorithm for Coordinate2D object using non-negative - * mapping and weighted coordinate values. - * - * @param obj The Coordinate2D object to hash. - * @return Hash of Coordinate2D object. - */ - std::size_t operator()(const Coordinate2D& obj) const; - - /** - * @brief Outputs the Coordinate2D object to an ostream. - * - * @param out The output stream. - * @param coord The Coordinate2D object to output. - * @return The output stream with the Coordinate object's values. - */ - friend std::ostream& operator<<(std::ostream& out, const Coordinate2D& coord); - - int x; - int z; -}; - -/** - * @brief Convert coordinate to string representation. - * - * @param coord The coordinate to stringify - * @return stringified coordinate - */ -std::string to_string(const Coordinate& coord); - -} // namespace mcpp diff --git a/include/mcpp/heightmap.h b/include/mcpp/heightmap.h deleted file mode 100644 index 54b864a3..00000000 --- a/include/mcpp/heightmap.h +++ /dev/null @@ -1,257 +0,0 @@ -#pragma once - -#include "coordinate.h" -#include -#include -#include - -namespace mcpp { -/** - * Represents a 2D area of the world with the y coordinates of the highest - * non-air blocks at each (x,z) - */ -struct HeightMap { -private: - Coordinate2D _base_pt; - uint16_t _x_len; - uint16_t _z_len; - std::unique_ptr _raw_heights; - -public: - // Constructors and assignment - HeightMap(const Coordinate2D& loc1, const Coordinate2D& loc2, - const std::vector& heights); - ~HeightMap() = default; - - HeightMap(const HeightMap& other) - : _base_pt(other._base_pt), _x_len(other._x_len), _z_len(other._z_len) { - size_t size = _x_len * _z_len; - // Allocate memory and copy the heights - _raw_heights.reset(new int16_t[size]); - std::copy(other._raw_heights.get(), other._raw_heights.get() + size, _raw_heights.get()); - } - - HeightMap(HeightMap&& other) noexcept = default; - HeightMap& operator=(const HeightMap& other); - HeightMap& operator=(HeightMap&& other) = default; - - /** - * Get the height using an offset from the origin/base point of the heights - * area - * @param x: x offset to access underlying array - * @param z: z offset to access underlying array - * @return: height at specified offset - */ - int16_t get(int x, int z) const; - - /** - * Get the height at a Minecraft coordinate if saved inside the height map - * @param loc: Coordinate2D in Minecraft world to access in the map - * @return: height at specified coordinate - */ - int16_t get_worldspace(const Coordinate2D& loc) const; - - /** - * Fill a coordinate inplace with the highest y coordinate at the `loc`'s x - * and z components. - * @param loc: Coordinate to fill y value for - */ - void fill_coord(Coordinate& out) const; - - /** - * Gets the x length of the HeightMap. - * @return x length of the HeightMap - */ - uint16_t x_len() const; - - /** - * Gets the z length of the HeightMap. - * @return z length of the HeightMap - */ - uint16_t z_len() const; - - /** - * Gets the minimum coordinate in the HeightMap. - * @return the minimum coordinate in the HeightMap. - */ - Coordinate2D base_pt() const; - - /** - * @brief An iterator for the HeightMap structure. - * - * This iterator allows for range-based for loops and standard iterator - * operations over the height data stored within a HeightMap. - */ - struct Iterator { - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = int16_t; - using pointer = int16_t*; - using reference = int16_t&; - - /** - * @brief Constructs an iterator at the given pointer position. - * - * @param ptr Pointer to the position in the height array. - */ - Iterator(pointer ptr) : m_ptr(ptr) {} - - /** - * @brief Dereference the iterator to access the value at the current - * position. - * - * @return Reference to the current element. - */ - reference operator*() const { return *m_ptr; } - - /** - * @brief Access the pointer to the current element. - * - * @return Pointer to the current element. - */ - pointer operator->() { return m_ptr; } - - /** - * @brief Pre-increment operator. Advances the iterator to the next - * position. - * - * @return Reference to the updated iterator. - */ - Iterator& operator++() { - m_ptr++; - return *this; - } - - /** - * @brief Post-increment operator. Advances the iterator to the next - * position. - * - * @param int Unused dummy parameter to differentiate from prefix - * increment. - * @return Iterator to the original position before incrementing. - */ - Iterator operator++(int) { - Iterator tmp = *this; - ++(*this); - return tmp; - } - - /** - * @brief Equality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if both iterators point to the same position, false - * otherwise. - */ - friend bool operator==(const Iterator& a, const Iterator& b) { return a.m_ptr == b.m_ptr; }; - - /** - * @brief Inequality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if iterators point to different positions, false - * otherwise. - */ - friend bool operator!=(const Iterator& a, const Iterator& b) { return a.m_ptr != b.m_ptr; }; - - private: - pointer m_ptr; - }; - - /** - * @brief An iterator for the const HeightMap structure. - * - * This iterator allows for range-based for loops and standard const - * iterator operations over the height data stored within a HeightMap. - */ - struct ConstIterator { - using iterator_category = std::forward_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = int16_t; - using pointer = const int16_t*; - using reference = const int16_t&; - - /** - * @brief Constructs an iterator at the given pointer position. - * - * @param ptr Pointer to the position in the height array. - */ - ConstIterator(pointer ptr) : m_ptr(ptr) {} - - /** - * @brief Dereference the iterator to access the value at the current - * position. - * - * @return Reference to the current element. - */ - reference operator*() const { return *m_ptr; } - - /** - * @brief Access the pointer to the current element. - * - * @return Pointer to the current element. - */ - pointer operator->() { return m_ptr; } - - /** - * @brief Pre-increment operator. Advances the iterator to the next - * position. - * - * @return Reference to the updated iterator. - */ - ConstIterator& operator++() { - m_ptr++; - return *this; - } - - /** - * @brief Post-increment operator. Advances the iterator to the next - * position. - * - * @param int Unused dummy parameter to differentiate from prefix - * increment. - * @return Iterator to the original position before incrementing. - */ - ConstIterator operator++(int) { - ConstIterator tmp = *this; - ++(*this); - return tmp; - } - - /** - * @brief Equality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if both iterators point to the same position, false - * otherwise. - */ - friend bool operator==(const ConstIterator& a, const ConstIterator& b) { - return a.m_ptr == b.m_ptr; - }; - - /** - * @brief Inequality comparison operator. - * - * @param a First iterator to compare. - * @param b Second iterator to compare. - * @return true if iterators point to different positions, false - * otherwise. - */ - friend bool operator!=(const ConstIterator& a, const ConstIterator& b) { - return a.m_ptr != b.m_ptr; - }; - - private: - pointer m_ptr; - }; - - Iterator begin() { return Iterator(&_raw_heights[0]); } - Iterator end() { return Iterator(&_raw_heights[_x_len * _z_len]); } - ConstIterator begin() const { return ConstIterator(&_raw_heights[0]); } - ConstIterator end() const { return ConstIterator(&_raw_heights[_x_len * _z_len]); } -}; - -} // namespace mcpp diff --git a/include/mcpp/mcpp.h b/include/mcpp/mcpp.h deleted file mode 100644 index 918c1585..00000000 --- a/include/mcpp/mcpp.h +++ /dev/null @@ -1,179 +0,0 @@ -#pragma once - -#include "block.h" -#include "chunk.h" -#include "coordinate.h" -#include "heightmap.h" - -#include - -/** @file - * @brief MinecraftConnection class. - * - */ - -/** - * @brief Namespace containing all the the mcpp library classes. - * - * The mcpp namespace includes classes and functions designed to facilitate - * interaction with the Minecraft world through various server commands - * and data manipulations. - */ -namespace mcpp { -// Forward declare to avoid polluting namespace -class SocketConnection; - -const uint16_t MCPP_PORT = 4711; - -class MinecraftConnection { -private: - /// Handle to the socket connection. - std::unique_ptr _conn; - -public: - /** - * @brief Represents the main endpoint for interaction with the minecraft - * world. - * - * @param address String address in IPV4 format, defaults to "localhost" - * @param port Integer port to run on, defaults to 4711 as that is the port - * for ELCI - */ - explicit MinecraftConnection(const std::string& address = "localhost", uint16_t port = MCPP_PORT); - - // Declared here, defaulted in mcpp.cpp to allow for forward declare of - // SocketConnection - ~MinecraftConnection(); - - // NOLINTBEGIN(readability-identifier-naming) - /** - * @brief Sends a message to the in-game chat, does not require a joined - * player - * - * @param message - */ - void postToChat(const std::string& message); - - /** - * @brief Performs an in-game minecraft command. Players have to exist on - * the server and should be server operators (default with ELCI) - * - * @param command Command string in the in-game format (e.g. "time set day") - */ - void doCommand(const std::string& command); - - /** - * @brief Sets player pos (block pos of lower half of playermodel) to - * specified Coordinate - * - * @param pos Coordinate to set - */ - void setPlayerPosition(const Coordinate& pos); - - /** - * @brief Returns a coordinate representing player position (block pos of - * lower half of playermodel) - * - * @return Coordinate of location - */ - [[nodiscard]] Coordinate getPlayerPosition() const; - - /** - * @brief Sets player position to be one above specified tile (i.e. tile = - * block player is standing on) - * - * @param tile Coordinate to set - */ - void setPlayerTilePosition(const Coordinate& tile); - - /** - * @brief Returns the coordinate location of the block the player is - * standing on - * - * @return Coordinate of location - */ - [[nodiscard]] Coordinate getPlayerTilePosition() const; - - /** - * @brief Sets block at Coordinate loc to the BlockType specified by - * blockType - * - * @param loc - * @param blockType - */ - void setBlock(const Coordinate& loc, const BlockType& block_type); - - /** - * @brief Sets a cuboid of blocks to the specified BlockType blockType, with - * the corners of the cuboid provided by the Coordinate loc1 and loc2 - * - * @param loc1 - * @param loc2 - * @param blockType - */ - void setBlocks(const Coordinate& loc1, const Coordinate& loc2, const BlockType& block_type); - - /** - * @brief Returns BlockType object from the specified Coordinate loc with - * modifier - * - * @param loc - * @return BlockType of the requested block - */ - [[nodiscard]] BlockType - getBlock(const Coordinate& loc) const; // NOLINT(readability-identifier-naming) - - /** - * @brief Returns a 3D vector of the BlockTypes of the requested cuboid with - * modifiers - * - * @param loc1 1st corner of the cuboid - * @param loc2 2nd corner of the cuboid - * @return Chunk containing the blocks in the specified area. - */ - [[nodiscard]] Chunk getBlocks(const Coordinate& loc1, const Coordinate& loc2) const; - - /** - * @brief Returns the height of the specific provided 2D coordinate - * - * ***IMPORTANT:*** - * DO NOT USE FOR LARGE AREAS, IT WILL BE VERY SLOW - * USE getHeights() INSTEAD - * - * Gets the y-value of the highest non-air block at the specified 2D - * coordinate. - * @param loc 2D coordinate - * @return Returns the integer y-height at the requested coordinate. - */ - [[nodiscard]] int32_t getHeight(Coordinate2D loc) const; - - /** - * @brief Returns the coordinate with the x, z, and in-world height of the - * specific provided 2D coordinate - * - * ***IMPORTANT:*** - * DO NOT USE FOR LARGE AREAS, IT WILL BE VERY SLOW - * USE getHeights() INSTEAD - * - * Gets the y-value of the highest non-air block at the specified 2D - * coordinate, and creates a new 3D coordinate. - * @param loc 2D coordinate - * @return Returns the coordinate with the filled-in height. - */ - Coordinate fillHeight(Coordinate2D loc) const; - - /** - * @brief Provides a scaled option of the getHeight call to allow for - * considerable performance gains. - * - * \par USE THIS instead of getHeight in a for loop. - * - * @param loc1 1st corner of rectangle - * @param loc2 2nd corner of rectangle - * @return Returns a vector of integers representing the 2D area of heights. - */ - [[nodiscard]] HeightMap getHeights(const Coordinate2D& loc1, const Coordinate2D& loc2) const; - - // NOLINTEND(readability-identifier-naming) -}; -} // namespace mcpp diff --git a/index.html b/index.html new file mode 100644 index 00000000..2e841565 --- /dev/null +++ b/index.html @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mcpp
+
+
+

mcpp logo

+

+mcpp

+

made-with-cpp made-by-rozukke GitHub license Build status

+

mcpp (Minecraft++) is a library built to interface with Minecraft through Spigot server running the ELCI plugin and using C++. It was primarily designed as a teaching tool, and is tested on MacOS/Linux or Windows with WSL.

+

+Documentation

+

➡ Access the docs for this repo at the mcpp documentation site.

+

➡ For more details on the broad strokes of mcpp, refer to the wiki!

+

+History

+

This library is based on mcpi, which is a Python library with similar functionality.

+

In addition to C++ support, this library implements several new commands supported by ELCI:

    +
  • getBlocks to get a cuboid of blocks with modifiers in a performant manner,
  • +
  • getHeights to get a 2D area of heights in a performant manner,
  • +
  • doCommand to perform an in-game minecraft command which allows for additional functionality.
  • +
+

This C++ version was created for the Royal Melbourne Institute of Technology (RMIT) to supplement the COSC2084 (Programming Studio 2) course.

+

+Installation

+

+Windows

+

Since the release is intended for UNIX systems, the recommendation it to do as follows:

    +
  • Install WSL, and then follow the below instructions for Linux.
  • +
  • Depending on your WSL version, you may need to specify a connection address manually in MinecraftConnection() if you are running Spigot (with ELCI) on Windows, which you can find using nslookup "$(hostname).local" on your WSL terminal. The default port for ELCI is 4711. As such, it's recommended to also run the server under WSL.
  • +
+

+MacOS and Linux

+
    +
  • Install g++, make, cmake and any other build prerequisites
  • +
  • Run the following commands:
    git clone https://github.com/rozukke/mcpp.git && cd mcpp
    +
    cmake -B build && cd build
    +
    sudo make install
    +
  • +
  • After doing this, the library should be accessible via a #include <mcpp/mcpp.h> directive.
  • +
  • When compiling code using the library, use the flag -lmcpp for Makefiles or target_link_libraries(your_executable mcpp) for CMake.
  • +
+

+Contributors

+

+

+License

+

The following applies to all relevant code and resource files:

+

Copyright 2024 Artemis Rosman and contributors

+

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
+

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+
+
+
+ + + + diff --git a/jquery.js b/jquery.js new file mode 100644 index 00000000..1dffb65b --- /dev/null +++ b/jquery.js @@ -0,0 +1,34 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e,function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/mcpp_8h.html b/mcpp_8h.html new file mode 100644 index 00000000..ba1c962a --- /dev/null +++ b/mcpp_8h.html @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/mcpp.h File Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
mcpp.h File Reference
+
+
+ +

MinecraftConnection class. +More...

+
#include "block.h"
+#include "chunk.h"
+#include "coordinate.h"
+#include "heightmap.h"
+#include <memory>
+
+Include dependency graph for mcpp.h:
+
+
+
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  mcpp::MinecraftConnection
 
+ + + + +

+Namespaces

namespace  mcpp
 Namespace containing all the the mcpp library classes.
 
+ + + +

+Variables

const uint16_t mcpp::MCPP_PORT = 4711
 
+

Detailed Description

+

MinecraftConnection class.

+
+
+ + + + diff --git a/mcpp_8h.js b/mcpp_8h.js new file mode 100644 index 00000000..80a3c858 --- /dev/null +++ b/mcpp_8h.js @@ -0,0 +1,5 @@ +var mcpp_8h = +[ + [ "mcpp::MinecraftConnection", "classmcpp_1_1_minecraft_connection.html", "classmcpp_1_1_minecraft_connection" ], + [ "MCPP_PORT", "mcpp_8h.html#a0d16253c87d5e4fdead3f5a26ae792ba", null ] +]; \ No newline at end of file diff --git a/mcpp_8h__incl.map b/mcpp_8h__incl.map new file mode 100644 index 00000000..2ce91ebd --- /dev/null +++ b/mcpp_8h__incl.map @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mcpp_8h__incl.md5 b/mcpp_8h__incl.md5 new file mode 100644 index 00000000..9c25abc6 --- /dev/null +++ b/mcpp_8h__incl.md5 @@ -0,0 +1 @@ +268ee53f32368f9bcd014707f4bc29a4 \ No newline at end of file diff --git a/mcpp_8h__incl.svg b/mcpp_8h__incl.svg new file mode 100644 index 00000000..8c8dfe1d --- /dev/null +++ b/mcpp_8h__incl.svg @@ -0,0 +1,237 @@ + + + + + + +include/mcpp/mcpp.h + + +Node1 + + +include/mcpp/mcpp.h + + + + + +Node2 + + +block.h + + + + + +Node1->Node2 + + + + + + + + +Node5 + + +chunk.h + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +coordinate.h + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +memory + + + + + +Node1->Node7 + + + + + + + + +Node9 + + +heightmap.h + + + + + +Node1->Node9 + + + + + + + + +Node3 + + +cstdint + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +ostream + + + + + +Node2->Node4 + + + + + + + + +Node5->Node2 + + + + + + + + +Node5->Node6 + + + + + + + + +Node5->Node7 + + + + + + + + +Node8 + + +vector + + + + + +Node5->Node8 + + + + + + + + +Node6->Node4 + + + + + + + + +Node9->Node3 + + + + + + + + +Node9->Node6 + + + + + + + + +Node9->Node7 + + + + + + + + +Node9->Node8 + + + + + + + + diff --git a/mcpp_8h_source.html b/mcpp_8h_source.html new file mode 100644 index 00000000..cd9086e9 --- /dev/null +++ b/mcpp_8h_source.html @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + mcpp: include/mcpp/mcpp.h Source File + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
mcpp +
+
C++ Minecraft Library
+
+
+ + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
mcpp.h
+
+
+Go to the documentation of this file.
1#pragma once
+
2
+
3#include "block.h"
+
4#include "chunk.h"
+
5#include "coordinate.h"
+
6#include "heightmap.h"
+
7
+
8#include <memory>
+
9
+
22namespace mcpp {
+
23// Forward declare to avoid polluting namespace
+
24class SocketConnection;
+
25
+
26const uint16_t MCPP_PORT = 4711;
+
27
+
+ +
29private:
+
31 std::unique_ptr<SocketConnection> _conn;
+
32
+
33public:
+
42 explicit MinecraftConnection(const std::string& address = "localhost", uint16_t port = MCPP_PORT);
+
43
+
44 // Declared here, defaulted in mcpp.cpp to allow for forward declare of
+
45 // SocketConnection
+ +
47
+
48 // NOLINTBEGIN(readability-identifier-naming)
+
55 void postToChat(const std::string& message);
+
56
+
63 void doCommand(const std::string& command);
+
64
+
71 void setPlayerPosition(const Coordinate& pos);
+
72
+
79 [[nodiscard]] Coordinate getPlayerPosition() const;
+
80
+ +
88
+
95 [[nodiscard]] Coordinate getPlayerTilePosition() const;
+
96
+
104 void setBlock(const Coordinate& loc, const BlockType& block_type);
+
105
+
114 void setBlocks(const Coordinate& loc1, const Coordinate& loc2, const BlockType& block_type);
+
115
+
123 [[nodiscard]] BlockType
+
124 getBlock(const Coordinate& loc) const; // NOLINT(readability-identifier-naming)
+
125
+
134 [[nodiscard]] Chunk getBlocks(const Coordinate& loc1, const Coordinate& loc2) const;
+
135
+
148 [[nodiscard]] int32_t getHeight(Coordinate2D loc) const;
+
149
+ +
164
+
175 [[nodiscard]] HeightMap getHeights(const Coordinate2D& loc1, const Coordinate2D& loc2) const;
+
176
+
177 // NOLINTEND(readability-identifier-naming)
+
178};
+
+
179} // namespace mcpp
+
BlockType class.
+ +
Definition block.h:11
+
Definition mcpp.h:28
+
void setPlayerTilePosition(const Coordinate &tile)
Sets player position to be one above specified tile (i.e. tile = block player is standing on)
+
void setPlayerPosition(const Coordinate &pos)
Sets player pos (block pos of lower half of playermodel) to specified Coordinate.
+
int32_t getHeight(Coordinate2D loc) const
Returns the height of the specific provided 2D coordinate.
+
Coordinate getPlayerTilePosition() const
Returns the coordinate location of the block the player is standing on.
+
BlockType getBlock(const Coordinate &loc) const
Returns BlockType object from the specified Coordinate loc with modifier.
+
Chunk getBlocks(const Coordinate &loc1, const Coordinate &loc2) const
Returns a 3D vector of the BlockTypes of the requested cuboid with modifiers.
+
Coordinate getPlayerPosition() const
Returns a coordinate representing player position (block pos of lower half of playermodel)
+
void doCommand(const std::string &command)
Performs an in-game minecraft command. Players have to exist on the server and should be server opera...
+
void setBlock(const Coordinate &loc, const BlockType &block_type)
Sets block at Coordinate loc to the BlockType specified by blockType.
+
void postToChat(const std::string &message)
Sends a message to the in-game chat, does not require a joined player.
+
Coordinate fillHeight(Coordinate2D loc) const
Returns the coordinate with the x, z, and in-world height of the specific provided 2D coordinate.
+
HeightMap getHeights(const Coordinate2D &loc1, const Coordinate2D &loc2) const
Provides a scaled option of the getHeight call to allow for considerable performance gains.
+
void setBlocks(const Coordinate &loc1, const Coordinate &loc2, const BlockType &block_type)
Sets a cuboid of blocks to the specified BlockType blockType, with the corners of the cuboid provided...
+
MinecraftConnection(const std::string &address="localhost", uint16_t port=MCPP_PORT)
Represents the main endpoint for interaction with the minecraft world.
+ +
Coordinate class.
+ +
Namespace containing all the the mcpp library classes.
Definition block.h:10
+
const uint16_t MCPP_PORT
Definition mcpp.h:26
+
Definition chunk.h:13
+
Height-agnostic coordinate class.
Definition coordinate.h:107
+
Definition coordinate.h:17
+
Definition heightmap.h:13
+
+
+ + + + diff --git a/menu.js b/menu.js new file mode 100644 index 00000000..b0b26936 --- /dev/null +++ b/menu.js @@ -0,0 +1,136 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+='
    '; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + var searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/menudata.js b/menudata.js new file mode 100644 index 00000000..c6044210 --- /dev/null +++ b/menudata.js @@ -0,0 +1,109 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Namespaces",url:"namespaces.html",children:[ +{text:"Namespace List",url:"namespaces.html"}, +{text:"Namespace Members",url:"namespacemembers.html",children:[ +{text:"All",url:"namespacemembers.html"}, +{text:"Functions",url:"namespacemembers_func.html"}, +{text:"Variables",url:"namespacemembers_vars.html"}]}]}, +{text:"Classes",url:"annotated.html",children:[ +{text:"Class List",url:"annotated.html"}, +{text:"Class Index",url:"classes.html"}, +{text:"Class Members",url:"functions.html",children:[ +{text:"All",url:"functions.html",children:[ +{text:"a",url:"functions.html#index_a"}, +{text:"b",url:"functions_b.html#index_b"}, +{text:"c",url:"functions_c.html#index_c"}, +{text:"d",url:"functions_d.html#index_d"}, +{text:"e",url:"functions_e.html#index_e"}, +{text:"f",url:"functions_f.html#index_f"}, +{text:"g",url:"functions_g.html#index_g"}, +{text:"h",url:"functions_h.html#index_h"}, +{text:"i",url:"functions_i.html#index_i"}, +{text:"j",url:"functions_j.html#index_j"}, +{text:"l",url:"functions_l.html#index_l"}, +{text:"m",url:"functions_m.html#index_m"}, +{text:"n",url:"functions_n.html#index_n"}, +{text:"o",url:"functions_o.html#index_o"}, +{text:"p",url:"functions_p.html#index_p"}, +{text:"q",url:"functions_q.html#index_q"}, +{text:"r",url:"functions_r.html#index_r"}, +{text:"s",url:"functions_s.html#index_s"}, +{text:"t",url:"functions_t.html#index_t"}, +{text:"v",url:"functions_v.html#index_v"}, +{text:"w",url:"functions_w.html#index_w"}, +{text:"x",url:"functions_x.html#index_x"}, +{text:"y",url:"functions_y.html#index_y"}, +{text:"z",url:"functions_z.html#index_z"}, +{text:"~",url:"functions_~.html#index__7E"}]}, +{text:"Functions",url:"functions_func.html",children:[ +{text:"b",url:"functions_func.html#index_b"}, +{text:"c",url:"functions_func.html#index_c"}, +{text:"d",url:"functions_func.html#index_d"}, +{text:"e",url:"functions_func.html#index_e"}, +{text:"f",url:"functions_func.html#index_f"}, +{text:"g",url:"functions_func.html#index_g"}, +{text:"h",url:"functions_func.html#index_h"}, +{text:"i",url:"functions_func.html#index_i"}, +{text:"m",url:"functions_func.html#index_m"}, +{text:"o",url:"functions_func.html#index_o"}, +{text:"p",url:"functions_func.html#index_p"}, +{text:"s",url:"functions_func.html#index_s"}, +{text:"w",url:"functions_func.html#index_w"}, +{text:"x",url:"functions_func.html#index_x"}, +{text:"y",url:"functions_func.html#index_y"}, +{text:"z",url:"functions_func.html#index_z"}, +{text:"~",url:"functions_func.html#index__7E"}]}, +{text:"Variables",url:"functions_vars.html",children:[ +{text:"a",url:"functions_vars.html#index_a"}, +{text:"b",url:"functions_vars_b.html#index_b"}, +{text:"c",url:"functions_vars_c.html#index_c"}, +{text:"d",url:"functions_vars_d.html#index_d"}, +{text:"e",url:"functions_vars_e.html#index_e"}, +{text:"f",url:"functions_vars_f.html#index_f"}, +{text:"g",url:"functions_vars_g.html#index_g"}, +{text:"h",url:"functions_vars_h.html#index_h"}, +{text:"i",url:"functions_vars_i.html#index_i"}, +{text:"j",url:"functions_vars_j.html#index_j"}, +{text:"l",url:"functions_vars_l.html#index_l"}, +{text:"m",url:"functions_vars_m.html#index_m"}, +{text:"n",url:"functions_vars_n.html#index_n"}, +{text:"o",url:"functions_vars_o.html#index_o"}, +{text:"p",url:"functions_vars_p.html#index_p"}, +{text:"q",url:"functions_vars_q.html#index_q"}, +{text:"r",url:"functions_vars_r.html#index_r"}, +{text:"s",url:"functions_vars_s.html#index_s"}, +{text:"t",url:"functions_vars_t.html#index_t"}, +{text:"v",url:"functions_vars_v.html#index_v"}, +{text:"w",url:"functions_vars_w.html#index_w"}, +{text:"x",url:"functions_vars_x.html#index_x"}, +{text:"y",url:"functions_vars_y.html#index_y"}, +{text:"z",url:"functions_vars_z.html#index_z"}]}, +{text:"Typedefs",url:"functions_type.html"}, +{text:"Related Symbols",url:"functions_rela.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/minus.svg b/minus.svg new file mode 100644 index 00000000..f70d0c1a --- /dev/null +++ b/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/minusd.svg b/minusd.svg new file mode 100644 index 00000000..5f8e8796 --- /dev/null +++ b/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/namespacemcpp.html b/namespacemcpp.html new file mode 100644 index 00000000..71a657c2 --- /dev/null +++ b/namespacemcpp.html @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp Namespace Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp Namespace Reference
    +
    +
    + +

    Namespace containing all the the mcpp library classes. +More...

    + + + + + + + + + + + + + + + + + +

    +Classes

    struct  Blocks
     
    class  BlockType
     
    struct  Chunk
     
    struct  Coordinate
     
    struct  Coordinate2D
     Height-agnostic coordinate class. More...
     
    struct  HeightMap
     
    class  MinecraftConnection
     
    + + + + +

    +Functions

    std::string to_string (const Coordinate &coord)
     Convert coordinate to string representation.
     
    + + + +

    +Variables

    const uint16_t MCPP_PORT = 4711
     
    +

    Detailed Description

    +

    Namespace containing all the the mcpp library classes.

    +

    The mcpp namespace includes classes and functions designed to facilitate interaction with the Minecraft world through various server commands and data manipulations.

    +

    Function Documentation

    + +

    ◆ to_string()

    + +
    +
    + + + + + + + + +
    std::string mcpp::to_string (const Coordinatecoord)
    +
    + +

    Convert coordinate to string representation.

    +
    Parameters
    + + +
    coordThe coordinate to stringify
    +
    +
    +
    Returns
    stringified coordinate
    + +
    +
    +

    Variable Documentation

    + +

    ◆ MCPP_PORT

    + +
    +
    + + + + +
    const uint16_t mcpp::MCPP_PORT = 4711
    +
    + +
    +
    +
    +
    + + + + diff --git a/namespacemcpp.js b/namespacemcpp.js new file mode 100644 index 00000000..238a6cc7 --- /dev/null +++ b/namespacemcpp.js @@ -0,0 +1,12 @@ +var namespacemcpp = +[ + [ "Blocks", "structmcpp_1_1_blocks.html", null ], + [ "BlockType", "classmcpp_1_1_block_type.html", "classmcpp_1_1_block_type" ], + [ "Chunk", "structmcpp_1_1_chunk.html", "structmcpp_1_1_chunk" ], + [ "Coordinate", "structmcpp_1_1_coordinate.html", "structmcpp_1_1_coordinate" ], + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html", "structmcpp_1_1_coordinate2_d" ], + [ "HeightMap", "structmcpp_1_1_height_map.html", "structmcpp_1_1_height_map" ], + [ "MinecraftConnection", "classmcpp_1_1_minecraft_connection.html", "classmcpp_1_1_minecraft_connection" ], + [ "to_string", "namespacemcpp.html#ab1bf0af2b50790de272ff6f3f4d26f29", null ], + [ "MCPP_PORT", "namespacemcpp.html#a0d16253c87d5e4fdead3f5a26ae792ba", null ] +]; \ No newline at end of file diff --git a/namespacemembers.html b/namespacemembers.html new file mode 100644 index 00000000..c5acfaf2 --- /dev/null +++ b/namespacemembers.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + mcpp: Namespace Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all namespace members with links to the namespace documentation for each member:
      +
    • MCPP_PORT : mcpp
    • +
    • to_string() : mcpp
    • +
    +
    +
    + + + + diff --git a/namespacemembers_func.html b/namespacemembers_func.html new file mode 100644 index 00000000..f0ee03a7 --- /dev/null +++ b/namespacemembers_func.html @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + mcpp: Namespace Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all namespace functions with links to the namespace documentation for each function:
      +
    • to_string() : mcpp
    • +
    +
    +
    + + + + diff --git a/namespacemembers_vars.html b/namespacemembers_vars.html new file mode 100644 index 00000000..bf0b6649 --- /dev/null +++ b/namespacemembers_vars.html @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + mcpp: Namespace Members + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Here is a list of all namespace variables with links to the namespace documentation for each variable:
      +
    • MCPP_PORT : mcpp
    • +
    +
    +
    + + + + diff --git a/namespaces.html b/namespaces.html new file mode 100644 index 00000000..36c6fc4d --- /dev/null +++ b/namespaces.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Namespace List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Namespace List
    +
    +
    +
    Here is a list of all namespaces with brief descriptions:
    +
    [detail level 123]
    + + + + + + + + + + + + +
     NmcppNamespace containing all the the mcpp library classes
     CBlocks
     CBlockType
     CChunk
     CConstIteratorAn iterator for the const Chunk's 3D block data
     CIteratorAn iterator for the Chunk's 3D block data
     CCoordinate
     CCoordinate2DHeight-agnostic coordinate class
     CHeightMap
     CConstIteratorAn iterator for the const HeightMap structure
     CIteratorAn iterator for the HeightMap structure
     CMinecraftConnection
    +
    +
    +
    + + + + diff --git a/namespaces_dup.js b/namespaces_dup.js new file mode 100644 index 00000000..af92163d --- /dev/null +++ b/namespaces_dup.js @@ -0,0 +1,4 @@ +var namespaces_dup = +[ + [ "mcpp", "namespacemcpp.html", "namespacemcpp" ] +]; \ No newline at end of file diff --git a/nav_f.png b/nav_f.png new file mode 100644 index 00000000..940086dd Binary files /dev/null and b/nav_f.png differ diff --git a/nav_fd.png b/nav_fd.png new file mode 100644 index 00000000..622f41ee Binary files /dev/null and b/nav_fd.png differ diff --git a/nav_g.png b/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/nav_g.png differ diff --git a/nav_h.png b/nav_h.png new file mode 100644 index 00000000..9a92b078 Binary files /dev/null and b/nav_h.png differ diff --git a/nav_hd.png b/nav_hd.png new file mode 100644 index 00000000..4f504203 Binary files /dev/null and b/nav_hd.png differ diff --git a/navtree.css b/navtree.css new file mode 100644 index 00000000..250aed7a --- /dev/null +++ b/navtree.css @@ -0,0 +1,149 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: white; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +#nav-tree .selected .arrow { + color: #43A4FF; + text-shadow: none; +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:white; +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: $width; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:url('splitbar.png'); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-repeat:repeat-x; + background-color: #F3F9FE; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/navtree.js b/navtree.js new file mode 100644 index 00000000..93dd3d46 --- /dev/null +++ b/navtree.js @@ -0,0 +1,559 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var navTreeSubIndices = new Array(); +var arrowDown = '▼'; +var arrowRight = '►'; + +function getData(varName) +{ + var i = varName.lastIndexOf('/'); + var n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/\-/g,'_')); +} + +function stripPath(uri) +{ + return uri.substring(uri.lastIndexOf('/')+1); +} + +function stripPath2(uri) +{ + var i = uri.lastIndexOf('/'); + var s = uri.substring(i+1); + var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; +} + +function hashValue() +{ + return $(location).attr('hash').substring(1).replace(/[^\w\-]/g,''); +} + +function hashUrl() +{ + return '#'+hashValue(); +} + +function pathName() +{ + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;\(\)]/g, ''); +} + +function localStorageSupported() +{ + try { + return 'localStorage' in window && window['localStorage'] !== null && window.localStorage.getItem; + } + catch(e) { + return false; + } +} + +function storeLink(link) +{ + if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { + window.localStorage.setItem('navpath',link); + } +} + +function deleteLink() +{ + if (localStorageSupported()) { + window.localStorage.setItem('navpath',''); + } +} + +function cachedLink() +{ + if (localStorageSupported()) { + return window.localStorage.getItem('navpath'); + } else { + return ''; + } +} + +function getScript(scriptName,func) +{ + var head = document.getElementsByTagName("head")[0]; + var script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); +} + +function createIndent(o,domNode,node,level) +{ + var level=-1; + var n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + var imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=arrowRight; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=arrowRight; + node.expanded = false; + } else { + expandNode(o, node, false, true); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + var span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } +} + +var animationInProgress = false; + +function gotoAnchor(anchor,aname,updateLocation) +{ + var pos, docContent = $('#doc-content'); + var ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || + ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || + ancParent.hasClass('fieldtype') || + ancParent.is(':header')) + { + pos = ancParent.position().top; + } else if (anchor.position()) { + pos = anchor.position().top; + } + if (pos) { + var dist = Math.abs(Math.min( + pos-docContent.offset().top, + docContent[0].scrollHeight- + docContent.height()-docContent.scrollTop())); + animationInProgress=true; + docContent.animate({ + scrollTop: pos + docContent.scrollTop() - docContent.offset().top + },Math.max(50,Math.min(500,dist)),function(){ + if (updateLocation) window.location.href=aname; + animationInProgress=false; + }); + } +} + +function newNode(o, po, text, link, childrenData, lastNode) +{ + var node = new Object(); + node.children = Array(); + node.childrenData = childrenData; + node.depth = po.depth + 1; + node.relpath = po.relpath; + node.isLast = lastNode; + + node.li = document.createElement("li"); + po.getChildrenUL().appendChild(node.li); + node.parentNode = po; + + node.itemDiv = document.createElement("div"); + node.itemDiv.className = "item"; + + node.labelSpan = document.createElement("span"); + node.labelSpan.className = "label"; + + createIndent(o,node.itemDiv,node,0); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + var a = document.createElement("a"); + node.labelSpan.appendChild(a); + node.label = document.createTextNode(text); + node.expanded = false; + a.appendChild(node.label); + if (link) { + var url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + var aname = '#'+link.split('#')[1]; + var srcPage = stripPath(pathName()); + var targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : "javascript:void(0)"; + a.onclick = function(){ + storeLink(link); + if (!$(a).parent().parent().hasClass('selected')) + { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + $(a).parent().parent().addClass('selected'); + $(a).parent().parent().attr('id','selected'); + } + var anchor = $(aname); + gotoAnchor(anchor,aname,true); + }; + } else { + a.href = url; + a.onclick = function() { storeLink(link); } + } + } else { + if (childrenData != null) + { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + } + + node.childrenUL = null; + node.getChildrenUL = function() { + if (!node.childrenUL) { + node.childrenUL = document.createElement("ul"); + node.childrenUL.className = "children_ul"; + node.childrenUL.style.display = "none"; + node.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }; + + return node; +} + +function showRoot() +{ + var headerHeight = $("#top").height(); + var footerHeight = $("#nav-path").height(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + (function (){ // retry until we can scroll to the selected item + try { + var navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); +} + +function expandNode(o, node, imm, setFocus) +{ + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + expandNode(o, node, imm, setFocus); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + if (setFocus) { + $(node.expandToggle).focus(); + } + } + } +} + +function glowEffect(n,duration) +{ + n.addClass('glow').delay(duration).queue(function(next){ + $(this).removeClass('glow');next(); + }); +} + +function highlightAnchor() +{ + var aname = hashUrl(); + var anchor = $(aname); + if (anchor.parent().attr('class')=='memItemLeft'){ + var rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname'){ + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype'){ + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } +} + +function selectAndHighlight(hash,n) +{ + var a; + if (hash) { + var link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + var topOffset=5; + if (typeof page_layout!=='undefined' && page_layout==1) { + topOffset+=$('#top').outerHeight(); + } + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); +} + +function showNode(o, node, index, hash) +{ + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + var varName = node.childrenData; + getScript(node.relpath+varName,function(){ + node.childrenData = getData(varName); + showNode(o,node,index,hash); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = arrowDown; + node.expanded = true; + var n = node.children[o.breadcrumbs[index]]; + if (index+11) hash = '#'+parts[1].replace(/[^\w\-]/g,''); + else hash=''; + } + if (hash.match(/^#l\d+$/)) { + var anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + var url=root+hash; + var i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function(){ + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + }); + } +} + +function showSyncOff(n,relpath) +{ + n.html(''); +} + +function showSyncOn(n,relpath) +{ + n.html(''); +} + +function toggleSyncButton(relpath) +{ + var navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } +} + +var loadTriggered = false; +var readyTriggered = false; +var loadObject,loadToRoot,loadUrl,loadRelPath; + +$(window).on('load',function(){ + if (readyTriggered) { // ready first + navTo(loadObject,loadToRoot,loadUrl,loadRelPath); + showRoot(); + } + loadTriggered=true; +}); + +function initNavTree(toroot,relpath) +{ + var o = new Object(); + o.toroot = toroot; + o.node = new Object(); + o.node.li = document.getElementById("nav-tree-contents"); + o.node.childrenData = NAVTREE; + o.node.children = new Array(); + o.node.childrenUL = document.createElement("ul"); + o.node.getChildrenUL = function() { return o.node.childrenUL; }; + o.node.li.appendChild(o.node.childrenUL); + o.node.depth = 0; + o.node.relpath = relpath; + o.node.expanded = false; + o.node.isLast = true; + o.node.plus_img = document.createElement("span"); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = arrowRight; + + if (localStorageSupported()) { + var navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + navSync.click(function(){ toggleSyncButton(relpath); }); + } + + if (loadTriggered) { // load before ready + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + } else { // ready before load + loadObject = o; + loadToRoot = toroot; + loadUrl = hashUrl(); + loadRelPath = relpath; + readyTriggered=true; + } + + $(window).bind('hashchange', function(){ + if (window.location.hash && window.location.hash.length>1){ + var a; + if ($(location).attr('hash')){ + var clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + + + diff --git a/plusd.svg b/plusd.svg new file mode 100644 index 00000000..0c65bfe9 --- /dev/null +++ b/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/resize.js b/resize.js new file mode 100644 index 00000000..0e5afa23 --- /dev/null +++ b/resize.js @@ -0,0 +1,155 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +var once=1; +function initResizable() +{ + var cookie_namespace = 'doxygen'; + var sidenav,navtree,content,header,barWidth=6,desktop_vp=768,titleHeight; + + function readSetting(cookie) + { + if (window.chrome) { + var val = localStorage.getItem(cookie_namespace+'_width'); + if (val) return val; + } else { + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) { + var index = document.cookie.indexOf(myCookie); + if (index != -1) { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + } + return 335; + } + + function writeSetting(cookie, val) + { + if (window.chrome) { + localStorage.setItem(cookie_namespace+"_width",val); + } else { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/"; + } + } + + function resizeWidth() + { + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); + } + writeSetting('width',sidenavWidth-barWidth); + } + + function restoreWidth(navWidth) + { + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + } + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight() + { + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height(); + var contentHeight,navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + content.css({height:contentHeight + "px"}); + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + if (location.hash.slice(1)) { + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); + } + } + + function collapseExpand() + { + var newWidth; + if (sidenav.width()>0) { + newWidth=0; + } + else { + var width = readSetting('width'); + newWidth = (width>335 && width<$(window).width()) ? width : 335; + } + restoreWidth(newWidth); + var sidenavWidth = $(sidenav).outerWidth(); + writeSetting('width',sidenavWidth-barWidth); + } + + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + $(window).resize(function() { resizeHeight(); }); + var device = navigator.userAgent.toLowerCase(); + var touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + var width = readSetting('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + if (once) { + $(".ui-resizable-handle").dblclick(collapseExpand); + once=0 + } + $(window).on('load',resizeHeight); +} +/* @license-end */ diff --git a/resources/mcpplogosmall.png b/resources/mcpplogosmall.png deleted file mode 100644 index 85b07ced..00000000 Binary files a/resources/mcpplogosmall.png and /dev/null differ diff --git a/search/all_0.js b/search/all_0.js new file mode 100644 index 00000000..dace79f6 --- /dev/null +++ b/search/all_0.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['acacia_5fdoor_5fblock_0',['ACACIA_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#a72e76bf5ec7e03f09944d6fcfc136bf2',1,'mcpp::Blocks']]], + ['acacia_5ffence_1',['ACACIA_FENCE',['../structmcpp_1_1_blocks.html#ab4a1ea92e8cb1a000c4051a547f9e96c',1,'mcpp::Blocks']]], + ['acacia_5ffence_5fgate_2',['ACACIA_FENCE_GATE',['../structmcpp_1_1_blocks.html#a87243b04778a3fa6d5d5b35a20519470',1,'mcpp::Blocks']]], + ['acacia_5fleaves_3',['ACACIA_LEAVES',['../structmcpp_1_1_blocks.html#ab26c9a42d77a43f58cabbc8302925cd7',1,'mcpp::Blocks']]], + ['acacia_5fsapling_4',['ACACIA_SAPLING',['../structmcpp_1_1_blocks.html#ada46a27c1ea2104266bfe55be67ae659',1,'mcpp::Blocks']]], + ['acacia_5fwood_5',['ACACIA_WOOD',['../structmcpp_1_1_blocks.html#acc89b3e19f160a5d5f7481bcc7898927',1,'mcpp::Blocks']]], + ['acacia_5fwood_5fplank_6',['ACACIA_WOOD_PLANK',['../structmcpp_1_1_blocks.html#a9ff7687e09b615b5e79984a6eea1bfbf',1,'mcpp::Blocks']]], + ['acacia_5fwood_5fslab_7',['ACACIA_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a7173f7ac3ff5e5f842476794d3fb6a0d',1,'mcpp::Blocks']]], + ['acacia_5fwood_5fstairs_8',['ACACIA_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#a8ccdeade44bd4257304d2dd5ae0218c0',1,'mcpp::Blocks']]], + ['activator_5frail_9',['ACTIVATOR_RAIL',['../structmcpp_1_1_blocks.html#ad601b7626961e7a6a19ce134a1224b05',1,'mcpp::Blocks']]], + ['air_10',['AIR',['../structmcpp_1_1_blocks.html#ac03835e0fece5b0a2ef61c36e60179c0',1,'mcpp::Blocks']]], + ['allium_11',['ALLIUM',['../structmcpp_1_1_blocks.html#ad72c1e58d32a0b4aa51e7df140d00391',1,'mcpp::Blocks']]], + ['and_20linux_12',['MacOS and Linux',['../index.html#autotoc_md5',1,'']]], + ['andesite_13',['ANDESITE',['../structmcpp_1_1_blocks.html#ac5eb7e9fac9b568297d21e043be79451',1,'mcpp::Blocks']]], + ['anvil_14',['ANVIL',['../structmcpp_1_1_blocks.html#a2108bc1b4133be7fb1f978bc1822cbc7',1,'mcpp::Blocks']]], + ['azure_5fbluet_15',['AZURE_BLUET',['../structmcpp_1_1_blocks.html#abd3470d662c47cdae1e6b90c5e0b1b7f',1,'mcpp::Blocks']]] +]; diff --git a/search/all_1.js b/search/all_1.js new file mode 100644 index 00000000..ceed4f4b --- /dev/null +++ b/search/all_1.js @@ -0,0 +1,60 @@ +var searchData= +[ + ['barrier_0',['BARRIER',['../structmcpp_1_1_blocks.html#a226314cdd40056aeab6dcd6c59c2fbde',1,'mcpp::Blocks']]], + ['base_5fpt_1',['base_pt',['../structmcpp_1_1_chunk.html#a06b31826ca7ca6a110c3655e45b1e2a2',1,'mcpp::Chunk::base_pt()'],['../structmcpp_1_1_height_map.html#a74388c7e2c66d1dd5c3d371ada6772c5',1,'mcpp::HeightMap::base_pt()']]], + ['beacon_2',['BEACON',['../structmcpp_1_1_blocks.html#a1cd9ba21975b1ac070cef8b6c7962189',1,'mcpp::Blocks']]], + ['bed_3',['BED',['../structmcpp_1_1_blocks.html#a90323f10a1f4a3b16f51dc4a8d53e6cf',1,'mcpp::Blocks']]], + ['bedrock_4',['BEDROCK',['../structmcpp_1_1_blocks.html#afc171621857a37728b25b9c537798fdd',1,'mcpp::Blocks']]], + ['beetroot_5fblock_5',['BEETROOT_BLOCK',['../structmcpp_1_1_blocks.html#ada28f034c5e35c1f61c6edae04c2e725',1,'mcpp::Blocks']]], + ['begin_6',['begin',['../structmcpp_1_1_chunk.html#a63103fc7a00824e56c065ecba6f51300',1,'mcpp::Chunk::begin()'],['../structmcpp_1_1_chunk.html#af6046c1b74fea144f2b5b0cfdcfd00c4',1,'mcpp::Chunk::begin() const'],['../structmcpp_1_1_height_map.html#a39eabb27a08366fff7a4f64fd0065cb4',1,'mcpp::HeightMap::begin()'],['../structmcpp_1_1_height_map.html#a6c35bbb2046585a447efaeb671267bde',1,'mcpp::HeightMap::begin() const']]], + ['birch_5fdoor_5fblock_7',['BIRCH_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#aac29e1143df31f10c4e1a0177e045218',1,'mcpp::Blocks']]], + ['birch_5ffence_8',['BIRCH_FENCE',['../structmcpp_1_1_blocks.html#ac1ee28a9df256bdddaa09ff4bb91932b',1,'mcpp::Blocks']]], + ['birch_5ffence_5fgate_9',['BIRCH_FENCE_GATE',['../structmcpp_1_1_blocks.html#ab6f95a15e0210538f9fc69dfff9abf8f',1,'mcpp::Blocks']]], + ['birch_5fleaves_10',['BIRCH_LEAVES',['../structmcpp_1_1_blocks.html#a2c4e54bd298ed4204b2e8afde272d9f9',1,'mcpp::Blocks']]], + ['birch_5fsapling_11',['BIRCH_SAPLING',['../structmcpp_1_1_blocks.html#ae431cbbbad3b69b736bf76caecc3e5bb',1,'mcpp::Blocks']]], + ['birch_5fwood_12',['BIRCH_WOOD',['../structmcpp_1_1_blocks.html#a647fd5f8b0ff106a607ac6ce8176470b',1,'mcpp::Blocks']]], + ['birch_5fwood_5fplank_13',['BIRCH_WOOD_PLANK',['../structmcpp_1_1_blocks.html#a93e72d5f0734c16a97647fef634788e9',1,'mcpp::Blocks']]], + ['birch_5fwood_5fslab_14',['BIRCH_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a97f4ed4537866b9fce5e377d007400c9',1,'mcpp::Blocks']]], + ['birch_5fwood_5fstairs_15',['BIRCH_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#a09a51850e2ab5a7f78e404f08c679a2a',1,'mcpp::Blocks']]], + ['black_5fcarpet_16',['BLACK_CARPET',['../structmcpp_1_1_blocks.html#a20af68df99fab425c47b850233c87cf8',1,'mcpp::Blocks']]], + ['black_5fconcrete_17',['BLACK_CONCRETE',['../structmcpp_1_1_blocks.html#a5bd6eec830f423db84786e8a5f8edac8',1,'mcpp::Blocks']]], + ['black_5fconcrete_5fpowder_18',['BLACK_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#afcbf618e02e9f5977ad7eaa57545bffc',1,'mcpp::Blocks']]], + ['black_5fglazed_5fterracotta_19',['BLACK_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#aab2ad1a890aa56f772aa938c462d7f14',1,'mcpp::Blocks']]], + ['black_5fhardened_5fclay_20',['BLACK_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a329c01c1645122438281094857d4e791',1,'mcpp::Blocks']]], + ['black_5fshulker_5fbox_21',['BLACK_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a5b7deeeebcae47a4b5a4ed26fa4c49b1',1,'mcpp::Blocks']]], + ['black_5fstained_5fglass_22',['BLACK_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a5c4f756b2df0deb9b7f1645fde9ae3c8',1,'mcpp::Blocks']]], + ['black_5fstained_5fglass_5fpane_23',['BLACK_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a5b7a8b6a2ab4936a40161755fabdc894',1,'mcpp::Blocks']]], + ['black_5fwool_24',['BLACK_WOOL',['../structmcpp_1_1_blocks.html#ae11a451423c7bda3abd3cadf43d94c87',1,'mcpp::Blocks']]], + ['block_2eh_25',['block.h',['../block_8h.html',1,'']]], + ['block_5fof_5fcoal_26',['BLOCK_OF_COAL',['../structmcpp_1_1_blocks.html#a50515d3763f3b81187bbd06ddcf3a9ef',1,'mcpp::Blocks']]], + ['blocks_27',['Blocks',['../structmcpp_1_1_blocks.html',1,'mcpp']]], + ['blocktype_28',['blocktype',['../classmcpp_1_1_block_type.html',1,'mcpp::BlockType'],['../classmcpp_1_1_block_type.html#ac475e584965cb95d1b5ec3ac3060413e',1,'mcpp::BlockType::BlockType()']]], + ['blue_5fcarpet_29',['BLUE_CARPET',['../structmcpp_1_1_blocks.html#aa409ea47fa347d01d111c786a74a76db',1,'mcpp::Blocks']]], + ['blue_5fconcrete_30',['BLUE_CONCRETE',['../structmcpp_1_1_blocks.html#aff369d294424a89de45ad7b41a385695',1,'mcpp::Blocks']]], + ['blue_5fconcrete_5fpowder_31',['BLUE_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a4b0cc59d92bf649f5a2bd941d7c121f1',1,'mcpp::Blocks']]], + ['blue_5fglazed_5fterracotta_32',['BLUE_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#aa4d82d6a59e8982edfb0ea7eca580d19',1,'mcpp::Blocks']]], + ['blue_5fhardened_5fclay_33',['BLUE_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ac4b6d4a2292ae90c0150024eb07cb779',1,'mcpp::Blocks']]], + ['blue_5forchid_34',['BLUE_ORCHID',['../structmcpp_1_1_blocks.html#a45b1afe5454da9023c9d71dd1de8501a',1,'mcpp::Blocks']]], + ['blue_5fshulker_5fbox_35',['BLUE_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a50eff2fd3c74207622b0907b6473f9b8',1,'mcpp::Blocks']]], + ['blue_5fstained_5fglass_36',['BLUE_STAINED_GLASS',['../structmcpp_1_1_blocks.html#ad1038624373c209c173564fe66d9c9f8',1,'mcpp::Blocks']]], + ['blue_5fstained_5fglass_5fpane_37',['BLUE_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a056c902287b2ca2d97fa69cae395a59c',1,'mcpp::Blocks']]], + ['blue_5fwool_38',['BLUE_WOOL',['../structmcpp_1_1_blocks.html#a180676f5945b33c16f354e4f36a34035',1,'mcpp::Blocks']]], + ['bone_5fblock_39',['BONE_BLOCK',['../structmcpp_1_1_blocks.html#acf9845f8c7fb8159c35ec7162d068b56',1,'mcpp::Blocks']]], + ['bookshelf_40',['BOOKSHELF',['../structmcpp_1_1_blocks.html#abdbe839710747f8d508ec7a54f56b42a',1,'mcpp::Blocks']]], + ['brewing_5fstand_41',['BREWING_STAND',['../structmcpp_1_1_blocks.html#a04a5482036caa263023a8e7b0565f569',1,'mcpp::Blocks']]], + ['brick_5fslab_42',['BRICK_SLAB',['../structmcpp_1_1_blocks.html#a54658821e1f0ed5235033cf266e07ac5',1,'mcpp::Blocks']]], + ['brick_5fstairs_43',['BRICK_STAIRS',['../structmcpp_1_1_blocks.html#abf2c393ab64663ae6586f5b711c3cfb2',1,'mcpp::Blocks']]], + ['bricks_44',['BRICKS',['../structmcpp_1_1_blocks.html#ad20a7f3ef9214c324a221d6bf22e23fe',1,'mcpp::Blocks']]], + ['brown_5fcarpet_45',['BROWN_CARPET',['../structmcpp_1_1_blocks.html#a8eb7cf9d41adcea7dd2a75cbfecd7f42',1,'mcpp::Blocks']]], + ['brown_5fconcrete_46',['BROWN_CONCRETE',['../structmcpp_1_1_blocks.html#ae11d826f721743c0b7a9d789ca90808e',1,'mcpp::Blocks']]], + ['brown_5fconcrete_5fpowder_47',['BROWN_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a958810fd9996ec555e45ed5d1a2eba65',1,'mcpp::Blocks']]], + ['brown_5fglazed_5fterracotta_48',['BROWN_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a22ae49a412e38ed9f9b538f67ea9f669',1,'mcpp::Blocks']]], + ['brown_5fhardened_5fclay_49',['BROWN_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a4d1d5fb11a412a21ede82725b3537bfe',1,'mcpp::Blocks']]], + ['brown_5fmushroom_50',['BROWN_MUSHROOM',['../structmcpp_1_1_blocks.html#ad5fa01975201fc789c72a75b9b65a423',1,'mcpp::Blocks']]], + ['brown_5fmushroom_5fblock_51',['BROWN_MUSHROOM_BLOCK',['../structmcpp_1_1_blocks.html#a372ce831284b72272347f60c1d69b2dd',1,'mcpp::Blocks']]], + ['brown_5fshulker_5fbox_52',['BROWN_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a2ba619b6b5f0eef9b355fea9f6624660',1,'mcpp::Blocks']]], + ['brown_5fstained_5fglass_53',['BROWN_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a25fb5ea87f4b82486ad6b14a5297945b',1,'mcpp::Blocks']]], + ['brown_5fstained_5fglass_5fpane_54',['BROWN_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#accec811954bb99e57f8d1d59a26571a9',1,'mcpp::Blocks']]], + ['brown_5fwool_55',['BROWN_WOOL',['../structmcpp_1_1_blocks.html#a7473bd88d6aaee8421ac313373268897',1,'mcpp::Blocks']]], + ['burning_5ffurnace_56',['BURNING_FURNACE',['../structmcpp_1_1_blocks.html#a3d0d48842261acf6725c9cdb1b5ff581',1,'mcpp::Blocks']]] +]; diff --git a/search/all_10.js b/search/all_10.js new file mode 100644 index 00000000..d4a76915 --- /dev/null +++ b/search/all_10.js @@ -0,0 +1,36 @@ +var searchData= +[ + ['rail_0',['RAIL',['../structmcpp_1_1_blocks.html#a9a8746ca0a58c3d09ef47ac7c70633fe',1,'mcpp::Blocks']]], + ['readme_2emd_1',['README.md',['../_r_e_a_d_m_e_8md.html',1,'']]], + ['red_5fcarpet_2',['RED_CARPET',['../structmcpp_1_1_blocks.html#a0ff0ee88c6806ec90d327c5d6fd4fb2e',1,'mcpp::Blocks']]], + ['red_5fconcrete_3',['RED_CONCRETE',['../structmcpp_1_1_blocks.html#ad6ea0866f49e1cf4f10ff37ea9ed991d',1,'mcpp::Blocks']]], + ['red_5fconcrete_5fpowder_4',['RED_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#af0b82c40b82184d442e1276cae65264d',1,'mcpp::Blocks']]], + ['red_5fglazed_5fterracotta_5',['RED_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a1847cc87bc68d4c5af00386aef79eb1b',1,'mcpp::Blocks']]], + ['red_5fhardened_5fclay_6',['RED_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ae10c2535db4dd755d5747b1c5c913b10',1,'mcpp::Blocks']]], + ['red_5fmushroom_7',['RED_MUSHROOM',['../structmcpp_1_1_blocks.html#a1ea426f875cd363ab31671061f2ba273',1,'mcpp::Blocks']]], + ['red_5fmushroom_5fblock_8',['RED_MUSHROOM_BLOCK',['../structmcpp_1_1_blocks.html#a016843eb0c63680e262806b3474b4e31',1,'mcpp::Blocks']]], + ['red_5fnether_5fbrick_9',['RED_NETHER_BRICK',['../structmcpp_1_1_blocks.html#af9acac71d05414f63830ee9f76ce8fc8',1,'mcpp::Blocks']]], + ['red_5fsand_10',['RED_SAND',['../structmcpp_1_1_blocks.html#a04a6702d375ead15f69f9e87df2913ac',1,'mcpp::Blocks']]], + ['red_5fsandstone_11',['RED_SANDSTONE',['../structmcpp_1_1_blocks.html#a9298949cd9a2ad3e191b2a01bc489ace',1,'mcpp::Blocks']]], + ['red_5fsandstone_5fslab_12',['RED_SANDSTONE_SLAB',['../structmcpp_1_1_blocks.html#a221ded5059217146ebfa5b86286884b7',1,'mcpp::Blocks']]], + ['red_5fsandstone_5fstairs_13',['RED_SANDSTONE_STAIRS',['../structmcpp_1_1_blocks.html#a55817498c783069c56852509a49a6793',1,'mcpp::Blocks']]], + ['red_5fshulker_5fbox_14',['RED_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a0e205c7136ffddeae849f25e00e207e2',1,'mcpp::Blocks']]], + ['red_5fstained_5fglass_15',['RED_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a4e82761ef022afa39347e1f5426a5860',1,'mcpp::Blocks']]], + ['red_5fstained_5fglass_5fpane_16',['RED_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a7f5b5de520615a34531a1c4c81687b40',1,'mcpp::Blocks']]], + ['red_5ftulip_17',['RED_TULIP',['../structmcpp_1_1_blocks.html#a042580342fcbf0cf2747a9ee8e4ed4e5',1,'mcpp::Blocks']]], + ['red_5fwool_18',['RED_WOOL',['../structmcpp_1_1_blocks.html#ae09d3ea74a0ce6aabf87a3815e4680c5',1,'mcpp::Blocks']]], + ['redstone_5fblock_19',['REDSTONE_BLOCK',['../structmcpp_1_1_blocks.html#a3878fa1f0a13df3028d8039b2f0e0e92',1,'mcpp::Blocks']]], + ['redstone_5fcomparator_5factive_20',['REDSTONE_COMPARATOR_ACTIVE',['../structmcpp_1_1_blocks.html#ab54c33e33b3af23d21dbc76df923fe44',1,'mcpp::Blocks']]], + ['redstone_5fcomparator_5finactive_21',['REDSTONE_COMPARATOR_INACTIVE',['../structmcpp_1_1_blocks.html#a5b96df136577b0708fb156084575a261',1,'mcpp::Blocks']]], + ['redstone_5flamp_5factive_22',['REDSTONE_LAMP_ACTIVE',['../structmcpp_1_1_blocks.html#a643a87d26419ff2bcc262a386cb47319',1,'mcpp::Blocks']]], + ['redstone_5flamp_5finactive_23',['REDSTONE_LAMP_INACTIVE',['../structmcpp_1_1_blocks.html#a9e500b46f354c0b4fb269e1f49550d8c',1,'mcpp::Blocks']]], + ['redstone_5fore_24',['REDSTONE_ORE',['../structmcpp_1_1_blocks.html#af75c961610aa9cd32548b76dbfc15307',1,'mcpp::Blocks']]], + ['redstone_5frepeater_5fblock_5foff_25',['REDSTONE_REPEATER_BLOCK_OFF',['../structmcpp_1_1_blocks.html#afab82d0b38d31e73463ceae235ee37df',1,'mcpp::Blocks']]], + ['redstone_5frepeater_5fblock_5fon_26',['REDSTONE_REPEATER_BLOCK_ON',['../structmcpp_1_1_blocks.html#aea8b1752707c7ddc4f9ba8b18f908921',1,'mcpp::Blocks']]], + ['redstone_5ftorch_5foff_27',['REDSTONE_TORCH_OFF',['../structmcpp_1_1_blocks.html#a2fa67d297fa522bb4b4fcda2a0407718',1,'mcpp::Blocks']]], + ['redstone_5ftorch_5fon_28',['REDSTONE_TORCH_ON',['../structmcpp_1_1_blocks.html#add4cc4c803eaac9b40c88ba87cfa369e',1,'mcpp::Blocks']]], + ['redstone_5fwire_29',['REDSTONE_WIRE',['../structmcpp_1_1_blocks.html#a2abd3287c46087378d9bf00b149835ba',1,'mcpp::Blocks']]], + ['reference_30',['reference',['../structmcpp_1_1_chunk_1_1_iterator.html#ada12027d45eb82bd5104f222718d8380',1,'mcpp::Chunk::Iterator::reference'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#ae7bb97e06ee7b429b470f886eb7402f6',1,'mcpp::Chunk::ConstIterator::reference'],['../structmcpp_1_1_height_map_1_1_iterator.html#a13975c7ad5e98a7760d5ca8530e02da2',1,'mcpp::HeightMap::Iterator::reference'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#a027ff4b8fbbb1276e5b1f6d99bfe4abf',1,'mcpp::HeightMap::ConstIterator::reference']]], + ['repeating_5fcommand_5fblock_31',['REPEATING_COMMAND_BLOCK',['../structmcpp_1_1_blocks.html#a58698dc51f11c7f362b70d60631eff70',1,'mcpp::Blocks']]], + ['rose_5fbush_32',['ROSE_BUSH',['../structmcpp_1_1_blocks.html#a06d7f77ecfcafe049ba2157bbfda0487',1,'mcpp::Blocks']]] +]; diff --git a/search/all_11.js b/search/all_11.js new file mode 100644 index 00000000..ec372dab --- /dev/null +++ b/search/all_11.js @@ -0,0 +1,45 @@ +var searchData= +[ + ['sand_0',['SAND',['../structmcpp_1_1_blocks.html#a2496f9afbcec6814e6b59343cae2139f',1,'mcpp::Blocks']]], + ['sandstone_1',['SANDSTONE',['../structmcpp_1_1_blocks.html#a03abeeae29bd769f50c0391aa7fced35',1,'mcpp::Blocks']]], + ['sandstone_5fslab_2',['SANDSTONE_SLAB',['../structmcpp_1_1_blocks.html#a655537aee4cd504a43a90b1da9ffacab',1,'mcpp::Blocks']]], + ['sandstone_5fstairs_3',['SANDSTONE_STAIRS',['../structmcpp_1_1_blocks.html#a5206853e401f7b66663525c617a5b69a',1,'mcpp::Blocks']]], + ['sea_5flantern_4',['SEA_LANTERN',['../structmcpp_1_1_blocks.html#a0f92f0c05136d0b68bd87092f47e11f1',1,'mcpp::Blocks']]], + ['setblock_5',['setBlock',['../classmcpp_1_1_minecraft_connection.html#a7da57f4b67732a3eedc943cec715ed8f',1,'mcpp::MinecraftConnection']]], + ['setblocks_6',['setBlocks',['../classmcpp_1_1_minecraft_connection.html#ac33d67903491e0a1c753c8754377b71a',1,'mcpp::MinecraftConnection']]], + ['setplayerposition_7',['setPlayerPosition',['../classmcpp_1_1_minecraft_connection.html#a35965000d661f13f19cee02a676780f2',1,'mcpp::MinecraftConnection']]], + ['setplayertileposition_8',['setPlayerTilePosition',['../classmcpp_1_1_minecraft_connection.html#a0c54cfc5da2741d4abff1115e8acef33',1,'mcpp::MinecraftConnection']]], + ['slime_5fblock_9',['SLIME_BLOCK',['../structmcpp_1_1_blocks.html#a8630f6cd66a09458cad6bf5b099179cc',1,'mcpp::Blocks']]], + ['smooth_5fred_5fsandstone_10',['SMOOTH_RED_SANDSTONE',['../structmcpp_1_1_blocks.html#a6bccfb2addf1093138ed56c5e9ffac30',1,'mcpp::Blocks']]], + ['smooth_5fsandstone_11',['SMOOTH_SANDSTONE',['../structmcpp_1_1_blocks.html#a8f9f07ec88e41208c86c721d34f5ed10',1,'mcpp::Blocks']]], + ['snow_12',['SNOW',['../structmcpp_1_1_blocks.html#a8ae19855fc714509d89fdf32a0fa8c70',1,'mcpp::Blocks']]], + ['snow_5fblock_13',['SNOW_BLOCK',['../structmcpp_1_1_blocks.html#acff893f21675d53544bdf67074dc61e9',1,'mcpp::Blocks']]], + ['soul_5fsand_14',['SOUL_SAND',['../structmcpp_1_1_blocks.html#acb128cec3d0fa4e91f9ded7eabc2c3aa',1,'mcpp::Blocks']]], + ['sponge_15',['SPONGE',['../structmcpp_1_1_blocks.html#a4757bea1d44f365dad7c5967c6a443a5',1,'mcpp::Blocks']]], + ['spruce_5fdoor_5fblock_16',['SPRUCE_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#a08b827461c21c6a8f93f9eb8db3d4864',1,'mcpp::Blocks']]], + ['spruce_5ffence_17',['SPRUCE_FENCE',['../structmcpp_1_1_blocks.html#a4d489398921358386d6cf3419659bcb4',1,'mcpp::Blocks']]], + ['spruce_5ffence_5fgate_18',['SPRUCE_FENCE_GATE',['../structmcpp_1_1_blocks.html#a04804f449cac04996a6933eeae42567e',1,'mcpp::Blocks']]], + ['spruce_5fleaves_19',['SPRUCE_LEAVES',['../structmcpp_1_1_blocks.html#a368f0966956ddd0824c2f59e6283211b',1,'mcpp::Blocks']]], + ['spruce_5fsapling_20',['SPRUCE_SAPLING',['../structmcpp_1_1_blocks.html#ad129a41a37fa05cb36335e8d1ac3dfeb',1,'mcpp::Blocks']]], + ['spruce_5fwood_21',['SPRUCE_WOOD',['../structmcpp_1_1_blocks.html#a276d4f9622cc246271d4db5dde4d8a02',1,'mcpp::Blocks']]], + ['spruce_5fwood_5fplank_22',['SPRUCE_WOOD_PLANK',['../structmcpp_1_1_blocks.html#a1658e669ed5c82b0e31caaef2f6f4657',1,'mcpp::Blocks']]], + ['spruce_5fwood_5fslab_23',['SPRUCE_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a26453ea88d059862147787548efd3616',1,'mcpp::Blocks']]], + ['spruce_5fwood_5fstairs_24',['SPRUCE_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#a62237dc713ffa653600dbe5162d94931',1,'mcpp::Blocks']]], + ['standing_5fsign_5fblock_25',['STANDING_SIGN_BLOCK',['../structmcpp_1_1_blocks.html#a5c6ede3edcfc1ee428ad25393156e3c7',1,'mcpp::Blocks']]], + ['sticky_5fpiston_26',['STICKY_PISTON',['../structmcpp_1_1_blocks.html#ab15d395bb3006a391d564f91be0228a8',1,'mcpp::Blocks']]], + ['still_5flava_27',['STILL_LAVA',['../structmcpp_1_1_blocks.html#a95b004109a92dea512a771a517b2c96e',1,'mcpp::Blocks']]], + ['still_5fwater_28',['STILL_WATER',['../structmcpp_1_1_blocks.html#a22232a0f7facc90a4097dc5fcddcc7c9',1,'mcpp::Blocks']]], + ['stone_29',['STONE',['../structmcpp_1_1_blocks.html#a3465597ce53c4e46f44d3356facd6e49',1,'mcpp::Blocks']]], + ['stone_5fbrick_5fmonster_5fegg_30',['STONE_BRICK_MONSTER_EGG',['../structmcpp_1_1_blocks.html#aa34143ed2ab86b2cbb19849762b99739',1,'mcpp::Blocks']]], + ['stone_5fbrick_5fslab_31',['STONE_BRICK_SLAB',['../structmcpp_1_1_blocks.html#a3c329e3dc45c31141e242e097abd6dfc',1,'mcpp::Blocks']]], + ['stone_5fbrick_5fstairs_32',['STONE_BRICK_STAIRS',['../structmcpp_1_1_blocks.html#a3dfadc312c4816d3a16d4e34a99ad19c',1,'mcpp::Blocks']]], + ['stone_5fbricks_33',['STONE_BRICKS',['../structmcpp_1_1_blocks.html#a04ff780c55f66e7c87ae83c18335cbac',1,'mcpp::Blocks']]], + ['stone_5fbutton_34',['STONE_BUTTON',['../structmcpp_1_1_blocks.html#ade5c4f14af1c42aa9504a83ea020aee6',1,'mcpp::Blocks']]], + ['stone_5fmonster_5fegg_35',['STONE_MONSTER_EGG',['../structmcpp_1_1_blocks.html#a8556ffcb61026cdbf2c17242c7833f96',1,'mcpp::Blocks']]], + ['stone_5fpressure_5fplate_36',['STONE_PRESSURE_PLATE',['../structmcpp_1_1_blocks.html#abe3716718039e225a67569b106b5f718',1,'mcpp::Blocks']]], + ['stone_5fslab_37',['STONE_SLAB',['../structmcpp_1_1_blocks.html#a2822a4aafcb1ecba6683548adac81889',1,'mcpp::Blocks']]], + ['structure_5fblock_38',['STRUCTURE_BLOCK',['../structmcpp_1_1_blocks.html#a61e13cfa32b2927d28246b242af756f2',1,'mcpp::Blocks']]], + ['structure_5fvoid_39',['STRUCTURE_VOID',['../structmcpp_1_1_blocks.html#a03de527c29a01725e9bdb7397e505b99',1,'mcpp::Blocks']]], + ['sugar_5fcanes_40',['SUGAR_CANES',['../structmcpp_1_1_blocks.html#ac01288a07642ef1e305ae9f118cb9a46',1,'mcpp::Blocks']]], + ['sunflower_41',['SUNFLOWER',['../structmcpp_1_1_blocks.html#a36cf041100c394c5b31c7b547a9095f4',1,'mcpp::Blocks']]] +]; diff --git a/search/all_12.js b/search/all_12.js new file mode 100644 index 00000000..1c7b3b27 --- /dev/null +++ b/search/all_12.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['tall_5fgrass_0',['TALL_GRASS',['../structmcpp_1_1_blocks.html#a5e2cf3f88d533228049432f7474b9170',1,'mcpp::Blocks']]], + ['tnt_1',['TNT',['../structmcpp_1_1_blocks.html#a38a8d0d8b96807a1e7c185d8f0371dd7',1,'mcpp::Blocks']]], + ['to_5fstring_2',['to_string',['../namespacemcpp.html#ab1bf0af2b50790de272ff6f3f4d26f29',1,'mcpp']]], + ['torch_3',['TORCH',['../structmcpp_1_1_blocks.html#a8a31a12eec7e5526a091651727352f65',1,'mcpp::Blocks']]], + ['trapped_5fchest_4',['TRAPPED_CHEST',['../structmcpp_1_1_blocks.html#a6747051dfdf7c77bd05c927c3c865a76',1,'mcpp::Blocks']]], + ['tripwire_5',['TRIPWIRE',['../structmcpp_1_1_blocks.html#a1dc81235f4b26a78f32ed66005b9d03a',1,'mcpp::Blocks']]], + ['tripwire_5fhook_6',['TRIPWIRE_HOOK',['../structmcpp_1_1_blocks.html#a71d746e9b5fc85da69a19c276960b2a9',1,'mcpp::Blocks']]] +]; diff --git a/search/all_13.js b/search/all_13.js new file mode 100644 index 00000000..2f0d58dc --- /dev/null +++ b/search/all_13.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['value_5ftype_0',['value_type',['../structmcpp_1_1_chunk_1_1_iterator.html#a1ed20bf3763f3e7445c3c8d698db400d',1,'mcpp::Chunk::Iterator::value_type'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a6ec2f4a801045bc714c10d9b9bbcaf5a',1,'mcpp::Chunk::ConstIterator::value_type'],['../structmcpp_1_1_height_map_1_1_iterator.html#a089592672f20646edb87f1dc2cee71a1',1,'mcpp::HeightMap::Iterator::value_type'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#aa83fe7872d10903e267cd04d597da250',1,'mcpp::HeightMap::ConstIterator::value_type']]], + ['vines_1',['VINES',['../structmcpp_1_1_blocks.html#a53ed561a34cf27472241730e77f99bed',1,'mcpp::Blocks']]] +]; diff --git a/search/all_14.js b/search/all_14.js new file mode 100644 index 00000000..37995896 --- /dev/null +++ b/search/all_14.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['wallmounted_5fbanner_0',['WALLMOUNTED_BANNER',['../structmcpp_1_1_blocks.html#a6707ff1fc0e839a6b1e3a60c71bd814c',1,'mcpp::Blocks']]], + ['wallmounted_5fsign_5fblock_1',['WALLMOUNTED_SIGN_BLOCK',['../structmcpp_1_1_blocks.html#a42061d5cc97b7b7a3350dfb228ee9cdd',1,'mcpp::Blocks']]], + ['weighted_5fpressure_5fplate_5fheavy_2',['WEIGHTED_PRESSURE_PLATE_HEAVY',['../structmcpp_1_1_blocks.html#ae55600cc14bc67340128f9f3ede228a9',1,'mcpp::Blocks']]], + ['weighted_5fpressure_5fplate_5flight_3',['WEIGHTED_PRESSURE_PLATE_LIGHT',['../structmcpp_1_1_blocks.html#ab892288e54b812b8e8f78f3485191dfd',1,'mcpp::Blocks']]], + ['wet_5fsponge_4',['WET_SPONGE',['../structmcpp_1_1_blocks.html#ac1d4a1dac18ba602e8a6205561ffda58',1,'mcpp::Blocks']]], + ['wheat_5fcrops_5',['WHEAT_CROPS',['../structmcpp_1_1_blocks.html#a510d428cc9e2e5c31f520a9c950bdeec',1,'mcpp::Blocks']]], + ['white_5fcarpet_6',['WHITE_CARPET',['../structmcpp_1_1_blocks.html#aa70c8997ed09864966fa9ce978e85eab',1,'mcpp::Blocks']]], + ['white_5fconcrete_7',['WHITE_CONCRETE',['../structmcpp_1_1_blocks.html#a9b5fd0309b95d5d6c5a15bc741075b14',1,'mcpp::Blocks']]], + ['white_5fconcrete_5fpowder_8',['WHITE_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#ade447d44ced3e6c60ef86288c5097408',1,'mcpp::Blocks']]], + ['white_5fglazed_5fterracotta_9',['WHITE_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a1009175bc6439f88688f2d452591a090',1,'mcpp::Blocks']]], + ['white_5fhardened_5fclay_10',['WHITE_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a21270c353d06eeb3e3d32eae67e3538a',1,'mcpp::Blocks']]], + ['white_5fshulker_5fbox_11',['WHITE_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a1dd79e09dac7d0d8f1f4bcd6c439513e',1,'mcpp::Blocks']]], + ['white_5fstained_5fglass_12',['WHITE_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a3cb773ccd4d40d9dd6790a7293130c67',1,'mcpp::Blocks']]], + ['white_5fstained_5fglass_5fpane_13',['WHITE_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a1a9bae80bd6ef59c7195f8f75a621328',1,'mcpp::Blocks']]], + ['white_5ftulip_14',['WHITE_TULIP',['../structmcpp_1_1_blocks.html#a22431acd59464fdf9e5b9511da97d9b7',1,'mcpp::Blocks']]], + ['white_5fwool_15',['WHITE_WOOL',['../structmcpp_1_1_blocks.html#a948dcddcf6593cbd568eb178d9ab6fe9',1,'mcpp::Blocks']]], + ['windows_16',['Windows',['../index.html#autotoc_md4',1,'']]], + ['with_5fheight_17',['with_height',['../structmcpp_1_1_coordinate2_d.html#adfc2d893774f802f04c6d1c6817085c6',1,'mcpp::Coordinate2D']]], + ['with_5fmod_18',['with_mod',['../classmcpp_1_1_block_type.html#a7dd394937bd5ebb798a95ff54b546f16',1,'mcpp::BlockType']]], + ['wooden_5fbutton_19',['WOODEN_BUTTON',['../structmcpp_1_1_blocks.html#a38c4c416536d12da21a5fbf4a378c7dc',1,'mcpp::Blocks']]], + ['wooden_5fpressure_5fplate_20',['WOODEN_PRESSURE_PLATE',['../structmcpp_1_1_blocks.html#ae2f44567fce9aa64e0bae19d2272c4a0',1,'mcpp::Blocks']]], + ['wooden_5fslab_21',['WOODEN_SLAB',['../structmcpp_1_1_blocks.html#a160c513e66f731ed3be363cb77dc6acd',1,'mcpp::Blocks']]], + ['wooden_5ftrapdoor_22',['WOODEN_TRAPDOOR',['../structmcpp_1_1_blocks.html#a9bfa8aa1720d2676ce55ea74553c145b',1,'mcpp::Blocks']]] +]; diff --git a/search/all_15.js b/search/all_15.js new file mode 100644 index 00000000..78205925 --- /dev/null +++ b/search/all_15.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['x_0',['x',['../structmcpp_1_1_coordinate.html#a84339f0bb43dd646b7ab4e14de7024d8',1,'mcpp::Coordinate::x'],['../structmcpp_1_1_coordinate2_d.html#abae9f5a78e7c56441b92797d325f82f9',1,'mcpp::Coordinate2D::x']]], + ['x_5flen_1',['x_len',['../structmcpp_1_1_chunk.html#ad0b7a1f08a35673b482ab9693bff1dfa',1,'mcpp::Chunk::x_len()'],['../structmcpp_1_1_height_map.html#a152ce47a657b30d78e5a591596ade889',1,'mcpp::HeightMap::x_len()']]] +]; diff --git a/search/all_16.js b/search/all_16.js new file mode 100644 index 00000000..d04e5313 --- /dev/null +++ b/search/all_16.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['y_0',['y',['../structmcpp_1_1_coordinate.html#a2b6002afea6796a291584313a30186c3',1,'mcpp::Coordinate']]], + ['y_5flen_1',['y_len',['../structmcpp_1_1_chunk.html#a5cf54ca51a63946e9b836ff4ff3f8982',1,'mcpp::Chunk']]], + ['yellow_5fcarpet_2',['YELLOW_CARPET',['../structmcpp_1_1_blocks.html#afbdd7baf788c0fe07d200d375ed6326b',1,'mcpp::Blocks']]], + ['yellow_5fconcrete_3',['YELLOW_CONCRETE',['../structmcpp_1_1_blocks.html#a0a1b618bd74f8de6ca4a4492e38da29b',1,'mcpp::Blocks']]], + ['yellow_5fconcrete_5fpowder_4',['YELLOW_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#aeeec36bc1fe8b2c6edc9628941a58a6a',1,'mcpp::Blocks']]], + ['yellow_5fglazed_5fterracotta_5',['YELLOW_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#ab8e4abe534066ea9070f4def9783d95e',1,'mcpp::Blocks']]], + ['yellow_5fhardened_5fclay_6',['YELLOW_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ac420c0e0bf9d617cf13b1f3cd419641b',1,'mcpp::Blocks']]], + ['yellow_5fshulker_5fbox_7',['YELLOW_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a223f6561b3086a9ca46cd414d9904a53',1,'mcpp::Blocks']]], + ['yellow_5fstained_5fglass_8',['YELLOW_STAINED_GLASS',['../structmcpp_1_1_blocks.html#aa230495d9b201a4af10105f9dd52d92d',1,'mcpp::Blocks']]], + ['yellow_5fstained_5fglass_5fpane_9',['YELLOW_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a01693b609f4c5d52a19ea47f5fe30023',1,'mcpp::Blocks']]], + ['yellow_5fwool_10',['YELLOW_WOOL',['../structmcpp_1_1_blocks.html#ae1d8a7f4cfcac88373e21152e7063ff4',1,'mcpp::Blocks']]] +]; diff --git a/search/all_17.js b/search/all_17.js new file mode 100644 index 00000000..77a16187 --- /dev/null +++ b/search/all_17.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['z_0',['z',['../structmcpp_1_1_coordinate.html#ac1b5d6b400a97496194bcb54849a2a29',1,'mcpp::Coordinate::z'],['../structmcpp_1_1_coordinate2_d.html#ad46dc636500fab2eb9e7bce886cf38c5',1,'mcpp::Coordinate2D::z']]], + ['z_5flen_1',['z_len',['../structmcpp_1_1_chunk.html#ac8c8d1a661dfa3ac22588fc9cd11d96b',1,'mcpp::Chunk::z_len()'],['../structmcpp_1_1_height_map.html#a1d05df8a6379d15b0ee5c1364415a41e',1,'mcpp::HeightMap::z_len()']]] +]; diff --git a/search/all_18.js b/search/all_18.js new file mode 100644 index 00000000..72d6b4da --- /dev/null +++ b/search/all_18.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_7echunk_0',['~Chunk',['../structmcpp_1_1_chunk.html#ad1be58a4b0c65d2569e9dc34bcfcb811',1,'mcpp::Chunk']]], + ['_7eheightmap_1',['~HeightMap',['../structmcpp_1_1_height_map.html#a4eeedc5ee0f765c5fd9a24a780e5ba79',1,'mcpp::HeightMap']]], + ['_7eminecraftconnection_2',['~MinecraftConnection',['../classmcpp_1_1_minecraft_connection.html#ae470f965ac0cdb97d7d92bd0ab9e6587',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/all_2.js b/search/all_2.js new file mode 100644 index 00000000..bb364f9c --- /dev/null +++ b/search/all_2.js @@ -0,0 +1,46 @@ +var searchData= +[ + ['cactus_0',['CACTUS',['../structmcpp_1_1_blocks.html#ae55277187d8808c3f2215bc2aa3ec83d',1,'mcpp::Blocks']]], + ['cake_5fblock_1',['CAKE_BLOCK',['../structmcpp_1_1_blocks.html#ae702ade332abc676fd20261f3f41ac86',1,'mcpp::Blocks']]], + ['carrots_2',['CARROTS',['../structmcpp_1_1_blocks.html#a2cbf14f44f919e7740156a4376d42d0f',1,'mcpp::Blocks']]], + ['cauldron_3',['CAULDRON',['../structmcpp_1_1_blocks.html#a1880f29074b425a730ce012869bedb27',1,'mcpp::Blocks']]], + ['chain_5fcommand_5fblock_4',['CHAIN_COMMAND_BLOCK',['../structmcpp_1_1_blocks.html#aa4d2c7ba37f0db7f0118b156b8373c09',1,'mcpp::Blocks']]], + ['chest_5',['CHEST',['../structmcpp_1_1_blocks.html#a69d55f09dd635c754004af7cabb8729c',1,'mcpp::Blocks']]], + ['chiseled_5fquartz_5fblock_6',['CHISELED_QUARTZ_BLOCK',['../structmcpp_1_1_blocks.html#a093ddbfde7ae0d97818166ecea59fef8',1,'mcpp::Blocks']]], + ['chiseled_5fred_5fsandstone_7',['CHISELED_RED_SANDSTONE',['../structmcpp_1_1_blocks.html#a09572a972b2b8d3d8f0af1f57c73ffa0',1,'mcpp::Blocks']]], + ['chiseled_5fsandstone_8',['CHISELED_SANDSTONE',['../structmcpp_1_1_blocks.html#affb674669374d50fd8b2b7703225064f',1,'mcpp::Blocks']]], + ['chiseled_5fstone_5fbrick_5fmonster_5fegg_9',['CHISELED_STONE_BRICK_MONSTER_EGG',['../structmcpp_1_1_blocks.html#a2c4b23ff0f5479129bd12101d5d86180',1,'mcpp::Blocks']]], + ['chiseled_5fstone_5fbricks_10',['CHISELED_STONE_BRICKS',['../structmcpp_1_1_blocks.html#a29579a2570d58cb13c741cfd50bc9676',1,'mcpp::Blocks']]], + ['chorus_5fflower_11',['CHORUS_FLOWER',['../structmcpp_1_1_blocks.html#abd205b27d363d92dcc6ed1dbc9b5f640',1,'mcpp::Blocks']]], + ['chorus_5fplant_12',['CHORUS_PLANT',['../structmcpp_1_1_blocks.html#aacf5547343d38823f71828b7e06a2084',1,'mcpp::Blocks']]], + ['chunk_13',['chunk',['../structmcpp_1_1_chunk.html#aa64d3b2cfa29d09ed149e2ae63b09c67',1,'mcpp::Chunk::Chunk(const Coordinate &loc1, const Coordinate &loc2, const std::vector< BlockType > &block_list)'],['../structmcpp_1_1_chunk.html#ab12fccb955880e8e51ab83d77d370b35',1,'mcpp::Chunk::Chunk(const Chunk &other)'],['../structmcpp_1_1_chunk.html#a4018abeef679fd2bc9c4507bb7618efd',1,'mcpp::Chunk::Chunk(Chunk &&other) noexcept=default'],['../structmcpp_1_1_chunk.html',1,'mcpp::Chunk']]], + ['chunk_2eh_14',['chunk.h',['../chunk_8h.html',1,'']]], + ['clay_15',['CLAY',['../structmcpp_1_1_blocks.html#a424d5140fa7853a368b7a2c1388ab855',1,'mcpp::Blocks']]], + ['coal_5fore_16',['COAL_ORE',['../structmcpp_1_1_blocks.html#ae00b4536c7e9bbf251644d22909ba229',1,'mcpp::Blocks']]], + ['coarse_5fdirt_17',['COARSE_DIRT',['../structmcpp_1_1_blocks.html#ab73df48ee48af187fac0aac8a15f04a7',1,'mcpp::Blocks']]], + ['cobblestone_18',['COBBLESTONE',['../structmcpp_1_1_blocks.html#aab2ce7854a8d0b56db515d4a734e3347',1,'mcpp::Blocks']]], + ['cobblestone_5fmonster_5fegg_19',['COBBLESTONE_MONSTER_EGG',['../structmcpp_1_1_blocks.html#a229c91f0548f523f05f4f63324b54776',1,'mcpp::Blocks']]], + ['cobblestone_5fslab_20',['COBBLESTONE_SLAB',['../structmcpp_1_1_blocks.html#a2fefcbfae212ec69cf9444f44a67e76e',1,'mcpp::Blocks']]], + ['cobblestone_5fstairs_21',['COBBLESTONE_STAIRS',['../structmcpp_1_1_blocks.html#aad1ea51a6f3d49097c7e4d0fbdbe9f40',1,'mcpp::Blocks']]], + ['cobblestone_5fwall_22',['COBBLESTONE_WALL',['../structmcpp_1_1_blocks.html#ab16579678ae520f5e2e844d960c73c43',1,'mcpp::Blocks']]], + ['cobweb_23',['COBWEB',['../structmcpp_1_1_blocks.html#ab9daeaa55c01bab1abcdf5957571ed9b',1,'mcpp::Blocks']]], + ['cocoa_24',['COCOA',['../structmcpp_1_1_blocks.html#ac159129c396f7b49711a0c80d8ec7f96',1,'mcpp::Blocks']]], + ['command_5fblock_25',['COMMAND_BLOCK',['../structmcpp_1_1_blocks.html#a5a61cd994951cafe3451c2d77078a270',1,'mcpp::Blocks']]], + ['constiterator_26',['constiterator',['../structmcpp_1_1_chunk_1_1_const_iterator.html#acbdebb9cafdbf1f6a35afb46d3426da1',1,'mcpp::Chunk::ConstIterator::ConstIterator()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#a2e5f6370cef6618061247fed008339a1',1,'mcpp::HeightMap::ConstIterator::ConstIterator()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html',1,'mcpp::Chunk::ConstIterator'],['../structmcpp_1_1_height_map_1_1_const_iterator.html',1,'mcpp::HeightMap::ConstIterator']]], + ['contributors_27',['Contributors',['../index.html#autotoc_md6',1,'']]], + ['coordinate_28',['coordinate',['../structmcpp_1_1_coordinate.html',1,'mcpp::Coordinate'],['../structmcpp_1_1_coordinate.html#a8af39c4153a09f110646212169a32449',1,'mcpp::Coordinate::Coordinate(int32_t x, int32_t y, int32_t z)'],['../structmcpp_1_1_coordinate.html#aa8bf97dfc6cd6ff08df614bbcb151dae',1,'mcpp::Coordinate::Coordinate()'],['../structmcpp_1_1_coordinate.html#aaf77bf635fec3314ba15dc524a53268e',1,'mcpp::Coordinate::Coordinate(double x, double y, double z)']]], + ['coordinate_2eh_29',['coordinate.h',['../coordinate_8h.html',1,'']]], + ['coordinate2d_30',['coordinate2d',['../structmcpp_1_1_coordinate2_d.html',1,'mcpp::Coordinate2D'],['../structmcpp_1_1_coordinate2_d.html#a8f65cfffbec8d8d84178744eb8903754',1,'mcpp::Coordinate2D::Coordinate2D(const Coordinate &coord)'],['../structmcpp_1_1_coordinate2_d.html#a7e9804ff78e9c361bc4998bf8474cb38',1,'mcpp::Coordinate2D::Coordinate2D(double x, double z)'],['../structmcpp_1_1_coordinate2_d.html#ab716a1351c8381af3df2f572ca72222d',1,'mcpp::Coordinate2D::Coordinate2D()'],['../structmcpp_1_1_coordinate2_d.html#af8c571915ae262648934119cc3124d02',1,'mcpp::Coordinate2D::Coordinate2D(int x, int z)']]], + ['cracked_5fstone_5fbrick_5fmonster_5fegg_31',['CRACKED_STONE_BRICK_MONSTER_EGG',['../structmcpp_1_1_blocks.html#a64dbb8a8903b7338bff284ab7727167f',1,'mcpp::Blocks']]], + ['cracked_5fstone_5fbricks_32',['CRACKED_STONE_BRICKS',['../structmcpp_1_1_blocks.html#adeb34fbad3f8f97438c35c6b80bdcb37',1,'mcpp::Blocks']]], + ['crafting_5ftable_33',['CRAFTING_TABLE',['../structmcpp_1_1_blocks.html#a7180e394f60d72d7095c227b48810480',1,'mcpp::Blocks']]], + ['cyan_5fcarpet_34',['CYAN_CARPET',['../structmcpp_1_1_blocks.html#a1515c7783cf8dc47b110a246e3e763ec',1,'mcpp::Blocks']]], + ['cyan_5fconcrete_35',['CYAN_CONCRETE',['../structmcpp_1_1_blocks.html#a3f037b6727ea3f0ba1593105469eda93',1,'mcpp::Blocks']]], + ['cyan_5fconcrete_5fpowder_36',['CYAN_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#aaffddf69a1d85d0c4c586a19b66a1f37',1,'mcpp::Blocks']]], + ['cyan_5fglazed_5fterracotta_37',['CYAN_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a5eb8252a64781e835449ecb9a9087e66',1,'mcpp::Blocks']]], + ['cyan_5fhardened_5fclay_38',['CYAN_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ae409c0a5d2d204e6fa8831a186d2509c',1,'mcpp::Blocks']]], + ['cyan_5fshulker_5fbox_39',['CYAN_SHULKER_BOX',['../structmcpp_1_1_blocks.html#aae70495dfd18b675713a3057fda180fb',1,'mcpp::Blocks']]], + ['cyan_5fstained_5fglass_40',['CYAN_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a15040d0ea6dab20f7d5fba2dd8cb3075',1,'mcpp::Blocks']]], + ['cyan_5fstained_5fglass_5fpane_41',['CYAN_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a8ec213ed77454b256898dae928848bb8',1,'mcpp::Blocks']]], + ['cyan_5fwool_42',['CYAN_WOOL',['../structmcpp_1_1_blocks.html#adede0c44e458e49f910f893678829cda',1,'mcpp::Blocks']]] +]; diff --git a/search/all_3.js b/search/all_3.js new file mode 100644 index 00000000..27af061e --- /dev/null +++ b/search/all_3.js @@ -0,0 +1,44 @@ +var searchData= +[ + ['dandelion_0',['DANDELION',['../structmcpp_1_1_blocks.html#a4ede93dc7165dfb9e2eb46c645420285',1,'mcpp::Blocks']]], + ['dark_5foak_5fdoor_5fblock_1',['DARK_OAK_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#a4a3e8d59262b3d27dadcbcdaa7f548e8',1,'mcpp::Blocks']]], + ['dark_5foak_5ffence_2',['DARK_OAK_FENCE',['../structmcpp_1_1_blocks.html#ab79bda104d2f60601e052cdc5b06f3a0',1,'mcpp::Blocks']]], + ['dark_5foak_5ffence_5fgate_3',['DARK_OAK_FENCE_GATE',['../structmcpp_1_1_blocks.html#afb5c6b1a0100519382b739af65105fc0',1,'mcpp::Blocks']]], + ['dark_5foak_5fleaves_4',['DARK_OAK_LEAVES',['../structmcpp_1_1_blocks.html#abe5312b2543b7ebc6e6a40eeb8f07fcd',1,'mcpp::Blocks']]], + ['dark_5foak_5fsapling_5',['DARK_OAK_SAPLING',['../structmcpp_1_1_blocks.html#aa2ce43bc0cdd973e2e5f70978c24d1c9',1,'mcpp::Blocks']]], + ['dark_5foak_5fwood_6',['DARK_OAK_WOOD',['../structmcpp_1_1_blocks.html#a68189f132be17724bba6dd7291d53e7e',1,'mcpp::Blocks']]], + ['dark_5foak_5fwood_5fplank_7',['DARK_OAK_WOOD_PLANK',['../structmcpp_1_1_blocks.html#aee4468237344bfd3c434b1f1bc36151e',1,'mcpp::Blocks']]], + ['dark_5foak_5fwood_5fslab_8',['DARK_OAK_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a94f577c81bdebc295fa3fbfa710e98ee',1,'mcpp::Blocks']]], + ['dark_5foak_5fwood_5fstairs_9',['DARK_OAK_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#ab302e5d0eb4e6c521732025466eb1c52',1,'mcpp::Blocks']]], + ['dark_5fprismarine_10',['DARK_PRISMARINE',['../structmcpp_1_1_blocks.html#a39c77900b54411576ff66860f4f5a270',1,'mcpp::Blocks']]], + ['daylight_5fsensor_11',['DAYLIGHT_SENSOR',['../structmcpp_1_1_blocks.html#a3350b3c6e5331c71cf0f0db2e78da728',1,'mcpp::Blocks']]], + ['dead_5fbush_12',['DEAD_BUSH',['../structmcpp_1_1_blocks.html#ab33d6298da4729925e7d1851ccaa0854',1,'mcpp::Blocks']]], + ['dead_5fshrub_13',['DEAD_SHRUB',['../structmcpp_1_1_blocks.html#af657bf849748d6acf482ed77fec842c7',1,'mcpp::Blocks']]], + ['detector_5frail_14',['DETECTOR_RAIL',['../structmcpp_1_1_blocks.html#a95e4f46009e3a833bf06287d73ab3d91',1,'mcpp::Blocks']]], + ['diamond_5fblock_15',['DIAMOND_BLOCK',['../structmcpp_1_1_blocks.html#a39562fce73a13549f53eca589339198f',1,'mcpp::Blocks']]], + ['diamond_5fore_16',['DIAMOND_ORE',['../structmcpp_1_1_blocks.html#a1d49c22608d5df074d1555dc0dc8becf',1,'mcpp::Blocks']]], + ['difference_5ftype_17',['difference_type',['../structmcpp_1_1_chunk_1_1_iterator.html#a56ab384d81ea481295958791591e3f28',1,'mcpp::Chunk::Iterator::difference_type'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#aceabcb1e0e5e8991e6f9ea5d8bc4b460',1,'mcpp::Chunk::ConstIterator::difference_type'],['../structmcpp_1_1_height_map_1_1_iterator.html#aefadac9f14ed715e1cb24b95bbaa62fc',1,'mcpp::HeightMap::Iterator::difference_type'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#aff655f437dcd961d5740a1f117e144e9',1,'mcpp::HeightMap::ConstIterator::difference_type']]], + ['diorite_18',['DIORITE',['../structmcpp_1_1_blocks.html#a17aadc881b95e84d2b03475c6678f039',1,'mcpp::Blocks']]], + ['dirt_19',['DIRT',['../structmcpp_1_1_blocks.html#a7920f33128282e6cc5a70e6a2c5c0bc6',1,'mcpp::Blocks']]], + ['dispenser_20',['DISPENSER',['../structmcpp_1_1_blocks.html#a29163b34db8fee78333b65570ad11387',1,'mcpp::Blocks']]], + ['docommand_21',['doCommand',['../classmcpp_1_1_minecraft_connection.html#a706ee80a08b33fc44512f4e483cec416',1,'mcpp::MinecraftConnection']]], + ['documentation_22',['Documentation',['../index.html#autotoc_md1',1,'']]], + ['double_5facacia_5fwood_5fslab_23',['DOUBLE_ACACIA_WOOD_SLAB',['../structmcpp_1_1_blocks.html#acb72deaaf9bf2c6120aa2d4c6bd0a034',1,'mcpp::Blocks']]], + ['double_5fbirch_5fwood_5fslab_24',['DOUBLE_BIRCH_WOOD_SLAB',['../structmcpp_1_1_blocks.html#ac3118cb1ebc38871e537f17b33f14f5b',1,'mcpp::Blocks']]], + ['double_5fbrick_5fslab_25',['DOUBLE_BRICK_SLAB',['../structmcpp_1_1_blocks.html#ab71d6ee941390a099bc5e3d1cefba64d',1,'mcpp::Blocks']]], + ['double_5fcobblestone_5fslab_26',['DOUBLE_COBBLESTONE_SLAB',['../structmcpp_1_1_blocks.html#a03e5c49e5accf6261626f0e86ca37c20',1,'mcpp::Blocks']]], + ['double_5fdark_5foak_5fwood_5fslab_27',['DOUBLE_DARK_OAK_WOOD_SLAB',['../structmcpp_1_1_blocks.html#af0eb96e257d1b7f07351561d7260ccca',1,'mcpp::Blocks']]], + ['double_5fjungle_5fwood_5fslab_28',['DOUBLE_JUNGLE_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a67b74150bb9491a426e71fc973858bdc',1,'mcpp::Blocks']]], + ['double_5fnether_5fbrick_5fslab_29',['DOUBLE_NETHER_BRICK_SLAB',['../structmcpp_1_1_blocks.html#ab93df59c3896f5683f10a5efd8ba3b2e',1,'mcpp::Blocks']]], + ['double_5foak_5fwood_5fslab_30',['DOUBLE_OAK_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a71a4aa630d9f1f57561f0493530dced7',1,'mcpp::Blocks']]], + ['double_5fquartz_5fslab_31',['DOUBLE_QUARTZ_SLAB',['../structmcpp_1_1_blocks.html#a5a831a1bdc6e642b24dc55ac988cabde',1,'mcpp::Blocks']]], + ['double_5fred_5fsandstone_5fslab_32',['DOUBLE_RED_SANDSTONE_SLAB',['../structmcpp_1_1_blocks.html#a6418a491ef474162dc8aadd1d3e452c9',1,'mcpp::Blocks']]], + ['double_5fsandstone_5fslab_33',['DOUBLE_SANDSTONE_SLAB',['../structmcpp_1_1_blocks.html#a0e50b08f02bbfa195c8123f5ba5547dc',1,'mcpp::Blocks']]], + ['double_5fspruce_5fwood_5fslab_34',['DOUBLE_SPRUCE_WOOD_SLAB',['../structmcpp_1_1_blocks.html#aad684e22c369045e7c91ebe7f9aa09bb',1,'mcpp::Blocks']]], + ['double_5fstone_5fbrick_5fslab_35',['DOUBLE_STONE_BRICK_SLAB',['../structmcpp_1_1_blocks.html#a31b852574294d0eaac1a7ceff2f85069',1,'mcpp::Blocks']]], + ['double_5fstone_5fslab_36',['DOUBLE_STONE_SLAB',['../structmcpp_1_1_blocks.html#ae92eb378c49d1691ec5b6edda20b99c4',1,'mcpp::Blocks']]], + ['double_5ftallgrass_37',['DOUBLE_TALLGRASS',['../structmcpp_1_1_blocks.html#a53fbf9aaaee7c5afaaea4fced3e1548a',1,'mcpp::Blocks']]], + ['double_5fwooden_5fslab_38',['DOUBLE_WOODEN_SLAB',['../structmcpp_1_1_blocks.html#a834f38eeb65a646e3169cace122695d3',1,'mcpp::Blocks']]], + ['dragon_5fegg_39',['DRAGON_EGG',['../structmcpp_1_1_blocks.html#ad9b26a16fdd557612c73883ff3cd60c3',1,'mcpp::Blocks']]], + ['dropper_40',['DROPPER',['../structmcpp_1_1_blocks.html#abd9821e628828036e6c6991004fe3148',1,'mcpp::Blocks']]] +]; diff --git a/search/all_4.js b/search/all_4.js new file mode 100644 index 00000000..10ee21ca --- /dev/null +++ b/search/all_4.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['emerald_5fblock_0',['EMERALD_BLOCK',['../structmcpp_1_1_blocks.html#a1db1b923f3bf0ccdc583df65cec42491',1,'mcpp::Blocks']]], + ['emerald_5fore_1',['EMERALD_ORE',['../structmcpp_1_1_blocks.html#aebf56a50f93a2e5162a52126110b1e6a',1,'mcpp::Blocks']]], + ['enchantment_5ftable_2',['ENCHANTMENT_TABLE',['../structmcpp_1_1_blocks.html#aeb3f5540f74621a623015b4b064d9c2b',1,'mcpp::Blocks']]], + ['end_3',['end',['../structmcpp_1_1_chunk.html#a6869daba96a9c33dd02aa3092930df93',1,'mcpp::Chunk::end()'],['../structmcpp_1_1_chunk.html#a00870a72d610d231af9af9f1db2960c0',1,'mcpp::Chunk::end() const'],['../structmcpp_1_1_height_map.html#a83541e8a13e78799fcd0eaf6925c181b',1,'mcpp::HeightMap::end()'],['../structmcpp_1_1_height_map.html#a4e326e338339e93a577a76c5ef26a5e5',1,'mcpp::HeightMap::end() const']]], + ['end_5fgateway_4',['END_GATEWAY',['../structmcpp_1_1_blocks.html#ad3bc68852133f0368f46fafe187202b3',1,'mcpp::Blocks']]], + ['end_5fportal_5',['END_PORTAL',['../structmcpp_1_1_blocks.html#afc2fd8d167f79a1b79d760d7a871ef6a',1,'mcpp::Blocks']]], + ['end_5fportal_5fframe_6',['END_PORTAL_FRAME',['../structmcpp_1_1_blocks.html#af0125fc7ff5540b88e9684155f2936ab',1,'mcpp::Blocks']]], + ['end_5frod_7',['END_ROD',['../structmcpp_1_1_blocks.html#a701901e07d24cc97024ba80309f8c83e',1,'mcpp::Blocks']]], + ['end_5fstone_8',['END_STONE',['../structmcpp_1_1_blocks.html#a6b0b002d612a734666f571df8b8da45d',1,'mcpp::Blocks']]], + ['end_5fstone_5fbricks_9',['END_STONE_BRICKS',['../structmcpp_1_1_blocks.html#ad8f390358a6bfeda878302bd29c83f45',1,'mcpp::Blocks']]], + ['ender_5fchest_10',['ENDER_CHEST',['../structmcpp_1_1_blocks.html#ab698eb6bac6e3eac78b28467900fbeaf',1,'mcpp::Blocks']]] +]; diff --git a/search/all_5.js b/search/all_5.js new file mode 100644 index 00000000..4dfb52dd --- /dev/null +++ b/search/all_5.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['farmland_0',['FARMLAND',['../structmcpp_1_1_blocks.html#ac19fc06b928b707ef627931284398020',1,'mcpp::Blocks']]], + ['fern_1',['FERN',['../structmcpp_1_1_blocks.html#af04dad5bcea044b5ac563c6177e1af6b',1,'mcpp::Blocks']]], + ['fill_5fcoord_2',['fill_coord',['../structmcpp_1_1_height_map.html#a28e5c2e7c9232b40ce56480e4f8514e3',1,'mcpp::HeightMap']]], + ['fillheight_3',['fillHeight',['../classmcpp_1_1_minecraft_connection.html#a82059d72f8eb1785d60961a493675602',1,'mcpp::MinecraftConnection']]], + ['fire_4',['FIRE',['../structmcpp_1_1_blocks.html#a6f61a0c2861d32941c1a5dd3482a24b3',1,'mcpp::Blocks']]], + ['flower_5fpot_5',['FLOWER_POT',['../structmcpp_1_1_blocks.html#aed6225513b9651a69cc5fb1891dc2cd2',1,'mcpp::Blocks']]], + ['flowing_5flava_6',['FLOWING_LAVA',['../structmcpp_1_1_blocks.html#ae2148b4c5bac74928cf21dd103876a72',1,'mcpp::Blocks']]], + ['flowing_5fwater_7',['FLOWING_WATER',['../structmcpp_1_1_blocks.html#ab5d3c16a2eff86d3f71f6feec82c8ebd',1,'mcpp::Blocks']]], + ['freestanding_5fbanner_8',['FREESTANDING_BANNER',['../structmcpp_1_1_blocks.html#ac8f3ec2da7c349fafcc44d08f4156b1a',1,'mcpp::Blocks']]], + ['frosted_5fice_9',['FROSTED_ICE',['../structmcpp_1_1_blocks.html#ab1d1053636d05047baffbb69cf14a905',1,'mcpp::Blocks']]], + ['furnace_10',['FURNACE',['../structmcpp_1_1_blocks.html#a6ba969b1d540703014661490d1d00122',1,'mcpp::Blocks']]] +]; diff --git a/search/all_6.js b/search/all_6.js new file mode 100644 index 00000000..1a25eb6f --- /dev/null +++ b/search/all_6.js @@ -0,0 +1,39 @@ +var searchData= +[ + ['get_0',['get',['../structmcpp_1_1_height_map.html#a79a245ec5b2920271b3d98dbab917f35',1,'mcpp::HeightMap::get()'],['../structmcpp_1_1_chunk.html#a6243d24c86b261f798af410df06e8009',1,'mcpp::Chunk::get()']]], + ['get_5fworldspace_1',['get_worldspace',['../structmcpp_1_1_height_map.html#ab67275d7088287eeb872fcfe8fce2401',1,'mcpp::HeightMap::get_worldspace()'],['../structmcpp_1_1_chunk.html#a1c9c77a2d85ddbb52f9f57f16b8f9823',1,'mcpp::Chunk::get_worldspace()']]], + ['getblock_2',['getBlock',['../classmcpp_1_1_minecraft_connection.html#a59c3b6a46e94b139930781d308c36e51',1,'mcpp::MinecraftConnection']]], + ['getblocks_3',['getBlocks',['../classmcpp_1_1_minecraft_connection.html#a5c581d64d7bb0207ccc70f8e4ef56aff',1,'mcpp::MinecraftConnection']]], + ['getheight_4',['getHeight',['../classmcpp_1_1_minecraft_connection.html#a3cd994404a9fd333f78b8a4671594db0',1,'mcpp::MinecraftConnection']]], + ['getheights_5',['getHeights',['../classmcpp_1_1_minecraft_connection.html#ab4fcb04814b36f82e935586f47e5ebb1',1,'mcpp::MinecraftConnection']]], + ['getplayerposition_6',['getPlayerPosition',['../classmcpp_1_1_minecraft_connection.html#a7003573d8ebf553c8ccc7130694b2575',1,'mcpp::MinecraftConnection']]], + ['getplayertileposition_7',['getPlayerTilePosition',['../classmcpp_1_1_minecraft_connection.html#a3e28810c0bf53f6365f3d1f285b561ad',1,'mcpp::MinecraftConnection']]], + ['glass_8',['GLASS',['../structmcpp_1_1_blocks.html#a96cd17dde5774bda9e966531ee41b382',1,'mcpp::Blocks']]], + ['glass_5fpane_9',['GLASS_PANE',['../structmcpp_1_1_blocks.html#aff4ba7885992c61d0b4897bbfdeb5518',1,'mcpp::Blocks']]], + ['glowing_5fredstone_5fore_10',['GLOWING_REDSTONE_ORE',['../structmcpp_1_1_blocks.html#a605d2ffae10360946749d1d369e12d70',1,'mcpp::Blocks']]], + ['glowstone_11',['GLOWSTONE',['../structmcpp_1_1_blocks.html#a1cfef192de0751711c354180fe40f512',1,'mcpp::Blocks']]], + ['gold_5fblock_12',['GOLD_BLOCK',['../structmcpp_1_1_blocks.html#aa4dfc50ceef25253d14723bdaecd9d71',1,'mcpp::Blocks']]], + ['gold_5fore_13',['GOLD_ORE',['../structmcpp_1_1_blocks.html#aa49db5e79bd99a734120ab6be091eb7c',1,'mcpp::Blocks']]], + ['granite_14',['GRANITE',['../structmcpp_1_1_blocks.html#ae22cf99618c8e6400358d6a25d2dd059',1,'mcpp::Blocks']]], + ['grass_15',['GRASS',['../structmcpp_1_1_blocks.html#a5f03014897e0e15890650d5983048267',1,'mcpp::Blocks']]], + ['grass_5fpath_16',['GRASS_PATH',['../structmcpp_1_1_blocks.html#aa3c5ea2d05ef6b0ff4fe707a7374050e',1,'mcpp::Blocks']]], + ['gravel_17',['GRAVEL',['../structmcpp_1_1_blocks.html#a9301c71b66c0037f86b5945f26ea475b',1,'mcpp::Blocks']]], + ['gray_5fcarpet_18',['GRAY_CARPET',['../structmcpp_1_1_blocks.html#af90804802b32653ae7bf7257643d276c',1,'mcpp::Blocks']]], + ['gray_5fconcrete_19',['GRAY_CONCRETE',['../structmcpp_1_1_blocks.html#ae1a6e47a97980803880205ecf6c6415e',1,'mcpp::Blocks']]], + ['gray_5fconcrete_5fpowder_20',['GRAY_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a710023dfea0e5c789e3ea84380e52db4',1,'mcpp::Blocks']]], + ['gray_5fglazed_5fterracotta_21',['GRAY_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#ae4dac8c94d5aab78063ee4b84c48dd1f',1,'mcpp::Blocks']]], + ['gray_5fhardened_5fclay_22',['GRAY_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a721a28ef11f1330a78d861d58ab7035b',1,'mcpp::Blocks']]], + ['gray_5fshulker_5fbox_23',['GRAY_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a6b3c77960c1b5753c62502502af747c9',1,'mcpp::Blocks']]], + ['gray_5fstained_5fglass_24',['GRAY_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a7b8c6d880cb64a41deb7bdc50be0b377',1,'mcpp::Blocks']]], + ['gray_5fstained_5fglass_5fpane_25',['GRAY_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a0ef864d5d2ce83a21615dd287fcc9d8e',1,'mcpp::Blocks']]], + ['gray_5fwool_26',['GRAY_WOOL',['../structmcpp_1_1_blocks.html#acd18ba77f68220dfe0e67648277e82a4',1,'mcpp::Blocks']]], + ['green_5fcarpet_27',['GREEN_CARPET',['../structmcpp_1_1_blocks.html#a83874225f35912619d71b74ced4406b2',1,'mcpp::Blocks']]], + ['green_5fconcrete_28',['GREEN_CONCRETE',['../structmcpp_1_1_blocks.html#ae3260ea943f5ec77e8347f4222b5980f',1,'mcpp::Blocks']]], + ['green_5fconcrete_5fpowder_29',['GREEN_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#af4bd8a829ddd371cb9ee9bdcfe36c250',1,'mcpp::Blocks']]], + ['green_5fglazed_5fterracotta_30',['GREEN_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a06311b8a17853c91f82cb22be4a76444',1,'mcpp::Blocks']]], + ['green_5fhardened_5fclay_31',['GREEN_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ab1bae0c61e7572f672ecd0577a354189',1,'mcpp::Blocks']]], + ['green_5fshulker_5fbox_32',['GREEN_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a9e63b488559fa5d0ca3486c65646fb92',1,'mcpp::Blocks']]], + ['green_5fstained_5fglass_33',['GREEN_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a4f345eb45700cefc4476a4854f7e934c',1,'mcpp::Blocks']]], + ['green_5fstained_5fglass_5fpane_34',['GREEN_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#acf92990ecd5b25ac885e03d8ca26119a',1,'mcpp::Blocks']]], + ['green_5fwool_35',['GREEN_WOOL',['../structmcpp_1_1_blocks.html#a4f13db67e87d9f8ac51f62d040bb9db3',1,'mcpp::Blocks']]] +]; diff --git a/search/all_7.js b/search/all_7.js new file mode 100644 index 00000000..432db1be --- /dev/null +++ b/search/all_7.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['hardened_5fclay_0',['HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a4f056658a322dcfa50549dd46efb2c40',1,'mcpp::Blocks']]], + ['hay_5fbale_1',['HAY_BALE',['../structmcpp_1_1_blocks.html#acbef02ca1adb3263c7f9314e23d2f063',1,'mcpp::Blocks']]], + ['heightmap_2',['heightmap',['../structmcpp_1_1_height_map.html',1,'mcpp::HeightMap'],['../structmcpp_1_1_height_map.html#a659f03dd9809854c68369a96389d34c4',1,'mcpp::HeightMap::HeightMap(const Coordinate2D &loc1, const Coordinate2D &loc2, const std::vector< int16_t > &heights)'],['../structmcpp_1_1_height_map.html#ac83adeb98538249ae8fd801cc6c739b2',1,'mcpp::HeightMap::HeightMap(const HeightMap &other)'],['../structmcpp_1_1_height_map.html#a12f1954bc6d9187df6d7d7e12a4b4701',1,'mcpp::HeightMap::HeightMap(HeightMap &&other) noexcept=default']]], + ['heightmap_2eh_3',['heightmap.h',['../heightmap_8h.html',1,'']]], + ['history_4',['History',['../index.html#autotoc_md2',1,'']]], + ['hopper_5',['HOPPER',['../structmcpp_1_1_blocks.html#a5bdd814bac41993d6780403941ac4595',1,'mcpp::Blocks']]] +]; diff --git a/search/all_8.js b/search/all_8.js new file mode 100644 index 00000000..04250d7a --- /dev/null +++ b/search/all_8.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['ice_0',['ICE',['../structmcpp_1_1_blocks.html#a067f6555115e932d79f1051e4e5b99f2',1,'mcpp::Blocks']]], + ['id_1',['id',['../classmcpp_1_1_block_type.html#ae5e0c3da00cf1a23d9e49977ed082a6b',1,'mcpp::BlockType']]], + ['installation_2',['Installation',['../index.html#autotoc_md3',1,'']]], + ['inverted_5fdaylight_5fsensor_3',['INVERTED_DAYLIGHT_SENSOR',['../structmcpp_1_1_blocks.html#a1a7b948b0f2593efc53a1b13c7ef6a83',1,'mcpp::Blocks']]], + ['iron_5fbars_4',['IRON_BARS',['../structmcpp_1_1_blocks.html#aaf1705a2a0e13cfd9ebf0a07547d81bb',1,'mcpp::Blocks']]], + ['iron_5fblock_5',['IRON_BLOCK',['../structmcpp_1_1_blocks.html#ae5433f2d74f1918e5a3a076a1f25a9e4',1,'mcpp::Blocks']]], + ['iron_5fdoor_5fblock_6',['IRON_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#a8dccf96755f102e3b7dd9c89e39cd7cd',1,'mcpp::Blocks']]], + ['iron_5fore_7',['IRON_ORE',['../structmcpp_1_1_blocks.html#a99494011577b01cef47f04d3b3bfdd68',1,'mcpp::Blocks']]], + ['iron_5ftrapdoor_8',['IRON_TRAPDOOR',['../structmcpp_1_1_blocks.html#ae29661020da16f870e254406d645a944',1,'mcpp::Blocks']]], + ['iterator_9',['iterator',['../structmcpp_1_1_chunk_1_1_iterator.html',1,'mcpp::Chunk::Iterator'],['../structmcpp_1_1_chunk_1_1_iterator.html#a233df6b92bd8701bbc5df9705a00b71c',1,'mcpp::Chunk::Iterator::Iterator()'],['../structmcpp_1_1_height_map_1_1_iterator.html#ab25fd1c9be320457edd894653a417c3a',1,'mcpp::HeightMap::Iterator::Iterator()'],['../structmcpp_1_1_height_map_1_1_iterator.html',1,'mcpp::HeightMap::Iterator']]], + ['iterator_5fcategory_10',['iterator_category',['../structmcpp_1_1_chunk_1_1_iterator.html#ac8d3cc7ca19681bada7c1a32af04a399',1,'mcpp::Chunk::Iterator::iterator_category'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#ae6da6fb6be202c0744a674d4e1fd5519',1,'mcpp::Chunk::ConstIterator::iterator_category'],['../structmcpp_1_1_height_map_1_1_iterator.html#a83cecdb30e49044d7cf38f1a5079e2b7',1,'mcpp::HeightMap::Iterator::iterator_category'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ae45cf53fdeb6f1819547a3be9c71b9d6',1,'mcpp::HeightMap::ConstIterator::iterator_category']]] +]; diff --git a/search/all_9.js b/search/all_9.js new file mode 100644 index 00000000..cc46387e --- /dev/null +++ b/search/all_9.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['jack_5folantern_0',['JACK_OLANTERN',['../structmcpp_1_1_blocks.html#a665236c55742047b93d185b35bce67e9',1,'mcpp::Blocks']]], + ['jukebox_1',['JUKEBOX',['../structmcpp_1_1_blocks.html#aceed7e2fad7be04c7f574edf8c0f43bd',1,'mcpp::Blocks']]], + ['jungle_5fdoor_5fblock_2',['JUNGLE_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#ac25a7c333551163db114ed0bb1ddc252',1,'mcpp::Blocks']]], + ['jungle_5ffence_3',['JUNGLE_FENCE',['../structmcpp_1_1_blocks.html#a6c458a125503fe16f1aa553b4695503c',1,'mcpp::Blocks']]], + ['jungle_5ffence_5fgate_4',['JUNGLE_FENCE_GATE',['../structmcpp_1_1_blocks.html#a6082bce8cc88ef8d5ed158e8be87b84d',1,'mcpp::Blocks']]], + ['jungle_5fleaves_5',['JUNGLE_LEAVES',['../structmcpp_1_1_blocks.html#ad25f9399f690ce6304360fe30da17ea5',1,'mcpp::Blocks']]], + ['jungle_5fsapling_6',['JUNGLE_SAPLING',['../structmcpp_1_1_blocks.html#a166392f2e723a8367040e1747c79dac1',1,'mcpp::Blocks']]], + ['jungle_5fwood_7',['JUNGLE_WOOD',['../structmcpp_1_1_blocks.html#a9b5c0c0116eff98d44e1238b8834b3ed',1,'mcpp::Blocks']]], + ['jungle_5fwood_5fplank_8',['JUNGLE_WOOD_PLANK',['../structmcpp_1_1_blocks.html#ad58e40171cd6dddb444f563af9762332',1,'mcpp::Blocks']]], + ['jungle_5fwood_5fslab_9',['JUNGLE_WOOD_SLAB',['../structmcpp_1_1_blocks.html#a2cd72453b31cff54a857c3364b035d0e',1,'mcpp::Blocks']]], + ['jungle_5fwood_5fstairs_10',['JUNGLE_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#a7647930c7d821587722370f8875cb1c3',1,'mcpp::Blocks']]] +]; diff --git a/search/all_a.js b/search/all_a.js new file mode 100644 index 00000000..0b6d1165 --- /dev/null +++ b/search/all_a.js @@ -0,0 +1,39 @@ +var searchData= +[ + ['ladder_0',['LADDER',['../structmcpp_1_1_blocks.html#abdb33e0a1761c25e54970ab072b41df1',1,'mcpp::Blocks']]], + ['lapis_5flazuli_5fblock_1',['LAPIS_LAZULI_BLOCK',['../structmcpp_1_1_blocks.html#aafc464b13fb20095e10a7fc0a7500632',1,'mcpp::Blocks']]], + ['lapis_5flazuli_5fore_2',['LAPIS_LAZULI_ORE',['../structmcpp_1_1_blocks.html#a0d4b27ab112c25d5dc2a88344f243328',1,'mcpp::Blocks']]], + ['large_5ffern_3',['LARGE_FERN',['../structmcpp_1_1_blocks.html#a80db4871a611c3e1f19eec3be1174bd0',1,'mcpp::Blocks']]], + ['lever_4',['LEVER',['../structmcpp_1_1_blocks.html#ace969f60c4f9c85b19499ca8bb229513',1,'mcpp::Blocks']]], + ['license_5',['License',['../index.html#autotoc_md7',1,'']]], + ['light_5fblue_5fcarpet_6',['LIGHT_BLUE_CARPET',['../structmcpp_1_1_blocks.html#ab26fa302ed60460a9ccf669b1cdfc5f3',1,'mcpp::Blocks']]], + ['light_5fblue_5fconcrete_7',['LIGHT_BLUE_CONCRETE',['../structmcpp_1_1_blocks.html#af5a1aedc915b2e173a62a56ef794e306',1,'mcpp::Blocks']]], + ['light_5fblue_5fconcrete_5fpowder_8',['LIGHT_BLUE_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#aeea52014aba57c9b18c565e3da97fa01',1,'mcpp::Blocks']]], + ['light_5fblue_5fglazed_5fterracotta_9',['LIGHT_BLUE_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#ae88865117601269a87b120e4967f81f1',1,'mcpp::Blocks']]], + ['light_5fblue_5fhardened_5fclay_10',['LIGHT_BLUE_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a1dcec571b114c5a0ed4251a2e9da2137',1,'mcpp::Blocks']]], + ['light_5fblue_5fshulker_5fbox_11',['LIGHT_BLUE_SHULKER_BOX',['../structmcpp_1_1_blocks.html#abe82aee86d0967f7a0f3649c48ed9062',1,'mcpp::Blocks']]], + ['light_5fblue_5fstained_5fglass_12',['LIGHT_BLUE_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a5123e2735d51414dc662053b3914aba6',1,'mcpp::Blocks']]], + ['light_5fblue_5fstained_5fglass_5fpane_13',['LIGHT_BLUE_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a5a2538b695346dd90d66c6bcacb81708',1,'mcpp::Blocks']]], + ['light_5fblue_5fwool_14',['LIGHT_BLUE_WOOL',['../structmcpp_1_1_blocks.html#a92e772cc9eef4ece168323e8ed8a477a',1,'mcpp::Blocks']]], + ['light_5fgray_5fcarpet_15',['LIGHT_GRAY_CARPET',['../structmcpp_1_1_blocks.html#a7ca57c8c5f4af087bf1c6c8ec0727db2',1,'mcpp::Blocks']]], + ['light_5fgray_5fconcrete_16',['LIGHT_GRAY_CONCRETE',['../structmcpp_1_1_blocks.html#a49cfa4418f0e3e4c26b845c5e9da5a7d',1,'mcpp::Blocks']]], + ['light_5fgray_5fconcrete_5fpowder_17',['LIGHT_GRAY_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a3d668df8f7201e4055b49d952e814ec2',1,'mcpp::Blocks']]], + ['light_5fgray_5fglazed_5fterracotta_18',['LIGHT_GRAY_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#aa346c588a3ce539a2a2570e3b01bb753',1,'mcpp::Blocks']]], + ['light_5fgray_5fhardened_5fclay_19',['LIGHT_GRAY_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a690f67a1df3228cfce34f758fbf7cd90',1,'mcpp::Blocks']]], + ['light_5fgray_5fshulker_5fbox_20',['LIGHT_GRAY_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a3619800e2b1cdf1ecd72c4ea6fc61721',1,'mcpp::Blocks']]], + ['light_5fgray_5fstained_5fglass_21',['LIGHT_GRAY_STAINED_GLASS',['../structmcpp_1_1_blocks.html#ad3f9fb0c3d2a1458b15772cbdb646842',1,'mcpp::Blocks']]], + ['light_5fgray_5fstained_5fglass_5fpane_22',['LIGHT_GRAY_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a16374b89fa88c3c432e89402c0d10ba4',1,'mcpp::Blocks']]], + ['light_5fgray_5fwool_23',['LIGHT_GRAY_WOOL',['../structmcpp_1_1_blocks.html#ab7318aba043ece28626009c5acaef7b4',1,'mcpp::Blocks']]], + ['lilac_24',['LILAC',['../structmcpp_1_1_blocks.html#a16f883fed5498464ee2fe14788b82d24',1,'mcpp::Blocks']]], + ['lily_5fpad_25',['LILY_PAD',['../structmcpp_1_1_blocks.html#afda586476d78fbef1e0d83086dea051c',1,'mcpp::Blocks']]], + ['lime_5fcarpet_26',['LIME_CARPET',['../structmcpp_1_1_blocks.html#a1a8f1ddbfc705c7c7c150f8121821603',1,'mcpp::Blocks']]], + ['lime_5fconcrete_27',['LIME_CONCRETE',['../structmcpp_1_1_blocks.html#abeb5d72da237ceed1bbbbf5602feabaa',1,'mcpp::Blocks']]], + ['lime_5fconcrete_5fpowder_28',['LIME_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a6df4756657fbd78b232c9c259d395280',1,'mcpp::Blocks']]], + ['lime_5fglazed_5fterracotta_29',['LIME_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a843c80d75d4cb65ef7248b2b006765a9',1,'mcpp::Blocks']]], + ['lime_5fhardened_5fclay_30',['LIME_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a6bb98186074dd31250db42c527e3d7f3',1,'mcpp::Blocks']]], + ['lime_5fshulker_5fbox_31',['LIME_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a032842a796e03258fe61ed667f286c2d',1,'mcpp::Blocks']]], + ['lime_5fstained_5fglass_32',['LIME_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a21baa16f609982ce6a05d9f75c1abb3c',1,'mcpp::Blocks']]], + ['lime_5fstained_5fglass_5fpane_33',['LIME_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a965bb40a3ade9101a40483205aef39c4',1,'mcpp::Blocks']]], + ['lime_5fwool_34',['LIME_WOOL',['../structmcpp_1_1_blocks.html#a10d8584965dc754343249d07d6bd5e93',1,'mcpp::Blocks']]], + ['linux_35',['MacOS and Linux',['../index.html#autotoc_md5',1,'']]] +]; diff --git a/search/all_b.js b/search/all_b.js new file mode 100644 index 00000000..92b6e96e --- /dev/null +++ b/search/all_b.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['macos_20and_20linux_0',['MacOS and Linux',['../index.html#autotoc_md5',1,'']]], + ['magenta_5fcarpet_1',['MAGENTA_CARPET',['../structmcpp_1_1_blocks.html#a041ddac946b7f8babbee4b29982bd877',1,'mcpp::Blocks']]], + ['magenta_5fconcrete_2',['MAGENTA_CONCRETE',['../structmcpp_1_1_blocks.html#ad1d4e7776c400d6f6fc4ffe71892a9b5',1,'mcpp::Blocks']]], + ['magenta_5fconcrete_5fpowder_3',['MAGENTA_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#aa18bc574abcf6d22aebbad8ca6aa8af2',1,'mcpp::Blocks']]], + ['magenta_5fglazed_5fterracotta_4',['MAGENTA_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a66d6169b4b8406b5dc630da51189436a',1,'mcpp::Blocks']]], + ['magenta_5fhardened_5fclay_5',['MAGENTA_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#aeb7ad8263148d4301e2028fe7ddb9dd9',1,'mcpp::Blocks']]], + ['magenta_5fshulker_5fbox_6',['MAGENTA_SHULKER_BOX',['../structmcpp_1_1_blocks.html#ae3ebe7ea0e69e3b52b2fab8557aab8c3',1,'mcpp::Blocks']]], + ['magenta_5fstained_5fglass_7',['MAGENTA_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a5dad3e200621a64e9feac405a90c1a07',1,'mcpp::Blocks']]], + ['magenta_5fstained_5fglass_5fpane_8',['MAGENTA_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a047f50ab8e331c373f6b6063dd7db266',1,'mcpp::Blocks']]], + ['magenta_5fwool_9',['MAGENTA_WOOL',['../structmcpp_1_1_blocks.html#a55b25538fe6af7f1cdb44bb20ff7b371',1,'mcpp::Blocks']]], + ['magma_5fblock_10',['MAGMA_BLOCK',['../structmcpp_1_1_blocks.html#a693fd418cce300195685971f250c897f',1,'mcpp::Blocks']]], + ['mcpp_11',['mcpp',['../namespacemcpp.html',1,'mcpp'],['../index.html#autotoc_md0',1,'mcpp'],['../index.html',1,'mcpp']]], + ['mcpp_2eh_12',['mcpp.h',['../mcpp_8h.html',1,'']]], + ['mcpp_5fport_13',['MCPP_PORT',['../namespacemcpp.html#a0d16253c87d5e4fdead3f5a26ae792ba',1,'mcpp']]], + ['melon_5fblock_14',['MELON_BLOCK',['../structmcpp_1_1_blocks.html#a596102046d3dabd41f13d741182a1e05',1,'mcpp::Blocks']]], + ['melon_5fstem_15',['MELON_STEM',['../structmcpp_1_1_blocks.html#a384dd874f4ca0f56685ddb6ce793f197',1,'mcpp::Blocks']]], + ['minecraftconnection_16',['minecraftconnection',['../classmcpp_1_1_minecraft_connection.html#ac36095d95c9b64c02e2a4ff8a8472752',1,'mcpp::MinecraftConnection::MinecraftConnection()'],['../classmcpp_1_1_minecraft_connection.html',1,'mcpp::MinecraftConnection']]], + ['mob_5fhead_17',['MOB_HEAD',['../structmcpp_1_1_blocks.html#ad69b4f2463863adb7bcbc5a041dad508',1,'mcpp::Blocks']]], + ['mod_18',['mod',['../classmcpp_1_1_block_type.html#a6af0613ecc563701ea7848a092de0899',1,'mcpp::BlockType']]], + ['monster_5fspawner_19',['MONSTER_SPAWNER',['../structmcpp_1_1_blocks.html#a07d0e4b94c19300debf908d56da54e4e',1,'mcpp::Blocks']]], + ['moss_5fstone_20',['MOSS_STONE',['../structmcpp_1_1_blocks.html#a8ec42f793fa7f434324075a98f5007ff',1,'mcpp::Blocks']]], + ['mossy_5fcobblestone_5fwall_21',['MOSSY_COBBLESTONE_WALL',['../structmcpp_1_1_blocks.html#a517a4191313658ca7515501aadb9f464',1,'mcpp::Blocks']]], + ['mossy_5fstone_5fbrick_5fmonster_5fegg_22',['MOSSY_STONE_BRICK_MONSTER_EGG',['../structmcpp_1_1_blocks.html#ab7374f8a067cedbe089e063291f73a65',1,'mcpp::Blocks']]], + ['mossy_5fstone_5fbricks_23',['MOSSY_STONE_BRICKS',['../structmcpp_1_1_blocks.html#a0148a2ecb8f8525fd72816460bc4fd7a',1,'mcpp::Blocks']]], + ['mycelium_24',['MYCELIUM',['../structmcpp_1_1_blocks.html#ae2420a5cad6a3add5ebaf0107a4294c8',1,'mcpp::Blocks']]] +]; diff --git a/search/all_c.js b/search/all_c.js new file mode 100644 index 00000000..668e9cdf --- /dev/null +++ b/search/all_c.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['nether_5fbrick_0',['NETHER_BRICK',['../structmcpp_1_1_blocks.html#adfe1d35b5c371b334aa88d8004814b84',1,'mcpp::Blocks']]], + ['nether_5fbrick_5ffence_1',['NETHER_BRICK_FENCE',['../structmcpp_1_1_blocks.html#abc1de67c5ce1211bda95721acd76fb8c',1,'mcpp::Blocks']]], + ['nether_5fbrick_5fslab_2',['NETHER_BRICK_SLAB',['../structmcpp_1_1_blocks.html#a5350bf6bce3e6d9b3f8ea83c47654d38',1,'mcpp::Blocks']]], + ['nether_5fbrick_5fstairs_3',['NETHER_BRICK_STAIRS',['../structmcpp_1_1_blocks.html#a23e1c0395f1b107b40db08ba740cec25',1,'mcpp::Blocks']]], + ['nether_5fportal_4',['NETHER_PORTAL',['../structmcpp_1_1_blocks.html#a86f09d917c3b5c95b67fab62c7379ff4',1,'mcpp::Blocks']]], + ['nether_5fquartz_5fore_5',['NETHER_QUARTZ_ORE',['../structmcpp_1_1_blocks.html#a7c6583af28d33cc69adb9877a60551fa',1,'mcpp::Blocks']]], + ['nether_5fwart_6',['NETHER_WART',['../structmcpp_1_1_blocks.html#af5279f7d88883389abef73403479fd69',1,'mcpp::Blocks']]], + ['nether_5fwart_5fblock_7',['NETHER_WART_BLOCK',['../structmcpp_1_1_blocks.html#a63632c83acaae6ccb486aab99bac211d',1,'mcpp::Blocks']]], + ['netherrack_8',['NETHERRACK',['../structmcpp_1_1_blocks.html#af958b9896bc4658374cf6cdd20c5809c',1,'mcpp::Blocks']]], + ['note_5fblock_9',['NOTE_BLOCK',['../structmcpp_1_1_blocks.html#ae84f97c1091f73e78411014125ddbf2e',1,'mcpp::Blocks']]] +]; diff --git a/search/all_d.js b/search/all_d.js new file mode 100644 index 00000000..307db484 --- /dev/null +++ b/search/all_d.js @@ -0,0 +1,35 @@ +var searchData= +[ + ['oak_5fdoor_5fblock_0',['OAK_DOOR_BLOCK',['../structmcpp_1_1_blocks.html#a65b82198248d98ac81a7ded77fdfba0b',1,'mcpp::Blocks']]], + ['oak_5ffence_1',['OAK_FENCE',['../structmcpp_1_1_blocks.html#a95f4c8647eda86f83484392acf4cd313',1,'mcpp::Blocks']]], + ['oak_5ffence_5fgate_2',['OAK_FENCE_GATE',['../structmcpp_1_1_blocks.html#a46e610cfe26b74c02ed3b7548ffe5a82',1,'mcpp::Blocks']]], + ['oak_5fleaves_3',['OAK_LEAVES',['../structmcpp_1_1_blocks.html#a1c4ec527077831611d48e7d8abc17bb8',1,'mcpp::Blocks']]], + ['oak_5fsapling_4',['OAK_SAPLING',['../structmcpp_1_1_blocks.html#ad17c400d2e22e17d5047dbdbc09e5927',1,'mcpp::Blocks']]], + ['oak_5fwood_5',['OAK_WOOD',['../structmcpp_1_1_blocks.html#a90541f25857235d0cca339da68d85a36',1,'mcpp::Blocks']]], + ['oak_5fwood_5fplank_6',['OAK_WOOD_PLANK',['../structmcpp_1_1_blocks.html#a76bdad2f29b0888aec37117ea0cbca45',1,'mcpp::Blocks']]], + ['oak_5fwood_5fslab_7',['OAK_WOOD_SLAB',['../structmcpp_1_1_blocks.html#add61b8c3f7c12ba9e37932dc82eb4f5d',1,'mcpp::Blocks']]], + ['oak_5fwood_5fstairs_8',['OAK_WOOD_STAIRS',['../structmcpp_1_1_blocks.html#a4a5664a420f41886fe107bcfb7aba6a5',1,'mcpp::Blocks']]], + ['observer_9',['OBSERVER',['../structmcpp_1_1_blocks.html#a63e878737853dd2b2d920ff21b9e23be',1,'mcpp::Blocks']]], + ['obsidian_10',['OBSIDIAN',['../structmcpp_1_1_blocks.html#af401f44104b7619c0f99f78af8ea1e38',1,'mcpp::Blocks']]], + ['operator_21_3d_11',['operator!=',['../structmcpp_1_1_coordinate2_d.html#a76597a189f8099c1696d9aa3d6787ecd',1,'mcpp::Coordinate2D::operator!=()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf',1,'mcpp::HeightMap::ConstIterator::operator!='],['../structmcpp_1_1_height_map_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824',1,'mcpp::HeightMap::Iterator::operator!='],['../structmcpp_1_1_coordinate.html#a7642ebe18537052edfbe717bfd2e31ad',1,'mcpp::Coordinate::operator!=()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf',1,'mcpp::Chunk::ConstIterator::operator!='],['../structmcpp_1_1_chunk_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824',1,'mcpp::Chunk::Iterator::operator!='],['../classmcpp_1_1_block_type.html#a1b86156283c53bb60f74d504b6c7f78c',1,'mcpp::BlockType::operator!=()']]], + ['operator_28_29_12',['operator()',['../structmcpp_1_1_coordinate.html#a8e6a2c08a64b008789178613e245157d',1,'mcpp::Coordinate::operator()()'],['../structmcpp_1_1_coordinate2_d.html#ac4e310060288cc893fb2038c6359500d',1,'mcpp::Coordinate2D::operator()()']]], + ['operator_2a_13',['operator*',['../structmcpp_1_1_chunk_1_1_iterator.html#af9f614f147b5d5b28bf96d99c3f1e871',1,'mcpp::Chunk::Iterator::operator*()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a214cbd0fd4b2ece21d90d6cc65090bb1',1,'mcpp::Chunk::ConstIterator::operator*()'],['../structmcpp_1_1_height_map_1_1_iterator.html#aadf47fd2adee2871ed6ea994a6ce5c03',1,'mcpp::HeightMap::Iterator::operator*()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ab521afe468c80feff76e9187e3912fdb',1,'mcpp::HeightMap::ConstIterator::operator*()']]], + ['operator_2b_14',['operator+',['../structmcpp_1_1_coordinate.html#a00d47c3ceaa12d83ebf3fd970963ae0b',1,'mcpp::Coordinate::operator+(const Coordinate &obj) const'],['../structmcpp_1_1_coordinate.html#aa429488170f898040f68ca8ad583eeb2',1,'mcpp::Coordinate::operator+(const Coordinate2D &obj) const'],['../structmcpp_1_1_coordinate2_d.html#adc7dcf9095fbd8c5d03d0ccc28582b05',1,'mcpp::Coordinate2D::operator+()']]], + ['operator_2b_2b_15',['operator++',['../structmcpp_1_1_height_map_1_1_iterator.html#a4927f2889df7ca838be54746d81a6a68',1,'mcpp::HeightMap::Iterator::operator++()'],['../structmcpp_1_1_height_map_1_1_iterator.html#a5a687d9afd110e5c246eeb6c00d4e569',1,'mcpp::HeightMap::Iterator::operator++(int)'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#a9b6520996ece19e5cbd3d03bd6076071',1,'mcpp::HeightMap::ConstIterator::operator++(int)'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ac0d85953eb4fa815a2f09166fadfc92b',1,'mcpp::HeightMap::ConstIterator::operator++()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#aca996a3d3783b20b9c2534a2b0e5e5a7',1,'mcpp::Chunk::ConstIterator::operator++()'],['../structmcpp_1_1_chunk_1_1_iterator.html#ac37fdf82878c6e98ed6b122066e9faf9',1,'mcpp::Chunk::Iterator::operator++(int)'],['../structmcpp_1_1_chunk_1_1_iterator.html#a9f9f4b645c7600c93e7e95f9c339cb41',1,'mcpp::Chunk::Iterator::operator++()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a9f425d2b24fdf5fa08e3b854da44146e',1,'mcpp::Chunk::ConstIterator::operator++()']]], + ['operator_2d_16',['operator-',['../structmcpp_1_1_coordinate.html#a51ef2fc83cf330cb0cea41ffb08c7169',1,'mcpp::Coordinate::operator-()'],['../structmcpp_1_1_coordinate2_d.html#a13a27f36afe25c8da969d803b27e610e',1,'mcpp::Coordinate2D::operator-()']]], + ['operator_2d_3e_17',['operator->',['../structmcpp_1_1_chunk_1_1_iterator.html#a90c2d7e5d30f9007aec464b24b7b1c6a',1,'mcpp::Chunk::Iterator::operator->()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a6cba7d963825aa1630029ae2055fc073',1,'mcpp::Chunk::ConstIterator::operator->()'],['../structmcpp_1_1_height_map_1_1_iterator.html#a500064cae9051413dc3e0bf159bf8121',1,'mcpp::HeightMap::Iterator::operator->()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#afa68ffb26e55223296df593ae0d5c777',1,'mcpp::HeightMap::ConstIterator::operator->()']]], + ['operator_3c_3c_18',['operator<<',['../classmcpp_1_1_block_type.html#a7dbe770d87d057f9e45b9b6509b07e96',1,'mcpp::BlockType::operator<<'],['../structmcpp_1_1_coordinate2_d.html#aeb3e44ce1b9c48b39f3cc59be4388468',1,'mcpp::Coordinate2D::operator<<'],['../structmcpp_1_1_coordinate.html#a90eac52373a64b1d794861197cd4db2e',1,'mcpp::Coordinate::operator<<']]], + ['operator_3d_19',['operator=',['../structmcpp_1_1_chunk.html#aa29e64684a203369cbd7e995cf308958',1,'mcpp::Chunk::operator=(const Chunk &other)'],['../structmcpp_1_1_chunk.html#a7573e7bb0e9830636a10c77d232da903',1,'mcpp::Chunk::operator=(Chunk &&other)=default'],['../structmcpp_1_1_height_map.html#adddc2a6d548b17967d717cdbf5e68ae1',1,'mcpp::HeightMap::operator=(const HeightMap &other)'],['../structmcpp_1_1_height_map.html#a995ed2e3e4125736056986cea04eb142',1,'mcpp::HeightMap::operator=(HeightMap &&other)=default']]], + ['operator_3d_3d_20',['operator==',['../classmcpp_1_1_block_type.html#a7964fb92287d04581559534d0bff91a5',1,'mcpp::BlockType::operator==()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68',1,'mcpp::HeightMap::ConstIterator::operator=='],['../structmcpp_1_1_height_map_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1',1,'mcpp::HeightMap::Iterator::operator=='],['../structmcpp_1_1_coordinate2_d.html#a5f4bb74c48e2e59ce44534bdb7377285',1,'mcpp::Coordinate2D::operator==()'],['../structmcpp_1_1_coordinate.html#aea212ae040336d2e0b46c82e605fada6',1,'mcpp::Coordinate::operator==()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68',1,'mcpp::Chunk::ConstIterator::operator=='],['../structmcpp_1_1_chunk_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1',1,'mcpp::Chunk::Iterator::operator==']]], + ['orange_5fcarpet_21',['ORANGE_CARPET',['../structmcpp_1_1_blocks.html#a8a65c0cccb3160d68c825799f1fe1f50',1,'mcpp::Blocks']]], + ['orange_5fconcrete_22',['ORANGE_CONCRETE',['../structmcpp_1_1_blocks.html#ae72096e0ef5842398fc639c68757dbc7',1,'mcpp::Blocks']]], + ['orange_5fconcrete_5fpowder_23',['ORANGE_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a3200352dee4c94c12b9fe179588dd41f',1,'mcpp::Blocks']]], + ['orange_5fglazed_5fterracotta_24',['ORANGE_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a37d3fbb6184e0ef2454dfb615c6a858e',1,'mcpp::Blocks']]], + ['orange_5fhardened_5fclay_25',['ORANGE_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#aedac20056e0706bd851707fa6c073c80',1,'mcpp::Blocks']]], + ['orange_5fshulker_5fbox_26',['ORANGE_SHULKER_BOX',['../structmcpp_1_1_blocks.html#ab4aafb3efefc0a61286376a2f29c1fd8',1,'mcpp::Blocks']]], + ['orange_5fstained_5fglass_27',['ORANGE_STAINED_GLASS',['../structmcpp_1_1_blocks.html#ae76f8e70609d675c038b6f4b3eadc44f',1,'mcpp::Blocks']]], + ['orange_5fstained_5fglass_5fpane_28',['ORANGE_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a294a3741eb079eda20c5835eb95e9079',1,'mcpp::Blocks']]], + ['orange_5ftulip_29',['ORANGE_TULIP',['../structmcpp_1_1_blocks.html#ae9986fccb40e0206ded9196c8b886156',1,'mcpp::Blocks']]], + ['orange_5fwool_30',['ORANGE_WOOL',['../structmcpp_1_1_blocks.html#a534547284b9c760a9be43550c9f07636',1,'mcpp::Blocks']]], + ['oxeye_5fdaisy_31',['OXEYE_DAISY',['../structmcpp_1_1_blocks.html#ac4ae874d9e559c96065d2f1b402ee029',1,'mcpp::Blocks']]] +]; diff --git a/search/all_e.js b/search/all_e.js new file mode 100644 index 00000000..c7fe9300 --- /dev/null +++ b/search/all_e.js @@ -0,0 +1,45 @@ +var searchData= +[ + ['packed_5fice_0',['PACKED_ICE',['../structmcpp_1_1_blocks.html#a7058caa2191c58f5d31d4674d93e4ff4',1,'mcpp::Blocks']]], + ['peony_1',['PEONY',['../structmcpp_1_1_blocks.html#ab323f7e8cbbcdfb15d8e951ee1341279',1,'mcpp::Blocks']]], + ['pillar_5fquartz_5fblock_2',['PILLAR_QUARTZ_BLOCK',['../structmcpp_1_1_blocks.html#a2d06cafdd918f44b75d2c0a07895ac0f',1,'mcpp::Blocks']]], + ['pink_5fcarpet_3',['PINK_CARPET',['../structmcpp_1_1_blocks.html#a8af97dd74a68946baed417d0bb512334',1,'mcpp::Blocks']]], + ['pink_5fconcrete_4',['PINK_CONCRETE',['../structmcpp_1_1_blocks.html#a0049d06fd1bf2b0120e471e77f43ee38',1,'mcpp::Blocks']]], + ['pink_5fconcrete_5fpowder_5',['PINK_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#a039177a7e5abf9f4b83718e145cd142f',1,'mcpp::Blocks']]], + ['pink_5fglazed_5fterracotta_6',['PINK_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#ac09b611c6d374d579e5c380dc6ce8f50',1,'mcpp::Blocks']]], + ['pink_5fhardened_5fclay_7',['PINK_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#ac850501b0fcf21afa2847b7626dffeb4',1,'mcpp::Blocks']]], + ['pink_5fshulker_5fbox_8',['PINK_SHULKER_BOX',['../structmcpp_1_1_blocks.html#acb8ad4e69b83e4fc91b4f3056e39eaf8',1,'mcpp::Blocks']]], + ['pink_5fstained_5fglass_9',['PINK_STAINED_GLASS',['../structmcpp_1_1_blocks.html#aef70902c9bc2a8afe45e89e4d27ae9aa',1,'mcpp::Blocks']]], + ['pink_5fstained_5fglass_5fpane_10',['PINK_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#afa965f7290c6041d6ff9f165e68c81a9',1,'mcpp::Blocks']]], + ['pink_5ftulip_11',['PINK_TULIP',['../structmcpp_1_1_blocks.html#ad23f25ee7dbcb377a31a82b1decc2e8a',1,'mcpp::Blocks']]], + ['pink_5fwool_12',['PINK_WOOL',['../structmcpp_1_1_blocks.html#a2b9ccf310592161799f1fa02479efbda',1,'mcpp::Blocks']]], + ['piston_13',['PISTON',['../structmcpp_1_1_blocks.html#a41f9391b40c6e66992f7a69ee72db87b',1,'mcpp::Blocks']]], + ['piston_5fhead_14',['PISTON_HEAD',['../structmcpp_1_1_blocks.html#a62f9d502d6a2ac28dbd4653918d37a0e',1,'mcpp::Blocks']]], + ['podzol_15',['PODZOL',['../structmcpp_1_1_blocks.html#abf7aaff92179e134174bdd1f7b914266',1,'mcpp::Blocks']]], + ['pointer_16',['pointer',['../structmcpp_1_1_chunk_1_1_iterator.html#a110d09c6ed3cab1efd8f028fc2cb3e52',1,'mcpp::Chunk::Iterator::pointer'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a7b73e4eaa49befb53a973778dc6b7dd1',1,'mcpp::Chunk::ConstIterator::pointer'],['../structmcpp_1_1_height_map_1_1_iterator.html#a3777e970064b05753ce1cf4e43aa79e3',1,'mcpp::HeightMap::Iterator::pointer'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ae63dd0a431e21e8526e22e7c4ba7e625',1,'mcpp::HeightMap::ConstIterator::pointer']]], + ['polished_5fandesite_17',['POLISHED_ANDESITE',['../structmcpp_1_1_blocks.html#a6b539cacd538549aa7f3e7918b53e1bc',1,'mcpp::Blocks']]], + ['polished_5fdiorite_18',['POLISHED_DIORITE',['../structmcpp_1_1_blocks.html#a25c750ec8c26810656901f24d2ab3dcc',1,'mcpp::Blocks']]], + ['polished_5fgranite_19',['POLISHED_GRANITE',['../structmcpp_1_1_blocks.html#a04e819115e0ae60553f418cddcbca2d0',1,'mcpp::Blocks']]], + ['poppy_20',['POPPY',['../structmcpp_1_1_blocks.html#add497248a7b6b9997b5ecc431483e92a',1,'mcpp::Blocks']]], + ['posttochat_21',['postToChat',['../classmcpp_1_1_minecraft_connection.html#a7f489b281f16ac1bf4e75c6070589130',1,'mcpp::MinecraftConnection']]], + ['potatoes_22',['POTATOES',['../structmcpp_1_1_blocks.html#afa158ce731cd6d9b362ef454634fcf23',1,'mcpp::Blocks']]], + ['powered_5frail_23',['POWERED_RAIL',['../structmcpp_1_1_blocks.html#a02daf3cf2f39047c225eec795b4a253e',1,'mcpp::Blocks']]], + ['prismarine_24',['PRISMARINE',['../structmcpp_1_1_blocks.html#ae04d9f59bb9fcbb94a12727740279a30',1,'mcpp::Blocks']]], + ['prismarine_5fbricks_25',['PRISMARINE_BRICKS',['../structmcpp_1_1_blocks.html#ac8f1ed69912fa1bb5763b8b2c039b858',1,'mcpp::Blocks']]], + ['pumpkin_26',['PUMPKIN',['../structmcpp_1_1_blocks.html#acd6740466a3b2de5aac36ae5df926031',1,'mcpp::Blocks']]], + ['pumpkin_5fstem_27',['PUMPKIN_STEM',['../structmcpp_1_1_blocks.html#a303d6e3c439e2339f3f920801e34a5b2',1,'mcpp::Blocks']]], + ['purple_5fcarpet_28',['PURPLE_CARPET',['../structmcpp_1_1_blocks.html#aa1823eb56cd22a381daf4cc210d2d1c2',1,'mcpp::Blocks']]], + ['purple_5fconcrete_29',['PURPLE_CONCRETE',['../structmcpp_1_1_blocks.html#ad24feec26e0621b97162c59d0423dc92',1,'mcpp::Blocks']]], + ['purple_5fconcrete_5fpowder_30',['PURPLE_CONCRETE_POWDER',['../structmcpp_1_1_blocks.html#ad78fdb17e64f68e311896287579571c9',1,'mcpp::Blocks']]], + ['purple_5fglazed_5fterracotta_31',['PURPLE_GLAZED_TERRACOTTA',['../structmcpp_1_1_blocks.html#a8b8e86b8ea66926bfe8d9ec11e9cdf09',1,'mcpp::Blocks']]], + ['purple_5fhardened_5fclay_32',['PURPLE_HARDENED_CLAY',['../structmcpp_1_1_blocks.html#a82b0d7b0668cadd561ea584a497996c9',1,'mcpp::Blocks']]], + ['purple_5fshulker_5fbox_33',['PURPLE_SHULKER_BOX',['../structmcpp_1_1_blocks.html#a4fa4533549b16e5d135d2077ddc7bc06',1,'mcpp::Blocks']]], + ['purple_5fstained_5fglass_34',['PURPLE_STAINED_GLASS',['../structmcpp_1_1_blocks.html#a4b383889935b500e7becb2a2257b2f76',1,'mcpp::Blocks']]], + ['purple_5fstained_5fglass_5fpane_35',['PURPLE_STAINED_GLASS_PANE',['../structmcpp_1_1_blocks.html#a356195cd8f744370546aa75ee9975720',1,'mcpp::Blocks']]], + ['purple_5fwool_36',['PURPLE_WOOL',['../structmcpp_1_1_blocks.html#a895838dfe0ecc82fbe9b9ded65f57b72',1,'mcpp::Blocks']]], + ['purpur_5fblock_37',['PURPUR_BLOCK',['../structmcpp_1_1_blocks.html#a15888257e0b89536280cc4deaaa41c27',1,'mcpp::Blocks']]], + ['purpur_5fdouble_5fslab_38',['PURPUR_DOUBLE_SLAB',['../structmcpp_1_1_blocks.html#a4d330bd609aae0819deadfb53e7692ba',1,'mcpp::Blocks']]], + ['purpur_5fpillar_39',['PURPUR_PILLAR',['../structmcpp_1_1_blocks.html#a7d65c0903ff3662f7b6163fb379f8600',1,'mcpp::Blocks']]], + ['purpur_5fslab_40',['PURPUR_SLAB',['../structmcpp_1_1_blocks.html#a3545c3bfce42065a429d4c4076c585aa',1,'mcpp::Blocks']]], + ['purpur_5fstairs_41',['PURPUR_STAIRS',['../structmcpp_1_1_blocks.html#ad5828235f5786040b94503ab35021194',1,'mcpp::Blocks']]] +]; diff --git a/search/all_f.js b/search/all_f.js new file mode 100644 index 00000000..37900d47 --- /dev/null +++ b/search/all_f.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['quartz_5fblock_0',['QUARTZ_BLOCK',['../structmcpp_1_1_blocks.html#affd01218fed3231d968328f812f3ba82',1,'mcpp::Blocks']]], + ['quartz_5fslab_1',['QUARTZ_SLAB',['../structmcpp_1_1_blocks.html#a5343f443dcc7d34cc7e0710927fdfb44',1,'mcpp::Blocks']]], + ['quartz_5fstairs_2',['QUARTZ_STAIRS',['../structmcpp_1_1_blocks.html#a74451da470370374345f1dff49d736c6',1,'mcpp::Blocks']]] +]; diff --git a/search/classes_0.js b/search/classes_0.js new file mode 100644 index 00000000..b4ccabf3 --- /dev/null +++ b/search/classes_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['blocks_0',['Blocks',['../structmcpp_1_1_blocks.html',1,'mcpp']]], + ['blocktype_1',['BlockType',['../classmcpp_1_1_block_type.html',1,'mcpp']]] +]; diff --git a/search/classes_1.js b/search/classes_1.js new file mode 100644 index 00000000..ab3fdb35 --- /dev/null +++ b/search/classes_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['chunk_0',['Chunk',['../structmcpp_1_1_chunk.html',1,'mcpp']]], + ['constiterator_1',['constiterator',['../structmcpp_1_1_chunk_1_1_const_iterator.html',1,'mcpp::Chunk::ConstIterator'],['../structmcpp_1_1_height_map_1_1_const_iterator.html',1,'mcpp::HeightMap::ConstIterator']]], + ['coordinate_2',['Coordinate',['../structmcpp_1_1_coordinate.html',1,'mcpp']]], + ['coordinate2d_3',['Coordinate2D',['../structmcpp_1_1_coordinate2_d.html',1,'mcpp']]] +]; diff --git a/search/classes_2.js b/search/classes_2.js new file mode 100644 index 00000000..a6f34ce1 --- /dev/null +++ b/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['heightmap_0',['HeightMap',['../structmcpp_1_1_height_map.html',1,'mcpp']]] +]; diff --git a/search/classes_3.js b/search/classes_3.js new file mode 100644 index 00000000..e5af50cf --- /dev/null +++ b/search/classes_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['iterator_0',['iterator',['../structmcpp_1_1_chunk_1_1_iterator.html',1,'mcpp::Chunk::Iterator'],['../structmcpp_1_1_height_map_1_1_iterator.html',1,'mcpp::HeightMap::Iterator']]] +]; diff --git a/search/classes_4.js b/search/classes_4.js new file mode 100644 index 00000000..b1690a5c --- /dev/null +++ b/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['minecraftconnection_0',['MinecraftConnection',['../classmcpp_1_1_minecraft_connection.html',1,'mcpp']]] +]; diff --git a/search/close.svg b/search/close.svg new file mode 100644 index 00000000..337d6cc1 --- /dev/null +++ b/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 00000000..98817c86 --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['block_2eh_0',['block.h',['../block_8h.html',1,'']]] +]; diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 00000000..f0973345 --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['chunk_2eh_0',['chunk.h',['../chunk_8h.html',1,'']]], + ['coordinate_2eh_1',['coordinate.h',['../coordinate_8h.html',1,'']]] +]; diff --git a/search/files_2.js b/search/files_2.js new file mode 100644 index 00000000..dc461b5c --- /dev/null +++ b/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['heightmap_2eh_0',['heightmap.h',['../heightmap_8h.html',1,'']]] +]; diff --git a/search/files_3.js b/search/files_3.js new file mode 100644 index 00000000..a492b654 --- /dev/null +++ b/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mcpp_2eh_0',['mcpp.h',['../mcpp_8h.html',1,'']]] +]; diff --git a/search/files_4.js b/search/files_4.js new file mode 100644 index 00000000..4accdc1f --- /dev/null +++ b/search/files_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['readme_2emd_0',['README.md',['../_r_e_a_d_m_e_8md.html',1,'']]] +]; diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 00000000..96a288ff --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['base_5fpt_0',['base_pt',['../structmcpp_1_1_chunk.html#a06b31826ca7ca6a110c3655e45b1e2a2',1,'mcpp::Chunk::base_pt()'],['../structmcpp_1_1_height_map.html#a74388c7e2c66d1dd5c3d371ada6772c5',1,'mcpp::HeightMap::base_pt()']]], + ['begin_1',['begin',['../structmcpp_1_1_chunk.html#a63103fc7a00824e56c065ecba6f51300',1,'mcpp::Chunk::begin()'],['../structmcpp_1_1_chunk.html#af6046c1b74fea144f2b5b0cfdcfd00c4',1,'mcpp::Chunk::begin() const'],['../structmcpp_1_1_height_map.html#a39eabb27a08366fff7a4f64fd0065cb4',1,'mcpp::HeightMap::begin()'],['../structmcpp_1_1_height_map.html#a6c35bbb2046585a447efaeb671267bde',1,'mcpp::HeightMap::begin() const']]], + ['blocktype_2',['BlockType',['../classmcpp_1_1_block_type.html#ac475e584965cb95d1b5ec3ac3060413e',1,'mcpp::BlockType']]] +]; diff --git a/search/functions_1.js b/search/functions_1.js new file mode 100644 index 00000000..7cbed2bb --- /dev/null +++ b/search/functions_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['chunk_0',['chunk',['../structmcpp_1_1_chunk.html#aa64d3b2cfa29d09ed149e2ae63b09c67',1,'mcpp::Chunk::Chunk(const Coordinate &loc1, const Coordinate &loc2, const std::vector< BlockType > &block_list)'],['../structmcpp_1_1_chunk.html#ab12fccb955880e8e51ab83d77d370b35',1,'mcpp::Chunk::Chunk(const Chunk &other)'],['../structmcpp_1_1_chunk.html#a4018abeef679fd2bc9c4507bb7618efd',1,'mcpp::Chunk::Chunk(Chunk &&other) noexcept=default']]], + ['constiterator_1',['constiterator',['../structmcpp_1_1_chunk_1_1_const_iterator.html#acbdebb9cafdbf1f6a35afb46d3426da1',1,'mcpp::Chunk::ConstIterator::ConstIterator()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#a2e5f6370cef6618061247fed008339a1',1,'mcpp::HeightMap::ConstIterator::ConstIterator()']]], + ['coordinate_2',['coordinate',['../structmcpp_1_1_coordinate.html#a8af39c4153a09f110646212169a32449',1,'mcpp::Coordinate::Coordinate(int32_t x, int32_t y, int32_t z)'],['../structmcpp_1_1_coordinate.html#aa8bf97dfc6cd6ff08df614bbcb151dae',1,'mcpp::Coordinate::Coordinate()'],['../structmcpp_1_1_coordinate.html#aaf77bf635fec3314ba15dc524a53268e',1,'mcpp::Coordinate::Coordinate(double x, double y, double z)']]], + ['coordinate2d_3',['coordinate2d',['../structmcpp_1_1_coordinate2_d.html#af8c571915ae262648934119cc3124d02',1,'mcpp::Coordinate2D::Coordinate2D(int x, int z)'],['../structmcpp_1_1_coordinate2_d.html#ab716a1351c8381af3df2f572ca72222d',1,'mcpp::Coordinate2D::Coordinate2D()'],['../structmcpp_1_1_coordinate2_d.html#a7e9804ff78e9c361bc4998bf8474cb38',1,'mcpp::Coordinate2D::Coordinate2D(double x, double z)'],['../structmcpp_1_1_coordinate2_d.html#a8f65cfffbec8d8d84178744eb8903754',1,'mcpp::Coordinate2D::Coordinate2D(const Coordinate &coord)']]] +]; diff --git a/search/functions_10.js b/search/functions_10.js new file mode 100644 index 00000000..304a271d --- /dev/null +++ b/search/functions_10.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['z_5flen_0',['z_len',['../structmcpp_1_1_chunk.html#ac8c8d1a661dfa3ac22588fc9cd11d96b',1,'mcpp::Chunk::z_len()'],['../structmcpp_1_1_height_map.html#a1d05df8a6379d15b0ee5c1364415a41e',1,'mcpp::HeightMap::z_len()']]] +]; diff --git a/search/functions_11.js b/search/functions_11.js new file mode 100644 index 00000000..72d6b4da --- /dev/null +++ b/search/functions_11.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_7echunk_0',['~Chunk',['../structmcpp_1_1_chunk.html#ad1be58a4b0c65d2569e9dc34bcfcb811',1,'mcpp::Chunk']]], + ['_7eheightmap_1',['~HeightMap',['../structmcpp_1_1_height_map.html#a4eeedc5ee0f765c5fd9a24a780e5ba79',1,'mcpp::HeightMap']]], + ['_7eminecraftconnection_2',['~MinecraftConnection',['../classmcpp_1_1_minecraft_connection.html#ae470f965ac0cdb97d7d92bd0ab9e6587',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_2.js b/search/functions_2.js new file mode 100644 index 00000000..8c125bba --- /dev/null +++ b/search/functions_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['docommand_0',['doCommand',['../classmcpp_1_1_minecraft_connection.html#a706ee80a08b33fc44512f4e483cec416',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_3.js b/search/functions_3.js new file mode 100644 index 00000000..b19ea59b --- /dev/null +++ b/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['end_0',['end',['../structmcpp_1_1_chunk.html#a6869daba96a9c33dd02aa3092930df93',1,'mcpp::Chunk::end()'],['../structmcpp_1_1_chunk.html#a00870a72d610d231af9af9f1db2960c0',1,'mcpp::Chunk::end() const'],['../structmcpp_1_1_height_map.html#a83541e8a13e78799fcd0eaf6925c181b',1,'mcpp::HeightMap::end()'],['../structmcpp_1_1_height_map.html#a4e326e338339e93a577a76c5ef26a5e5',1,'mcpp::HeightMap::end() const']]] +]; diff --git a/search/functions_4.js b/search/functions_4.js new file mode 100644 index 00000000..cb3f6254 --- /dev/null +++ b/search/functions_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fill_5fcoord_0',['fill_coord',['../structmcpp_1_1_height_map.html#a28e5c2e7c9232b40ce56480e4f8514e3',1,'mcpp::HeightMap']]], + ['fillheight_1',['fillHeight',['../classmcpp_1_1_minecraft_connection.html#a82059d72f8eb1785d60961a493675602',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_5.js b/search/functions_5.js new file mode 100644 index 00000000..7d3d4270 --- /dev/null +++ b/search/functions_5.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['get_0',['get',['../structmcpp_1_1_chunk.html#a6243d24c86b261f798af410df06e8009',1,'mcpp::Chunk::get()'],['../structmcpp_1_1_height_map.html#a79a245ec5b2920271b3d98dbab917f35',1,'mcpp::HeightMap::get()']]], + ['get_5fworldspace_1',['get_worldspace',['../structmcpp_1_1_chunk.html#a1c9c77a2d85ddbb52f9f57f16b8f9823',1,'mcpp::Chunk::get_worldspace()'],['../structmcpp_1_1_height_map.html#ab67275d7088287eeb872fcfe8fce2401',1,'mcpp::HeightMap::get_worldspace()']]], + ['getblock_2',['getBlock',['../classmcpp_1_1_minecraft_connection.html#a59c3b6a46e94b139930781d308c36e51',1,'mcpp::MinecraftConnection']]], + ['getblocks_3',['getBlocks',['../classmcpp_1_1_minecraft_connection.html#a5c581d64d7bb0207ccc70f8e4ef56aff',1,'mcpp::MinecraftConnection']]], + ['getheight_4',['getHeight',['../classmcpp_1_1_minecraft_connection.html#a3cd994404a9fd333f78b8a4671594db0',1,'mcpp::MinecraftConnection']]], + ['getheights_5',['getHeights',['../classmcpp_1_1_minecraft_connection.html#ab4fcb04814b36f82e935586f47e5ebb1',1,'mcpp::MinecraftConnection']]], + ['getplayerposition_6',['getPlayerPosition',['../classmcpp_1_1_minecraft_connection.html#a7003573d8ebf553c8ccc7130694b2575',1,'mcpp::MinecraftConnection']]], + ['getplayertileposition_7',['getPlayerTilePosition',['../classmcpp_1_1_minecraft_connection.html#a3e28810c0bf53f6365f3d1f285b561ad',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_6.js b/search/functions_6.js new file mode 100644 index 00000000..62f17d73 --- /dev/null +++ b/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['heightmap_0',['heightmap',['../structmcpp_1_1_height_map.html#a659f03dd9809854c68369a96389d34c4',1,'mcpp::HeightMap::HeightMap(const Coordinate2D &loc1, const Coordinate2D &loc2, const std::vector< int16_t > &heights)'],['../structmcpp_1_1_height_map.html#ac83adeb98538249ae8fd801cc6c739b2',1,'mcpp::HeightMap::HeightMap(const HeightMap &other)'],['../structmcpp_1_1_height_map.html#a12f1954bc6d9187df6d7d7e12a4b4701',1,'mcpp::HeightMap::HeightMap(HeightMap &&other) noexcept=default']]] +]; diff --git a/search/functions_7.js b/search/functions_7.js new file mode 100644 index 00000000..cb4caaf2 --- /dev/null +++ b/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['iterator_0',['iterator',['../structmcpp_1_1_chunk_1_1_iterator.html#a233df6b92bd8701bbc5df9705a00b71c',1,'mcpp::Chunk::Iterator::Iterator()'],['../structmcpp_1_1_height_map_1_1_iterator.html#ab25fd1c9be320457edd894653a417c3a',1,'mcpp::HeightMap::Iterator::Iterator()']]] +]; diff --git a/search/functions_8.js b/search/functions_8.js new file mode 100644 index 00000000..3f4bde3e --- /dev/null +++ b/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['minecraftconnection_0',['MinecraftConnection',['../classmcpp_1_1_minecraft_connection.html#ac36095d95c9b64c02e2a4ff8a8472752',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_9.js b/search/functions_9.js new file mode 100644 index 00000000..affb325c --- /dev/null +++ b/search/functions_9.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['operator_21_3d_0',['operator!=',['../structmcpp_1_1_coordinate.html#a7642ebe18537052edfbe717bfd2e31ad',1,'mcpp::Coordinate::operator!=()'],['../structmcpp_1_1_coordinate2_d.html#a76597a189f8099c1696d9aa3d6787ecd',1,'mcpp::Coordinate2D::operator!=()'],['../classmcpp_1_1_block_type.html#a1b86156283c53bb60f74d504b6c7f78c',1,'mcpp::BlockType::operator!=()']]], + ['operator_28_29_1',['operator()',['../structmcpp_1_1_coordinate.html#a8e6a2c08a64b008789178613e245157d',1,'mcpp::Coordinate::operator()()'],['../structmcpp_1_1_coordinate2_d.html#ac4e310060288cc893fb2038c6359500d',1,'mcpp::Coordinate2D::operator()()']]], + ['operator_2a_2',['operator*',['../structmcpp_1_1_chunk_1_1_iterator.html#af9f614f147b5d5b28bf96d99c3f1e871',1,'mcpp::Chunk::Iterator::operator*()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a214cbd0fd4b2ece21d90d6cc65090bb1',1,'mcpp::Chunk::ConstIterator::operator*()'],['../structmcpp_1_1_height_map_1_1_iterator.html#aadf47fd2adee2871ed6ea994a6ce5c03',1,'mcpp::HeightMap::Iterator::operator*()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ab521afe468c80feff76e9187e3912fdb',1,'mcpp::HeightMap::ConstIterator::operator*()']]], + ['operator_2b_3',['operator+',['../structmcpp_1_1_coordinate.html#a00d47c3ceaa12d83ebf3fd970963ae0b',1,'mcpp::Coordinate::operator+(const Coordinate &obj) const'],['../structmcpp_1_1_coordinate.html#aa429488170f898040f68ca8ad583eeb2',1,'mcpp::Coordinate::operator+(const Coordinate2D &obj) const'],['../structmcpp_1_1_coordinate2_d.html#adc7dcf9095fbd8c5d03d0ccc28582b05',1,'mcpp::Coordinate2D::operator+()']]], + ['operator_2b_2b_4',['operator++',['../structmcpp_1_1_height_map_1_1_iterator.html#a4927f2889df7ca838be54746d81a6a68',1,'mcpp::HeightMap::Iterator::operator++()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#a9b6520996ece19e5cbd3d03bd6076071',1,'mcpp::HeightMap::ConstIterator::operator++(int)'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ac0d85953eb4fa815a2f09166fadfc92b',1,'mcpp::HeightMap::ConstIterator::operator++()'],['../structmcpp_1_1_height_map_1_1_iterator.html#a5a687d9afd110e5c246eeb6c00d4e569',1,'mcpp::HeightMap::Iterator::operator++()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#aca996a3d3783b20b9c2534a2b0e5e5a7',1,'mcpp::Chunk::ConstIterator::operator++()'],['../structmcpp_1_1_chunk_1_1_iterator.html#ac37fdf82878c6e98ed6b122066e9faf9',1,'mcpp::Chunk::Iterator::operator++(int)'],['../structmcpp_1_1_chunk_1_1_iterator.html#a9f9f4b645c7600c93e7e95f9c339cb41',1,'mcpp::Chunk::Iterator::operator++()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a9f425d2b24fdf5fa08e3b854da44146e',1,'mcpp::Chunk::ConstIterator::operator++()']]], + ['operator_2d_5',['operator-',['../structmcpp_1_1_coordinate.html#a51ef2fc83cf330cb0cea41ffb08c7169',1,'mcpp::Coordinate::operator-()'],['../structmcpp_1_1_coordinate2_d.html#a13a27f36afe25c8da969d803b27e610e',1,'mcpp::Coordinate2D::operator-()']]], + ['operator_2d_3e_6',['operator->',['../structmcpp_1_1_height_map_1_1_iterator.html#a500064cae9051413dc3e0bf159bf8121',1,'mcpp::HeightMap::Iterator::operator->()'],['../structmcpp_1_1_height_map_1_1_const_iterator.html#afa68ffb26e55223296df593ae0d5c777',1,'mcpp::HeightMap::ConstIterator::operator->()'],['../structmcpp_1_1_chunk_1_1_const_iterator.html#a6cba7d963825aa1630029ae2055fc073',1,'mcpp::Chunk::ConstIterator::operator->()'],['../structmcpp_1_1_chunk_1_1_iterator.html#a90c2d7e5d30f9007aec464b24b7b1c6a',1,'mcpp::Chunk::Iterator::operator->()']]], + ['operator_3d_7',['operator=',['../structmcpp_1_1_chunk.html#aa29e64684a203369cbd7e995cf308958',1,'mcpp::Chunk::operator=(const Chunk &other)'],['../structmcpp_1_1_chunk.html#a7573e7bb0e9830636a10c77d232da903',1,'mcpp::Chunk::operator=(Chunk &&other)=default'],['../structmcpp_1_1_height_map.html#adddc2a6d548b17967d717cdbf5e68ae1',1,'mcpp::HeightMap::operator=(const HeightMap &other)'],['../structmcpp_1_1_height_map.html#a995ed2e3e4125736056986cea04eb142',1,'mcpp::HeightMap::operator=(HeightMap &&other)=default']]], + ['operator_3d_3d_8',['operator==',['../classmcpp_1_1_block_type.html#a7964fb92287d04581559534d0bff91a5',1,'mcpp::BlockType::operator==()'],['../structmcpp_1_1_coordinate.html#aea212ae040336d2e0b46c82e605fada6',1,'mcpp::Coordinate::operator==()'],['../structmcpp_1_1_coordinate2_d.html#a5f4bb74c48e2e59ce44534bdb7377285',1,'mcpp::Coordinate2D::operator==()']]] +]; diff --git a/search/functions_a.js b/search/functions_a.js new file mode 100644 index 00000000..10ede3b6 --- /dev/null +++ b/search/functions_a.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['posttochat_0',['postToChat',['../classmcpp_1_1_minecraft_connection.html#a7f489b281f16ac1bf4e75c6070589130',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_b.js b/search/functions_b.js new file mode 100644 index 00000000..da0d676b --- /dev/null +++ b/search/functions_b.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['setblock_0',['setBlock',['../classmcpp_1_1_minecraft_connection.html#a7da57f4b67732a3eedc943cec715ed8f',1,'mcpp::MinecraftConnection']]], + ['setblocks_1',['setBlocks',['../classmcpp_1_1_minecraft_connection.html#ac33d67903491e0a1c753c8754377b71a',1,'mcpp::MinecraftConnection']]], + ['setplayerposition_2',['setPlayerPosition',['../classmcpp_1_1_minecraft_connection.html#a35965000d661f13f19cee02a676780f2',1,'mcpp::MinecraftConnection']]], + ['setplayertileposition_3',['setPlayerTilePosition',['../classmcpp_1_1_minecraft_connection.html#a0c54cfc5da2741d4abff1115e8acef33',1,'mcpp::MinecraftConnection']]] +]; diff --git a/search/functions_c.js b/search/functions_c.js new file mode 100644 index 00000000..398bafcb --- /dev/null +++ b/search/functions_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['to_5fstring_0',['to_string',['../namespacemcpp.html#ab1bf0af2b50790de272ff6f3f4d26f29',1,'mcpp']]] +]; diff --git a/search/functions_d.js b/search/functions_d.js new file mode 100644 index 00000000..4a17439a --- /dev/null +++ b/search/functions_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['with_5fheight_0',['with_height',['../structmcpp_1_1_coordinate2_d.html#adfc2d893774f802f04c6d1c6817085c6',1,'mcpp::Coordinate2D']]], + ['with_5fmod_1',['with_mod',['../classmcpp_1_1_block_type.html#a7dd394937bd5ebb798a95ff54b546f16',1,'mcpp::BlockType']]] +]; diff --git a/search/functions_e.js b/search/functions_e.js new file mode 100644 index 00000000..2e58f56f --- /dev/null +++ b/search/functions_e.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_5flen_0',['x_len',['../structmcpp_1_1_chunk.html#ad0b7a1f08a35673b482ab9693bff1dfa',1,'mcpp::Chunk::x_len()'],['../structmcpp_1_1_height_map.html#a152ce47a657b30d78e5a591596ade889',1,'mcpp::HeightMap::x_len()']]] +]; diff --git a/search/functions_f.js b/search/functions_f.js new file mode 100644 index 00000000..f6a6f380 --- /dev/null +++ b/search/functions_f.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['y_5flen_0',['y_len',['../structmcpp_1_1_chunk.html#a5cf54ca51a63946e9b836ff4ff3f8982',1,'mcpp::Chunk']]] +]; diff --git a/search/mag.svg b/search/mag.svg new file mode 100644 index 00000000..ffb6cf0d --- /dev/null +++ b/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/search/mag_d.svg b/search/mag_d.svg new file mode 100644 index 00000000..4122773f --- /dev/null +++ b/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/search/mag_sel.svg b/search/mag_sel.svg new file mode 100644 index 00000000..553dba87 --- /dev/null +++ b/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/search/mag_seld.svg b/search/mag_seld.svg new file mode 100644 index 00000000..c906f84c --- /dev/null +++ b/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/search/namespaces_0.js b/search/namespaces_0.js new file mode 100644 index 00000000..45b794cc --- /dev/null +++ b/search/namespaces_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mcpp_0',['mcpp',['../namespacemcpp.html',1,'']]] +]; diff --git a/search/pages_0.js b/search/pages_0.js new file mode 100644 index 00000000..03e1df0c --- /dev/null +++ b/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mcpp_0',['mcpp',['../index.html',1,'']]] +]; diff --git a/search/related_0.js b/search/related_0.js new file mode 100644 index 00000000..cfb277ce --- /dev/null +++ b/search/related_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['operator_21_3d_0',['operator!=',['../structmcpp_1_1_chunk_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824',1,'mcpp::Chunk::Iterator::operator!='],['../structmcpp_1_1_chunk_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf',1,'mcpp::Chunk::ConstIterator::operator!='],['../structmcpp_1_1_height_map_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824',1,'mcpp::HeightMap::Iterator::operator!='],['../structmcpp_1_1_height_map_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf',1,'mcpp::HeightMap::ConstIterator::operator!=']]], + ['operator_3c_3c_1',['operator<<',['../classmcpp_1_1_block_type.html#a7dbe770d87d057f9e45b9b6509b07e96',1,'mcpp::BlockType::operator<<'],['../structmcpp_1_1_coordinate.html#a90eac52373a64b1d794861197cd4db2e',1,'mcpp::Coordinate::operator<<'],['../structmcpp_1_1_coordinate2_d.html#aeb3e44ce1b9c48b39f3cc59be4388468',1,'mcpp::Coordinate2D::operator<<']]], + ['operator_3d_3d_2',['operator==',['../structmcpp_1_1_chunk_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1',1,'mcpp::Chunk::Iterator::operator=='],['../structmcpp_1_1_chunk_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68',1,'mcpp::Chunk::ConstIterator::operator=='],['../structmcpp_1_1_height_map_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1',1,'mcpp::HeightMap::Iterator::operator=='],['../structmcpp_1_1_height_map_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68',1,'mcpp::HeightMap::ConstIterator::operator==']]] +]; diff --git a/search/search.css b/search/search.css new file mode 100644 index 00000000..ebbcc767 --- /dev/null +++ b/search/search.css @@ -0,0 +1,291 @@ +/*---------------- Search Box positioning */ + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: url('mag_sel.svg'); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: url('mag.svg'); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial,Verdana,sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: black; +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #2E9AFE; + background-color: #F3F9FE; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial,Verdana,sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: black; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: black; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: white; + background-color: #004789; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid black; + background-color: #DDEEFE; + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: #DDEEFE; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #004F99; + font-family: Arial,Verdana,sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #004F99; + font-family: Arial,Verdana,sans-serif; + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial,Verdana,sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial,Verdana,sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/search/search.js b/search/search.js new file mode 100644 index 00000000..6fd40c67 --- /dev/null +++ b/search/search.js @@ -0,0 +1,840 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var jsFile; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + var loadJS = function(url, impl, loc){ + var scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + var domSearchBox = this.DOMSearchBox(); + var domPopupSearchResults = this.DOMPopupSearchResults(); + var domSearchClose = this.DOMSearchClose(); + var resultsPath = this.resultsPath; + + var handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') + { + domSearchClose.style.display = 'inline-block'; + var left = getXPos(domSearchBox) + 150; + var top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + var maxWidth = document.body.clientWidth; + var maxHeight = document.body.clientHeight; + var width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + var height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults(resultsPath) +{ + var results = document.getElementById("SRResults"); + results.innerHTML = ''; + for (var e=0; eid == other.id && this->mod == other.mod; -} - -bool BlockType::operator!=(const BlockType& other) const { return !(*this == other); } - -BlockType BlockType::with_mod(uint8_t modifier) const { return {this->id, modifier}; } - -std::ostream& operator<<(std::ostream& out, const BlockType& block) { - using std::to_string; - out << "[" << to_string(block.id) << ", " << to_string(block.mod) << "]"; - return out; -} -} // namespace mcpp diff --git a/src/chunk.cpp b/src/chunk.cpp deleted file mode 100644 index c516ec87..00000000 --- a/src/chunk.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include - -#include "../include/mcpp/chunk.h" - -namespace mcpp { -Chunk::Chunk(const Coordinate& loc1, const Coordinate& loc2, - const std::vector& block_list) { - Coordinate min{std::min(loc1.x, loc2.x), std::min(loc1.y, loc2.y), std::min(loc1.z, loc2.z)}; - _base_pt = min; - - Coordinate dim = loc1 - loc2; - _x_len = std::abs(dim.x) + 1; - _y_len = std::abs(dim.y) + 1; - _z_len = std::abs(dim.z) + 1; - - _raw_data = std::make_unique(block_list.size()); - std::copy(block_list.begin(), block_list.end(), _raw_data.get()); -} - -Chunk& Chunk::operator=(const Chunk& other) { - if (this != &other) { - _base_pt = other._base_pt; - _x_len = other._x_len; - _y_len = other._y_len; - _z_len = other._z_len; - size_t size = _x_len * _y_len * _z_len; - _raw_data = std::make_unique(size); - std::copy(other._raw_data.get(), other._raw_data.get() + size, _raw_data.get()); - } - return *this; -} - -BlockType Chunk::get(int x, int y, int z) const { - if ((x < 0 || y < 0 || z < 0) || (x > _x_len - 1 || y > _y_len - 1 || z > _z_len - 1)) { - throw std::out_of_range("Out of bounds Chunk access at " + to_string(Coordinate(x, y, z))); - } - return _raw_data[(y * _x_len * _z_len) + (x * _z_len) + z]; -} - -BlockType Chunk::get_worldspace(const Coordinate& pos) const { - Coordinate array_pos = pos - _base_pt; - if ((array_pos.x < 0 || array_pos.y < 0 || array_pos.z < 0) || - (array_pos.x > _x_len - 1 || array_pos.y > _y_len - 1 || array_pos.z > _z_len - 1)) { - throw std::out_of_range("Out of bounds Chunk access at " + to_string(array_pos) + - " (world coordinate " + to_string(pos) + " )"); - } - return _raw_data[(array_pos.y * _x_len * _z_len) + (array_pos.x * _z_len) + array_pos.z]; -} - -uint16_t Chunk::x_len() const { return this->_x_len; } - -uint16_t Chunk::y_len() const { return this->_y_len; } - -uint16_t Chunk::z_len() const { return this->_z_len; } - -Coordinate Chunk::base_pt() const { return this->_base_pt; } -} // namespace mcpp diff --git a/src/connection.cpp b/src/connection.cpp deleted file mode 100644 index 1e049a46..00000000 --- a/src/connection.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include "connection.h" - -#include -#include -#include -#include - -#include -#include - -namespace mcpp { -SocketConnection::SocketConnection(const std::string& address_str, uint16_t port) { - std::string ip_addr = resolve_hostname(address_str); - - // Using std libs only to avoid dependency on socket lib - _socket_handle = socket(AF_INET, SOCK_STREAM, 0); - if (_socket_handle == -1) { - throw std::runtime_error("Failed to create socket."); - } - - sockaddr_in server_addr{}; - server_addr.sin_family = AF_INET; - server_addr.sin_port = htons(port); - - if (inet_pton(AF_INET, ip_addr.c_str(), &(server_addr.sin_addr)) <= 0) { - throw std::runtime_error("Invalid address."); - } - - if (connect(_socket_handle, reinterpret_cast(&server_addr), - sizeof(server_addr)) < 0) { - throw std::runtime_error("Failed to connect to the server. Check if the server is running."); - } -} - -std::string SocketConnection::resolve_hostname(const std::string& hostname) { - struct addrinfo hints {}; - struct addrinfo* result; - - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_STREAM; - - if (getaddrinfo(hostname.c_str(), nullptr, &hints, &result) != 0) { - throw std::runtime_error("Failed to resolve hostname."); - } - - auto* address = reinterpret_cast(result->ai_addr); - char ip_addr[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, &(address->sin_addr), ip_addr, INET_ADDRSTRLEN); - - std::string ip_string(ip_addr); - freeaddrinfo(result); - - return ip_string; -} - -void SocketConnection::send(const std::string& data_string) { - _last_sent = data_string; - ssize_t result = write(_socket_handle, data_string.c_str(), data_string.length()); - if (result < 0) { - throw std::runtime_error("Failed to send data."); - } -} - -std::string SocketConnection::recv() const { - std::stringstream response_stream; - char buffer[BUFFER_SIZE]; - - ssize_t bytes_read; - do { - bytes_read = read(_socket_handle, buffer, sizeof(buffer)); - if (bytes_read < 0) { - throw std::runtime_error("Failed to receive data."); - } - - response_stream.write(buffer, bytes_read); - } while (buffer[bytes_read - 1] != '\n'); - - std::string response = response_stream.str(); - - // Remove trailing \n - if (!response.empty() && response[response.length() - 1] == '\n') { - response.pop_back(); - } - - if (response == FAIL_RESPONSE) { - std::string error_msg = "Server failed to execute command: "; - error_msg += _last_sent; - throw std::runtime_error(error_msg); - } - return response; -} -} // namespace mcpp diff --git a/src/connection.h b/src/connection.h deleted file mode 100644 index ffb2a900..00000000 --- a/src/connection.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#define FAIL_RESPONSE "Fail" - -/** @file - * @brief SocketConnection class. - * - */ -namespace mcpp { - -const size_t BUFFER_SIZE = 1024; - -class SocketConnection { -private: - int _socket_handle; - std::string _last_sent; - - static std::string resolve_hostname(const std::string& hostname); - -public: - SocketConnection(const std::string& address_str, uint16_t port); - - void send(const std::string& data_string); - - /** - * Takes in parameters supporting std::stringstream conversion and a string - * prefix and transforms them into format "prefix(arg1,arg2,arg3)\n" e.g. - * "chat.post(test)\n)" and sends command to the server. - * - * @tparam Types - * @param prefix - * @param args - */ - template void send_command(const std::string& prefix, const Types&... args) { - std::stringstream ss; - - ss << prefix << "("; - - // Iterate over args pack - ((ss << args << ','), ...); - // Remove trailing comma - ss.seekp(-1, std::ios_base::end); - - ss << ")\n"; - - send(ss.str()); - } - - /** - * Sends via sendCommand() and returns the result from endpoint - * - * @tparam T - * @tparam Types - * @param prefix - * @param args - * @return - */ - template - std::string send_receive_command(const T& prefix, const Types&... args) { - send_command(prefix, args...); - auto result = recv(); - return result; - } - - [[nodiscard]] std::string recv() const; -}; -} // namespace mcpp diff --git a/src/coordinate.cpp b/src/coordinate.cpp deleted file mode 100644 index 74a10f3c..00000000 --- a/src/coordinate.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include "../include/mcpp/coordinate.h" -#include - -namespace mcpp { -Coordinate Coordinate::operator+(const Coordinate& obj) const { - Coordinate result; - result.x = this->x + obj.x; - result.y = this->y + obj.y; - result.z = this->z + obj.z; - return result; -} - -Coordinate Coordinate::operator+(const Coordinate2D& obj) const { - Coordinate result; - result.x = this->x + obj.x; - result.y = this->y; - result.z = this->z + obj.z; - return result; -} - -bool Coordinate::operator==(const Coordinate& obj) const { - return (this->x == obj.x) && (this->y == obj.y) && (this->z == obj.z); -} - -bool Coordinate::operator!=(const Coordinate& obj) const { return !(*this == obj); } - -Coordinate Coordinate::operator-(const Coordinate& obj) const { - Coordinate result; - result.x = this->x - obj.x; - result.y = this->y - obj.y; - result.z = this->z - obj.z; - return result; -} - -std::size_t Coordinate::operator()(const mcpp::Coordinate& obj) const { - int lower = -3e7, upper = 3e7; - size_t base = upper - lower + 1; - - size_t nx = obj.x - lower; - size_t ny = obj.y - lower; - size_t nz = obj.z - lower; - - return nx * base * base + ny * base + nz; -} - -std::string to_string(const Coordinate& coord) { - using std::to_string; - return "(" + to_string(coord.x) + "," + to_string(coord.y) + "," + to_string(coord.z) + ")"; -} - -std::ostream& operator<<(std::ostream& out, const Coordinate& coord) { - out << to_string(coord); - return out; -} - -Coordinate Coordinate2D::with_height(int y) const { return Coordinate(this->x, y, this->z); } - -Coordinate2D Coordinate2D::operator+(const Coordinate2D& obj) const { - Coordinate2D result; - result.x = this->x + obj.x; - result.z = this->z + obj.z; - return result; -} - -bool Coordinate2D::operator==(const Coordinate2D& obj) const { - return (this->x == obj.x) && (this->z == obj.z); -} - -bool Coordinate2D::operator!=(const Coordinate2D& obj) const { return !(*this == obj); } - -Coordinate2D Coordinate2D::operator-(const Coordinate2D& obj) const { - Coordinate2D result; - result.x = this->x - obj.x; - result.z = this->z - obj.z; - return result; -} - -std::size_t Coordinate2D::operator()(const mcpp::Coordinate2D& obj) const { - int lower = -3e7, upper = 3e7; - size_t base = upper - lower + 1; - - size_t nx = obj.x - lower; - size_t nz = obj.z - lower; - - return nx * base + nz; -} - -std::string to_string(const Coordinate2D& coord) { - using std::to_string; - return "(" + to_string(coord.x) + "," + to_string(coord.z) + ")"; -} - -std::ostream& operator<<(std::ostream& out, const Coordinate2D& coord) { - out << to_string(coord); - return out; -} -} // namespace mcpp diff --git a/src/heightmap.cpp b/src/heightmap.cpp deleted file mode 100644 index d043b04d..00000000 --- a/src/heightmap.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "../include/mcpp/heightmap.h" -#include - -namespace mcpp { -HeightMap::HeightMap(const Coordinate2D& loc1, const Coordinate2D& loc2, - const std::vector& heights) { - _base_pt = Coordinate{ - std::min(loc1.x, loc2.x), - 0, - std::min(loc1.z, loc2.z), - }; - - _x_len = std::abs(loc1.x - loc2.x) + 1; - _z_len = std::abs(loc1.z - loc2.z) + 1; - - _raw_heights = std::make_unique(heights.size()); - std::copy(heights.begin(), heights.end(), _raw_heights.get()); -} - -HeightMap& HeightMap::operator=(const HeightMap& other) { - if (this != &other) { - // Copy data from the other object - _base_pt = other._base_pt; - _x_len = other._x_len; - _z_len = other._z_len; - } - return *this; -} - -int16_t HeightMap::get(int x, int z) const { - if ((x < 0 || x >= _x_len) || (z < 0 || z >= _z_len)) { - throw std::out_of_range("Out of range access of heightmap at " + std::to_string(x) + "," + - std::to_string(z) + " (worldspace x=" + std::to_string(_base_pt.x + x) + - ",z=" + std::to_string(_base_pt.z + z)); - } - // Get 2D from flat vector - return _raw_heights[(x * _z_len) + z]; -} - -int16_t HeightMap::get_worldspace(const Coordinate2D& loc) const { - return get(loc.x - _base_pt.x, loc.z - _base_pt.z); -} - -void HeightMap::fill_coord(Coordinate& out) const { out.y = get_worldspace(out); } - -uint16_t HeightMap::x_len() const { return _x_len; } - -uint16_t HeightMap::z_len() const { return _z_len; } - -Coordinate2D HeightMap::base_pt() const { return _base_pt; } -} // namespace mcpp diff --git a/src/mcpp.cpp b/src/mcpp.cpp deleted file mode 100644 index dbec1653..00000000 --- a/src/mcpp.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include -#include -#include - -#include "../include/mcpp/mcpp.h" -#include "connection.h" -#include "util.h" - -using namespace std::string_literals; - -namespace mcpp { - -MinecraftConnection::MinecraftConnection(const std::string& address, uint16_t port) { - _conn = std::make_unique(address, port); -} - -MinecraftConnection::~MinecraftConnection() = default; - -void MinecraftConnection::postToChat(const std::string& message) { - _conn->send_command("chat.post", message); -} - -void MinecraftConnection::doCommand(const std::string& command) { - _conn->send_command("player.doCommand", command); -} - -void MinecraftConnection::setPlayerPosition(const Coordinate& pos) { - _conn->send_command("player.setPos", pos.x, pos.y, pos.z); -} - -Coordinate MinecraftConnection::getPlayerPosition() const { - std::string response = _conn->send_receive_command("player.getPos", ""); - std::vector parsed; - split_response(response, parsed); - return {parsed[0], parsed[1], parsed[2]}; -} - -void MinecraftConnection::setPlayerTilePosition(const Coordinate& tile) { - Coordinate new_tile = tile; - new_tile.y++; - setPlayerPosition(new_tile); -} - -Coordinate MinecraftConnection::getPlayerTilePosition() const { - Coordinate player_tile = getPlayerPosition(); - player_tile.y--; - return player_tile; -} - -void MinecraftConnection::setBlock(const Coordinate& loc, const BlockType& block_type) { - // Static cast required because of stupid ss default of uint8_t as char - _conn->send_command("world.setBlock", loc.x, loc.y, loc.z, static_cast(block_type.id), - static_cast(block_type.mod)); -} - -void MinecraftConnection::setBlocks(const Coordinate& loc1, const Coordinate& loc2, - const BlockType& block_type) { - auto [x1, y1, z1] = loc1; - auto [x2, y2, z2] = loc2; - _conn->send_command("world.setBlocks", x1, y1, z1, x2, y2, z2, static_cast(block_type.id), - static_cast(block_type.mod)); -} - -BlockType MinecraftConnection::getBlock(const Coordinate& loc) const { - std::string return_str = - _conn->send_receive_command("world.getBlockWithData", loc.x, loc.y, loc.z); - std::vector parsed; - split_response(return_str, parsed); - - // Values are id and mod - return {parsed[0], parsed[1]}; -} - -Chunk MinecraftConnection::getBlocks(const Coordinate& loc1, const Coordinate& loc2) const { - std::string response = _conn->send_receive_command("world.getBlocksWithData", loc1.x, loc1.y, - loc1.z, loc2.x, loc2.y, loc2.z); - - // Received in format 1,2;1,2;1,2 where 1,2 is a block of type 1 and mod 2 - std::vector result; - std::stringstream stream(response); - - // uint16_t because stupid << is overloaded to read first character instead - // of number for uint8_t raaaa - // This shouldn't return anything larger than a uint8_t anyway - uint16_t id; - uint16_t mod; - char delimiter; - while (stream >> id) { - stream >> delimiter; - if (delimiter == ',') { - stream >> mod; - result.emplace_back(id, mod); - stream >> delimiter; - } - if (delimiter == ';') { - continue; - } - if (delimiter == EOF) { - break; - } - } - - return Chunk{loc1, loc2, result}; -} - -int MinecraftConnection::getHeight(Coordinate2D loc) const { - std::string response = _conn->send_receive_command("world.getHeight", loc.x, loc.z); - return stoi(response); -} - -Coordinate MinecraftConnection::fillHeight(Coordinate2D loc) const { - int y = this->getHeight(loc); - return Coordinate(loc.x, y, loc.z); -} - -HeightMap MinecraftConnection::getHeights(const Coordinate2D& loc1, - const Coordinate2D& loc2) const { - std::string response = - _conn->send_receive_command("world.getHeights", loc1.x, loc1.z, loc2.x, loc2.z); - - // Returned in format "1,2,3,4,5" - std::vector parsed; - split_response(response, parsed); - - return HeightMap{loc1, loc2, parsed}; -} - -} // namespace mcpp diff --git a/src/util.h b/src/util.h deleted file mode 100644 index a4d23c8b..00000000 --- a/src/util.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include - -template void split_response(const std::string& str, std::vector& vec) { - static_assert(std::is_integral_v, "T must be an integral type."); - - std::stringstream ss(str); - std::string item; - - while (std::getline(ss, item, ',')) { - try { - vec.push_back(static_cast(std::floor(std::stod(item)))); - } catch (const std::exception&) { - throw std::runtime_error("Server call returned malformed response string: " + str); - } - } -} diff --git a/structmcpp_1_1_blocks-members.html b/structmcpp_1_1_blocks-members.html new file mode 100644 index 00000000..ff90d813 --- /dev/null +++ b/structmcpp_1_1_blocks-members.html @@ -0,0 +1,584 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Blocks Member List
    +
    +
    + +

    This is the complete list of members for mcpp::Blocks, including all inherited members.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ACACIA_DOOR_BLOCKmcpp::Blocksstatic
    ACACIA_FENCEmcpp::Blocksstatic
    ACACIA_FENCE_GATEmcpp::Blocksstatic
    ACACIA_LEAVESmcpp::Blocksstatic
    ACACIA_SAPLINGmcpp::Blocksstatic
    ACACIA_WOODmcpp::Blocksstatic
    ACACIA_WOOD_PLANKmcpp::Blocksstatic
    ACACIA_WOOD_SLABmcpp::Blocksstatic
    ACACIA_WOOD_STAIRSmcpp::Blocksstatic
    ACTIVATOR_RAILmcpp::Blocksstatic
    AIRmcpp::Blocksstatic
    ALLIUMmcpp::Blocksstatic
    ANDESITEmcpp::Blocksstatic
    ANVILmcpp::Blocksstatic
    AZURE_BLUETmcpp::Blocksstatic
    BARRIERmcpp::Blocksstatic
    BEACONmcpp::Blocksstatic
    BEDmcpp::Blocksstatic
    BEDROCKmcpp::Blocksstatic
    BEETROOT_BLOCKmcpp::Blocksstatic
    BIRCH_DOOR_BLOCKmcpp::Blocksstatic
    BIRCH_FENCEmcpp::Blocksstatic
    BIRCH_FENCE_GATEmcpp::Blocksstatic
    BIRCH_LEAVESmcpp::Blocksstatic
    BIRCH_SAPLINGmcpp::Blocksstatic
    BIRCH_WOODmcpp::Blocksstatic
    BIRCH_WOOD_PLANKmcpp::Blocksstatic
    BIRCH_WOOD_SLABmcpp::Blocksstatic
    BIRCH_WOOD_STAIRSmcpp::Blocksstatic
    BLACK_CARPETmcpp::Blocksstatic
    BLACK_CONCRETEmcpp::Blocksstatic
    BLACK_CONCRETE_POWDERmcpp::Blocksstatic
    BLACK_GLAZED_TERRACOTTAmcpp::Blocksstatic
    BLACK_HARDENED_CLAYmcpp::Blocksstatic
    BLACK_SHULKER_BOXmcpp::Blocksstatic
    BLACK_STAINED_GLASSmcpp::Blocksstatic
    BLACK_STAINED_GLASS_PANEmcpp::Blocksstatic
    BLACK_WOOLmcpp::Blocksstatic
    BLOCK_OF_COALmcpp::Blocksstatic
    BLUE_CARPETmcpp::Blocksstatic
    BLUE_CONCRETEmcpp::Blocksstatic
    BLUE_CONCRETE_POWDERmcpp::Blocksstatic
    BLUE_GLAZED_TERRACOTTAmcpp::Blocksstatic
    BLUE_HARDENED_CLAYmcpp::Blocksstatic
    BLUE_ORCHIDmcpp::Blocksstatic
    BLUE_SHULKER_BOXmcpp::Blocksstatic
    BLUE_STAINED_GLASSmcpp::Blocksstatic
    BLUE_STAINED_GLASS_PANEmcpp::Blocksstatic
    BLUE_WOOLmcpp::Blocksstatic
    BONE_BLOCKmcpp::Blocksstatic
    BOOKSHELFmcpp::Blocksstatic
    BREWING_STANDmcpp::Blocksstatic
    BRICK_SLABmcpp::Blocksstatic
    BRICK_STAIRSmcpp::Blocksstatic
    BRICKSmcpp::Blocksstatic
    BROWN_CARPETmcpp::Blocksstatic
    BROWN_CONCRETEmcpp::Blocksstatic
    BROWN_CONCRETE_POWDERmcpp::Blocksstatic
    BROWN_GLAZED_TERRACOTTAmcpp::Blocksstatic
    BROWN_HARDENED_CLAYmcpp::Blocksstatic
    BROWN_MUSHROOMmcpp::Blocksstatic
    BROWN_MUSHROOM_BLOCKmcpp::Blocksstatic
    BROWN_SHULKER_BOXmcpp::Blocksstatic
    BROWN_STAINED_GLASSmcpp::Blocksstatic
    BROWN_STAINED_GLASS_PANEmcpp::Blocksstatic
    BROWN_WOOLmcpp::Blocksstatic
    BURNING_FURNACEmcpp::Blocksstatic
    CACTUSmcpp::Blocksstatic
    CAKE_BLOCKmcpp::Blocksstatic
    CARROTSmcpp::Blocksstatic
    CAULDRONmcpp::Blocksstatic
    CHAIN_COMMAND_BLOCKmcpp::Blocksstatic
    CHESTmcpp::Blocksstatic
    CHISELED_QUARTZ_BLOCKmcpp::Blocksstatic
    CHISELED_RED_SANDSTONEmcpp::Blocksstatic
    CHISELED_SANDSTONEmcpp::Blocksstatic
    CHISELED_STONE_BRICK_MONSTER_EGGmcpp::Blocksstatic
    CHISELED_STONE_BRICKSmcpp::Blocksstatic
    CHORUS_FLOWERmcpp::Blocksstatic
    CHORUS_PLANTmcpp::Blocksstatic
    CLAYmcpp::Blocksstatic
    COAL_OREmcpp::Blocksstatic
    COARSE_DIRTmcpp::Blocksstatic
    COBBLESTONEmcpp::Blocksstatic
    COBBLESTONE_MONSTER_EGGmcpp::Blocksstatic
    COBBLESTONE_SLABmcpp::Blocksstatic
    COBBLESTONE_STAIRSmcpp::Blocksstatic
    COBBLESTONE_WALLmcpp::Blocksstatic
    COBWEBmcpp::Blocksstatic
    COCOAmcpp::Blocksstatic
    COMMAND_BLOCKmcpp::Blocksstatic
    CRACKED_STONE_BRICK_MONSTER_EGGmcpp::Blocksstatic
    CRACKED_STONE_BRICKSmcpp::Blocksstatic
    CRAFTING_TABLEmcpp::Blocksstatic
    CYAN_CARPETmcpp::Blocksstatic
    CYAN_CONCRETEmcpp::Blocksstatic
    CYAN_CONCRETE_POWDERmcpp::Blocksstatic
    CYAN_GLAZED_TERRACOTTAmcpp::Blocksstatic
    CYAN_HARDENED_CLAYmcpp::Blocksstatic
    CYAN_SHULKER_BOXmcpp::Blocksstatic
    CYAN_STAINED_GLASSmcpp::Blocksstatic
    CYAN_STAINED_GLASS_PANEmcpp::Blocksstatic
    CYAN_WOOLmcpp::Blocksstatic
    DANDELIONmcpp::Blocksstatic
    DARK_OAK_DOOR_BLOCKmcpp::Blocksstatic
    DARK_OAK_FENCEmcpp::Blocksstatic
    DARK_OAK_FENCE_GATEmcpp::Blocksstatic
    DARK_OAK_LEAVESmcpp::Blocksstatic
    DARK_OAK_SAPLINGmcpp::Blocksstatic
    DARK_OAK_WOODmcpp::Blocksstatic
    DARK_OAK_WOOD_PLANKmcpp::Blocksstatic
    DARK_OAK_WOOD_SLABmcpp::Blocksstatic
    DARK_OAK_WOOD_STAIRSmcpp::Blocksstatic
    DARK_PRISMARINEmcpp::Blocksstatic
    DAYLIGHT_SENSORmcpp::Blocksstatic
    DEAD_BUSHmcpp::Blocksstatic
    DEAD_SHRUBmcpp::Blocksstatic
    DETECTOR_RAILmcpp::Blocksstatic
    DIAMOND_BLOCKmcpp::Blocksstatic
    DIAMOND_OREmcpp::Blocksstatic
    DIORITEmcpp::Blocksstatic
    DIRTmcpp::Blocksstatic
    DISPENSERmcpp::Blocksstatic
    DOUBLE_ACACIA_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_BIRCH_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_BRICK_SLABmcpp::Blocksstatic
    DOUBLE_COBBLESTONE_SLABmcpp::Blocksstatic
    DOUBLE_DARK_OAK_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_JUNGLE_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_NETHER_BRICK_SLABmcpp::Blocksstatic
    DOUBLE_OAK_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_QUARTZ_SLABmcpp::Blocksstatic
    DOUBLE_RED_SANDSTONE_SLABmcpp::Blocksstatic
    DOUBLE_SANDSTONE_SLABmcpp::Blocksstatic
    DOUBLE_SPRUCE_WOOD_SLABmcpp::Blocksstatic
    DOUBLE_STONE_BRICK_SLABmcpp::Blocksstatic
    DOUBLE_STONE_SLABmcpp::Blocksstatic
    DOUBLE_TALLGRASSmcpp::Blocksstatic
    DOUBLE_WOODEN_SLABmcpp::Blocksstatic
    DRAGON_EGGmcpp::Blocksstatic
    DROPPERmcpp::Blocksstatic
    EMERALD_BLOCKmcpp::Blocksstatic
    EMERALD_OREmcpp::Blocksstatic
    ENCHANTMENT_TABLEmcpp::Blocksstatic
    END_GATEWAYmcpp::Blocksstatic
    END_PORTALmcpp::Blocksstatic
    END_PORTAL_FRAMEmcpp::Blocksstatic
    END_RODmcpp::Blocksstatic
    END_STONEmcpp::Blocksstatic
    END_STONE_BRICKSmcpp::Blocksstatic
    ENDER_CHESTmcpp::Blocksstatic
    FARMLANDmcpp::Blocksstatic
    FERNmcpp::Blocksstatic
    FIREmcpp::Blocksstatic
    FLOWER_POTmcpp::Blocksstatic
    FLOWING_LAVAmcpp::Blocksstatic
    FLOWING_WATERmcpp::Blocksstatic
    FREESTANDING_BANNERmcpp::Blocksstatic
    FROSTED_ICEmcpp::Blocksstatic
    FURNACEmcpp::Blocksstatic
    GLASSmcpp::Blocksstatic
    GLASS_PANEmcpp::Blocksstatic
    GLOWING_REDSTONE_OREmcpp::Blocksstatic
    GLOWSTONEmcpp::Blocksstatic
    GOLD_BLOCKmcpp::Blocksstatic
    GOLD_OREmcpp::Blocksstatic
    GRANITEmcpp::Blocksstatic
    GRASSmcpp::Blocksstatic
    GRASS_PATHmcpp::Blocksstatic
    GRAVELmcpp::Blocksstatic
    GRAY_CARPETmcpp::Blocksstatic
    GRAY_CONCRETEmcpp::Blocksstatic
    GRAY_CONCRETE_POWDERmcpp::Blocksstatic
    GRAY_GLAZED_TERRACOTTAmcpp::Blocksstatic
    GRAY_HARDENED_CLAYmcpp::Blocksstatic
    GRAY_SHULKER_BOXmcpp::Blocksstatic
    GRAY_STAINED_GLASSmcpp::Blocksstatic
    GRAY_STAINED_GLASS_PANEmcpp::Blocksstatic
    GRAY_WOOLmcpp::Blocksstatic
    GREEN_CARPETmcpp::Blocksstatic
    GREEN_CONCRETEmcpp::Blocksstatic
    GREEN_CONCRETE_POWDERmcpp::Blocksstatic
    GREEN_GLAZED_TERRACOTTAmcpp::Blocksstatic
    GREEN_HARDENED_CLAYmcpp::Blocksstatic
    GREEN_SHULKER_BOXmcpp::Blocksstatic
    GREEN_STAINED_GLASSmcpp::Blocksstatic
    GREEN_STAINED_GLASS_PANEmcpp::Blocksstatic
    GREEN_WOOLmcpp::Blocksstatic
    HARDENED_CLAYmcpp::Blocksstatic
    HAY_BALEmcpp::Blocksstatic
    HOPPERmcpp::Blocksstatic
    ICEmcpp::Blocksstatic
    INVERTED_DAYLIGHT_SENSORmcpp::Blocksstatic
    IRON_BARSmcpp::Blocksstatic
    IRON_BLOCKmcpp::Blocksstatic
    IRON_DOOR_BLOCKmcpp::Blocksstatic
    IRON_OREmcpp::Blocksstatic
    IRON_TRAPDOORmcpp::Blocksstatic
    JACK_OLANTERNmcpp::Blocksstatic
    JUKEBOXmcpp::Blocksstatic
    JUNGLE_DOOR_BLOCKmcpp::Blocksstatic
    JUNGLE_FENCEmcpp::Blocksstatic
    JUNGLE_FENCE_GATEmcpp::Blocksstatic
    JUNGLE_LEAVESmcpp::Blocksstatic
    JUNGLE_SAPLINGmcpp::Blocksstatic
    JUNGLE_WOODmcpp::Blocksstatic
    JUNGLE_WOOD_PLANKmcpp::Blocksstatic
    JUNGLE_WOOD_SLABmcpp::Blocksstatic
    JUNGLE_WOOD_STAIRSmcpp::Blocksstatic
    LADDERmcpp::Blocksstatic
    LAPIS_LAZULI_BLOCKmcpp::Blocksstatic
    LAPIS_LAZULI_OREmcpp::Blocksstatic
    LARGE_FERNmcpp::Blocksstatic
    LEVERmcpp::Blocksstatic
    LIGHT_BLUE_CARPETmcpp::Blocksstatic
    LIGHT_BLUE_CONCRETEmcpp::Blocksstatic
    LIGHT_BLUE_CONCRETE_POWDERmcpp::Blocksstatic
    LIGHT_BLUE_GLAZED_TERRACOTTAmcpp::Blocksstatic
    LIGHT_BLUE_HARDENED_CLAYmcpp::Blocksstatic
    LIGHT_BLUE_SHULKER_BOXmcpp::Blocksstatic
    LIGHT_BLUE_STAINED_GLASSmcpp::Blocksstatic
    LIGHT_BLUE_STAINED_GLASS_PANEmcpp::Blocksstatic
    LIGHT_BLUE_WOOLmcpp::Blocksstatic
    LIGHT_GRAY_CARPETmcpp::Blocksstatic
    LIGHT_GRAY_CONCRETEmcpp::Blocksstatic
    LIGHT_GRAY_CONCRETE_POWDERmcpp::Blocksstatic
    LIGHT_GRAY_GLAZED_TERRACOTTAmcpp::Blocksstatic
    LIGHT_GRAY_HARDENED_CLAYmcpp::Blocksstatic
    LIGHT_GRAY_SHULKER_BOXmcpp::Blocksstatic
    LIGHT_GRAY_STAINED_GLASSmcpp::Blocksstatic
    LIGHT_GRAY_STAINED_GLASS_PANEmcpp::Blocksstatic
    LIGHT_GRAY_WOOLmcpp::Blocksstatic
    LILACmcpp::Blocksstatic
    LILY_PADmcpp::Blocksstatic
    LIME_CARPETmcpp::Blocksstatic
    LIME_CONCRETEmcpp::Blocksstatic
    LIME_CONCRETE_POWDERmcpp::Blocksstatic
    LIME_GLAZED_TERRACOTTAmcpp::Blocksstatic
    LIME_HARDENED_CLAYmcpp::Blocksstatic
    LIME_SHULKER_BOXmcpp::Blocksstatic
    LIME_STAINED_GLASSmcpp::Blocksstatic
    LIME_STAINED_GLASS_PANEmcpp::Blocksstatic
    LIME_WOOLmcpp::Blocksstatic
    MAGENTA_CARPETmcpp::Blocksstatic
    MAGENTA_CONCRETEmcpp::Blocksstatic
    MAGENTA_CONCRETE_POWDERmcpp::Blocksstatic
    MAGENTA_GLAZED_TERRACOTTAmcpp::Blocksstatic
    MAGENTA_HARDENED_CLAYmcpp::Blocksstatic
    MAGENTA_SHULKER_BOXmcpp::Blocksstatic
    MAGENTA_STAINED_GLASSmcpp::Blocksstatic
    MAGENTA_STAINED_GLASS_PANEmcpp::Blocksstatic
    MAGENTA_WOOLmcpp::Blocksstatic
    MAGMA_BLOCKmcpp::Blocksstatic
    MELON_BLOCKmcpp::Blocksstatic
    MELON_STEMmcpp::Blocksstatic
    MOB_HEADmcpp::Blocksstatic
    MONSTER_SPAWNERmcpp::Blocksstatic
    MOSS_STONEmcpp::Blocksstatic
    MOSSY_COBBLESTONE_WALLmcpp::Blocksstatic
    MOSSY_STONE_BRICK_MONSTER_EGGmcpp::Blocksstatic
    MOSSY_STONE_BRICKSmcpp::Blocksstatic
    MYCELIUMmcpp::Blocksstatic
    NETHER_BRICKmcpp::Blocksstatic
    NETHER_BRICK_FENCEmcpp::Blocksstatic
    NETHER_BRICK_SLABmcpp::Blocksstatic
    NETHER_BRICK_STAIRSmcpp::Blocksstatic
    NETHER_PORTALmcpp::Blocksstatic
    NETHER_QUARTZ_OREmcpp::Blocksstatic
    NETHER_WARTmcpp::Blocksstatic
    NETHER_WART_BLOCKmcpp::Blocksstatic
    NETHERRACKmcpp::Blocksstatic
    NOTE_BLOCKmcpp::Blocksstatic
    OAK_DOOR_BLOCKmcpp::Blocksstatic
    OAK_FENCEmcpp::Blocksstatic
    OAK_FENCE_GATEmcpp::Blocksstatic
    OAK_LEAVESmcpp::Blocksstatic
    OAK_SAPLINGmcpp::Blocksstatic
    OAK_WOODmcpp::Blocksstatic
    OAK_WOOD_PLANKmcpp::Blocksstatic
    OAK_WOOD_SLABmcpp::Blocksstatic
    OAK_WOOD_STAIRSmcpp::Blocksstatic
    OBSERVERmcpp::Blocksstatic
    OBSIDIANmcpp::Blocksstatic
    ORANGE_CARPETmcpp::Blocksstatic
    ORANGE_CONCRETEmcpp::Blocksstatic
    ORANGE_CONCRETE_POWDERmcpp::Blocksstatic
    ORANGE_GLAZED_TERRACOTTAmcpp::Blocksstatic
    ORANGE_HARDENED_CLAYmcpp::Blocksstatic
    ORANGE_SHULKER_BOXmcpp::Blocksstatic
    ORANGE_STAINED_GLASSmcpp::Blocksstatic
    ORANGE_STAINED_GLASS_PANEmcpp::Blocksstatic
    ORANGE_TULIPmcpp::Blocksstatic
    ORANGE_WOOLmcpp::Blocksstatic
    OXEYE_DAISYmcpp::Blocksstatic
    PACKED_ICEmcpp::Blocksstatic
    PEONYmcpp::Blocksstatic
    PILLAR_QUARTZ_BLOCKmcpp::Blocksstatic
    PINK_CARPETmcpp::Blocksstatic
    PINK_CONCRETEmcpp::Blocksstatic
    PINK_CONCRETE_POWDERmcpp::Blocksstatic
    PINK_GLAZED_TERRACOTTAmcpp::Blocksstatic
    PINK_HARDENED_CLAYmcpp::Blocksstatic
    PINK_SHULKER_BOXmcpp::Blocksstatic
    PINK_STAINED_GLASSmcpp::Blocksstatic
    PINK_STAINED_GLASS_PANEmcpp::Blocksstatic
    PINK_TULIPmcpp::Blocksstatic
    PINK_WOOLmcpp::Blocksstatic
    PISTONmcpp::Blocksstatic
    PISTON_HEADmcpp::Blocksstatic
    PODZOLmcpp::Blocksstatic
    POLISHED_ANDESITEmcpp::Blocksstatic
    POLISHED_DIORITEmcpp::Blocksstatic
    POLISHED_GRANITEmcpp::Blocksstatic
    POPPYmcpp::Blocksstatic
    POTATOESmcpp::Blocksstatic
    POWERED_RAILmcpp::Blocksstatic
    PRISMARINEmcpp::Blocksstatic
    PRISMARINE_BRICKSmcpp::Blocksstatic
    PUMPKINmcpp::Blocksstatic
    PUMPKIN_STEMmcpp::Blocksstatic
    PURPLE_CARPETmcpp::Blocksstatic
    PURPLE_CONCRETEmcpp::Blocksstatic
    PURPLE_CONCRETE_POWDERmcpp::Blocksstatic
    PURPLE_GLAZED_TERRACOTTAmcpp::Blocksstatic
    PURPLE_HARDENED_CLAYmcpp::Blocksstatic
    PURPLE_SHULKER_BOXmcpp::Blocksstatic
    PURPLE_STAINED_GLASSmcpp::Blocksstatic
    PURPLE_STAINED_GLASS_PANEmcpp::Blocksstatic
    PURPLE_WOOLmcpp::Blocksstatic
    PURPUR_BLOCKmcpp::Blocksstatic
    PURPUR_DOUBLE_SLABmcpp::Blocksstatic
    PURPUR_PILLARmcpp::Blocksstatic
    PURPUR_SLABmcpp::Blocksstatic
    PURPUR_STAIRSmcpp::Blocksstatic
    QUARTZ_BLOCKmcpp::Blocksstatic
    QUARTZ_SLABmcpp::Blocksstatic
    QUARTZ_STAIRSmcpp::Blocksstatic
    RAILmcpp::Blocksstatic
    RED_CARPETmcpp::Blocksstatic
    RED_CONCRETEmcpp::Blocksstatic
    RED_CONCRETE_POWDERmcpp::Blocksstatic
    RED_GLAZED_TERRACOTTAmcpp::Blocksstatic
    RED_HARDENED_CLAYmcpp::Blocksstatic
    RED_MUSHROOMmcpp::Blocksstatic
    RED_MUSHROOM_BLOCKmcpp::Blocksstatic
    RED_NETHER_BRICKmcpp::Blocksstatic
    RED_SANDmcpp::Blocksstatic
    RED_SANDSTONEmcpp::Blocksstatic
    RED_SANDSTONE_SLABmcpp::Blocksstatic
    RED_SANDSTONE_STAIRSmcpp::Blocksstatic
    RED_SHULKER_BOXmcpp::Blocksstatic
    RED_STAINED_GLASSmcpp::Blocksstatic
    RED_STAINED_GLASS_PANEmcpp::Blocksstatic
    RED_TULIPmcpp::Blocksstatic
    RED_WOOLmcpp::Blocksstatic
    REDSTONE_BLOCKmcpp::Blocksstatic
    REDSTONE_COMPARATOR_ACTIVEmcpp::Blocksstatic
    REDSTONE_COMPARATOR_INACTIVEmcpp::Blocksstatic
    REDSTONE_LAMP_ACTIVEmcpp::Blocksstatic
    REDSTONE_LAMP_INACTIVEmcpp::Blocksstatic
    REDSTONE_OREmcpp::Blocksstatic
    REDSTONE_REPEATER_BLOCK_OFFmcpp::Blocksstatic
    REDSTONE_REPEATER_BLOCK_ONmcpp::Blocksstatic
    REDSTONE_TORCH_OFFmcpp::Blocksstatic
    REDSTONE_TORCH_ONmcpp::Blocksstatic
    REDSTONE_WIREmcpp::Blocksstatic
    REPEATING_COMMAND_BLOCKmcpp::Blocksstatic
    ROSE_BUSHmcpp::Blocksstatic
    SANDmcpp::Blocksstatic
    SANDSTONEmcpp::Blocksstatic
    SANDSTONE_SLABmcpp::Blocksstatic
    SANDSTONE_STAIRSmcpp::Blocksstatic
    SEA_LANTERNmcpp::Blocksstatic
    SLIME_BLOCKmcpp::Blocksstatic
    SMOOTH_RED_SANDSTONEmcpp::Blocksstatic
    SMOOTH_SANDSTONEmcpp::Blocksstatic
    SNOWmcpp::Blocksstatic
    SNOW_BLOCKmcpp::Blocksstatic
    SOUL_SANDmcpp::Blocksstatic
    SPONGEmcpp::Blocksstatic
    SPRUCE_DOOR_BLOCKmcpp::Blocksstatic
    SPRUCE_FENCEmcpp::Blocksstatic
    SPRUCE_FENCE_GATEmcpp::Blocksstatic
    SPRUCE_LEAVESmcpp::Blocksstatic
    SPRUCE_SAPLINGmcpp::Blocksstatic
    SPRUCE_WOODmcpp::Blocksstatic
    SPRUCE_WOOD_PLANKmcpp::Blocksstatic
    SPRUCE_WOOD_SLABmcpp::Blocksstatic
    SPRUCE_WOOD_STAIRSmcpp::Blocksstatic
    STANDING_SIGN_BLOCKmcpp::Blocksstatic
    STICKY_PISTONmcpp::Blocksstatic
    STILL_LAVAmcpp::Blocksstatic
    STILL_WATERmcpp::Blocksstatic
    STONEmcpp::Blocksstatic
    STONE_BRICK_MONSTER_EGGmcpp::Blocksstatic
    STONE_BRICK_SLABmcpp::Blocksstatic
    STONE_BRICK_STAIRSmcpp::Blocksstatic
    STONE_BRICKSmcpp::Blocksstatic
    STONE_BUTTONmcpp::Blocksstatic
    STONE_MONSTER_EGGmcpp::Blocksstatic
    STONE_PRESSURE_PLATEmcpp::Blocksstatic
    STONE_SLABmcpp::Blocksstatic
    STRUCTURE_BLOCKmcpp::Blocksstatic
    STRUCTURE_VOIDmcpp::Blocksstatic
    SUGAR_CANESmcpp::Blocksstatic
    SUNFLOWERmcpp::Blocksstatic
    TALL_GRASSmcpp::Blocksstatic
    TNTmcpp::Blocksstatic
    TORCHmcpp::Blocksstatic
    TRAPPED_CHESTmcpp::Blocksstatic
    TRIPWIREmcpp::Blocksstatic
    TRIPWIRE_HOOKmcpp::Blocksstatic
    VINESmcpp::Blocksstatic
    WALLMOUNTED_BANNERmcpp::Blocksstatic
    WALLMOUNTED_SIGN_BLOCKmcpp::Blocksstatic
    WEIGHTED_PRESSURE_PLATE_HEAVYmcpp::Blocksstatic
    WEIGHTED_PRESSURE_PLATE_LIGHTmcpp::Blocksstatic
    WET_SPONGEmcpp::Blocksstatic
    WHEAT_CROPSmcpp::Blocksstatic
    WHITE_CARPETmcpp::Blocksstatic
    WHITE_CONCRETEmcpp::Blocksstatic
    WHITE_CONCRETE_POWDERmcpp::Blocksstatic
    WHITE_GLAZED_TERRACOTTAmcpp::Blocksstatic
    WHITE_HARDENED_CLAYmcpp::Blocksstatic
    WHITE_SHULKER_BOXmcpp::Blocksstatic
    WHITE_STAINED_GLASSmcpp::Blocksstatic
    WHITE_STAINED_GLASS_PANEmcpp::Blocksstatic
    WHITE_TULIPmcpp::Blocksstatic
    WHITE_WOOLmcpp::Blocksstatic
    WOODEN_BUTTONmcpp::Blocksstatic
    WOODEN_PRESSURE_PLATEmcpp::Blocksstatic
    WOODEN_SLABmcpp::Blocksstatic
    WOODEN_TRAPDOORmcpp::Blocksstatic
    YELLOW_CARPETmcpp::Blocksstatic
    YELLOW_CONCRETEmcpp::Blocksstatic
    YELLOW_CONCRETE_POWDERmcpp::Blocksstatic
    YELLOW_GLAZED_TERRACOTTAmcpp::Blocksstatic
    YELLOW_HARDENED_CLAYmcpp::Blocksstatic
    YELLOW_SHULKER_BOXmcpp::Blocksstatic
    YELLOW_STAINED_GLASSmcpp::Blocksstatic
    YELLOW_STAINED_GLASS_PANEmcpp::Blocksstatic
    YELLOW_WOOLmcpp::Blocksstatic
    +
    + + + + diff --git a/structmcpp_1_1_blocks.html b/structmcpp_1_1_blocks.html new file mode 100644 index 00000000..a53c7f4c --- /dev/null +++ b/structmcpp_1_1_blocks.html @@ -0,0 +1,10763 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Blocks Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Blocks Struct Reference
    +
    +
    + +

    #include <block.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Static Public Attributes

    static constexpr BlockType AIR = BlockType(0)
     
    static constexpr BlockType STONE = BlockType(1)
     
    static constexpr BlockType GRANITE = BlockType(1, 1)
     
    static constexpr BlockType POLISHED_GRANITE = BlockType(1, 2)
     
    static constexpr BlockType DIORITE = BlockType(1, 3)
     
    static constexpr BlockType POLISHED_DIORITE = BlockType(1, 4)
     
    static constexpr BlockType ANDESITE = BlockType(1, 5)
     
    static constexpr BlockType POLISHED_ANDESITE = BlockType(1, 6)
     
    static constexpr BlockType GRASS = BlockType(2)
     
    static constexpr BlockType DIRT = BlockType(3)
     
    static constexpr BlockType COARSE_DIRT = BlockType(3, 1)
     
    static constexpr BlockType PODZOL = BlockType(3, 2)
     
    static constexpr BlockType COBBLESTONE = BlockType(4)
     
    static constexpr BlockType OAK_WOOD_PLANK = BlockType(5)
     
    static constexpr BlockType SPRUCE_WOOD_PLANK = BlockType(5, 1)
     
    static constexpr BlockType BIRCH_WOOD_PLANK = BlockType(5, 2)
     
    static constexpr BlockType JUNGLE_WOOD_PLANK = BlockType(5, 3)
     
    static constexpr BlockType ACACIA_WOOD_PLANK = BlockType(5, 4)
     
    static constexpr BlockType DARK_OAK_WOOD_PLANK = BlockType(5, 5)
     
    static constexpr BlockType OAK_SAPLING = BlockType(6)
     
    static constexpr BlockType SPRUCE_SAPLING = BlockType(6, 1)
     
    static constexpr BlockType BIRCH_SAPLING = BlockType(6, 2)
     
    static constexpr BlockType JUNGLE_SAPLING = BlockType(6, 3)
     
    static constexpr BlockType ACACIA_SAPLING = BlockType(6, 4)
     
    static constexpr BlockType DARK_OAK_SAPLING = BlockType(6, 5)
     
    static constexpr BlockType BEDROCK = BlockType(7)
     
    static constexpr BlockType FLOWING_WATER = BlockType(8)
     
    static constexpr BlockType STILL_WATER = BlockType(9)
     
    static constexpr BlockType FLOWING_LAVA = BlockType(10)
     
    static constexpr BlockType STILL_LAVA = BlockType(11)
     
    static constexpr BlockType SAND = BlockType(12)
     
    static constexpr BlockType RED_SAND = BlockType(12, 1)
     
    static constexpr BlockType GRAVEL = BlockType(13)
     
    static constexpr BlockType GOLD_ORE = BlockType(14)
     
    static constexpr BlockType IRON_ORE = BlockType(15)
     
    static constexpr BlockType COAL_ORE = BlockType(16)
     
    static constexpr BlockType OAK_WOOD = BlockType(17)
     
    static constexpr BlockType SPRUCE_WOOD = BlockType(17, 1)
     
    static constexpr BlockType BIRCH_WOOD = BlockType(17, 2)
     
    static constexpr BlockType JUNGLE_WOOD = BlockType(17, 3)
     
    static constexpr BlockType OAK_LEAVES = BlockType(18)
     
    static constexpr BlockType SPRUCE_LEAVES = BlockType(18, 1)
     
    static constexpr BlockType BIRCH_LEAVES = BlockType(18, 2)
     
    static constexpr BlockType JUNGLE_LEAVES = BlockType(18, 3)
     
    static constexpr BlockType SPONGE = BlockType(19)
     
    static constexpr BlockType WET_SPONGE = BlockType(19, 1)
     
    static constexpr BlockType GLASS = BlockType(20)
     
    static constexpr BlockType LAPIS_LAZULI_ORE = BlockType(21)
     
    static constexpr BlockType LAPIS_LAZULI_BLOCK = BlockType(22)
     
    static constexpr BlockType DISPENSER = BlockType(23)
     
    static constexpr BlockType SANDSTONE = BlockType(24)
     
    static constexpr BlockType CHISELED_SANDSTONE = BlockType(24, 1)
     
    static constexpr BlockType SMOOTH_SANDSTONE = BlockType(24, 2)
     
    static constexpr BlockType NOTE_BLOCK = BlockType(25)
     
    static constexpr BlockType BED = BlockType(26)
     
    static constexpr BlockType POWERED_RAIL = BlockType(27)
     
    static constexpr BlockType DETECTOR_RAIL = BlockType(28)
     
    static constexpr BlockType STICKY_PISTON = BlockType(29)
     
    static constexpr BlockType COBWEB = BlockType(30)
     
    static constexpr BlockType DEAD_SHRUB = BlockType(31)
     
    static constexpr BlockType TALL_GRASS = BlockType(31, 1)
     
    static constexpr BlockType FERN = BlockType(31, 2)
     
    static constexpr BlockType DEAD_BUSH = BlockType(32)
     
    static constexpr BlockType PISTON = BlockType(33)
     
    static constexpr BlockType PISTON_HEAD = BlockType(34)
     
    static constexpr BlockType WHITE_WOOL = BlockType(35)
     
    static constexpr BlockType ORANGE_WOOL = BlockType(35, 1)
     
    static constexpr BlockType MAGENTA_WOOL = BlockType(35, 2)
     
    static constexpr BlockType LIGHT_BLUE_WOOL = BlockType(35, 3)
     
    static constexpr BlockType YELLOW_WOOL = BlockType(35, 4)
     
    static constexpr BlockType LIME_WOOL = BlockType(35, 5)
     
    static constexpr BlockType PINK_WOOL = BlockType(35, 6)
     
    static constexpr BlockType GRAY_WOOL = BlockType(35, 7)
     
    static constexpr BlockType LIGHT_GRAY_WOOL = BlockType(35, 8)
     
    static constexpr BlockType CYAN_WOOL = BlockType(35, 9)
     
    static constexpr BlockType PURPLE_WOOL = BlockType(35, 10)
     
    static constexpr BlockType BLUE_WOOL = BlockType(35, 11)
     
    static constexpr BlockType BROWN_WOOL = BlockType(35, 12)
     
    static constexpr BlockType GREEN_WOOL = BlockType(35, 13)
     
    static constexpr BlockType RED_WOOL = BlockType(35, 14)
     
    static constexpr BlockType BLACK_WOOL = BlockType(35, 15)
     
    static constexpr BlockType DANDELION = BlockType(37)
     
    static constexpr BlockType POPPY = BlockType(38)
     
    static constexpr BlockType BLUE_ORCHID = BlockType(38, 1)
     
    static constexpr BlockType ALLIUM = BlockType(38, 2)
     
    static constexpr BlockType AZURE_BLUET = BlockType(38, 3)
     
    static constexpr BlockType RED_TULIP = BlockType(38, 4)
     
    static constexpr BlockType ORANGE_TULIP = BlockType(38, 5)
     
    static constexpr BlockType WHITE_TULIP = BlockType(38, 6)
     
    static constexpr BlockType PINK_TULIP = BlockType(38, 7)
     
    static constexpr BlockType OXEYE_DAISY = BlockType(38, 8)
     
    static constexpr BlockType BROWN_MUSHROOM = BlockType(39)
     
    static constexpr BlockType RED_MUSHROOM = BlockType(40)
     
    static constexpr BlockType GOLD_BLOCK = BlockType(41)
     
    static constexpr BlockType IRON_BLOCK = BlockType(42)
     
    static constexpr BlockType DOUBLE_STONE_SLAB = BlockType(43)
     
    static constexpr BlockType DOUBLE_SANDSTONE_SLAB = BlockType(43, 1)
     
    static constexpr BlockType DOUBLE_WOODEN_SLAB = BlockType(43, 2)
     
    static constexpr BlockType DOUBLE_COBBLESTONE_SLAB = BlockType(43, 3)
     
    static constexpr BlockType DOUBLE_BRICK_SLAB = BlockType(43, 4)
     
    static constexpr BlockType DOUBLE_STONE_BRICK_SLAB = BlockType(43, 5)
     
    static constexpr BlockType DOUBLE_NETHER_BRICK_SLAB = BlockType(43, 6)
     
    static constexpr BlockType DOUBLE_QUARTZ_SLAB = BlockType(43, 7)
     
    static constexpr BlockType STONE_SLAB = BlockType(44)
     
    static constexpr BlockType SANDSTONE_SLAB = BlockType(44, 1)
     
    static constexpr BlockType WOODEN_SLAB = BlockType(44, 2)
     
    static constexpr BlockType COBBLESTONE_SLAB = BlockType(44, 3)
     
    static constexpr BlockType BRICK_SLAB = BlockType(44, 4)
     
    static constexpr BlockType STONE_BRICK_SLAB = BlockType(44, 5)
     
    static constexpr BlockType NETHER_BRICK_SLAB = BlockType(44, 6)
     
    static constexpr BlockType QUARTZ_SLAB = BlockType(44, 7)
     
    static constexpr BlockType BRICKS = BlockType(45)
     
    static constexpr BlockType TNT = BlockType(46)
     
    static constexpr BlockType BOOKSHELF = BlockType(47)
     
    static constexpr BlockType MOSS_STONE = BlockType(48)
     
    static constexpr BlockType OBSIDIAN = BlockType(49)
     
    static constexpr BlockType TORCH = BlockType(50)
     
    static constexpr BlockType FIRE = BlockType(51)
     
    static constexpr BlockType MONSTER_SPAWNER = BlockType(52)
     
    static constexpr BlockType OAK_WOOD_STAIRS = BlockType(53)
     
    static constexpr BlockType CHEST = BlockType(54)
     
    static constexpr BlockType REDSTONE_WIRE = BlockType(55)
     
    static constexpr BlockType DIAMOND_ORE = BlockType(56)
     
    static constexpr BlockType DIAMOND_BLOCK = BlockType(57)
     
    static constexpr BlockType CRAFTING_TABLE = BlockType(58)
     
    static constexpr BlockType WHEAT_CROPS = BlockType(59)
     
    static constexpr BlockType FARMLAND = BlockType(60)
     
    static constexpr BlockType FURNACE = BlockType(61)
     
    static constexpr BlockType BURNING_FURNACE = BlockType(62)
     
    static constexpr BlockType STANDING_SIGN_BLOCK = BlockType(63)
     
    static constexpr BlockType OAK_DOOR_BLOCK = BlockType(64)
     
    static constexpr BlockType LADDER = BlockType(65)
     
    static constexpr BlockType RAIL = BlockType(66)
     
    static constexpr BlockType COBBLESTONE_STAIRS = BlockType(67)
     
    static constexpr BlockType WALLMOUNTED_SIGN_BLOCK = BlockType(68)
     
    static constexpr BlockType LEVER = BlockType(69)
     
    static constexpr BlockType STONE_PRESSURE_PLATE = BlockType(70)
     
    static constexpr BlockType IRON_DOOR_BLOCK = BlockType(71)
     
    static constexpr BlockType WOODEN_PRESSURE_PLATE = BlockType(72)
     
    static constexpr BlockType REDSTONE_ORE = BlockType(73)
     
    static constexpr BlockType GLOWING_REDSTONE_ORE = BlockType(74)
     
    static constexpr BlockType REDSTONE_TORCH_OFF = BlockType(75)
     
    static constexpr BlockType REDSTONE_TORCH_ON = BlockType(76)
     
    static constexpr BlockType STONE_BUTTON = BlockType(77)
     
    static constexpr BlockType SNOW = BlockType(78)
     
    static constexpr BlockType ICE = BlockType(79)
     
    static constexpr BlockType SNOW_BLOCK = BlockType(80)
     
    static constexpr BlockType CACTUS = BlockType(81)
     
    static constexpr BlockType CLAY = BlockType(82)
     
    static constexpr BlockType SUGAR_CANES = BlockType(83)
     
    static constexpr BlockType JUKEBOX = BlockType(84)
     
    static constexpr BlockType OAK_FENCE = BlockType(85)
     
    static constexpr BlockType PUMPKIN = BlockType(86)
     
    static constexpr BlockType NETHERRACK = BlockType(87)
     
    static constexpr BlockType SOUL_SAND = BlockType(88)
     
    static constexpr BlockType GLOWSTONE = BlockType(89)
     
    static constexpr BlockType NETHER_PORTAL = BlockType(90)
     
    static constexpr BlockType JACK_OLANTERN = BlockType(91)
     
    static constexpr BlockType CAKE_BLOCK = BlockType(92)
     
    static constexpr BlockType REDSTONE_REPEATER_BLOCK_OFF = BlockType(93)
     
    static constexpr BlockType REDSTONE_REPEATER_BLOCK_ON = BlockType(94)
     
    static constexpr BlockType WHITE_STAINED_GLASS = BlockType(95)
     
    static constexpr BlockType ORANGE_STAINED_GLASS = BlockType(95, 1)
     
    static constexpr BlockType MAGENTA_STAINED_GLASS = BlockType(95, 2)
     
    static constexpr BlockType LIGHT_BLUE_STAINED_GLASS = BlockType(95, 3)
     
    static constexpr BlockType YELLOW_STAINED_GLASS = BlockType(95, 4)
     
    static constexpr BlockType LIME_STAINED_GLASS = BlockType(95, 5)
     
    static constexpr BlockType PINK_STAINED_GLASS = BlockType(95, 6)
     
    static constexpr BlockType GRAY_STAINED_GLASS = BlockType(95, 7)
     
    static constexpr BlockType LIGHT_GRAY_STAINED_GLASS = BlockType(95, 8)
     
    static constexpr BlockType CYAN_STAINED_GLASS = BlockType(95, 9)
     
    static constexpr BlockType PURPLE_STAINED_GLASS = BlockType(95, 10)
     
    static constexpr BlockType BLUE_STAINED_GLASS = BlockType(95, 11)
     
    static constexpr BlockType BROWN_STAINED_GLASS = BlockType(95, 12)
     
    static constexpr BlockType GREEN_STAINED_GLASS = BlockType(95, 13)
     
    static constexpr BlockType RED_STAINED_GLASS = BlockType(95, 14)
     
    static constexpr BlockType BLACK_STAINED_GLASS = BlockType(95, 15)
     
    static constexpr BlockType WOODEN_TRAPDOOR = BlockType(96)
     
    static constexpr BlockType STONE_MONSTER_EGG = BlockType(97)
     
    static constexpr BlockType COBBLESTONE_MONSTER_EGG = BlockType(97, 1)
     
    static constexpr BlockType STONE_BRICK_MONSTER_EGG = BlockType(97, 2)
     
    static constexpr BlockType MOSSY_STONE_BRICK_MONSTER_EGG = BlockType(97, 3)
     
    static constexpr BlockType CRACKED_STONE_BRICK_MONSTER_EGG = BlockType(97, 4)
     
    static constexpr BlockType CHISELED_STONE_BRICK_MONSTER_EGG = BlockType(97, 5)
     
    static constexpr BlockType STONE_BRICKS = BlockType(98)
     
    static constexpr BlockType MOSSY_STONE_BRICKS = BlockType(98, 1)
     
    static constexpr BlockType CRACKED_STONE_BRICKS = BlockType(98, 2)
     
    static constexpr BlockType CHISELED_STONE_BRICKS = BlockType(98, 3)
     
    static constexpr BlockType BROWN_MUSHROOM_BLOCK = BlockType(99)
     
    static constexpr BlockType RED_MUSHROOM_BLOCK = BlockType(100)
     
    static constexpr BlockType IRON_BARS = BlockType(101)
     
    static constexpr BlockType GLASS_PANE = BlockType(102)
     
    static constexpr BlockType MELON_BLOCK = BlockType(103)
     
    static constexpr BlockType PUMPKIN_STEM = BlockType(104)
     
    static constexpr BlockType MELON_STEM = BlockType(105)
     
    static constexpr BlockType VINES = BlockType(106)
     
    static constexpr BlockType OAK_FENCE_GATE = BlockType(107)
     
    static constexpr BlockType BRICK_STAIRS = BlockType(108)
     
    static constexpr BlockType STONE_BRICK_STAIRS = BlockType(109)
     
    static constexpr BlockType MYCELIUM = BlockType(110)
     
    static constexpr BlockType LILY_PAD = BlockType(111)
     
    static constexpr BlockType NETHER_BRICK = BlockType(112)
     
    static constexpr BlockType NETHER_BRICK_FENCE = BlockType(113)
     
    static constexpr BlockType NETHER_BRICK_STAIRS = BlockType(114)
     
    static constexpr BlockType NETHER_WART = BlockType(115)
     
    static constexpr BlockType ENCHANTMENT_TABLE = BlockType(116)
     
    static constexpr BlockType BREWING_STAND = BlockType(117)
     
    static constexpr BlockType CAULDRON = BlockType(118)
     
    static constexpr BlockType END_PORTAL = BlockType(119)
     
    static constexpr BlockType END_PORTAL_FRAME = BlockType(120)
     
    static constexpr BlockType END_STONE = BlockType(121)
     
    static constexpr BlockType DRAGON_EGG = BlockType(122)
     
    static constexpr BlockType REDSTONE_LAMP_INACTIVE = BlockType(123)
     
    static constexpr BlockType REDSTONE_LAMP_ACTIVE = BlockType(124)
     
    static constexpr BlockType DOUBLE_OAK_WOOD_SLAB = BlockType(125)
     
    static constexpr BlockType DOUBLE_SPRUCE_WOOD_SLAB = BlockType(125, 1)
     
    static constexpr BlockType DOUBLE_BIRCH_WOOD_SLAB = BlockType(125, 2)
     
    static constexpr BlockType DOUBLE_JUNGLE_WOOD_SLAB = BlockType(125, 3)
     
    static constexpr BlockType DOUBLE_ACACIA_WOOD_SLAB = BlockType(125, 4)
     
    static constexpr BlockType DOUBLE_DARK_OAK_WOOD_SLAB = BlockType(125, 5)
     
    static constexpr BlockType OAK_WOOD_SLAB = BlockType(126)
     
    static constexpr BlockType SPRUCE_WOOD_SLAB = BlockType(126, 1)
     
    static constexpr BlockType BIRCH_WOOD_SLAB = BlockType(126, 2)
     
    static constexpr BlockType JUNGLE_WOOD_SLAB = BlockType(126, 3)
     
    static constexpr BlockType ACACIA_WOOD_SLAB = BlockType(126, 4)
     
    static constexpr BlockType DARK_OAK_WOOD_SLAB = BlockType(126, 5)
     
    static constexpr BlockType COCOA = BlockType(127)
     
    static constexpr BlockType SANDSTONE_STAIRS = BlockType(128)
     
    static constexpr BlockType EMERALD_ORE = BlockType(129)
     
    static constexpr BlockType ENDER_CHEST = BlockType(130)
     
    static constexpr BlockType TRIPWIRE_HOOK = BlockType(131)
     
    static constexpr BlockType TRIPWIRE = BlockType(132)
     
    static constexpr BlockType EMERALD_BLOCK = BlockType(133)
     
    static constexpr BlockType SPRUCE_WOOD_STAIRS = BlockType(134)
     
    static constexpr BlockType BIRCH_WOOD_STAIRS = BlockType(135)
     
    static constexpr BlockType JUNGLE_WOOD_STAIRS = BlockType(136)
     
    static constexpr BlockType COMMAND_BLOCK = BlockType(137)
     
    static constexpr BlockType BEACON = BlockType(138)
     
    static constexpr BlockType COBBLESTONE_WALL = BlockType(139)
     
    static constexpr BlockType MOSSY_COBBLESTONE_WALL = BlockType(139, 1)
     
    static constexpr BlockType FLOWER_POT = BlockType(140)
     
    static constexpr BlockType CARROTS = BlockType(141)
     
    static constexpr BlockType POTATOES = BlockType(142)
     
    static constexpr BlockType WOODEN_BUTTON = BlockType(143)
     
    static constexpr BlockType MOB_HEAD = BlockType(144)
     
    static constexpr BlockType ANVIL = BlockType(145)
     
    static constexpr BlockType TRAPPED_CHEST = BlockType(146)
     
    static constexpr BlockType WEIGHTED_PRESSURE_PLATE_LIGHT = BlockType(147)
     
    static constexpr BlockType WEIGHTED_PRESSURE_PLATE_HEAVY = BlockType(148)
     
    static constexpr BlockType REDSTONE_COMPARATOR_INACTIVE = BlockType(149)
     
    static constexpr BlockType REDSTONE_COMPARATOR_ACTIVE = BlockType(150)
     
    static constexpr BlockType DAYLIGHT_SENSOR = BlockType(151)
     
    static constexpr BlockType REDSTONE_BLOCK = BlockType(152)
     
    static constexpr BlockType NETHER_QUARTZ_ORE = BlockType(153)
     
    static constexpr BlockType HOPPER = BlockType(154)
     
    static constexpr BlockType QUARTZ_BLOCK = BlockType(155)
     
    static constexpr BlockType CHISELED_QUARTZ_BLOCK = BlockType(155, 1)
     
    static constexpr BlockType PILLAR_QUARTZ_BLOCK = BlockType(155, 2)
     
    static constexpr BlockType QUARTZ_STAIRS = BlockType(156)
     
    static constexpr BlockType ACTIVATOR_RAIL = BlockType(157)
     
    static constexpr BlockType DROPPER = BlockType(158)
     
    static constexpr BlockType WHITE_HARDENED_CLAY = BlockType(159)
     
    static constexpr BlockType ORANGE_HARDENED_CLAY = BlockType(159, 1)
     
    static constexpr BlockType MAGENTA_HARDENED_CLAY = BlockType(159, 2)
     
    static constexpr BlockType LIGHT_BLUE_HARDENED_CLAY = BlockType(159, 3)
     
    static constexpr BlockType YELLOW_HARDENED_CLAY = BlockType(159, 4)
     
    static constexpr BlockType LIME_HARDENED_CLAY = BlockType(159, 5)
     
    static constexpr BlockType PINK_HARDENED_CLAY = BlockType(159, 6)
     
    static constexpr BlockType GRAY_HARDENED_CLAY = BlockType(159, 7)
     
    static constexpr BlockType LIGHT_GRAY_HARDENED_CLAY = BlockType(159, 8)
     
    static constexpr BlockType CYAN_HARDENED_CLAY = BlockType(159, 9)
     
    static constexpr BlockType PURPLE_HARDENED_CLAY = BlockType(159, 10)
     
    static constexpr BlockType BLUE_HARDENED_CLAY = BlockType(159, 11)
     
    static constexpr BlockType BROWN_HARDENED_CLAY = BlockType(159, 12)
     
    static constexpr BlockType GREEN_HARDENED_CLAY = BlockType(159, 13)
     
    static constexpr BlockType RED_HARDENED_CLAY = BlockType(159, 14)
     
    static constexpr BlockType BLACK_HARDENED_CLAY = BlockType(159, 15)
     
    static constexpr BlockType WHITE_STAINED_GLASS_PANE = BlockType(160)
     
    static constexpr BlockType ORANGE_STAINED_GLASS_PANE = BlockType(160, 1)
     
    static constexpr BlockType MAGENTA_STAINED_GLASS_PANE = BlockType(160, 2)
     
    static constexpr BlockType LIGHT_BLUE_STAINED_GLASS_PANE = BlockType(160, 3)
     
    static constexpr BlockType YELLOW_STAINED_GLASS_PANE = BlockType(160, 4)
     
    static constexpr BlockType LIME_STAINED_GLASS_PANE = BlockType(160, 5)
     
    static constexpr BlockType PINK_STAINED_GLASS_PANE = BlockType(160, 6)
     
    static constexpr BlockType GRAY_STAINED_GLASS_PANE = BlockType(160, 7)
     
    static constexpr BlockType LIGHT_GRAY_STAINED_GLASS_PANE = BlockType(160, 8)
     
    static constexpr BlockType CYAN_STAINED_GLASS_PANE = BlockType(160, 9)
     
    static constexpr BlockType PURPLE_STAINED_GLASS_PANE = BlockType(160, 10)
     
    static constexpr BlockType BLUE_STAINED_GLASS_PANE = BlockType(160, 11)
     
    static constexpr BlockType BROWN_STAINED_GLASS_PANE = BlockType(160, 12)
     
    static constexpr BlockType GREEN_STAINED_GLASS_PANE = BlockType(160, 13)
     
    static constexpr BlockType RED_STAINED_GLASS_PANE = BlockType(160, 14)
     
    static constexpr BlockType BLACK_STAINED_GLASS_PANE = BlockType(160, 15)
     
    static constexpr BlockType ACACIA_LEAVES = BlockType(161)
     
    static constexpr BlockType DARK_OAK_LEAVES = BlockType(161, 1)
     
    static constexpr BlockType ACACIA_WOOD = BlockType(162)
     
    static constexpr BlockType DARK_OAK_WOOD = BlockType(162, 1)
     
    static constexpr BlockType ACACIA_WOOD_STAIRS = BlockType(163)
     
    static constexpr BlockType DARK_OAK_WOOD_STAIRS = BlockType(164)
     
    static constexpr BlockType SLIME_BLOCK = BlockType(165)
     
    static constexpr BlockType BARRIER = BlockType(166)
     
    static constexpr BlockType IRON_TRAPDOOR = BlockType(167)
     
    static constexpr BlockType PRISMARINE = BlockType(168)
     
    static constexpr BlockType PRISMARINE_BRICKS = BlockType(168, 1)
     
    static constexpr BlockType DARK_PRISMARINE = BlockType(168, 2)
     
    static constexpr BlockType SEA_LANTERN = BlockType(169)
     
    static constexpr BlockType HAY_BALE = BlockType(170)
     
    static constexpr BlockType WHITE_CARPET = BlockType(171)
     
    static constexpr BlockType ORANGE_CARPET = BlockType(171, 1)
     
    static constexpr BlockType MAGENTA_CARPET = BlockType(171, 2)
     
    static constexpr BlockType LIGHT_BLUE_CARPET = BlockType(171, 3)
     
    static constexpr BlockType YELLOW_CARPET = BlockType(171, 4)
     
    static constexpr BlockType LIME_CARPET = BlockType(171, 5)
     
    static constexpr BlockType PINK_CARPET = BlockType(171, 6)
     
    static constexpr BlockType GRAY_CARPET = BlockType(171, 7)
     
    static constexpr BlockType LIGHT_GRAY_CARPET = BlockType(171, 8)
     
    static constexpr BlockType CYAN_CARPET = BlockType(171, 9)
     
    static constexpr BlockType PURPLE_CARPET = BlockType(171, 10)
     
    static constexpr BlockType BLUE_CARPET = BlockType(171, 11)
     
    static constexpr BlockType BROWN_CARPET = BlockType(171, 12)
     
    static constexpr BlockType GREEN_CARPET = BlockType(171, 13)
     
    static constexpr BlockType RED_CARPET = BlockType(171, 14)
     
    static constexpr BlockType BLACK_CARPET = BlockType(171, 15)
     
    static constexpr BlockType HARDENED_CLAY = BlockType(172)
     
    static constexpr BlockType BLOCK_OF_COAL = BlockType(173)
     
    static constexpr BlockType PACKED_ICE = BlockType(174)
     
    static constexpr BlockType SUNFLOWER = BlockType(175)
     
    static constexpr BlockType LILAC = BlockType(175, 1)
     
    static constexpr BlockType DOUBLE_TALLGRASS = BlockType(175, 2)
     
    static constexpr BlockType LARGE_FERN = BlockType(175, 3)
     
    static constexpr BlockType ROSE_BUSH = BlockType(175, 4)
     
    static constexpr BlockType PEONY = BlockType(175, 5)
     
    static constexpr BlockType FREESTANDING_BANNER = BlockType(176)
     
    static constexpr BlockType WALLMOUNTED_BANNER = BlockType(177)
     
    static constexpr BlockType INVERTED_DAYLIGHT_SENSOR = BlockType(178)
     
    static constexpr BlockType RED_SANDSTONE = BlockType(179)
     
    static constexpr BlockType CHISELED_RED_SANDSTONE = BlockType(179, 1)
     
    static constexpr BlockType SMOOTH_RED_SANDSTONE = BlockType(179, 2)
     
    static constexpr BlockType RED_SANDSTONE_STAIRS = BlockType(180)
     
    static constexpr BlockType DOUBLE_RED_SANDSTONE_SLAB = BlockType(181)
     
    static constexpr BlockType RED_SANDSTONE_SLAB = BlockType(182)
     
    static constexpr BlockType SPRUCE_FENCE_GATE = BlockType(183)
     
    static constexpr BlockType BIRCH_FENCE_GATE = BlockType(184)
     
    static constexpr BlockType JUNGLE_FENCE_GATE = BlockType(185)
     
    static constexpr BlockType DARK_OAK_FENCE_GATE = BlockType(186)
     
    static constexpr BlockType ACACIA_FENCE_GATE = BlockType(187)
     
    static constexpr BlockType SPRUCE_FENCE = BlockType(188)
     
    static constexpr BlockType BIRCH_FENCE = BlockType(189)
     
    static constexpr BlockType JUNGLE_FENCE = BlockType(190)
     
    static constexpr BlockType DARK_OAK_FENCE = BlockType(191)
     
    static constexpr BlockType ACACIA_FENCE = BlockType(192)
     
    static constexpr BlockType SPRUCE_DOOR_BLOCK = BlockType(193)
     
    static constexpr BlockType BIRCH_DOOR_BLOCK = BlockType(194)
     
    static constexpr BlockType JUNGLE_DOOR_BLOCK = BlockType(195)
     
    static constexpr BlockType ACACIA_DOOR_BLOCK = BlockType(196)
     
    static constexpr BlockType DARK_OAK_DOOR_BLOCK = BlockType(197)
     
    static constexpr BlockType END_ROD = BlockType(198)
     
    static constexpr BlockType CHORUS_PLANT = BlockType(199)
     
    static constexpr BlockType CHORUS_FLOWER = BlockType(200)
     
    static constexpr BlockType PURPUR_BLOCK = BlockType(201)
     
    static constexpr BlockType PURPUR_PILLAR = BlockType(202)
     
    static constexpr BlockType PURPUR_STAIRS = BlockType(203)
     
    static constexpr BlockType PURPUR_DOUBLE_SLAB = BlockType(204)
     
    static constexpr BlockType PURPUR_SLAB = BlockType(205)
     
    static constexpr BlockType END_STONE_BRICKS = BlockType(206)
     
    static constexpr BlockType BEETROOT_BLOCK = BlockType(207)
     
    static constexpr BlockType GRASS_PATH = BlockType(208)
     
    static constexpr BlockType END_GATEWAY = BlockType(209)
     
    static constexpr BlockType REPEATING_COMMAND_BLOCK = BlockType(210)
     
    static constexpr BlockType CHAIN_COMMAND_BLOCK = BlockType(211)
     
    static constexpr BlockType FROSTED_ICE = BlockType(212)
     
    static constexpr BlockType MAGMA_BLOCK = BlockType(213)
     
    static constexpr BlockType NETHER_WART_BLOCK = BlockType(214)
     
    static constexpr BlockType RED_NETHER_BRICK = BlockType(215)
     
    static constexpr BlockType BONE_BLOCK = BlockType(216)
     
    static constexpr BlockType STRUCTURE_VOID = BlockType(217)
     
    static constexpr BlockType OBSERVER = BlockType(218)
     
    static constexpr BlockType WHITE_SHULKER_BOX = BlockType(219)
     
    static constexpr BlockType ORANGE_SHULKER_BOX = BlockType(220)
     
    static constexpr BlockType MAGENTA_SHULKER_BOX = BlockType(221)
     
    static constexpr BlockType LIGHT_BLUE_SHULKER_BOX = BlockType(222)
     
    static constexpr BlockType YELLOW_SHULKER_BOX = BlockType(223)
     
    static constexpr BlockType LIME_SHULKER_BOX = BlockType(224)
     
    static constexpr BlockType PINK_SHULKER_BOX = BlockType(225)
     
    static constexpr BlockType GRAY_SHULKER_BOX = BlockType(226)
     
    static constexpr BlockType LIGHT_GRAY_SHULKER_BOX = BlockType(227)
     
    static constexpr BlockType CYAN_SHULKER_BOX = BlockType(228)
     
    static constexpr BlockType PURPLE_SHULKER_BOX = BlockType(229)
     
    static constexpr BlockType BLUE_SHULKER_BOX = BlockType(230)
     
    static constexpr BlockType BROWN_SHULKER_BOX = BlockType(231)
     
    static constexpr BlockType GREEN_SHULKER_BOX = BlockType(232)
     
    static constexpr BlockType RED_SHULKER_BOX = BlockType(233)
     
    static constexpr BlockType BLACK_SHULKER_BOX = BlockType(234)
     
    static constexpr BlockType WHITE_GLAZED_TERRACOTTA = BlockType(235)
     
    static constexpr BlockType ORANGE_GLAZED_TERRACOTTA = BlockType(236)
     
    static constexpr BlockType MAGENTA_GLAZED_TERRACOTTA = BlockType(237)
     
    static constexpr BlockType LIGHT_BLUE_GLAZED_TERRACOTTA = BlockType(238)
     
    static constexpr BlockType YELLOW_GLAZED_TERRACOTTA = BlockType(239)
     
    static constexpr BlockType LIME_GLAZED_TERRACOTTA = BlockType(240)
     
    static constexpr BlockType PINK_GLAZED_TERRACOTTA = BlockType(241)
     
    static constexpr BlockType GRAY_GLAZED_TERRACOTTA = BlockType(242)
     
    static constexpr BlockType LIGHT_GRAY_GLAZED_TERRACOTTA = BlockType(243)
     
    static constexpr BlockType CYAN_GLAZED_TERRACOTTA = BlockType(244)
     
    static constexpr BlockType PURPLE_GLAZED_TERRACOTTA = BlockType(245)
     
    static constexpr BlockType BLUE_GLAZED_TERRACOTTA = BlockType(246)
     
    static constexpr BlockType BROWN_GLAZED_TERRACOTTA = BlockType(247)
     
    static constexpr BlockType GREEN_GLAZED_TERRACOTTA = BlockType(248)
     
    static constexpr BlockType RED_GLAZED_TERRACOTTA = BlockType(249)
     
    static constexpr BlockType BLACK_GLAZED_TERRACOTTA = BlockType(250)
     
    static constexpr BlockType WHITE_CONCRETE = BlockType(251)
     
    static constexpr BlockType ORANGE_CONCRETE = BlockType(251, 1)
     
    static constexpr BlockType MAGENTA_CONCRETE = BlockType(251, 2)
     
    static constexpr BlockType LIGHT_BLUE_CONCRETE = BlockType(251, 3)
     
    static constexpr BlockType YELLOW_CONCRETE = BlockType(251, 4)
     
    static constexpr BlockType LIME_CONCRETE = BlockType(251, 5)
     
    static constexpr BlockType PINK_CONCRETE = BlockType(251, 6)
     
    static constexpr BlockType GRAY_CONCRETE = BlockType(251, 7)
     
    static constexpr BlockType LIGHT_GRAY_CONCRETE = BlockType(251, 8)
     
    static constexpr BlockType CYAN_CONCRETE = BlockType(251, 9)
     
    static constexpr BlockType PURPLE_CONCRETE = BlockType(251, 10)
     
    static constexpr BlockType BLUE_CONCRETE = BlockType(251, 11)
     
    static constexpr BlockType BROWN_CONCRETE = BlockType(251, 12)
     
    static constexpr BlockType GREEN_CONCRETE = BlockType(251, 13)
     
    static constexpr BlockType RED_CONCRETE = BlockType(251, 14)
     
    static constexpr BlockType BLACK_CONCRETE = BlockType(251, 15)
     
    static constexpr BlockType WHITE_CONCRETE_POWDER = BlockType(252)
     
    static constexpr BlockType ORANGE_CONCRETE_POWDER = BlockType(252, 1)
     
    static constexpr BlockType MAGENTA_CONCRETE_POWDER = BlockType(252, 2)
     
    static constexpr BlockType LIGHT_BLUE_CONCRETE_POWDER = BlockType(252, 3)
     
    static constexpr BlockType YELLOW_CONCRETE_POWDER = BlockType(252, 4)
     
    static constexpr BlockType LIME_CONCRETE_POWDER = BlockType(252, 5)
     
    static constexpr BlockType PINK_CONCRETE_POWDER = BlockType(252, 6)
     
    static constexpr BlockType GRAY_CONCRETE_POWDER = BlockType(252, 7)
     
    static constexpr BlockType LIGHT_GRAY_CONCRETE_POWDER = BlockType(252, 8)
     
    static constexpr BlockType CYAN_CONCRETE_POWDER = BlockType(252, 9)
     
    static constexpr BlockType PURPLE_CONCRETE_POWDER = BlockType(252, 10)
     
    static constexpr BlockType BLUE_CONCRETE_POWDER = BlockType(252, 11)
     
    static constexpr BlockType BROWN_CONCRETE_POWDER = BlockType(252, 12)
     
    static constexpr BlockType GREEN_CONCRETE_POWDER = BlockType(252, 13)
     
    static constexpr BlockType RED_CONCRETE_POWDER = BlockType(252, 14)
     
    static constexpr BlockType BLACK_CONCRETE_POWDER = BlockType(252, 15)
     
    static constexpr BlockType STRUCTURE_BLOCK = BlockType(255)
     
    +

    Detailed Description

    +

    Struct of static block objects that allows for a "search" of sorts, callable using Blocks::TYPE after importing <block.h>

    +

    Member Data Documentation

    + +

    ◆ ACACIA_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_DOOR_BLOCK = BlockType(196)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_FENCE = BlockType(192)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_FENCE_GATE = BlockType(187)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_LEAVES = BlockType(161)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_SAPLING = BlockType(6, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_WOOD = BlockType(162)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_WOOD_PLANK = BlockType(5, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_WOOD_SLAB = BlockType(126, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACACIA_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACACIA_WOOD_STAIRS = BlockType(163)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ACTIVATOR_RAIL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ACTIVATOR_RAIL = BlockType(157)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ AIR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::AIR = BlockType(0)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ALLIUM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ALLIUM = BlockType(38, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ANDESITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ANDESITE = BlockType(1, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ANVIL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ANVIL = BlockType(145)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ AZURE_BLUET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::AZURE_BLUET = BlockType(38, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BARRIER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BARRIER = BlockType(166)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BEACON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BEACON = BlockType(138)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BED

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BED = BlockType(26)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BEDROCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BEDROCK = BlockType(7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BEETROOT_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BEETROOT_BLOCK = BlockType(207)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_DOOR_BLOCK = BlockType(194)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_FENCE = BlockType(189)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_FENCE_GATE = BlockType(184)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_LEAVES = BlockType(18, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_SAPLING = BlockType(6, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_WOOD = BlockType(17, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_WOOD_PLANK = BlockType(5, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_WOOD_SLAB = BlockType(126, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BIRCH_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BIRCH_WOOD_STAIRS = BlockType(135)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_CARPET = BlockType(171, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_CONCRETE = BlockType(251, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_CONCRETE_POWDER = BlockType(252, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_GLAZED_TERRACOTTA = BlockType(250)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_HARDENED_CLAY = BlockType(159, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_SHULKER_BOX = BlockType(234)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_STAINED_GLASS = BlockType(95, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_STAINED_GLASS_PANE = BlockType(160, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLACK_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLACK_WOOL = BlockType(35, 15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLOCK_OF_COAL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLOCK_OF_COAL = BlockType(173)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_CARPET = BlockType(171, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_CONCRETE = BlockType(251, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_CONCRETE_POWDER = BlockType(252, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_GLAZED_TERRACOTTA = BlockType(246)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_HARDENED_CLAY = BlockType(159, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_ORCHID

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_ORCHID = BlockType(38, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_SHULKER_BOX = BlockType(230)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_STAINED_GLASS = BlockType(95, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_STAINED_GLASS_PANE = BlockType(160, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BLUE_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BLUE_WOOL = BlockType(35, 11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BONE_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BONE_BLOCK = BlockType(216)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BOOKSHELF

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BOOKSHELF = BlockType(47)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BREWING_STAND

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BREWING_STAND = BlockType(117)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BRICK_SLAB = BlockType(44, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BRICK_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BRICK_STAIRS = BlockType(108)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BRICKS = BlockType(45)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_CARPET = BlockType(171, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_CONCRETE = BlockType(251, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_CONCRETE_POWDER = BlockType(252, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_GLAZED_TERRACOTTA = BlockType(247)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_HARDENED_CLAY = BlockType(159, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_MUSHROOM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_MUSHROOM = BlockType(39)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_MUSHROOM_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_MUSHROOM_BLOCK = BlockType(99)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_SHULKER_BOX = BlockType(231)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_STAINED_GLASS = BlockType(95, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_STAINED_GLASS_PANE = BlockType(160, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BROWN_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BROWN_WOOL = BlockType(35, 12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ BURNING_FURNACE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::BURNING_FURNACE = BlockType(62)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CACTUS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CACTUS = BlockType(81)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CAKE_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CAKE_BLOCK = BlockType(92)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CARROTS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CARROTS = BlockType(141)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CAULDRON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CAULDRON = BlockType(118)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHAIN_COMMAND_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHAIN_COMMAND_BLOCK = BlockType(211)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHEST

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHEST = BlockType(54)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHISELED_QUARTZ_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHISELED_QUARTZ_BLOCK = BlockType(155, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHISELED_RED_SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHISELED_RED_SANDSTONE = BlockType(179, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHISELED_SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHISELED_SANDSTONE = BlockType(24, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHISELED_STONE_BRICK_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHISELED_STONE_BRICK_MONSTER_EGG = BlockType(97, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHISELED_STONE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHISELED_STONE_BRICKS = BlockType(98, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHORUS_FLOWER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHORUS_FLOWER = BlockType(200)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CHORUS_PLANT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CHORUS_PLANT = BlockType(199)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CLAY = BlockType(82)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COAL_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COAL_ORE = BlockType(16)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COARSE_DIRT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COARSE_DIRT = BlockType(3, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBBLESTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBBLESTONE = BlockType(4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBBLESTONE_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBBLESTONE_MONSTER_EGG = BlockType(97, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBBLESTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBBLESTONE_SLAB = BlockType(44, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBBLESTONE_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBBLESTONE_STAIRS = BlockType(67)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBBLESTONE_WALL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBBLESTONE_WALL = BlockType(139)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COBWEB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COBWEB = BlockType(30)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COCOA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COCOA = BlockType(127)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ COMMAND_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::COMMAND_BLOCK = BlockType(137)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CRACKED_STONE_BRICK_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CRACKED_STONE_BRICK_MONSTER_EGG = BlockType(97, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CRACKED_STONE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CRACKED_STONE_BRICKS = BlockType(98, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CRAFTING_TABLE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CRAFTING_TABLE = BlockType(58)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_CARPET = BlockType(171, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_CONCRETE = BlockType(251, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_CONCRETE_POWDER = BlockType(252, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_GLAZED_TERRACOTTA = BlockType(244)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_HARDENED_CLAY = BlockType(159, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_SHULKER_BOX = BlockType(228)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_STAINED_GLASS = BlockType(95, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_STAINED_GLASS_PANE = BlockType(160, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ CYAN_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::CYAN_WOOL = BlockType(35, 9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DANDELION

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DANDELION = BlockType(37)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_DOOR_BLOCK = BlockType(197)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_FENCE = BlockType(191)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_FENCE_GATE = BlockType(186)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_LEAVES = BlockType(161, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_SAPLING = BlockType(6, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_WOOD = BlockType(162, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_WOOD_PLANK = BlockType(5, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_WOOD_SLAB = BlockType(126, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_OAK_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_OAK_WOOD_STAIRS = BlockType(164)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DARK_PRISMARINE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DARK_PRISMARINE = BlockType(168, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DAYLIGHT_SENSOR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DAYLIGHT_SENSOR = BlockType(151)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DEAD_BUSH

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DEAD_BUSH = BlockType(32)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DEAD_SHRUB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DEAD_SHRUB = BlockType(31)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DETECTOR_RAIL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DETECTOR_RAIL = BlockType(28)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DIAMOND_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DIAMOND_BLOCK = BlockType(57)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DIAMOND_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DIAMOND_ORE = BlockType(56)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DIORITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DIORITE = BlockType(1, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DIRT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DIRT = BlockType(3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DISPENSER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DISPENSER = BlockType(23)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_ACACIA_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_ACACIA_WOOD_SLAB = BlockType(125, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_BIRCH_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_BIRCH_WOOD_SLAB = BlockType(125, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_BRICK_SLAB = BlockType(43, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_COBBLESTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_COBBLESTONE_SLAB = BlockType(43, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_DARK_OAK_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_DARK_OAK_WOOD_SLAB = BlockType(125, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_JUNGLE_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_JUNGLE_WOOD_SLAB = BlockType(125, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_NETHER_BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_NETHER_BRICK_SLAB = BlockType(43, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_OAK_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_OAK_WOOD_SLAB = BlockType(125)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_QUARTZ_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_QUARTZ_SLAB = BlockType(43, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_RED_SANDSTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_RED_SANDSTONE_SLAB = BlockType(181)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_SANDSTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_SANDSTONE_SLAB = BlockType(43, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_SPRUCE_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_SPRUCE_WOOD_SLAB = BlockType(125, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_STONE_BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_STONE_BRICK_SLAB = BlockType(43, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_STONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_STONE_SLAB = BlockType(43)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_TALLGRASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_TALLGRASS = BlockType(175, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DOUBLE_WOODEN_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DOUBLE_WOODEN_SLAB = BlockType(43, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DRAGON_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DRAGON_EGG = BlockType(122)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ DROPPER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::DROPPER = BlockType(158)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ EMERALD_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::EMERALD_BLOCK = BlockType(133)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ EMERALD_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::EMERALD_ORE = BlockType(129)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ENCHANTMENT_TABLE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ENCHANTMENT_TABLE = BlockType(116)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_GATEWAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_GATEWAY = BlockType(209)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_PORTAL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_PORTAL = BlockType(119)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_PORTAL_FRAME

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_PORTAL_FRAME = BlockType(120)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_ROD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_ROD = BlockType(198)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_STONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_STONE = BlockType(121)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ END_STONE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::END_STONE_BRICKS = BlockType(206)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ENDER_CHEST

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ENDER_CHEST = BlockType(130)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FARMLAND

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FARMLAND = BlockType(60)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FERN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FERN = BlockType(31, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FIRE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FIRE = BlockType(51)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FLOWER_POT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FLOWER_POT = BlockType(140)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FLOWING_LAVA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FLOWING_LAVA = BlockType(10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FLOWING_WATER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FLOWING_WATER = BlockType(8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FREESTANDING_BANNER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FREESTANDING_BANNER = BlockType(176)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FROSTED_ICE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FROSTED_ICE = BlockType(212)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ FURNACE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::FURNACE = BlockType(61)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GLASS = BlockType(20)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GLASS_PANE = BlockType(102)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GLOWING_REDSTONE_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GLOWING_REDSTONE_ORE = BlockType(74)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GLOWSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GLOWSTONE = BlockType(89)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GOLD_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GOLD_BLOCK = BlockType(41)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GOLD_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GOLD_ORE = BlockType(14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRANITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRANITE = BlockType(1, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRASS = BlockType(2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRASS_PATH

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRASS_PATH = BlockType(208)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAVEL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAVEL = BlockType(13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_CARPET = BlockType(171, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_CONCRETE = BlockType(251, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_CONCRETE_POWDER = BlockType(252, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_GLAZED_TERRACOTTA = BlockType(242)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_HARDENED_CLAY = BlockType(159, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_SHULKER_BOX = BlockType(226)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_STAINED_GLASS = BlockType(95, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_STAINED_GLASS_PANE = BlockType(160, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GRAY_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GRAY_WOOL = BlockType(35, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_CARPET = BlockType(171, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_CONCRETE = BlockType(251, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_CONCRETE_POWDER = BlockType(252, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_GLAZED_TERRACOTTA = BlockType(248)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_HARDENED_CLAY = BlockType(159, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_SHULKER_BOX = BlockType(232)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_STAINED_GLASS = BlockType(95, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_STAINED_GLASS_PANE = BlockType(160, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ GREEN_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::GREEN_WOOL = BlockType(35, 13)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::HARDENED_CLAY = BlockType(172)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ HAY_BALE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::HAY_BALE = BlockType(170)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ HOPPER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::HOPPER = BlockType(154)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ICE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ICE = BlockType(79)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ INVERTED_DAYLIGHT_SENSOR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::INVERTED_DAYLIGHT_SENSOR = BlockType(178)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ IRON_BARS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::IRON_BARS = BlockType(101)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ IRON_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::IRON_BLOCK = BlockType(42)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ IRON_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::IRON_DOOR_BLOCK = BlockType(71)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ IRON_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::IRON_ORE = BlockType(15)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ IRON_TRAPDOOR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::IRON_TRAPDOOR = BlockType(167)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JACK_OLANTERN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JACK_OLANTERN = BlockType(91)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUKEBOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUKEBOX = BlockType(84)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_DOOR_BLOCK = BlockType(195)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_FENCE = BlockType(190)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_FENCE_GATE = BlockType(185)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_LEAVES = BlockType(18, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_SAPLING = BlockType(6, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_WOOD = BlockType(17, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_WOOD_PLANK = BlockType(5, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_WOOD_SLAB = BlockType(126, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ JUNGLE_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::JUNGLE_WOOD_STAIRS = BlockType(136)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LADDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LADDER = BlockType(65)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LAPIS_LAZULI_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LAPIS_LAZULI_BLOCK = BlockType(22)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LAPIS_LAZULI_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LAPIS_LAZULI_ORE = BlockType(21)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LARGE_FERN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LARGE_FERN = BlockType(175, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LEVER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LEVER = BlockType(69)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_CARPET = BlockType(171, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_CONCRETE = BlockType(251, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_CONCRETE_POWDER = BlockType(252, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_GLAZED_TERRACOTTA = BlockType(238)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_HARDENED_CLAY = BlockType(159, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_SHULKER_BOX = BlockType(222)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_STAINED_GLASS = BlockType(95, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_STAINED_GLASS_PANE = BlockType(160, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_BLUE_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_BLUE_WOOL = BlockType(35, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_CARPET = BlockType(171, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_CONCRETE = BlockType(251, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_CONCRETE_POWDER = BlockType(252, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_GLAZED_TERRACOTTA = BlockType(243)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_HARDENED_CLAY = BlockType(159, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_SHULKER_BOX = BlockType(227)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_STAINED_GLASS = BlockType(95, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_STAINED_GLASS_PANE = BlockType(160, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIGHT_GRAY_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIGHT_GRAY_WOOL = BlockType(35, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LILAC

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LILAC = BlockType(175, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LILY_PAD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LILY_PAD = BlockType(111)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_CARPET = BlockType(171, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_CONCRETE = BlockType(251, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_CONCRETE_POWDER = BlockType(252, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_GLAZED_TERRACOTTA = BlockType(240)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_HARDENED_CLAY = BlockType(159, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_SHULKER_BOX = BlockType(224)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_STAINED_GLASS = BlockType(95, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_STAINED_GLASS_PANE = BlockType(160, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ LIME_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::LIME_WOOL = BlockType(35, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_CARPET = BlockType(171, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_CONCRETE = BlockType(251, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_CONCRETE_POWDER = BlockType(252, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_GLAZED_TERRACOTTA = BlockType(237)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_HARDENED_CLAY = BlockType(159, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_SHULKER_BOX = BlockType(221)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_STAINED_GLASS = BlockType(95, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_STAINED_GLASS_PANE = BlockType(160, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGENTA_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGENTA_WOOL = BlockType(35, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MAGMA_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MAGMA_BLOCK = BlockType(213)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MELON_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MELON_BLOCK = BlockType(103)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MELON_STEM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MELON_STEM = BlockType(105)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MOB_HEAD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MOB_HEAD = BlockType(144)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MONSTER_SPAWNER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MONSTER_SPAWNER = BlockType(52)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MOSS_STONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MOSS_STONE = BlockType(48)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MOSSY_COBBLESTONE_WALL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MOSSY_COBBLESTONE_WALL = BlockType(139, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MOSSY_STONE_BRICK_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MOSSY_STONE_BRICK_MONSTER_EGG = BlockType(97, 3)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MOSSY_STONE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MOSSY_STONE_BRICKS = BlockType(98, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ MYCELIUM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::MYCELIUM = BlockType(110)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_BRICK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_BRICK = BlockType(112)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_BRICK_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_BRICK_FENCE = BlockType(113)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_BRICK_SLAB = BlockType(44, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_BRICK_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_BRICK_STAIRS = BlockType(114)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_PORTAL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_PORTAL = BlockType(90)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_QUARTZ_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_QUARTZ_ORE = BlockType(153)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_WART

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_WART = BlockType(115)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHER_WART_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHER_WART_BLOCK = BlockType(214)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NETHERRACK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NETHERRACK = BlockType(87)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ NOTE_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::NOTE_BLOCK = BlockType(25)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_DOOR_BLOCK = BlockType(64)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_FENCE = BlockType(85)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_FENCE_GATE = BlockType(107)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_LEAVES = BlockType(18)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_SAPLING = BlockType(6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_WOOD = BlockType(17)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_WOOD_PLANK = BlockType(5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_WOOD_SLAB = BlockType(126)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OAK_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OAK_WOOD_STAIRS = BlockType(53)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OBSERVER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OBSERVER = BlockType(218)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OBSIDIAN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OBSIDIAN = BlockType(49)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_CARPET = BlockType(171, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_CONCRETE = BlockType(251, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_CONCRETE_POWDER = BlockType(252, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_GLAZED_TERRACOTTA = BlockType(236)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_HARDENED_CLAY = BlockType(159, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_SHULKER_BOX = BlockType(220)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_STAINED_GLASS = BlockType(95, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_STAINED_GLASS_PANE = BlockType(160, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_TULIP

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_TULIP = BlockType(38, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ORANGE_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ORANGE_WOOL = BlockType(35, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ OXEYE_DAISY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::OXEYE_DAISY = BlockType(38, 8)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PACKED_ICE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PACKED_ICE = BlockType(174)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PEONY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PEONY = BlockType(175, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PILLAR_QUARTZ_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PILLAR_QUARTZ_BLOCK = BlockType(155, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_CARPET = BlockType(171, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_CONCRETE = BlockType(251, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_CONCRETE_POWDER = BlockType(252, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_GLAZED_TERRACOTTA = BlockType(241)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_HARDENED_CLAY = BlockType(159, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_SHULKER_BOX = BlockType(225)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_STAINED_GLASS = BlockType(95, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_STAINED_GLASS_PANE = BlockType(160, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_TULIP

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_TULIP = BlockType(38, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PINK_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PINK_WOOL = BlockType(35, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PISTON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PISTON = BlockType(33)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PISTON_HEAD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PISTON_HEAD = BlockType(34)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PODZOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PODZOL = BlockType(3, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POLISHED_ANDESITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POLISHED_ANDESITE = BlockType(1, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POLISHED_DIORITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POLISHED_DIORITE = BlockType(1, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POLISHED_GRANITE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POLISHED_GRANITE = BlockType(1, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POPPY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POPPY = BlockType(38)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POTATOES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POTATOES = BlockType(142)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ POWERED_RAIL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::POWERED_RAIL = BlockType(27)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PRISMARINE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PRISMARINE = BlockType(168)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PRISMARINE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PRISMARINE_BRICKS = BlockType(168, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PUMPKIN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PUMPKIN = BlockType(86)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PUMPKIN_STEM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PUMPKIN_STEM = BlockType(104)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_CARPET = BlockType(171, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_CONCRETE = BlockType(251, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_CONCRETE_POWDER = BlockType(252, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_GLAZED_TERRACOTTA = BlockType(245)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_HARDENED_CLAY = BlockType(159, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_SHULKER_BOX = BlockType(229)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_STAINED_GLASS = BlockType(95, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_STAINED_GLASS_PANE = BlockType(160, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPLE_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPLE_WOOL = BlockType(35, 10)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPUR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPUR_BLOCK = BlockType(201)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPUR_DOUBLE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPUR_DOUBLE_SLAB = BlockType(204)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPUR_PILLAR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPUR_PILLAR = BlockType(202)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPUR_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPUR_SLAB = BlockType(205)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ PURPUR_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::PURPUR_STAIRS = BlockType(203)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ QUARTZ_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::QUARTZ_BLOCK = BlockType(155)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ QUARTZ_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::QUARTZ_SLAB = BlockType(44, 7)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ QUARTZ_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::QUARTZ_STAIRS = BlockType(156)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RAIL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RAIL = BlockType(66)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_CARPET = BlockType(171, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_CONCRETE = BlockType(251, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_CONCRETE_POWDER = BlockType(252, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_GLAZED_TERRACOTTA = BlockType(249)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_HARDENED_CLAY = BlockType(159, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_MUSHROOM

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_MUSHROOM = BlockType(40)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_MUSHROOM_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_MUSHROOM_BLOCK = BlockType(100)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_NETHER_BRICK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_NETHER_BRICK = BlockType(215)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_SAND

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_SAND = BlockType(12, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_SANDSTONE = BlockType(179)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_SANDSTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_SANDSTONE_SLAB = BlockType(182)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_SANDSTONE_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_SANDSTONE_STAIRS = BlockType(180)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_SHULKER_BOX = BlockType(233)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_STAINED_GLASS = BlockType(95, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_STAINED_GLASS_PANE = BlockType(160, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_TULIP

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_TULIP = BlockType(38, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ RED_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::RED_WOOL = BlockType(35, 14)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_BLOCK = BlockType(152)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_COMPARATOR_ACTIVE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_COMPARATOR_ACTIVE = BlockType(150)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_COMPARATOR_INACTIVE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_COMPARATOR_INACTIVE = BlockType(149)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_LAMP_ACTIVE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_LAMP_ACTIVE = BlockType(124)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_LAMP_INACTIVE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_LAMP_INACTIVE = BlockType(123)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_ORE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_ORE = BlockType(73)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_REPEATER_BLOCK_OFF

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_REPEATER_BLOCK_OFF = BlockType(93)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_REPEATER_BLOCK_ON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_REPEATER_BLOCK_ON = BlockType(94)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_TORCH_OFF

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_TORCH_OFF = BlockType(75)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_TORCH_ON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_TORCH_ON = BlockType(76)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REDSTONE_WIRE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REDSTONE_WIRE = BlockType(55)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ REPEATING_COMMAND_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::REPEATING_COMMAND_BLOCK = BlockType(210)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ ROSE_BUSH

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::ROSE_BUSH = BlockType(175, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SAND

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SAND = BlockType(12)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SANDSTONE = BlockType(24)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SANDSTONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SANDSTONE_SLAB = BlockType(44, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SANDSTONE_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SANDSTONE_STAIRS = BlockType(128)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SEA_LANTERN

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SEA_LANTERN = BlockType(169)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SLIME_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SLIME_BLOCK = BlockType(165)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SMOOTH_RED_SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SMOOTH_RED_SANDSTONE = BlockType(179, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SMOOTH_SANDSTONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SMOOTH_SANDSTONE = BlockType(24, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SNOW

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SNOW = BlockType(78)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SNOW_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SNOW_BLOCK = BlockType(80)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SOUL_SAND

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SOUL_SAND = BlockType(88)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPONGE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPONGE = BlockType(19)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_DOOR_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_DOOR_BLOCK = BlockType(193)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_FENCE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_FENCE = BlockType(188)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_FENCE_GATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_FENCE_GATE = BlockType(183)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_LEAVES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_LEAVES = BlockType(18, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_SAPLING

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_SAPLING = BlockType(6, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_WOOD

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_WOOD = BlockType(17, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_WOOD_PLANK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_WOOD_PLANK = BlockType(5, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_WOOD_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_WOOD_SLAB = BlockType(126, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SPRUCE_WOOD_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SPRUCE_WOOD_STAIRS = BlockType(134)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STANDING_SIGN_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STANDING_SIGN_BLOCK = BlockType(63)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STICKY_PISTON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STICKY_PISTON = BlockType(29)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STILL_LAVA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STILL_LAVA = BlockType(11)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STILL_WATER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STILL_WATER = BlockType(9)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE = BlockType(1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_BRICK_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_BRICK_MONSTER_EGG = BlockType(97, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_BRICK_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_BRICK_SLAB = BlockType(44, 5)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_BRICK_STAIRS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_BRICK_STAIRS = BlockType(109)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_BRICKS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_BRICKS = BlockType(98)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_BUTTON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_BUTTON = BlockType(77)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_MONSTER_EGG

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_MONSTER_EGG = BlockType(97)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_PRESSURE_PLATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_PRESSURE_PLATE = BlockType(70)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STONE_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STONE_SLAB = BlockType(44)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STRUCTURE_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STRUCTURE_BLOCK = BlockType(255)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ STRUCTURE_VOID

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::STRUCTURE_VOID = BlockType(217)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SUGAR_CANES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SUGAR_CANES = BlockType(83)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ SUNFLOWER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::SUNFLOWER = BlockType(175)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TALL_GRASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TALL_GRASS = BlockType(31, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TNT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TNT = BlockType(46)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TORCH

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TORCH = BlockType(50)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TRAPPED_CHEST

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TRAPPED_CHEST = BlockType(146)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TRIPWIRE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TRIPWIRE = BlockType(132)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ TRIPWIRE_HOOK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::TRIPWIRE_HOOK = BlockType(131)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ VINES

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::VINES = BlockType(106)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WALLMOUNTED_BANNER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WALLMOUNTED_BANNER = BlockType(177)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WALLMOUNTED_SIGN_BLOCK

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WALLMOUNTED_SIGN_BLOCK = BlockType(68)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WEIGHTED_PRESSURE_PLATE_HEAVY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WEIGHTED_PRESSURE_PLATE_HEAVY = BlockType(148)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WEIGHTED_PRESSURE_PLATE_LIGHT

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WEIGHTED_PRESSURE_PLATE_LIGHT = BlockType(147)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WET_SPONGE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WET_SPONGE = BlockType(19, 1)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHEAT_CROPS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHEAT_CROPS = BlockType(59)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_CARPET = BlockType(171)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_CONCRETE = BlockType(251)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_CONCRETE_POWDER = BlockType(252)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_GLAZED_TERRACOTTA = BlockType(235)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_HARDENED_CLAY = BlockType(159)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_SHULKER_BOX = BlockType(219)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_STAINED_GLASS = BlockType(95)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_STAINED_GLASS_PANE = BlockType(160)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_TULIP

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_TULIP = BlockType(38, 6)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WHITE_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WHITE_WOOL = BlockType(35)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WOODEN_BUTTON

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WOODEN_BUTTON = BlockType(143)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WOODEN_PRESSURE_PLATE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WOODEN_PRESSURE_PLATE = BlockType(72)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WOODEN_SLAB

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WOODEN_SLAB = BlockType(44, 2)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ WOODEN_TRAPDOOR

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::WOODEN_TRAPDOOR = BlockType(96)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_CARPET

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_CARPET = BlockType(171, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_CONCRETE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_CONCRETE = BlockType(251, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_CONCRETE_POWDER

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_CONCRETE_POWDER = BlockType(252, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_GLAZED_TERRACOTTA

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_GLAZED_TERRACOTTA = BlockType(239)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_HARDENED_CLAY

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_HARDENED_CLAY = BlockType(159, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_SHULKER_BOX

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_SHULKER_BOX = BlockType(223)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_STAINED_GLASS

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_STAINED_GLASS = BlockType(95, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_STAINED_GLASS_PANE

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_STAINED_GLASS_PANE = BlockType(160, 4)
    +
    +staticconstexpr
    +
    + +
    +
    + +

    ◆ YELLOW_WOOL

    + +
    +
    + + + + + +
    + + + + +
    constexpr BlockType mcpp::Blocks::YELLOW_WOOL = BlockType(35, 4)
    +
    +staticconstexpr
    +
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_chunk-members.html b/structmcpp_1_1_chunk-members.html new file mode 100644 index 00000000..01c3e8b6 --- /dev/null +++ b/structmcpp_1_1_chunk-members.html @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Chunk Member List
    +
    +
    + +

    This is the complete list of members for mcpp::Chunk, including all inherited members.

    + + + + + + + + + + + + + + + + + +
    base_pt() constmcpp::Chunk
    begin()mcpp::Chunkinline
    begin() constmcpp::Chunkinline
    Chunk(const Coordinate &loc1, const Coordinate &loc2, const std::vector< BlockType > &block_list)mcpp::Chunk
    Chunk(const Chunk &other)mcpp::Chunkinline
    Chunk(Chunk &&other) noexcept=defaultmcpp::Chunk
    end()mcpp::Chunkinline
    end() constmcpp::Chunkinline
    get(int x, int y, int z) constmcpp::Chunk
    get_worldspace(const Coordinate &pos) constmcpp::Chunk
    operator=(const Chunk &other)mcpp::Chunk
    operator=(Chunk &&other)=defaultmcpp::Chunk
    x_len() constmcpp::Chunk
    y_len() constmcpp::Chunk
    z_len() constmcpp::Chunk
    ~Chunk()=defaultmcpp::Chunk
    +
    + + + + diff --git a/structmcpp_1_1_chunk.html b/structmcpp_1_1_chunk.html new file mode 100644 index 00000000..0213c2ad --- /dev/null +++ b/structmcpp_1_1_chunk.html @@ -0,0 +1,593 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Chunk Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Chunk Struct Reference
    +
    +
    + +

    #include <chunk.h>

    + + + + + + + + +

    +Classes

    struct  ConstIterator
     An iterator for the const Chunk's 3D block data. More...
     
    struct  Iterator
     An iterator for the Chunk's 3D block data. More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

     Chunk (const Coordinate &loc1, const Coordinate &loc2, const std::vector< BlockType > &block_list)
     
     ~Chunk ()=default
     
     Chunk (const Chunk &other)
     
     Chunk (Chunk &&other) noexcept=default
     
    Chunkoperator= (const Chunk &other)
     
    Chunkoperator= (Chunk &&other)=default
     
    BlockType get_worldspace (const Coordinate &pos) const
     
    BlockType get (int x, int y, int z) const
     
    uint16_t x_len () const
     
    uint16_t y_len () const
     
    uint16_t z_len () const
     
    Coordinate base_pt () const
     
    Iterator begin ()
     
    Iterator end ()
     
    ConstIterator begin () const
     
    ConstIterator end () const
     
    +

    Detailed Description

    +

    Stores a 3D cuboid of BlockTypes while preserving their relative location to the base point they were gathered at and each other.

    +

    Constructor & Destructor Documentation

    + +

    ◆ Chunk() [1/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    mcpp::Chunk::Chunk (const Coordinateloc1,
    const Coordinateloc2,
    const std::vector< BlockType > & block_list 
    )
    +
    + +
    +
    + +

    ◆ ~Chunk()

    + +
    +
    + + + + + +
    + + + + + + + +
    mcpp::Chunk::~Chunk ()
    +
    +default
    +
    + +
    +
    + +

    ◆ Chunk() [2/3]

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::Chunk::Chunk (const Chunkother)
    +
    +inline
    +
    + +
    +
    + +

    ◆ Chunk() [3/3]

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::Chunk::Chunk (Chunk && other)
    +
    +defaultnoexcept
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ base_pt()

    + +
    +
    + + + + + + + +
    Coordinate mcpp::Chunk::base_pt () const
    +
    +

    Gets the minimum coordinate in the Chunk.

    Returns
    the minimum coordinate in the Chunk
    + +
    +
    + +

    ◆ begin() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator mcpp::Chunk::begin ()
    +
    +inline
    +
    + +
    +
    + +

    ◆ begin() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator mcpp::Chunk::begin () const
    +
    +inline
    +
    + +
    +
    + +

    ◆ end() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator mcpp::Chunk::end ()
    +
    +inline
    +
    + +
    +
    + +

    ◆ end() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator mcpp::Chunk::end () const
    +
    +inline
    +
    + +
    +
    + +

    ◆ get()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    BlockType mcpp::Chunk::get (int x,
    int y,
    int z 
    ) const
    +
    +

    Local equivalent of get_worldspace, equivalent to a 3D array access of the internal data.

    Parameters
    + + + + +
    xx element of array access
    yy element of array access
    zz element of array access
    +
    +
    +
    Returns
    BlockType at specified location
    + +
    +
    + +

    ◆ get_worldspace()

    + +
    +
    + + + + + + + + +
    BlockType mcpp::Chunk::get_worldspace (const Coordinatepos) const
    +
    +

    Accesses the Minecraft block at absolute position pos and returns its BlockType if it is in the included area.

    Parameters
    + + +
    posAbolute position in the Minecraft world to query BlockType for
    +
    +
    +
    Returns
    BlockType at specified location
    + +
    +
    + +

    ◆ operator=() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    Chunk & mcpp::Chunk::operator= (Chunk && other)
    +
    +default
    +
    + +
    +
    + +

    ◆ operator=() [2/2]

    + +
    +
    + + + + + + + + +
    Chunk & mcpp::Chunk::operator= (const Chunkother)
    +
    + +
    +
    + +

    ◆ x_len()

    + +
    +
    + + + + + + + +
    uint16_t mcpp::Chunk::x_len () const
    +
    +

    Gets the x length of the Chunk.

    Returns
    x length of the Chunk
    + +
    +
    + +

    ◆ y_len()

    + +
    +
    + + + + + + + +
    uint16_t mcpp::Chunk::y_len () const
    +
    +

    Gets the y length of the Chunk.

    Returns
    y length of the Chunk
    + +
    +
    + +

    ◆ z_len()

    + +
    +
    + + + + + + + +
    uint16_t mcpp::Chunk::z_len () const
    +
    +

    Gets the z length of the Chunk.

    Returns
    z length of the Chunk
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_chunk.js b/structmcpp_1_1_chunk.js new file mode 100644 index 00000000..76646f34 --- /dev/null +++ b/structmcpp_1_1_chunk.js @@ -0,0 +1,21 @@ +var structmcpp_1_1_chunk = +[ + [ "ConstIterator", "structmcpp_1_1_chunk_1_1_const_iterator.html", "structmcpp_1_1_chunk_1_1_const_iterator" ], + [ "Iterator", "structmcpp_1_1_chunk_1_1_iterator.html", "structmcpp_1_1_chunk_1_1_iterator" ], + [ "Chunk", "structmcpp_1_1_chunk.html#aa64d3b2cfa29d09ed149e2ae63b09c67", null ], + [ "~Chunk", "structmcpp_1_1_chunk.html#ad1be58a4b0c65d2569e9dc34bcfcb811", null ], + [ "Chunk", "structmcpp_1_1_chunk.html#ab12fccb955880e8e51ab83d77d370b35", null ], + [ "Chunk", "structmcpp_1_1_chunk.html#a4018abeef679fd2bc9c4507bb7618efd", null ], + [ "base_pt", "structmcpp_1_1_chunk.html#a06b31826ca7ca6a110c3655e45b1e2a2", null ], + [ "begin", "structmcpp_1_1_chunk.html#a63103fc7a00824e56c065ecba6f51300", null ], + [ "begin", "structmcpp_1_1_chunk.html#af6046c1b74fea144f2b5b0cfdcfd00c4", null ], + [ "end", "structmcpp_1_1_chunk.html#a6869daba96a9c33dd02aa3092930df93", null ], + [ "end", "structmcpp_1_1_chunk.html#a00870a72d610d231af9af9f1db2960c0", null ], + [ "get", "structmcpp_1_1_chunk.html#a6243d24c86b261f798af410df06e8009", null ], + [ "get_worldspace", "structmcpp_1_1_chunk.html#a1c9c77a2d85ddbb52f9f57f16b8f9823", null ], + [ "operator=", "structmcpp_1_1_chunk.html#a7573e7bb0e9830636a10c77d232da903", null ], + [ "operator=", "structmcpp_1_1_chunk.html#aa29e64684a203369cbd7e995cf308958", null ], + [ "x_len", "structmcpp_1_1_chunk.html#ad0b7a1f08a35673b482ab9693bff1dfa", null ], + [ "y_len", "structmcpp_1_1_chunk.html#a5cf54ca51a63946e9b836ff4ff3f8982", null ], + [ "z_len", "structmcpp_1_1_chunk.html#ac8c8d1a661dfa3ac22588fc9cd11d96b", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_chunk_1_1_const_iterator-members.html b/structmcpp_1_1_chunk_1_1_const_iterator-members.html new file mode 100644 index 00000000..da780cf5 --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_const_iterator-members.html @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Chunk::ConstIterator Member List
    +
    + +
    + + + + diff --git a/structmcpp_1_1_chunk_1_1_const_iterator.html b/structmcpp_1_1_chunk_1_1_const_iterator.html new file mode 100644 index 00000000..c1229a1a --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_const_iterator.html @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Chunk::ConstIterator Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Chunk::ConstIterator Struct Reference
    +
    +
    + +

    An iterator for the const Chunk's 3D block data. + More...

    + +

    #include <chunk.h>

    + + + + + + + + + + + + +

    +Public Types

    using iterator_category = std::forward_iterator_tag
     
    using difference_type = std::ptrdiff_t
     
    using value_type = BlockType
     
    using pointer = const BlockType *
     
    using reference = const BlockType &
     
    + + + + + + + + + + + + + + + + +

    +Public Member Functions

     ConstIterator (pointer ptr)
     Constructs an iterator at the given pointer position.
     
    reference operator* () const
     Dereference the iterator to access the value at the current position.
     
    pointer operator-> ()
     Access the pointer to the current element.
     
    ConstIteratoroperator++ ()
     Pre-increment operator. Advances the iterator to the next position.
     
    ConstIterator operator++ (int)
     Post-increment operator. Advances the iterator to the next position.
     
    + + + + + + + +

    +Friends

    bool operator== (const ConstIterator &a, const ConstIterator &b)
     Equality comparison operator.
     
    bool operator!= (const ConstIterator &a, const ConstIterator &b)
     Inequality comparison operator.
     
    +

    Detailed Description

    +

    An iterator for the const Chunk's 3D block data.

    +

    This iterator allows for range-based for loops and standard const iterator operations over the 3D block data stored within a Chunk. It provides a linear interface to traverse the 3D grid of blocks, enabling sequential immutable access to the elements stored in the chunk.

    +

    Member Typedef Documentation

    + +

    ◆ difference_type

    + +
    +
    + + + + +
    using mcpp::Chunk::ConstIterator::difference_type = std::ptrdiff_t
    +
    + +
    +
    + +

    ◆ iterator_category

    + +
    +
    + + + + +
    using mcpp::Chunk::ConstIterator::iterator_category = std::forward_iterator_tag
    +
    + +
    +
    + +

    ◆ pointer

    + +
    +
    + +
    +
    + +

    ◆ reference

    + +
    +
    + +
    +
    + +

    ◆ value_type

    + + +

    Constructor & Destructor Documentation

    + +

    ◆ ConstIterator()

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::Chunk::ConstIterator::ConstIterator (pointer ptr)
    +
    +inline
    +
    + +

    Constructs an iterator at the given pointer position.

    +
    Parameters
    + + +
    ptrPointer to the position in the height array.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator*()

    + +
    +
    + + + + + +
    + + + + + + + +
    reference mcpp::Chunk::ConstIterator::operator* () const
    +
    +inline
    +
    + +

    Dereference the iterator to access the value at the current position.

    +
    Returns
    Reference to the current element.
    + +
    +
    + +

    ◆ operator++() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator & mcpp::Chunk::ConstIterator::operator++ ()
    +
    +inline
    +
    + +

    Pre-increment operator. Advances the iterator to the next position.

    +
    Returns
    Reference to the updated iterator.
    + +
    +
    + +

    ◆ operator++() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    ConstIterator mcpp::Chunk::ConstIterator::operator++ (int )
    +
    +inline
    +
    + +

    Post-increment operator. Advances the iterator to the next position.

    +
    Parameters
    + + +
    intUnused dummy parameter to differentiate from prefix increment.
    +
    +
    +
    Returns
    Iterator to the original position before incrementing.
    + +
    +
    + +

    ◆ operator->()

    + +
    +
    + + + + + +
    + + + + + + + +
    pointer mcpp::Chunk::ConstIterator::operator-> ()
    +
    +inline
    +
    + +

    Access the pointer to the current element.

    +
    Returns
    Pointer to the current element.
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator!=

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator!= (const ConstIteratora,
    const ConstIteratorb 
    )
    +
    +friend
    +
    + +

    Inequality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if iterators point to different positions, false otherwise.
    + +
    +
    + +

    ◆ operator==

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator== (const ConstIteratora,
    const ConstIteratorb 
    )
    +
    +friend
    +
    + +

    Equality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if both iterators point to the same position, false otherwise.
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_chunk_1_1_const_iterator.js b/structmcpp_1_1_chunk_1_1_const_iterator.js new file mode 100644 index 00000000..313b7ca8 --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_const_iterator.js @@ -0,0 +1,15 @@ +var structmcpp_1_1_chunk_1_1_const_iterator = +[ + [ "difference_type", "structmcpp_1_1_chunk_1_1_const_iterator.html#aceabcb1e0e5e8991e6f9ea5d8bc4b460", null ], + [ "iterator_category", "structmcpp_1_1_chunk_1_1_const_iterator.html#ae6da6fb6be202c0744a674d4e1fd5519", null ], + [ "pointer", "structmcpp_1_1_chunk_1_1_const_iterator.html#a7b73e4eaa49befb53a973778dc6b7dd1", null ], + [ "reference", "structmcpp_1_1_chunk_1_1_const_iterator.html#ae7bb97e06ee7b429b470f886eb7402f6", null ], + [ "value_type", "structmcpp_1_1_chunk_1_1_const_iterator.html#a6ec2f4a801045bc714c10d9b9bbcaf5a", null ], + [ "ConstIterator", "structmcpp_1_1_chunk_1_1_const_iterator.html#acbdebb9cafdbf1f6a35afb46d3426da1", null ], + [ "operator*", "structmcpp_1_1_chunk_1_1_const_iterator.html#a214cbd0fd4b2ece21d90d6cc65090bb1", null ], + [ "operator++", "structmcpp_1_1_chunk_1_1_const_iterator.html#aca996a3d3783b20b9c2534a2b0e5e5a7", null ], + [ "operator++", "structmcpp_1_1_chunk_1_1_const_iterator.html#a9f425d2b24fdf5fa08e3b854da44146e", null ], + [ "operator->", "structmcpp_1_1_chunk_1_1_const_iterator.html#a6cba7d963825aa1630029ae2055fc073", null ], + [ "operator!=", "structmcpp_1_1_chunk_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf", null ], + [ "operator==", "structmcpp_1_1_chunk_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_chunk_1_1_iterator-members.html b/structmcpp_1_1_chunk_1_1_iterator-members.html new file mode 100644 index 00000000..a73b4596 --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_iterator-members.html @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Chunk::Iterator Member List
    +
    + +
    + + + + diff --git a/structmcpp_1_1_chunk_1_1_iterator.html b/structmcpp_1_1_chunk_1_1_iterator.html new file mode 100644 index 00000000..d7d6d7a1 --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_iterator.html @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Chunk::Iterator Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Chunk::Iterator Struct Reference
    +
    +
    + +

    An iterator for the Chunk's 3D block data. + More...

    + +

    #include <chunk.h>

    + + + + + + + + + + + + +

    +Public Types

    using iterator_category = std::forward_iterator_tag
     
    using difference_type = std::ptrdiff_t
     
    using value_type = BlockType
     
    using pointer = BlockType *
     
    using reference = BlockType &
     
    + + + + + + + + + + + + + + + + +

    +Public Member Functions

     Iterator (pointer ptr)
     Constructs an iterator at the given pointer position.
     
    reference operator* () const
     Dereference the iterator to access the value at the current position.
     
    pointer operator-> ()
     Access the pointer to the current element.
     
    Iteratoroperator++ ()
     Pre-increment operator. Advances the iterator to the next position.
     
    Iterator operator++ (int)
     Post-increment operator. Advances the iterator to the next position.
     
    + + + + + + + +

    +Friends

    bool operator== (const Iterator &a, const Iterator &b)
     Equality comparison operator.
     
    bool operator!= (const Iterator &a, const Iterator &b)
     Inequality comparison operator.
     
    +

    Detailed Description

    +

    An iterator for the Chunk's 3D block data.

    +

    This iterator allows for range-based for loops and standard iterator operations over the 3D block data stored within a Chunk. It provides a linear interface to traverse the 3D grid of blocks, enabling sequential access to the elements stored in the chunk.

    +

    Member Typedef Documentation

    + +

    ◆ difference_type

    + +
    +
    + + + + +
    using mcpp::Chunk::Iterator::difference_type = std::ptrdiff_t
    +
    + +
    +
    + +

    ◆ iterator_category

    + +
    +
    + + + + +
    using mcpp::Chunk::Iterator::iterator_category = std::forward_iterator_tag
    +
    + +
    +
    + +

    ◆ pointer

    + +
    +
    + +
    +
    + +

    ◆ reference

    + +
    +
    + +
    +
    + +

    ◆ value_type

    + +
    +
    + +
    +
    +

    Constructor & Destructor Documentation

    + +

    ◆ Iterator()

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::Chunk::Iterator::Iterator (pointer ptr)
    +
    +inline
    +
    + +

    Constructs an iterator at the given pointer position.

    +
    Parameters
    + + +
    ptrPointer to the position in the height array.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator*()

    + +
    +
    + + + + + +
    + + + + + + + +
    reference mcpp::Chunk::Iterator::operator* () const
    +
    +inline
    +
    + +

    Dereference the iterator to access the value at the current position.

    +
    Returns
    Reference to the current element.
    + +
    +
    + +

    ◆ operator++() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator & mcpp::Chunk::Iterator::operator++ ()
    +
    +inline
    +
    + +

    Pre-increment operator. Advances the iterator to the next position.

    +
    Returns
    Reference to the updated iterator.
    + +
    +
    + +

    ◆ operator++() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    Iterator mcpp::Chunk::Iterator::operator++ (int )
    +
    +inline
    +
    + +

    Post-increment operator. Advances the iterator to the next position.

    +
    Parameters
    + + +
    intUnused dummy parameter to differentiate from prefix increment.
    +
    +
    +
    Returns
    Iterator to the original position before incrementing.
    + +
    +
    + +

    ◆ operator->()

    + +
    +
    + + + + + +
    + + + + + + + +
    pointer mcpp::Chunk::Iterator::operator-> ()
    +
    +inline
    +
    + +

    Access the pointer to the current element.

    +
    Returns
    Pointer to the current element.
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator!=

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator!= (const Iteratora,
    const Iteratorb 
    )
    +
    +friend
    +
    + +

    Inequality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if iterators point to different positions, false otherwise.
    + +
    +
    + +

    ◆ operator==

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator== (const Iteratora,
    const Iteratorb 
    )
    +
    +friend
    +
    + +

    Equality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if both iterators point to the same position, false otherwise.
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_chunk_1_1_iterator.js b/structmcpp_1_1_chunk_1_1_iterator.js new file mode 100644 index 00000000..b11d7abe --- /dev/null +++ b/structmcpp_1_1_chunk_1_1_iterator.js @@ -0,0 +1,15 @@ +var structmcpp_1_1_chunk_1_1_iterator = +[ + [ "difference_type", "structmcpp_1_1_chunk_1_1_iterator.html#a56ab384d81ea481295958791591e3f28", null ], + [ "iterator_category", "structmcpp_1_1_chunk_1_1_iterator.html#ac8d3cc7ca19681bada7c1a32af04a399", null ], + [ "pointer", "structmcpp_1_1_chunk_1_1_iterator.html#a110d09c6ed3cab1efd8f028fc2cb3e52", null ], + [ "reference", "structmcpp_1_1_chunk_1_1_iterator.html#ada12027d45eb82bd5104f222718d8380", null ], + [ "value_type", "structmcpp_1_1_chunk_1_1_iterator.html#a1ed20bf3763f3e7445c3c8d698db400d", null ], + [ "Iterator", "structmcpp_1_1_chunk_1_1_iterator.html#a233df6b92bd8701bbc5df9705a00b71c", null ], + [ "operator*", "structmcpp_1_1_chunk_1_1_iterator.html#af9f614f147b5d5b28bf96d99c3f1e871", null ], + [ "operator++", "structmcpp_1_1_chunk_1_1_iterator.html#a9f9f4b645c7600c93e7e95f9c339cb41", null ], + [ "operator++", "structmcpp_1_1_chunk_1_1_iterator.html#ac37fdf82878c6e98ed6b122066e9faf9", null ], + [ "operator->", "structmcpp_1_1_chunk_1_1_iterator.html#a90c2d7e5d30f9007aec464b24b7b1c6a", null ], + [ "operator!=", "structmcpp_1_1_chunk_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824", null ], + [ "operator==", "structmcpp_1_1_chunk_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_coordinate-members.html b/structmcpp_1_1_coordinate-members.html new file mode 100644 index 00000000..c80cb3fd --- /dev/null +++ b/structmcpp_1_1_coordinate-members.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Coordinate Member List
    +
    +
    + +

    This is the complete list of members for mcpp::Coordinate, including all inherited members.

    + + + + + + + + + + + + + + +
    Coordinate(int32_t x, int32_t y, int32_t z)mcpp::Coordinateinline
    Coordinate()mcpp::Coordinateinline
    Coordinate(double x, double y, double z)mcpp::Coordinateinline
    operator!=(const Coordinate &obj) constmcpp::Coordinate
    operator()(const Coordinate &obj) constmcpp::Coordinate
    operator+(const Coordinate &obj) constmcpp::Coordinate
    operator+(const Coordinate2D &obj) constmcpp::Coordinate
    operator-(const Coordinate &obj) constmcpp::Coordinate
    operator<<mcpp::Coordinatefriend
    operator==(const Coordinate &obj) constmcpp::Coordinate
    xmcpp::Coordinate
    ymcpp::Coordinate
    zmcpp::Coordinate
    +
    + + + + diff --git a/structmcpp_1_1_coordinate.html b/structmcpp_1_1_coordinate.html new file mode 100644 index 00000000..bca3f84d --- /dev/null +++ b/structmcpp_1_1_coordinate.html @@ -0,0 +1,573 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Coordinate Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Coordinate Struct Reference
    +
    +
    + +

    #include <coordinate.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    constexpr Coordinate (int32_t x, int32_t y, int32_t z)
     Constructs a Coordinate object with integer values.
     
    constexpr Coordinate ()
     Constructs a Coordinate object with zero values.
     
    constexpr Coordinate (double x, double y, double z)
     Constructs a Coordinate object with double values.
     
    Coordinate operator+ (const Coordinate &obj) const
     Adds two Coordinate objects.
     
    Coordinate operator+ (const Coordinate2D &obj) const
     
    bool operator== (const Coordinate &obj) const
     Checks if two Coordinate objects are equal.
     
    bool operator!= (const Coordinate &obj) const
     Checks if two Coordinate objects are not equal.
     
    Coordinate operator- (const Coordinate &obj) const
     Subtracts one Coordinate object from another.
     
    std::size_t operator() (const Coordinate &obj) const
     Implements hash algorithm for Coordinate object using non-negative mapping and weighted coordinate values.
     
    + + + + + + + +

    +Public Attributes

    int32_t x
     
    int32_t y
     
    int32_t z
     
    + + + + +

    +Friends

    std::ostream & operator<< (std::ostream &out, const Coordinate &coord)
     Outputs the Coordinate object to an ostream.
     
    +

    Detailed Description

    +

    Represented using integers since sub-unit coordinates are not of particular relevance. Allows for operations such as addition between coordinates.

    +

    Constructor & Destructor Documentation

    + +

    ◆ Coordinate() [1/3]

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    constexpr mcpp::Coordinate::Coordinate (int32_t x,
    int32_t y,
    int32_t z 
    )
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate object with integer values.

    +
    Parameters
    + + + + +
    xThe x-coordinate.
    yThe y-coordinate.
    zThe z-coordinate.
    +
    +
    + +
    +
    + +

    ◆ Coordinate() [2/3]

    + +
    +
    + + + + + +
    + + + + + + + +
    constexpr mcpp::Coordinate::Coordinate ()
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate object with zero values.

    + +
    +
    + +

    ◆ Coordinate() [3/3]

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    constexpr mcpp::Coordinate::Coordinate (double x,
    double y,
    double z 
    )
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate object with double values.

    +
    Parameters
    + + + + +
    xThe x-coordinate as a double.
    yThe y-coordinate as a double.
    zThe z-coordinate as a double.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator!=()

    + +
    +
    + + + + + + + + +
    bool mcpp::Coordinate::operator!= (const Coordinateobj) const
    +
    + +

    Checks if two Coordinate objects are not equal.

    +
    Parameters
    + + +
    objThe Coordinate object to compare with.
    +
    +
    +
    Returns
    True if the coordinates are not equal, false otherwise.
    + +
    +
    + +

    ◆ operator()()

    + +
    +
    + + + + + + + + +
    std::size_t mcpp::Coordinate::operator() (const Coordinateobj) const
    +
    + +

    Implements hash algorithm for Coordinate object using non-negative mapping and weighted coordinate values.

    +
    Parameters
    + + +
    objThe Coordinate object to hash.
    +
    +
    +
    Returns
    Hash of Coordinate object.
    + +
    +
    + +

    ◆ operator+() [1/2]

    + +
    +
    + + + + + + + + +
    Coordinate mcpp::Coordinate::operator+ (const Coordinateobj) const
    +
    + +

    Adds two Coordinate objects.

    +
    Parameters
    + + +
    objThe Coordinate object to add.
    +
    +
    +
    Returns
    A new Coordinate object representing the sum of the two coordinates.
    + +
    +
    + +

    ◆ operator+() [2/2]

    + +
    +
    + + + + + + + + +
    Coordinate mcpp::Coordinate::operator+ (const Coordinate2Dobj) const
    +
    + +
    +
    + +

    ◆ operator-()

    + +
    +
    + + + + + + + + +
    Coordinate mcpp::Coordinate::operator- (const Coordinateobj) const
    +
    + +

    Subtracts one Coordinate object from another.

    +
    Parameters
    + + +
    objThe Coordinate object to subtract.
    +
    +
    +
    Returns
    A new Coordinate object representing the difference between the two coordinates.
    + +
    +
    + +

    ◆ operator==()

    + +
    +
    + + + + + + + + +
    bool mcpp::Coordinate::operator== (const Coordinateobj) const
    +
    + +

    Checks if two Coordinate objects are equal.

    +
    Parameters
    + + +
    objThe Coordinate object to compare with.
    +
    +
    +
    Returns
    True if the coordinates are equal, false otherwise.
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator<<

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::ostream & operator<< (std::ostream & out,
    const Coordinatecoord 
    )
    +
    +friend
    +
    + +

    Outputs the Coordinate object to an ostream.

    +
    Parameters
    + + + +
    outThe output stream.
    coordThe Coordinate object to output.
    +
    +
    +
    Returns
    The output stream with the Coordinate object's values.
    + +
    +
    +

    Member Data Documentation

    + +

    ◆ x

    + +
    +
    + + + + +
    int32_t mcpp::Coordinate::x
    +
    + +
    +
    + +

    ◆ y

    + +
    +
    + + + + +
    int32_t mcpp::Coordinate::y
    +
    + +
    +
    + +

    ◆ z

    + +
    +
    + + + + +
    int32_t mcpp::Coordinate::z
    +
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_coordinate.js b/structmcpp_1_1_coordinate.js new file mode 100644 index 00000000..f46f663d --- /dev/null +++ b/structmcpp_1_1_coordinate.js @@ -0,0 +1,16 @@ +var structmcpp_1_1_coordinate = +[ + [ "Coordinate", "structmcpp_1_1_coordinate.html#a8af39c4153a09f110646212169a32449", null ], + [ "Coordinate", "structmcpp_1_1_coordinate.html#aa8bf97dfc6cd6ff08df614bbcb151dae", null ], + [ "Coordinate", "structmcpp_1_1_coordinate.html#aaf77bf635fec3314ba15dc524a53268e", null ], + [ "operator!=", "structmcpp_1_1_coordinate.html#a7642ebe18537052edfbe717bfd2e31ad", null ], + [ "operator()", "structmcpp_1_1_coordinate.html#a8e6a2c08a64b008789178613e245157d", null ], + [ "operator+", "structmcpp_1_1_coordinate.html#a00d47c3ceaa12d83ebf3fd970963ae0b", null ], + [ "operator+", "structmcpp_1_1_coordinate.html#aa429488170f898040f68ca8ad583eeb2", null ], + [ "operator-", "structmcpp_1_1_coordinate.html#a51ef2fc83cf330cb0cea41ffb08c7169", null ], + [ "operator==", "structmcpp_1_1_coordinate.html#aea212ae040336d2e0b46c82e605fada6", null ], + [ "operator<<", "structmcpp_1_1_coordinate.html#a90eac52373a64b1d794861197cd4db2e", null ], + [ "x", "structmcpp_1_1_coordinate.html#a84339f0bb43dd646b7ab4e14de7024d8", null ], + [ "y", "structmcpp_1_1_coordinate.html#a2b6002afea6796a291584313a30186c3", null ], + [ "z", "structmcpp_1_1_coordinate.html#ac1b5d6b400a97496194bcb54849a2a29", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_coordinate2_d-members.html b/structmcpp_1_1_coordinate2_d-members.html new file mode 100644 index 00000000..32ba15ad --- /dev/null +++ b/structmcpp_1_1_coordinate2_d-members.html @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::Coordinate2D Member List
    +
    +
    + +

    This is the complete list of members for mcpp::Coordinate2D, including all inherited members.

    + + + + + + + + + + + + + + +
    Coordinate2D(int x, int z)mcpp::Coordinate2Dinline
    Coordinate2D()mcpp::Coordinate2Dinline
    Coordinate2D(double x, double z)mcpp::Coordinate2Dinline
    Coordinate2D(const Coordinate &coord)mcpp::Coordinate2Dinline
    operator!=(const Coordinate2D &obj) constmcpp::Coordinate2D
    operator()(const Coordinate2D &obj) constmcpp::Coordinate2D
    operator+(const Coordinate2D &obj) constmcpp::Coordinate2D
    operator-(const Coordinate2D &obj) constmcpp::Coordinate2D
    operator<<mcpp::Coordinate2Dfriend
    operator==(const Coordinate2D &obj) constmcpp::Coordinate2D
    with_height(int y) constmcpp::Coordinate2D
    xmcpp::Coordinate2D
    zmcpp::Coordinate2D
    +
    + + + + diff --git a/structmcpp_1_1_coordinate2_d.html b/structmcpp_1_1_coordinate2_d.html new file mode 100644 index 00000000..1ad8df04 --- /dev/null +++ b/structmcpp_1_1_coordinate2_d.html @@ -0,0 +1,594 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::Coordinate2D Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::Coordinate2D Struct Reference
    +
    +
    + +

    Height-agnostic coordinate class. + More...

    + +

    #include <coordinate.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    constexpr Coordinate2D (int x, int z)
     Constructs a Coordinate2D object with integer values.
     
    constexpr Coordinate2D ()
     Constructs a Coordinate2D object with zero values.
     
    constexpr Coordinate2D (double x, double z)
     Constructs a Coordinate2D object with double values.
     
    constexpr Coordinate2D (const Coordinate &coord)
     Constructs a Coordinate2D object from a Coordinate object.
     
    Coordinate with_height (int y) const
     Constructs a Coordinate object from a Coordinate2D object and a y value.
     
    Coordinate2D operator+ (const Coordinate2D &obj) const
     Adds two Coordinate2D objects.
     
    bool operator== (const Coordinate2D &obj) const
     Checks if two Coordinate2D objects are equal.
     
    bool operator!= (const Coordinate2D &obj) const
     Checks if two Coordinate2D objects are not equal.
     
    Coordinate2D operator- (const Coordinate2D &obj) const
     Subtracts one Coordinate2D object from another.
     
    std::size_t operator() (const Coordinate2D &obj) const
     Implements hash algorithm for Coordinate2D object using non-negative mapping and weighted coordinate values.
     
    + + + + + +

    +Public Attributes

    int x
     
    int z
     
    + + + + +

    +Friends

    std::ostream & operator<< (std::ostream &out, const Coordinate2D &coord)
     Outputs the Coordinate2D object to an ostream.
     
    +

    Detailed Description

    +

    Height-agnostic coordinate class.

    +

    Represented using integers since sub-unit coordinates are not of particular relevance. Allows for operations such as addition between flat coordinates.

    +

    Constructor & Destructor Documentation

    + +

    ◆ Coordinate2D() [1/4]

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    constexpr mcpp::Coordinate2D::Coordinate2D (int x,
    int z 
    )
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate2D object with integer values.

    +
    Parameters
    + + + +
    xThe x-coordinate.
    zThe z-coordinate.
    +
    +
    + +
    +
    + +

    ◆ Coordinate2D() [2/4]

    + +
    +
    + + + + + +
    + + + + + + + +
    constexpr mcpp::Coordinate2D::Coordinate2D ()
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate2D object with zero values.

    + +
    +
    + +

    ◆ Coordinate2D() [3/4]

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    constexpr mcpp::Coordinate2D::Coordinate2D (double x,
    double z 
    )
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate2D object with double values.

    +
    Parameters
    + + + +
    xThe x-coordinate as a double.
    zThe z-coordinate as a double.
    +
    +
    + +
    +
    + +

    ◆ Coordinate2D() [4/4]

    + +
    +
    + + + + + +
    + + + + + + + + +
    constexpr mcpp::Coordinate2D::Coordinate2D (const Coordinatecoord)
    +
    +inlineconstexpr
    +
    + +

    Constructs a Coordinate2D object from a Coordinate object.

    +
    Parameters
    + + +
    coordThe Coordinate object.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator!=()

    + +
    +
    + + + + + + + + +
    bool mcpp::Coordinate2D::operator!= (const Coordinate2Dobj) const
    +
    + +

    Checks if two Coordinate2D objects are not equal.

    +
    Parameters
    + + +
    objThe Coordinate2D object to compare with.
    +
    +
    +
    Returns
    True if the flat coordinates are not equal, false otherwise.
    + +
    +
    + +

    ◆ operator()()

    + +
    +
    + + + + + + + + +
    std::size_t mcpp::Coordinate2D::operator() (const Coordinate2Dobj) const
    +
    + +

    Implements hash algorithm for Coordinate2D object using non-negative mapping and weighted coordinate values.

    +
    Parameters
    + + +
    objThe Coordinate2D object to hash.
    +
    +
    +
    Returns
    Hash of Coordinate2D object.
    + +
    +
    + +

    ◆ operator+()

    + +
    +
    + + + + + + + + +
    Coordinate2D mcpp::Coordinate2D::operator+ (const Coordinate2Dobj) const
    +
    + +

    Adds two Coordinate2D objects.

    +
    Parameters
    + + +
    objThe Coordinate2D object to add.
    +
    +
    +
    Returns
    A new Coordinate2D object representing the sum of the two coordinates.
    + +
    +
    + +

    ◆ operator-()

    + +
    +
    + + + + + + + + +
    Coordinate2D mcpp::Coordinate2D::operator- (const Coordinate2Dobj) const
    +
    + +

    Subtracts one Coordinate2D object from another.

    +
    Parameters
    + + +
    objThe Coordinate2D object to subtract.
    +
    +
    +
    Returns
    A new Coordinate2D object representing the difference between the two coordinates.
    + +
    +
    + +

    ◆ operator==()

    + +
    +
    + + + + + + + + +
    bool mcpp::Coordinate2D::operator== (const Coordinate2Dobj) const
    +
    + +

    Checks if two Coordinate2D objects are equal.

    +
    Parameters
    + + +
    objThe Coordinate2D object to compare with.
    +
    +
    +
    Returns
    True if the flat coordinates are equal, false otherwise.
    + +
    +
    + +

    ◆ with_height()

    + +
    +
    + + + + + + + + +
    Coordinate mcpp::Coordinate2D::with_height (int y) const
    +
    + +

    Constructs a Coordinate object from a Coordinate2D object and a y value.

    +
    Parameters
    + + + +
    coordThe Coordinate2D object.
    yThe y value.
    +
    +
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator<<

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    std::ostream & operator<< (std::ostream & out,
    const Coordinate2Dcoord 
    )
    +
    +friend
    +
    + +

    Outputs the Coordinate2D object to an ostream.

    +
    Parameters
    + + + +
    outThe output stream.
    coordThe Coordinate2D object to output.
    +
    +
    +
    Returns
    The output stream with the Coordinate object's values.
    + +
    +
    +

    Member Data Documentation

    + +

    ◆ x

    + +
    +
    + + + + +
    int mcpp::Coordinate2D::x
    +
    + +
    +
    + +

    ◆ z

    + +
    +
    + + + + +
    int mcpp::Coordinate2D::z
    +
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_coordinate2_d.js b/structmcpp_1_1_coordinate2_d.js new file mode 100644 index 00000000..12b05c17 --- /dev/null +++ b/structmcpp_1_1_coordinate2_d.js @@ -0,0 +1,16 @@ +var structmcpp_1_1_coordinate2_d = +[ + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html#af8c571915ae262648934119cc3124d02", null ], + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html#ab716a1351c8381af3df2f572ca72222d", null ], + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html#a7e9804ff78e9c361bc4998bf8474cb38", null ], + [ "Coordinate2D", "structmcpp_1_1_coordinate2_d.html#a8f65cfffbec8d8d84178744eb8903754", null ], + [ "operator!=", "structmcpp_1_1_coordinate2_d.html#a76597a189f8099c1696d9aa3d6787ecd", null ], + [ "operator()", "structmcpp_1_1_coordinate2_d.html#ac4e310060288cc893fb2038c6359500d", null ], + [ "operator+", "structmcpp_1_1_coordinate2_d.html#adc7dcf9095fbd8c5d03d0ccc28582b05", null ], + [ "operator-", "structmcpp_1_1_coordinate2_d.html#a13a27f36afe25c8da969d803b27e610e", null ], + [ "operator==", "structmcpp_1_1_coordinate2_d.html#a5f4bb74c48e2e59ce44534bdb7377285", null ], + [ "with_height", "structmcpp_1_1_coordinate2_d.html#adfc2d893774f802f04c6d1c6817085c6", null ], + [ "operator<<", "structmcpp_1_1_coordinate2_d.html#aeb3e44ce1b9c48b39f3cc59be4388468", null ], + [ "x", "structmcpp_1_1_coordinate2_d.html#abae9f5a78e7c56441b92797d325f82f9", null ], + [ "z", "structmcpp_1_1_coordinate2_d.html#ad46dc636500fab2eb9e7bce886cf38c5", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_height_map-members.html b/structmcpp_1_1_height_map-members.html new file mode 100644 index 00000000..2b0baa55 --- /dev/null +++ b/structmcpp_1_1_height_map-members.html @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::HeightMap Member List
    +
    +
    + +

    This is the complete list of members for mcpp::HeightMap, including all inherited members.

    + + + + + + + + + + + + + + + + + +
    base_pt() constmcpp::HeightMap
    begin()mcpp::HeightMapinline
    begin() constmcpp::HeightMapinline
    end()mcpp::HeightMapinline
    end() constmcpp::HeightMapinline
    fill_coord(Coordinate &out) constmcpp::HeightMap
    get(int x, int z) constmcpp::HeightMap
    get_worldspace(const Coordinate2D &loc) constmcpp::HeightMap
    HeightMap(const Coordinate2D &loc1, const Coordinate2D &loc2, const std::vector< int16_t > &heights)mcpp::HeightMap
    HeightMap(const HeightMap &other)mcpp::HeightMapinline
    HeightMap(HeightMap &&other) noexcept=defaultmcpp::HeightMap
    operator=(const HeightMap &other)mcpp::HeightMap
    operator=(HeightMap &&other)=defaultmcpp::HeightMap
    x_len() constmcpp::HeightMap
    z_len() constmcpp::HeightMap
    ~HeightMap()=defaultmcpp::HeightMap
    +
    + + + + diff --git a/structmcpp_1_1_height_map.html b/structmcpp_1_1_height_map.html new file mode 100644 index 00000000..38cb8b65 --- /dev/null +++ b/structmcpp_1_1_height_map.html @@ -0,0 +1,592 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::HeightMap Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::HeightMap Struct Reference
    +
    +
    + +

    #include <heightmap.h>

    + + + + + + + + +

    +Classes

    struct  ConstIterator
     An iterator for the const HeightMap structure. More...
     
    struct  Iterator
     An iterator for the HeightMap structure. More...
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

     HeightMap (const Coordinate2D &loc1, const Coordinate2D &loc2, const std::vector< int16_t > &heights)
     
     ~HeightMap ()=default
     
     HeightMap (const HeightMap &other)
     
     HeightMap (HeightMap &&other) noexcept=default
     
    HeightMapoperator= (const HeightMap &other)
     
    HeightMapoperator= (HeightMap &&other)=default
     
    int16_t get (int x, int z) const
     
    int16_t get_worldspace (const Coordinate2D &loc) const
     
    void fill_coord (Coordinate &out) const
     
    uint16_t x_len () const
     
    uint16_t z_len () const
     
    Coordinate2D base_pt () const
     
    Iterator begin ()
     
    Iterator end ()
     
    ConstIterator begin () const
     
    ConstIterator end () const
     
    +

    Detailed Description

    +

    Represents a 2D area of the world with the y coordinates of the highest non-air blocks at each (x,z)

    +

    Constructor & Destructor Documentation

    + +

    ◆ HeightMap() [1/3]

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    mcpp::HeightMap::HeightMap (const Coordinate2Dloc1,
    const Coordinate2Dloc2,
    const std::vector< int16_t > & heights 
    )
    +
    + +
    +
    + +

    ◆ ~HeightMap()

    + +
    +
    + + + + + +
    + + + + + + + +
    mcpp::HeightMap::~HeightMap ()
    +
    +default
    +
    + +
    +
    + +

    ◆ HeightMap() [2/3]

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::HeightMap::HeightMap (const HeightMapother)
    +
    +inline
    +
    + +
    +
    + +

    ◆ HeightMap() [3/3]

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::HeightMap::HeightMap (HeightMap && other)
    +
    +defaultnoexcept
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ base_pt()

    + +
    +
    + + + + + + + +
    Coordinate2D mcpp::HeightMap::base_pt () const
    +
    +

    Gets the minimum coordinate in the HeightMap.

    Returns
    the minimum coordinate in the HeightMap.
    + +
    +
    + +

    ◆ begin() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator mcpp::HeightMap::begin ()
    +
    +inline
    +
    + +
    +
    + +

    ◆ begin() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator mcpp::HeightMap::begin () const
    +
    +inline
    +
    + +
    +
    + +

    ◆ end() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator mcpp::HeightMap::end ()
    +
    +inline
    +
    + +
    +
    + +

    ◆ end() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator mcpp::HeightMap::end () const
    +
    +inline
    +
    + +
    +
    + +

    ◆ fill_coord()

    + +
    +
    + + + + + + + + +
    void mcpp::HeightMap::fill_coord (Coordinateout) const
    +
    +

    Fill a coordinate inplace with the highest y coordinate at the loc's x and z components.

    Parameters
    + + +
    locCoordinate to fill y value for
    +
    +
    + +
    +
    + +

    ◆ get()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    int16_t mcpp::HeightMap::get (int x,
    int z 
    ) const
    +
    +

    Get the height using an offset from the origin/base point of the heights area

    Parameters
    + + + +
    xx offset to access underlying array
    zz offset to access underlying array
    +
    +
    +
    Returns
    : height at specified offset
    + +
    +
    + +

    ◆ get_worldspace()

    + +
    +
    + + + + + + + + +
    int16_t mcpp::HeightMap::get_worldspace (const Coordinate2Dloc) const
    +
    +

    Get the height at a Minecraft coordinate if saved inside the height map

    Parameters
    + + +
    locCoordinate2D in Minecraft world to access in the map
    +
    +
    +
    Returns
    : height at specified coordinate
    + +
    +
    + +

    ◆ operator=() [1/2]

    + +
    +
    + + + + + + + + +
    HeightMap & mcpp::HeightMap::operator= (const HeightMapother)
    +
    + +
    +
    + +

    ◆ operator=() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    HeightMap & mcpp::HeightMap::operator= (HeightMap && other)
    +
    +default
    +
    + +
    +
    + +

    ◆ x_len()

    + +
    +
    + + + + + + + +
    uint16_t mcpp::HeightMap::x_len () const
    +
    +

    Gets the x length of the HeightMap.

    Returns
    x length of the HeightMap
    + +
    +
    + +

    ◆ z_len()

    + +
    +
    + + + + + + + +
    uint16_t mcpp::HeightMap::z_len () const
    +
    +

    Gets the z length of the HeightMap.

    Returns
    z length of the HeightMap
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_height_map.js b/structmcpp_1_1_height_map.js new file mode 100644 index 00000000..5251f44c --- /dev/null +++ b/structmcpp_1_1_height_map.js @@ -0,0 +1,21 @@ +var structmcpp_1_1_height_map = +[ + [ "ConstIterator", "structmcpp_1_1_height_map_1_1_const_iterator.html", "structmcpp_1_1_height_map_1_1_const_iterator" ], + [ "Iterator", "structmcpp_1_1_height_map_1_1_iterator.html", "structmcpp_1_1_height_map_1_1_iterator" ], + [ "HeightMap", "structmcpp_1_1_height_map.html#a659f03dd9809854c68369a96389d34c4", null ], + [ "~HeightMap", "structmcpp_1_1_height_map.html#a4eeedc5ee0f765c5fd9a24a780e5ba79", null ], + [ "HeightMap", "structmcpp_1_1_height_map.html#ac83adeb98538249ae8fd801cc6c739b2", null ], + [ "HeightMap", "structmcpp_1_1_height_map.html#a12f1954bc6d9187df6d7d7e12a4b4701", null ], + [ "base_pt", "structmcpp_1_1_height_map.html#a74388c7e2c66d1dd5c3d371ada6772c5", null ], + [ "begin", "structmcpp_1_1_height_map.html#a39eabb27a08366fff7a4f64fd0065cb4", null ], + [ "begin", "structmcpp_1_1_height_map.html#a6c35bbb2046585a447efaeb671267bde", null ], + [ "end", "structmcpp_1_1_height_map.html#a83541e8a13e78799fcd0eaf6925c181b", null ], + [ "end", "structmcpp_1_1_height_map.html#a4e326e338339e93a577a76c5ef26a5e5", null ], + [ "fill_coord", "structmcpp_1_1_height_map.html#a28e5c2e7c9232b40ce56480e4f8514e3", null ], + [ "get", "structmcpp_1_1_height_map.html#a79a245ec5b2920271b3d98dbab917f35", null ], + [ "get_worldspace", "structmcpp_1_1_height_map.html#ab67275d7088287eeb872fcfe8fce2401", null ], + [ "operator=", "structmcpp_1_1_height_map.html#adddc2a6d548b17967d717cdbf5e68ae1", null ], + [ "operator=", "structmcpp_1_1_height_map.html#a995ed2e3e4125736056986cea04eb142", null ], + [ "x_len", "structmcpp_1_1_height_map.html#a152ce47a657b30d78e5a591596ade889", null ], + [ "z_len", "structmcpp_1_1_height_map.html#a1d05df8a6379d15b0ee5c1364415a41e", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_height_map_1_1_const_iterator-members.html b/structmcpp_1_1_height_map_1_1_const_iterator-members.html new file mode 100644 index 00000000..afe2383e --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_const_iterator-members.html @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + + + + + + diff --git a/structmcpp_1_1_height_map_1_1_const_iterator.html b/structmcpp_1_1_height_map_1_1_const_iterator.html new file mode 100644 index 00000000..63b5d1da --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_const_iterator.html @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::HeightMap::ConstIterator Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::HeightMap::ConstIterator Struct Reference
    +
    +
    + +

    An iterator for the const HeightMap structure. + More...

    + +

    #include <heightmap.h>

    + + + + + + + + + + + + +

    +Public Types

    using iterator_category = std::forward_iterator_tag
     
    using difference_type = std::ptrdiff_t
     
    using value_type = int16_t
     
    using pointer = const int16_t *
     
    using reference = const int16_t &
     
    + + + + + + + + + + + + + + + + +

    +Public Member Functions

     ConstIterator (pointer ptr)
     Constructs an iterator at the given pointer position.
     
    reference operator* () const
     Dereference the iterator to access the value at the current position.
     
    pointer operator-> ()
     Access the pointer to the current element.
     
    ConstIteratoroperator++ ()
     Pre-increment operator. Advances the iterator to the next position.
     
    ConstIterator operator++ (int)
     Post-increment operator. Advances the iterator to the next position.
     
    + + + + + + + +

    +Friends

    bool operator== (const ConstIterator &a, const ConstIterator &b)
     Equality comparison operator.
     
    bool operator!= (const ConstIterator &a, const ConstIterator &b)
     Inequality comparison operator.
     
    +

    Detailed Description

    +

    An iterator for the const HeightMap structure.

    +

    This iterator allows for range-based for loops and standard const iterator operations over the height data stored within a HeightMap.

    +

    Member Typedef Documentation

    + +

    ◆ difference_type

    + +
    +
    + + + + +
    using mcpp::HeightMap::ConstIterator::difference_type = std::ptrdiff_t
    +
    + +
    +
    + +

    ◆ iterator_category

    + +
    +
    + + + + +
    using mcpp::HeightMap::ConstIterator::iterator_category = std::forward_iterator_tag
    +
    + +
    +
    + +

    ◆ pointer

    + +
    +
    + + + + +
    using mcpp::HeightMap::ConstIterator::pointer = const int16_t*
    +
    + +
    +
    + +

    ◆ reference

    + +
    +
    + + + + +
    using mcpp::HeightMap::ConstIterator::reference = const int16_t&
    +
    + +
    +
    + +

    ◆ value_type

    + +
    +
    + + + + +
    using mcpp::HeightMap::ConstIterator::value_type = int16_t
    +
    + +
    +
    +

    Constructor & Destructor Documentation

    + +

    ◆ ConstIterator()

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::HeightMap::ConstIterator::ConstIterator (pointer ptr)
    +
    +inline
    +
    + +

    Constructs an iterator at the given pointer position.

    +
    Parameters
    + + +
    ptrPointer to the position in the height array.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator*()

    + +
    +
    + + + + + +
    + + + + + + + +
    reference mcpp::HeightMap::ConstIterator::operator* () const
    +
    +inline
    +
    + +

    Dereference the iterator to access the value at the current position.

    +
    Returns
    Reference to the current element.
    + +
    +
    + +

    ◆ operator++() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    ConstIterator & mcpp::HeightMap::ConstIterator::operator++ ()
    +
    +inline
    +
    + +

    Pre-increment operator. Advances the iterator to the next position.

    +
    Returns
    Reference to the updated iterator.
    + +
    +
    + +

    ◆ operator++() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    ConstIterator mcpp::HeightMap::ConstIterator::operator++ (int )
    +
    +inline
    +
    + +

    Post-increment operator. Advances the iterator to the next position.

    +
    Parameters
    + + +
    intUnused dummy parameter to differentiate from prefix increment.
    +
    +
    +
    Returns
    Iterator to the original position before incrementing.
    + +
    +
    + +

    ◆ operator->()

    + +
    +
    + + + + + +
    + + + + + + + +
    pointer mcpp::HeightMap::ConstIterator::operator-> ()
    +
    +inline
    +
    + +

    Access the pointer to the current element.

    +
    Returns
    Pointer to the current element.
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator!=

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator!= (const ConstIteratora,
    const ConstIteratorb 
    )
    +
    +friend
    +
    + +

    Inequality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if iterators point to different positions, false otherwise.
    + +
    +
    + +

    ◆ operator==

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator== (const ConstIteratora,
    const ConstIteratorb 
    )
    +
    +friend
    +
    + +

    Equality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if both iterators point to the same position, false otherwise.
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_height_map_1_1_const_iterator.js b/structmcpp_1_1_height_map_1_1_const_iterator.js new file mode 100644 index 00000000..8ee786eb --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_const_iterator.js @@ -0,0 +1,15 @@ +var structmcpp_1_1_height_map_1_1_const_iterator = +[ + [ "difference_type", "structmcpp_1_1_height_map_1_1_const_iterator.html#aff655f437dcd961d5740a1f117e144e9", null ], + [ "iterator_category", "structmcpp_1_1_height_map_1_1_const_iterator.html#ae45cf53fdeb6f1819547a3be9c71b9d6", null ], + [ "pointer", "structmcpp_1_1_height_map_1_1_const_iterator.html#ae63dd0a431e21e8526e22e7c4ba7e625", null ], + [ "reference", "structmcpp_1_1_height_map_1_1_const_iterator.html#a027ff4b8fbbb1276e5b1f6d99bfe4abf", null ], + [ "value_type", "structmcpp_1_1_height_map_1_1_const_iterator.html#aa83fe7872d10903e267cd04d597da250", null ], + [ "ConstIterator", "structmcpp_1_1_height_map_1_1_const_iterator.html#a2e5f6370cef6618061247fed008339a1", null ], + [ "operator*", "structmcpp_1_1_height_map_1_1_const_iterator.html#ab521afe468c80feff76e9187e3912fdb", null ], + [ "operator++", "structmcpp_1_1_height_map_1_1_const_iterator.html#ac0d85953eb4fa815a2f09166fadfc92b", null ], + [ "operator++", "structmcpp_1_1_height_map_1_1_const_iterator.html#a9b6520996ece19e5cbd3d03bd6076071", null ], + [ "operator->", "structmcpp_1_1_height_map_1_1_const_iterator.html#afa68ffb26e55223296df593ae0d5c777", null ], + [ "operator!=", "structmcpp_1_1_height_map_1_1_const_iterator.html#ae2d098d75c9b9d94fed5c416aa4ca0cf", null ], + [ "operator==", "structmcpp_1_1_height_map_1_1_const_iterator.html#adaf71c7726f80ad0a7b8046bc2e1db68", null ] +]; \ No newline at end of file diff --git a/structmcpp_1_1_height_map_1_1_iterator-members.html b/structmcpp_1_1_height_map_1_1_iterator-members.html new file mode 100644 index 00000000..cef713db --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_iterator-members.html @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + mcpp: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    mcpp::HeightMap::Iterator Member List
    +
    + +
    + + + + diff --git a/structmcpp_1_1_height_map_1_1_iterator.html b/structmcpp_1_1_height_map_1_1_iterator.html new file mode 100644 index 00000000..4ebee266 --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_iterator.html @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + mcpp: mcpp::HeightMap::Iterator Struct Reference + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    mcpp +
    +
    C++ Minecraft Library
    +
    +
    + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    mcpp::HeightMap::Iterator Struct Reference
    +
    +
    + +

    An iterator for the HeightMap structure. + More...

    + +

    #include <heightmap.h>

    + + + + + + + + + + + + +

    +Public Types

    using iterator_category = std::forward_iterator_tag
     
    using difference_type = std::ptrdiff_t
     
    using value_type = int16_t
     
    using pointer = int16_t *
     
    using reference = int16_t &
     
    + + + + + + + + + + + + + + + + +

    +Public Member Functions

     Iterator (pointer ptr)
     Constructs an iterator at the given pointer position.
     
    reference operator* () const
     Dereference the iterator to access the value at the current position.
     
    pointer operator-> ()
     Access the pointer to the current element.
     
    Iteratoroperator++ ()
     Pre-increment operator. Advances the iterator to the next position.
     
    Iterator operator++ (int)
     Post-increment operator. Advances the iterator to the next position.
     
    + + + + + + + +

    +Friends

    bool operator== (const Iterator &a, const Iterator &b)
     Equality comparison operator.
     
    bool operator!= (const Iterator &a, const Iterator &b)
     Inequality comparison operator.
     
    +

    Detailed Description

    +

    An iterator for the HeightMap structure.

    +

    This iterator allows for range-based for loops and standard iterator operations over the height data stored within a HeightMap.

    +

    Member Typedef Documentation

    + +

    ◆ difference_type

    + +
    +
    + + + + +
    using mcpp::HeightMap::Iterator::difference_type = std::ptrdiff_t
    +
    + +
    +
    + +

    ◆ iterator_category

    + +
    +
    + + + + +
    using mcpp::HeightMap::Iterator::iterator_category = std::forward_iterator_tag
    +
    + +
    +
    + +

    ◆ pointer

    + +
    +
    + + + + +
    using mcpp::HeightMap::Iterator::pointer = int16_t*
    +
    + +
    +
    + +

    ◆ reference

    + +
    +
    + + + + +
    using mcpp::HeightMap::Iterator::reference = int16_t&
    +
    + +
    +
    + +

    ◆ value_type

    + +
    +
    + + + + +
    using mcpp::HeightMap::Iterator::value_type = int16_t
    +
    + +
    +
    +

    Constructor & Destructor Documentation

    + +

    ◆ Iterator()

    + +
    +
    + + + + + +
    + + + + + + + + +
    mcpp::HeightMap::Iterator::Iterator (pointer ptr)
    +
    +inline
    +
    + +

    Constructs an iterator at the given pointer position.

    +
    Parameters
    + + +
    ptrPointer to the position in the height array.
    +
    +
    + +
    +
    +

    Member Function Documentation

    + +

    ◆ operator*()

    + +
    +
    + + + + + +
    + + + + + + + +
    reference mcpp::HeightMap::Iterator::operator* () const
    +
    +inline
    +
    + +

    Dereference the iterator to access the value at the current position.

    +
    Returns
    Reference to the current element.
    + +
    +
    + +

    ◆ operator++() [1/2]

    + +
    +
    + + + + + +
    + + + + + + + +
    Iterator & mcpp::HeightMap::Iterator::operator++ ()
    +
    +inline
    +
    + +

    Pre-increment operator. Advances the iterator to the next position.

    +
    Returns
    Reference to the updated iterator.
    + +
    +
    + +

    ◆ operator++() [2/2]

    + +
    +
    + + + + + +
    + + + + + + + + +
    Iterator mcpp::HeightMap::Iterator::operator++ (int )
    +
    +inline
    +
    + +

    Post-increment operator. Advances the iterator to the next position.

    +
    Parameters
    + + +
    intUnused dummy parameter to differentiate from prefix increment.
    +
    +
    +
    Returns
    Iterator to the original position before incrementing.
    + +
    +
    + +

    ◆ operator->()

    + +
    +
    + + + + + +
    + + + + + + + +
    pointer mcpp::HeightMap::Iterator::operator-> ()
    +
    +inline
    +
    + +

    Access the pointer to the current element.

    +
    Returns
    Pointer to the current element.
    + +
    +
    +

    Friends And Related Symbol Documentation

    + +

    ◆ operator!=

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator!= (const Iteratora,
    const Iteratorb 
    )
    +
    +friend
    +
    + +

    Inequality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if iterators point to different positions, false otherwise.
    + +
    +
    + +

    ◆ operator==

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    bool operator== (const Iteratora,
    const Iteratorb 
    )
    +
    +friend
    +
    + +

    Equality comparison operator.

    +
    Parameters
    + + + +
    aFirst iterator to compare.
    bSecond iterator to compare.
    +
    +
    +
    Returns
    true if both iterators point to the same position, false otherwise.
    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/structmcpp_1_1_height_map_1_1_iterator.js b/structmcpp_1_1_height_map_1_1_iterator.js new file mode 100644 index 00000000..915c9767 --- /dev/null +++ b/structmcpp_1_1_height_map_1_1_iterator.js @@ -0,0 +1,15 @@ +var structmcpp_1_1_height_map_1_1_iterator = +[ + [ "difference_type", "structmcpp_1_1_height_map_1_1_iterator.html#aefadac9f14ed715e1cb24b95bbaa62fc", null ], + [ "iterator_category", "structmcpp_1_1_height_map_1_1_iterator.html#a83cecdb30e49044d7cf38f1a5079e2b7", null ], + [ "pointer", "structmcpp_1_1_height_map_1_1_iterator.html#a3777e970064b05753ce1cf4e43aa79e3", null ], + [ "reference", "structmcpp_1_1_height_map_1_1_iterator.html#a13975c7ad5e98a7760d5ca8530e02da2", null ], + [ "value_type", "structmcpp_1_1_height_map_1_1_iterator.html#a089592672f20646edb87f1dc2cee71a1", null ], + [ "Iterator", "structmcpp_1_1_height_map_1_1_iterator.html#ab25fd1c9be320457edd894653a417c3a", null ], + [ "operator*", "structmcpp_1_1_height_map_1_1_iterator.html#aadf47fd2adee2871ed6ea994a6ce5c03", null ], + [ "operator++", "structmcpp_1_1_height_map_1_1_iterator.html#a4927f2889df7ca838be54746d81a6a68", null ], + [ "operator++", "structmcpp_1_1_height_map_1_1_iterator.html#a5a687d9afd110e5c246eeb6c00d4e569", null ], + [ "operator->", "structmcpp_1_1_height_map_1_1_iterator.html#a500064cae9051413dc3e0bf159bf8121", null ], + [ "operator!=", "structmcpp_1_1_height_map_1_1_iterator.html#a27aed9f3ea67a677964fa51de28a5824", null ], + [ "operator==", "structmcpp_1_1_height_map_1_1_iterator.html#adf9a9358b475317bd816d7b47a0f5cd1", null ] +]; \ No newline at end of file diff --git a/sync_off.png b/sync_off.png new file mode 100644 index 00000000..224ee1ee Binary files /dev/null and b/sync_off.png differ diff --git a/sync_on.png b/sync_on.png new file mode 100644 index 00000000..c704bb74 Binary files /dev/null and b/sync_on.png differ diff --git a/tab_a.png b/tab_a.png new file mode 100644 index 00000000..8200d145 Binary files /dev/null and b/tab_a.png differ diff --git a/tab_ad.png b/tab_ad.png new file mode 100644 index 00000000..880241fc Binary files /dev/null and b/tab_ad.png differ diff --git a/tab_b.png b/tab_b.png new file mode 100644 index 00000000..65e4a7c8 Binary files /dev/null and b/tab_b.png differ diff --git a/tab_bd.png b/tab_bd.png new file mode 100644 index 00000000..589885cf Binary files /dev/null and b/tab_bd.png differ diff --git a/tab_h.png b/tab_h.png new file mode 100644 index 00000000..f9ddf130 Binary files /dev/null and b/tab_h.png differ diff --git a/tab_hd.png b/tab_hd.png new file mode 100644 index 00000000..0fd62f19 Binary files /dev/null and b/tab_hd.png differ diff --git a/tab_s.png b/tab_s.png new file mode 100644 index 00000000..69bd9393 Binary files /dev/null and b/tab_s.png differ diff --git a/tab_sd.png b/tab_sd.png new file mode 100644 index 00000000..b1a0f855 Binary files /dev/null and b/tab_sd.png differ diff --git a/tabs.css b/tabs.css new file mode 100644 index 00000000..e25118d5 --- /dev/null +++ b/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:#003C74;-webkit-transition:all 0.25s;transition:all 0.25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked~.main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}#main-menu-state:not(:checked)~#main-menu{display:none}#main-menu-state:checked~#main-menu{display:block}@media (min-width: 768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked)~#main-menu{display:block}}.sm-dox{background-image:url('tab_b.png')}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255, 255, 255, 0.9);color:#00274D;outline:none}.sm-dox a:hover{background-image:url('tab_a.png');background-repeat:repeat-x;color:white;text-shadow:0px 1px 1px rgba(0, 0, 0, 1.0)}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255, 255, 255, 0.5);border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:white}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url('tab_a.png');background-repeat:repeat-x;color:white;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url('tab_b.png');line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#00274D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url('tab_s.png');background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url('tab_a.png');background-repeat:repeat-x;color:white;text-shadow:0px 1px 1px rgba(0, 0, 0, 1.0)}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent white transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:white;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555555;background-image:none;border:0 !important;color:#555555;background-image:none}.sm-dox ul a:hover{background-image:url('tab_a.png');background-repeat:repeat-x;color:white;text-shadow:0px 1px 1px rgba(0, 0, 0, 1.0)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:white;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url('tab_b.png')}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:white}} diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index df5c8681..00000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_executable(local_tests EXCLUDE_FROM_ALL local_tests.cpp) -add_executable(minecraft_tests EXCLUDE_FROM_ALL local_tests.cpp minecraft_tests.cpp) -add_executable(test_suite EXCLUDE_FROM_ALL local_tests.cpp minecraft_tests.cpp) - -target_link_libraries(local_tests ${PROJECT_NAME}) -target_link_libraries(minecraft_tests ${PROJECT_NAME}) -target_link_libraries(test_suite ${PROJECT_NAME}) - -# Enable player tests for full test suite -set_property(TARGET test_suite PROPERTY COMPILE_DEFINITIONS PLAYER_TEST) diff --git a/test/doctest.h b/test/doctest.h deleted file mode 100644 index 856fa79a..00000000 --- a/test/doctest.h +++ /dev/null @@ -1,7019 +0,0 @@ -// ====================================================================== lgtm [cpp/missing-header-guard] -// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! == -// ====================================================================== -// -// doctest.h - the lightest feature-rich C++ single-header testing framework for unit test and TDD -// -// Copyright (c) 2016-2021 Viktor Kirilov -// -// Distributed under the MIT Software License -// See accompanying file LICENSE.txt or copy at -// https://opensource.org/licenses/MIT -// -// The documentation can be found at the library's page: -// https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md -// -// ================================================================================================= -// ================================================================================================= -// ================================================================================================= -// -// The library is heavily influenced by Catch - https://github.com/catchorg/Catch2 -// which uses the Boost Software License - Version 1.0 -// see here - https://github.com/catchorg/Catch2/blob/master/LICENSE.txt -// -// The concept of subcases (sections in Catch) and expression decomposition are from there. -// Some parts of the code are taken directly: -// - stringification - the detection of "ostream& operator<<(ostream&, const T&)" and StringMaker<> -// - the Approx() helper class for floating point comparison -// - colors in the console -// - breaking into a debugger -// - signal / SEH handling -// - timer -// - XmlWriter class - thanks to Phil Nash for allowing the direct reuse (AKA copy/paste) -// -// The expression decomposing templates are taken from lest - https://github.com/martinmoene/lest -// which uses the Boost Software License - Version 1.0 -// see here - https://github.com/martinmoene/lest/blob/master/LICENSE.txt -// -// ================================================================================================= -// ================================================================================================= -// ================================================================================================= - -#ifndef DOCTEST_LIBRARY_INCLUDED -#define DOCTEST_LIBRARY_INCLUDED - -// ================================================================================================= -// == VERSION ====================================================================================== -// ================================================================================================= - -#define DOCTEST_VERSION_MAJOR 2 -#define DOCTEST_VERSION_MINOR 4 -#define DOCTEST_VERSION_PATCH 9 - -// util we need here -#define DOCTEST_TOSTR_IMPL(x) #x -#define DOCTEST_TOSTR(x) DOCTEST_TOSTR_IMPL(x) - -#define DOCTEST_VERSION_STR \ - DOCTEST_TOSTR(DOCTEST_VERSION_MAJOR) "." \ - DOCTEST_TOSTR(DOCTEST_VERSION_MINOR) "." \ - DOCTEST_TOSTR(DOCTEST_VERSION_PATCH) - -#define DOCTEST_VERSION \ - (DOCTEST_VERSION_MAJOR * 10000 + DOCTEST_VERSION_MINOR * 100 + DOCTEST_VERSION_PATCH) - -// ================================================================================================= -// == COMPILER VERSION ============================================================================= -// ================================================================================================= - -// ideas for the version stuff are taken from here: https://github.com/cxxstuff/cxx_detect - -#ifdef _MSC_VER -#define DOCTEST_CPLUSPLUS _MSVC_LANG -#else -#define DOCTEST_CPLUSPLUS __cplusplus -#endif - -#define DOCTEST_COMPILER(MAJOR, MINOR, PATCH) ((MAJOR)*10000000 + (MINOR)*100000 + (PATCH)) - -// GCC/Clang and GCC/MSVC are mutually exclusive, but Clang/MSVC are not because of clang-cl... -#if defined(_MSC_VER) && defined(_MSC_FULL_VER) -#if _MSC_VER == _MSC_FULL_VER / 10000 -#define DOCTEST_MSVC DOCTEST_COMPILER(_MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 10000) -#else // MSVC -#define DOCTEST_MSVC \ - DOCTEST_COMPILER(_MSC_VER / 100, (_MSC_FULL_VER / 100000) % 100, _MSC_FULL_VER % 100000) -#endif // MSVC -#endif // MSVC -#if defined(__clang__) && defined(__clang_minor__) -#define DOCTEST_CLANG DOCTEST_COMPILER(__clang_major__, __clang_minor__, __clang_patchlevel__) -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) && \ - !defined(__INTEL_COMPILER) -#define DOCTEST_GCC DOCTEST_COMPILER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) -#endif // GCC - -#ifndef DOCTEST_MSVC -#define DOCTEST_MSVC 0 -#endif // DOCTEST_MSVC -#ifndef DOCTEST_CLANG -#define DOCTEST_CLANG 0 -#endif // DOCTEST_CLANG -#ifndef DOCTEST_GCC -#define DOCTEST_GCC 0 -#endif // DOCTEST_GCC - -// ================================================================================================= -// == COMPILER WARNINGS HELPERS ==================================================================== -// ================================================================================================= - -#if DOCTEST_CLANG -#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x) -#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH _Pragma("clang diagnostic push") -#define DOCTEST_CLANG_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(clang diagnostic ignored w) -#define DOCTEST_CLANG_SUPPRESS_WARNING_POP _Pragma("clang diagnostic pop") -#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_CLANG_SUPPRESS_WARNING_PUSH DOCTEST_CLANG_SUPPRESS_WARNING(w) -#else // DOCTEST_CLANG -#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -#define DOCTEST_CLANG_SUPPRESS_WARNING(w) -#define DOCTEST_CLANG_SUPPRESS_WARNING_POP -#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_CLANG - -#if DOCTEST_GCC -#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x) -#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH _Pragma("GCC diagnostic push") -#define DOCTEST_GCC_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(GCC diagnostic ignored w) -#define DOCTEST_GCC_SUPPRESS_WARNING_POP _Pragma("GCC diagnostic pop") -#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_GCC_SUPPRESS_WARNING_PUSH DOCTEST_GCC_SUPPRESS_WARNING(w) -#else // DOCTEST_GCC -#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH -#define DOCTEST_GCC_SUPPRESS_WARNING(w) -#define DOCTEST_GCC_SUPPRESS_WARNING_POP -#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_GCC - -#if DOCTEST_MSVC -#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH __pragma(warning(push)) -#define DOCTEST_MSVC_SUPPRESS_WARNING(w) __pragma(warning(disable : w)) -#define DOCTEST_MSVC_SUPPRESS_WARNING_POP __pragma(warning(pop)) -#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w) \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH DOCTEST_MSVC_SUPPRESS_WARNING(w) -#else // DOCTEST_MSVC -#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -#define DOCTEST_MSVC_SUPPRESS_WARNING(w) -#define DOCTEST_MSVC_SUPPRESS_WARNING_POP -#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w) -#endif // DOCTEST_MSVC - -// ================================================================================================= -// == COMPILER WARNINGS ============================================================================ -// ================================================================================================= - -// both the header and the implementation suppress all of these, -// so it only makes sense to aggregrate them like so -#define DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH \ - DOCTEST_CLANG_SUPPRESS_WARNING_PUSH \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wunknown-pragmas") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wweak-vtables") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wpadded") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-prototypes") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat") \ - DOCTEST_CLANG_SUPPRESS_WARNING("-Wc++98-compat-pedantic") \ - \ - DOCTEST_GCC_SUPPRESS_WARNING_PUSH \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wunknown-pragmas") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wpragmas") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Weffc++") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-overflow") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wstrict-aliasing") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-declarations") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wuseless-cast") \ - DOCTEST_GCC_SUPPRESS_WARNING("-Wnoexcept") \ - \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ - /* these 4 also disabled globally via cmake: */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4514) /* unreferenced inline function has been removed */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4571) /* SEH related */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4710) /* function not inlined */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4711) /* function selected for inline expansion*/ \ - /* */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4616) /* invalid compiler warning */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4619) /* invalid compiler warning */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4996) /* The compiler encountered a deprecated declaration */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4706) /* assignment within conditional expression */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4512) /* 'class' : assignment operator could not be generated */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4127) /* conditional expression is constant */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4640) /* construction of local static object not thread-safe */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ - /* static analysis */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26439) /* Function may not throw. Declare it 'noexcept' */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26495) /* Always initialize a member variable */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26451) /* Arithmetic overflow ... */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26444) /* Avoid unnamed objects with custom ctor and dtor... */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(26812) /* Prefer 'enum class' over 'enum' */ - -#define DOCTEST_SUPPRESS_COMMON_WARNINGS_POP \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP \ - DOCTEST_GCC_SUPPRESS_WARNING_POP \ - DOCTEST_MSVC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH - -DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wdeprecated") - -DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wctor-dtor-privacy") -DOCTEST_GCC_SUPPRESS_WARNING("-Wnon-virtual-dtor") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-promo") - -DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING(4623) // default constructor was implicitly defined as deleted - -#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN \ - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH \ - DOCTEST_MSVC_SUPPRESS_WARNING(4548) /* before comma no effect; expected side - effect */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4265) /* virtual functions, but destructor is not virtual */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4986) /* exception specification does not match previous */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4350) /* 'member1' called instead of 'member2' */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4668) /* not defined as a preprocessor macro */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4365) /* signed/unsigned mismatch */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4774) /* format string not a string literal */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4820) /* padding */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4623) /* default constructor was implicitly deleted */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5039) /* pointer to pot. throwing function passed to extern C */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(5105) /* macro producing 'defined' has undefined behavior */ \ - DOCTEST_MSVC_SUPPRESS_WARNING(4738) /* storing float result in memory, loss of performance */ - -#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END DOCTEST_MSVC_SUPPRESS_WARNING_POP - -// ================================================================================================= -// == FEATURE DETECTION ============================================================================ -// ================================================================================================= - -// general compiler feature support table: https://en.cppreference.com/w/cpp/compiler_support -// MSVC C++11 feature support table: https://msdn.microsoft.com/en-us/library/hh567368.aspx -// GCC C++11 feature support table: https://gcc.gnu.org/projects/cxx-status.html -// MSVC version table: -// https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering -// MSVC++ 14.3 (17) _MSC_VER == 1930 (Visual Studio 2022) -// MSVC++ 14.2 (16) _MSC_VER == 1920 (Visual Studio 2019) -// MSVC++ 14.1 (15) _MSC_VER == 1910 (Visual Studio 2017) -// MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -// MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) -// MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012) -// MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) -// MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) -// MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) - -// Universal Windows Platform support -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -#define DOCTEST_CONFIG_NO_WINDOWS_SEH -#endif // WINAPI_FAMILY -#if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH) -#define DOCTEST_CONFIG_WINDOWS_SEH -#endif // MSVC -#if defined(DOCTEST_CONFIG_NO_WINDOWS_SEH) && defined(DOCTEST_CONFIG_WINDOWS_SEH) -#undef DOCTEST_CONFIG_WINDOWS_SEH -#endif // DOCTEST_CONFIG_NO_WINDOWS_SEH - -#if !defined(_WIN32) && !defined(__QNX__) && !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && \ - !defined(__EMSCRIPTEN__) && !defined(__wasi__) -#define DOCTEST_CONFIG_POSIX_SIGNALS -#endif // _WIN32 -#if defined(DOCTEST_CONFIG_NO_POSIX_SIGNALS) && defined(DOCTEST_CONFIG_POSIX_SIGNALS) -#undef DOCTEST_CONFIG_POSIX_SIGNALS -#endif // DOCTEST_CONFIG_NO_POSIX_SIGNALS - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -#if !defined(__cpp_exceptions) && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) \ - || defined(__wasi__) -#define DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // no exceptions -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS -#define DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS - -#if defined(DOCTEST_CONFIG_NO_EXCEPTIONS) && !defined(DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS) -#define DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS && !DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS - -#ifdef __wasi__ -#define DOCTEST_CONFIG_NO_MULTITHREADING -#endif - -#if defined(DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN) && !defined(DOCTEST_CONFIG_IMPLEMENT) -#define DOCTEST_CONFIG_IMPLEMENT -#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -#if defined(_WIN32) || defined(__CYGWIN__) -#if DOCTEST_MSVC -#define DOCTEST_SYMBOL_EXPORT __declspec(dllexport) -#define DOCTEST_SYMBOL_IMPORT __declspec(dllimport) -#else // MSVC -#define DOCTEST_SYMBOL_EXPORT __attribute__((dllexport)) -#define DOCTEST_SYMBOL_IMPORT __attribute__((dllimport)) -#endif // MSVC -#else // _WIN32 -#define DOCTEST_SYMBOL_EXPORT __attribute__((visibility("default"))) -#define DOCTEST_SYMBOL_IMPORT -#endif // _WIN32 - -#ifdef DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL -#ifdef DOCTEST_CONFIG_IMPLEMENT -#define DOCTEST_INTERFACE DOCTEST_SYMBOL_EXPORT -#else // DOCTEST_CONFIG_IMPLEMENT -#define DOCTEST_INTERFACE DOCTEST_SYMBOL_IMPORT -#endif // DOCTEST_CONFIG_IMPLEMENT -#else // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL -#define DOCTEST_INTERFACE -#endif // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL - -// needed for extern template instantiations -// see https://github.com/fmtlib/fmt/issues/2228 -#if DOCTEST_MSVC -#define DOCTEST_INTERFACE_DECL -#define DOCTEST_INTERFACE_DEF DOCTEST_INTERFACE -#else // DOCTEST_MSVC -#define DOCTEST_INTERFACE_DECL DOCTEST_INTERFACE -#define DOCTEST_INTERFACE_DEF -#endif // DOCTEST_MSVC - -#define DOCTEST_EMPTY - -#if DOCTEST_MSVC -#define DOCTEST_NOINLINE __declspec(noinline) -#define DOCTEST_UNUSED -#define DOCTEST_ALIGNMENT(x) -#elif DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 5, 0) -#define DOCTEST_NOINLINE -#define DOCTEST_UNUSED -#define DOCTEST_ALIGNMENT(x) -#else -#define DOCTEST_NOINLINE __attribute__((noinline)) -#define DOCTEST_UNUSED __attribute__((unused)) -#define DOCTEST_ALIGNMENT(x) __attribute__((aligned(x))) -#endif - -#ifndef DOCTEST_NORETURN -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_NORETURN -#else // DOCTEST_MSVC -#define DOCTEST_NORETURN [[noreturn]] -#endif // DOCTEST_MSVC -#endif // DOCTEST_NORETURN - -#ifndef DOCTEST_NOEXCEPT -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_NOEXCEPT -#else // DOCTEST_MSVC -#define DOCTEST_NOEXCEPT noexcept -#endif // DOCTEST_MSVC -#endif // DOCTEST_NOEXCEPT - -#ifndef DOCTEST_CONSTEXPR -#if DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_CONSTEXPR const -#define DOCTEST_CONSTEXPR_FUNC inline -#else // DOCTEST_MSVC -#define DOCTEST_CONSTEXPR constexpr -#define DOCTEST_CONSTEXPR_FUNC constexpr -#endif // DOCTEST_MSVC -#endif // DOCTEST_CONSTEXPR - -// ================================================================================================= -// == FEATURE DETECTION END ======================================================================== -// ================================================================================================= - -#define DOCTEST_DECLARE_INTERFACE(name) \ - virtual ~name(); \ - name() = default; \ - name(const name&) = delete; \ - name(name&&) = delete; \ - name& operator=(const name&) = delete; \ - name& operator=(name&&) = delete; - -#define DOCTEST_DEFINE_INTERFACE(name) \ - name::~name() = default; - -// internal macros for string concatenation and anonymous variable name generation -#define DOCTEST_CAT_IMPL(s1, s2) s1##s2 -#define DOCTEST_CAT(s1, s2) DOCTEST_CAT_IMPL(s1, s2) -#ifdef __COUNTER__ // not standard and may be missing for some compilers -#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __COUNTER__) -#else // __COUNTER__ -#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __LINE__) -#endif // __COUNTER__ - -#ifndef DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE -#define DOCTEST_REF_WRAP(x) x& -#else // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE -#define DOCTEST_REF_WRAP(x) x -#endif // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE - -// not using __APPLE__ because... this is how Catch does it -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -#define DOCTEST_PLATFORM_MAC -#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#define DOCTEST_PLATFORM_IPHONE -#elif defined(_WIN32) -#define DOCTEST_PLATFORM_WINDOWS -#elif defined(__wasi__) -#define DOCTEST_PLATFORM_WASI -#else // DOCTEST_PLATFORM -#define DOCTEST_PLATFORM_LINUX -#endif // DOCTEST_PLATFORM - -namespace doctest { namespace detail { - static DOCTEST_CONSTEXPR int consume(const int*, int) noexcept { return 0; } -}} - -#define DOCTEST_GLOBAL_NO_WARNINGS(var, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wglobal-constructors") \ - static const int var = doctest::detail::consume(&var, __VA_ARGS__); \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#ifndef DOCTEST_BREAK_INTO_DEBUGGER -// should probably take a look at https://github.com/scottt/debugbreak -#ifdef DOCTEST_PLATFORM_LINUX -#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) -// Break at the location of the failing check if possible -#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("int $3\n" : :) // NOLINT(hicpp-no-assembler) -#else -#include -#define DOCTEST_BREAK_INTO_DEBUGGER() raise(SIGTRAP) -#endif -#elif defined(DOCTEST_PLATFORM_MAC) -#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__i386) -#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("int $3\n" : :) // NOLINT(hicpp-no-assembler) -#elif defined(__ppc__) || defined(__ppc64__) -// https://www.cocoawithlove.com/2008/03/break-into-debugger.html -#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n": : : "memory","r0","r3","r4") // NOLINT(hicpp-no-assembler) -#else -#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__("brk #0"); // NOLINT(hicpp-no-assembler) -#endif -#elif DOCTEST_MSVC -#define DOCTEST_BREAK_INTO_DEBUGGER() __debugbreak() -#elif defined(__MINGW32__) -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wredundant-decls") -extern "C" __declspec(dllimport) void __stdcall DebugBreak(); -DOCTEST_GCC_SUPPRESS_WARNING_POP -#define DOCTEST_BREAK_INTO_DEBUGGER() ::DebugBreak() -#else // linux -#define DOCTEST_BREAK_INTO_DEBUGGER() (static_cast(0)) -#endif // linux -#endif // DOCTEST_BREAK_INTO_DEBUGGER - -// this is kept here for backwards compatibility since the config option was changed -#ifdef DOCTEST_CONFIG_USE_IOSFWD -#ifndef DOCTEST_CONFIG_USE_STD_HEADERS -#define DOCTEST_CONFIG_USE_STD_HEADERS -#endif -#endif // DOCTEST_CONFIG_USE_IOSFWD - -// for clang - always include ciso646 (which drags some std stuff) because -// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in -// which case we don't want to forward declare stuff from std - for reference: -// https://github.com/doctest/doctest/issues/126 -// https://github.com/doctest/doctest/issues/356 -#if DOCTEST_CLANG -#include -#ifdef _LIBCPP_VERSION -#ifndef DOCTEST_CONFIG_USE_STD_HEADERS -#define DOCTEST_CONFIG_USE_STD_HEADERS -#endif -#endif // _LIBCPP_VERSION -#endif // clang - -#ifdef DOCTEST_CONFIG_USE_STD_HEADERS -#ifndef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#define DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN -#include -#include -#include -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END -#else // DOCTEST_CONFIG_USE_STD_HEADERS - -// Forward declaring 'X' in namespace std is not permitted by the C++ Standard. -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4643) - -namespace std { // NOLINT(cert-dcl58-cpp) -typedef decltype(nullptr) nullptr_t; // NOLINT(modernize-use-using) -typedef decltype(sizeof(void*)) size_t; // NOLINT(modernize-use-using) -template -struct char_traits; -template <> -struct char_traits; -template -class basic_ostream; // NOLINT(fuchsia-virtual-inheritance) -typedef basic_ostream> ostream; // NOLINT(modernize-use-using) -template -// NOLINTNEXTLINE -basic_ostream& operator<<(basic_ostream&, const char*); -template -class basic_istream; -typedef basic_istream> istream; // NOLINT(modernize-use-using) -template -class tuple; -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 -template -class allocator; -template -class basic_string; -using string = basic_string, allocator>; -#endif // VS 2019 -} // namespace std - -DOCTEST_MSVC_SUPPRESS_WARNING_POP - -#endif // DOCTEST_CONFIG_USE_STD_HEADERS - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#include -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - -namespace doctest { - -using std::size_t; - -DOCTEST_INTERFACE extern bool is_running_in_test; - -#ifndef DOCTEST_CONFIG_STRING_SIZE_TYPE -#define DOCTEST_CONFIG_STRING_SIZE_TYPE unsigned -#endif - -// A 24 byte string class (can be as small as 17 for x64 and 13 for x86) that can hold strings with length -// of up to 23 chars on the stack before going on the heap - the last byte of the buffer is used for: -// - "is small" bit - the highest bit - if "0" then it is small - otherwise its "1" (128) -// - if small - capacity left before going on the heap - using the lowest 5 bits -// - if small - 2 bits are left unused - the second and third highest ones -// - if small - acts as a null terminator if strlen() is 23 (24 including the null terminator) -// and the "is small" bit remains "0" ("as well as the capacity left") so its OK -// Idea taken from this lecture about the string implementation of facebook/folly - fbstring -// https://www.youtube.com/watch?v=kPR8h4-qZdk -// TODO: -// - optimizations - like not deleting memory unnecessarily in operator= and etc. -// - resize/reserve/clear -// - replace -// - back/front -// - iterator stuff -// - find & friends -// - push_back/pop_back -// - assign/insert/erase -// - relational operators as free functions - taking const char* as one of the params -class DOCTEST_INTERFACE String -{ -public: - using size_type = DOCTEST_CONFIG_STRING_SIZE_TYPE; - -private: - static DOCTEST_CONSTEXPR size_type len = 24; //!OCLINT avoid private static members - static DOCTEST_CONSTEXPR size_type last = len - 1; //!OCLINT avoid private static members - - struct view // len should be more than sizeof(view) - because of the final byte for flags - { - char* ptr; - size_type size; - size_type capacity; - }; - - union - { - char buf[len]; // NOLINT(*-avoid-c-arrays) - view data; - }; - - char* allocate(size_type sz); - - bool isOnStack() const noexcept { return (buf[last] & 128) == 0; } - void setOnHeap() noexcept; - void setLast(size_type in = last) noexcept; - void setSize(size_type sz) noexcept; - - void copy(const String& other); - -public: - static DOCTEST_CONSTEXPR size_type npos = static_cast(-1); - - String() noexcept; - ~String(); - - // cppcheck-suppress noExplicitConstructor - String(const char* in); - String(const char* in, size_type in_size); - - String(std::istream& in, size_type in_size); - - String(const String& other); - String& operator=(const String& other); - - String& operator+=(const String& other); - - String(String&& other) noexcept; - String& operator=(String&& other) noexcept; - - char operator[](size_type i) const; - char& operator[](size_type i); - - // the only functions I'm willing to leave in the interface - available for inlining - const char* c_str() const { return const_cast(this)->c_str(); } // NOLINT - char* c_str() { - if (isOnStack()) { - return reinterpret_cast(buf); - } - return data.ptr; - } - - size_type size() const; - size_type capacity() const; - - String substr(size_type pos, size_type cnt = npos) &&; - String substr(size_type pos, size_type cnt = npos) const &; - - size_type find(char ch, size_type pos = 0) const; - size_type rfind(char ch, size_type pos = npos) const; - - int compare(const char* other, bool no_case = false) const; - int compare(const String& other, bool no_case = false) const; - -friend DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, const String& in); -}; - -DOCTEST_INTERFACE String operator+(const String& lhs, const String& rhs); - -DOCTEST_INTERFACE bool operator==(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator!=(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator<(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator>(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator<=(const String& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator>=(const String& lhs, const String& rhs); - -class DOCTEST_INTERFACE Contains { -public: - explicit Contains(const String& string); - - bool checkWith(const String& other) const; - - String string; -}; - -DOCTEST_INTERFACE String toString(const Contains& in); - -DOCTEST_INTERFACE bool operator==(const String& lhs, const Contains& rhs); -DOCTEST_INTERFACE bool operator==(const Contains& lhs, const String& rhs); -DOCTEST_INTERFACE bool operator!=(const String& lhs, const Contains& rhs); -DOCTEST_INTERFACE bool operator!=(const Contains& lhs, const String& rhs); - -namespace Color { - enum Enum - { - None = 0, - White, - Red, - Green, - Blue, - Cyan, - Yellow, - Grey, - - Bright = 0x10, - - BrightRed = Bright | Red, - BrightGreen = Bright | Green, - LightGrey = Bright | Grey, - BrightWhite = Bright | White - }; - - DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, Color::Enum code); -} // namespace Color - -namespace assertType { - enum Enum - { - // macro traits - - is_warn = 1, - is_check = 2 * is_warn, - is_require = 2 * is_check, - - is_normal = 2 * is_require, - is_throws = 2 * is_normal, - is_throws_as = 2 * is_throws, - is_throws_with = 2 * is_throws_as, - is_nothrow = 2 * is_throws_with, - - is_false = 2 * is_nothrow, - is_unary = 2 * is_false, // not checked anywhere - used just to distinguish the types - - is_eq = 2 * is_unary, - is_ne = 2 * is_eq, - - is_lt = 2 * is_ne, - is_gt = 2 * is_lt, - - is_ge = 2 * is_gt, - is_le = 2 * is_ge, - - // macro types - - DT_WARN = is_normal | is_warn, - DT_CHECK = is_normal | is_check, - DT_REQUIRE = is_normal | is_require, - - DT_WARN_FALSE = is_normal | is_false | is_warn, - DT_CHECK_FALSE = is_normal | is_false | is_check, - DT_REQUIRE_FALSE = is_normal | is_false | is_require, - - DT_WARN_THROWS = is_throws | is_warn, - DT_CHECK_THROWS = is_throws | is_check, - DT_REQUIRE_THROWS = is_throws | is_require, - - DT_WARN_THROWS_AS = is_throws_as | is_warn, - DT_CHECK_THROWS_AS = is_throws_as | is_check, - DT_REQUIRE_THROWS_AS = is_throws_as | is_require, - - DT_WARN_THROWS_WITH = is_throws_with | is_warn, - DT_CHECK_THROWS_WITH = is_throws_with | is_check, - DT_REQUIRE_THROWS_WITH = is_throws_with | is_require, - - DT_WARN_THROWS_WITH_AS = is_throws_with | is_throws_as | is_warn, - DT_CHECK_THROWS_WITH_AS = is_throws_with | is_throws_as | is_check, - DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require, - - DT_WARN_NOTHROW = is_nothrow | is_warn, - DT_CHECK_NOTHROW = is_nothrow | is_check, - DT_REQUIRE_NOTHROW = is_nothrow | is_require, - - DT_WARN_EQ = is_normal | is_eq | is_warn, - DT_CHECK_EQ = is_normal | is_eq | is_check, - DT_REQUIRE_EQ = is_normal | is_eq | is_require, - - DT_WARN_NE = is_normal | is_ne | is_warn, - DT_CHECK_NE = is_normal | is_ne | is_check, - DT_REQUIRE_NE = is_normal | is_ne | is_require, - - DT_WARN_GT = is_normal | is_gt | is_warn, - DT_CHECK_GT = is_normal | is_gt | is_check, - DT_REQUIRE_GT = is_normal | is_gt | is_require, - - DT_WARN_LT = is_normal | is_lt | is_warn, - DT_CHECK_LT = is_normal | is_lt | is_check, - DT_REQUIRE_LT = is_normal | is_lt | is_require, - - DT_WARN_GE = is_normal | is_ge | is_warn, - DT_CHECK_GE = is_normal | is_ge | is_check, - DT_REQUIRE_GE = is_normal | is_ge | is_require, - - DT_WARN_LE = is_normal | is_le | is_warn, - DT_CHECK_LE = is_normal | is_le | is_check, - DT_REQUIRE_LE = is_normal | is_le | is_require, - - DT_WARN_UNARY = is_normal | is_unary | is_warn, - DT_CHECK_UNARY = is_normal | is_unary | is_check, - DT_REQUIRE_UNARY = is_normal | is_unary | is_require, - - DT_WARN_UNARY_FALSE = is_normal | is_false | is_unary | is_warn, - DT_CHECK_UNARY_FALSE = is_normal | is_false | is_unary | is_check, - DT_REQUIRE_UNARY_FALSE = is_normal | is_false | is_unary | is_require, - }; -} // namespace assertType - -DOCTEST_INTERFACE const char* assertString(assertType::Enum at); -DOCTEST_INTERFACE const char* failureString(assertType::Enum at); -DOCTEST_INTERFACE const char* skipPathFromFilename(const char* file); - -struct DOCTEST_INTERFACE TestCaseData -{ - String m_file; // the file in which the test was registered (using String - see #350) - unsigned m_line; // the line where the test was registered - const char* m_name; // name of the test case - const char* m_test_suite; // the test suite in which the test was added - const char* m_description; - bool m_skip; - bool m_no_breaks; - bool m_no_output; - bool m_may_fail; - bool m_should_fail; - int m_expected_failures; - double m_timeout; -}; - -struct DOCTEST_INTERFACE AssertData -{ - // common - for all asserts - const TestCaseData* m_test_case; - assertType::Enum m_at; - const char* m_file; - int m_line; - const char* m_expr; - bool m_failed; - - // exception-related - for all asserts - bool m_threw; - String m_exception; - - // for normal asserts - String m_decomp; - - // for specific exception-related asserts - bool m_threw_as; - const char* m_exception_type; - - class DOCTEST_INTERFACE StringContains { - private: - Contains content; - bool isContains; - - public: - StringContains(const String& str) : content(str), isContains(false) { } - StringContains(Contains cntn) : content(static_cast(cntn)), isContains(true) { } - - bool check(const String& str) { return isContains ? (content == str) : (content.string == str); } - - operator const String&() const { return content.string; } - - const char* c_str() const { return content.string.c_str(); } - } m_exception_string; - - AssertData(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type, const StringContains& exception_string); -}; - -struct DOCTEST_INTERFACE MessageData -{ - String m_string; - const char* m_file; - int m_line; - assertType::Enum m_severity; -}; - -struct DOCTEST_INTERFACE SubcaseSignature -{ - String m_name; - const char* m_file; - int m_line; - - bool operator==(const SubcaseSignature& other) const; - bool operator<(const SubcaseSignature& other) const; -}; - -struct DOCTEST_INTERFACE IContextScope -{ - DOCTEST_DECLARE_INTERFACE(IContextScope) - virtual void stringify(std::ostream*) const = 0; -}; - -namespace detail { - struct DOCTEST_INTERFACE TestCase; -} // namespace detail - -struct ContextOptions //!OCLINT too many fields -{ - std::ostream* cout = nullptr; // stdout stream - String binary_name; // the test binary name - - const detail::TestCase* currentTest = nullptr; - - // == parameters from the command line - String out; // output filename - String order_by; // how test should be ordered - unsigned rand_seed; // the seed for rand ordering - - unsigned first; // the first (matching) test to be executed - unsigned last; // the last (matching) test to be executed - - int abort_after; // stop test after this many failed assertions - int subcase_filter_levels; // apply the subcase filters for the first N levels - - bool success; // include successful assertions in output - bool case_sensitive; // if filtering should be case sensitive - bool exit; // if the program should be exited after the test are ran/whatever - bool duration; // print the time duration of each test case - bool minimal; // minimal console output (only test failures) - bool quiet; // no console output - bool no_throw; // to skip exceptions-related assertion macros - bool no_exitcode; // if the framework should return 0 as the exitcode - bool no_run; // to not run the test at all (can be done with an "*" exclude) - bool no_intro; // to not print the intro of the framework - bool no_version; // to not print the version of the framework - bool no_colors; // if output to the console should be colorized - bool force_colors; // forces the use of colors even when a tty cannot be detected - bool no_breaks; // to not break into the debugger - bool no_skip; // don't skip test cases which are marked to be skipped - bool gnu_file_line; // if line numbers should be surrounded with :x: and not (x): - bool no_path_in_filenames; // if the path to files should be removed from the output - bool no_line_numbers; // if source code line numbers should be omitted from the output - bool no_debug_output; // no output in the debug console when a debugger is attached - bool no_skipped_summary; // don't print "skipped" in the summary !!! UNDOCUMENTED !!! - bool no_time_in_output; // omit any time/timestamps from output !!! UNDOCUMENTED !!! - - bool help; // to print the help - bool version; // to print the version - bool count; // if only the count of matching test is to be retrieved - bool list_test_cases; // to list all test matching the filters - bool list_test_suites; // to list all suites matching the filters - bool list_reporters; // lists all registered reporters -}; - -namespace detail { - namespace types { -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - using namespace std; -#else - template - struct enable_if { }; - - template - struct enable_if { using type = T; }; - - struct true_type { static DOCTEST_CONSTEXPR bool value = true; }; - struct false_type { static DOCTEST_CONSTEXPR bool value = false; }; - - template struct remove_reference { using type = T; }; - template struct remove_reference { using type = T; }; - template struct remove_reference { using type = T; }; - - template struct is_rvalue_reference : false_type { }; - template struct is_rvalue_reference : true_type { }; - - template struct remove_const { using type = T; }; - template struct remove_const { using type = T; }; - - // Compiler intrinsics - template struct is_enum { static DOCTEST_CONSTEXPR bool value = __is_enum(T); }; - template struct underlying_type { using type = __underlying_type(T); }; - - template struct is_pointer : false_type { }; - template struct is_pointer : true_type { }; - - template struct is_array : false_type { }; - // NOLINTNEXTLINE(*-avoid-c-arrays) - template struct is_array : true_type { }; -#endif - } - - // - template - T&& declval(); - - template - DOCTEST_CONSTEXPR_FUNC T&& forward(typename types::remove_reference::type& t) DOCTEST_NOEXCEPT { - return static_cast(t); - } - - template - DOCTEST_CONSTEXPR_FUNC T&& forward(typename types::remove_reference::type&& t) DOCTEST_NOEXCEPT { - return static_cast(t); - } - - template - struct deferred_false : types::false_type { }; - -// MSVS 2015 :( -#if defined(_MSC_VER) && _MSC_VER <= 1900 - template - struct has_global_insertion_operator : types::false_type { }; - - template - struct has_global_insertion_operator(), declval()), void())> : types::true_type { }; - - template - struct has_insertion_operator { static DOCTEST_CONSTEXPR bool value = has_global_insertion_operator::value; }; - - template - struct insert_hack; - - template - struct insert_hack { - static void insert(std::ostream& os, const T& t) { ::operator<<(os, t); } - }; - - template - struct insert_hack { - static void insert(std::ostream& os, const T& t) { operator<<(os, t); } - }; - - template - using insert_hack_t = insert_hack::value>; -#else - template - struct has_insertion_operator : types::false_type { }; -#endif - -template -struct has_insertion_operator(), declval()), void())> : types::true_type { }; - - DOCTEST_INTERFACE std::ostream* tlssPush(); - DOCTEST_INTERFACE String tlssPop(); - - template - struct StringMakerBase { - template - static String convert(const DOCTEST_REF_WRAP(T)) { -#ifdef DOCTEST_CONFIG_REQUIRE_STRINGIFICATION_FOR_ALL_USED_TYPES - static_assert(deferred_false::value, "No stringification detected for type T. See string conversion manual"); -#endif - return "{?}"; - } - }; - - template - struct filldata; - - template - void filloss(std::ostream* stream, const T& in) { - filldata::fill(stream, in); - } - - template - void filloss(std::ostream* stream, const T (&in)[N]) { // NOLINT(*-avoid-c-arrays) - // T[N], T(&)[N], T(&&)[N] have same behaviour. - // Hence remove reference. - filloss::type>(stream, in); - } - - template - String toStream(const T& in) { - std::ostream* stream = tlssPush(); - filloss(stream, in); - return tlssPop(); - } - - template <> - struct StringMakerBase { - template - static String convert(const DOCTEST_REF_WRAP(T) in) { - return toStream(in); - } - }; -} // namespace detail - -template -struct StringMaker : public detail::StringMakerBase< - detail::has_insertion_operator::value || detail::types::is_pointer::value || detail::types::is_array::value> -{}; - -#ifndef DOCTEST_STRINGIFY -#ifdef DOCTEST_CONFIG_DOUBLE_STRINGIFY -#define DOCTEST_STRINGIFY(...) toString(toString(__VA_ARGS__)) -#else -#define DOCTEST_STRINGIFY(...) toString(__VA_ARGS__) -#endif -#endif - -template -String toString() { -#if DOCTEST_MSVC >= 0 && DOCTEST_CLANG == 0 && DOCTEST_GCC == 0 - String ret = __FUNCSIG__; // class doctest::String __cdecl doctest::toString(void) - String::size_type beginPos = ret.find('<'); - return ret.substr(beginPos + 1, ret.size() - beginPos - static_cast(sizeof(">(void)"))); -#else - String ret = __PRETTY_FUNCTION__; // doctest::String toString() [with T = TYPE] - String::size_type begin = ret.find('=') + 2; - return ret.substr(begin, ret.size() - begin - 1); -#endif -} - -template ::value, bool>::type = true> -String toString(const DOCTEST_REF_WRAP(T) value) { - return StringMaker::convert(value); -} - -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -DOCTEST_INTERFACE String toString(const char* in); -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 -DOCTEST_INTERFACE String toString(const std::string& in); -#endif // VS 2019 - -DOCTEST_INTERFACE String toString(String in); - -DOCTEST_INTERFACE String toString(std::nullptr_t); - -DOCTEST_INTERFACE String toString(bool in); - -DOCTEST_INTERFACE String toString(float in); -DOCTEST_INTERFACE String toString(double in); -DOCTEST_INTERFACE String toString(double long in); - -DOCTEST_INTERFACE String toString(char in); -DOCTEST_INTERFACE String toString(char signed in); -DOCTEST_INTERFACE String toString(char unsigned in); -DOCTEST_INTERFACE String toString(short in); -DOCTEST_INTERFACE String toString(short unsigned in); -DOCTEST_INTERFACE String toString(signed in); -DOCTEST_INTERFACE String toString(unsigned in); -DOCTEST_INTERFACE String toString(long in); -DOCTEST_INTERFACE String toString(long unsigned in); -DOCTEST_INTERFACE String toString(long long in); -DOCTEST_INTERFACE String toString(long long unsigned in); - -template ::value, bool>::type = true> -String toString(const DOCTEST_REF_WRAP(T) value) { - using UT = typename detail::types::underlying_type::type; - return (DOCTEST_STRINGIFY(static_cast(value))); -} - -namespace detail { - template - struct filldata - { - static void fill(std::ostream* stream, const T& in) { -#if defined(_MSC_VER) && _MSC_VER <= 1900 - insert_hack_t::insert(*stream, in); -#else - operator<<(*stream, in); -#endif - } - }; - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866) -// NOLINTBEGIN(*-avoid-c-arrays) - template - struct filldata { - static void fill(std::ostream* stream, const T(&in)[N]) { - *stream << "["; - for (size_t i = 0; i < N; i++) { - if (i != 0) { *stream << ", "; } - *stream << (DOCTEST_STRINGIFY(in[i])); - } - *stream << "]"; - } - }; -// NOLINTEND(*-avoid-c-arrays) -DOCTEST_MSVC_SUPPRESS_WARNING_POP - - // Specialized since we don't want the terminating null byte! -// NOLINTBEGIN(*-avoid-c-arrays) - template - struct filldata { - static void fill(std::ostream* stream, const char (&in)[N]) { - *stream << String(in, in[N - 1] ? N : N - 1); - } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) - }; -// NOLINTEND(*-avoid-c-arrays) - - template <> - struct filldata { - static void fill(std::ostream* stream, const void* in); - }; - - template - struct filldata { - static void fill(std::ostream* stream, const T* in) { - filldata::fill(stream, in); - } - }; -} - -struct DOCTEST_INTERFACE Approx -{ - Approx(double value); - - Approx operator()(double value) const; - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - explicit Approx(const T& value, - typename detail::types::enable_if::value>::type* = - static_cast(nullptr)) { - *this = static_cast(value); - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - Approx& epsilon(double newEpsilon); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - typename std::enable_if::value, Approx&>::type epsilon( - const T& newEpsilon) { - m_epsilon = static_cast(newEpsilon); - return *this; - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - Approx& scale(double newScale); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - template - typename std::enable_if::value, Approx&>::type scale( - const T& newScale) { - m_scale = static_cast(newScale); - return *this; - } -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - // clang-format off - DOCTEST_INTERFACE friend bool operator==(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator==(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator!=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator!=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator<=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator<=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator>=(double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator>=(const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator< (double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator< (const Approx & lhs, double rhs); - DOCTEST_INTERFACE friend bool operator> (double lhs, const Approx & rhs); - DOCTEST_INTERFACE friend bool operator> (const Approx & lhs, double rhs); - -#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS -#define DOCTEST_APPROX_PREFIX \ - template friend typename std::enable_if::value, bool>::type - - DOCTEST_APPROX_PREFIX operator==(const T& lhs, const Approx& rhs) { return operator==(static_cast(lhs), rhs); } - DOCTEST_APPROX_PREFIX operator==(const Approx& lhs, const T& rhs) { return operator==(rhs, lhs); } - DOCTEST_APPROX_PREFIX operator!=(const T& lhs, const Approx& rhs) { return !operator==(lhs, rhs); } - DOCTEST_APPROX_PREFIX operator!=(const Approx& lhs, const T& rhs) { return !operator==(rhs, lhs); } - DOCTEST_APPROX_PREFIX operator<=(const T& lhs, const Approx& rhs) { return static_cast(lhs) < rhs.m_value || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator<=(const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast(rhs) || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator>=(const T& lhs, const Approx& rhs) { return static_cast(lhs) > rhs.m_value || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator>=(const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast(rhs) || lhs == rhs; } - DOCTEST_APPROX_PREFIX operator< (const T& lhs, const Approx& rhs) { return static_cast(lhs) < rhs.m_value && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator< (const Approx& lhs, const T& rhs) { return lhs.m_value < static_cast(rhs) && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator> (const T& lhs, const Approx& rhs) { return static_cast(lhs) > rhs.m_value && lhs != rhs; } - DOCTEST_APPROX_PREFIX operator> (const Approx& lhs, const T& rhs) { return lhs.m_value > static_cast(rhs) && lhs != rhs; } -#undef DOCTEST_APPROX_PREFIX -#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS - - // clang-format on - - double m_epsilon; - double m_scale; - double m_value; -}; - -DOCTEST_INTERFACE String toString(const Approx& in); - -DOCTEST_INTERFACE const ContextOptions* getContextOptions(); - -template -struct DOCTEST_INTERFACE_DECL IsNaN -{ - F value; bool flipped; - IsNaN(F f, bool flip = false) : value(f), flipped(flip) { } - IsNaN operator!() const { return { value, !flipped }; } - operator bool() const; -}; -#ifndef __MINGW32__ -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -extern template struct DOCTEST_INTERFACE_DECL IsNaN; -#endif -DOCTEST_INTERFACE String toString(IsNaN in); -DOCTEST_INTERFACE String toString(IsNaN in); -DOCTEST_INTERFACE String toString(IsNaN in); - -#ifndef DOCTEST_CONFIG_DISABLE - -namespace detail { - // clang-format off -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - template struct decay_array { using type = T; }; - template struct decay_array { using type = T*; }; - template struct decay_array { using type = T*; }; - - template struct not_char_pointer { static DOCTEST_CONSTEXPR value = 1; }; - template<> struct not_char_pointer { static DOCTEST_CONSTEXPR value = 0; }; - template<> struct not_char_pointer { static DOCTEST_CONSTEXPR value = 0; }; - - template struct can_use_op : public not_char_pointer::type> {}; -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - // clang-format on - - struct DOCTEST_INTERFACE TestFailureException - { - }; - - DOCTEST_INTERFACE bool checkIfShouldThrow(assertType::Enum at); - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - DOCTEST_NORETURN -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - DOCTEST_INTERFACE void throwException(); - - struct DOCTEST_INTERFACE Subcase - { - SubcaseSignature m_signature; - bool m_entered = false; - - Subcase(const String& name, const char* file, int line); - Subcase(const Subcase&) = delete; - Subcase(Subcase&&) = delete; - Subcase& operator=(const Subcase&) = delete; - Subcase& operator=(Subcase&&) = delete; - ~Subcase(); - - operator bool() const; - - private: - bool checkFilters(); - }; - - template - String stringifyBinaryExpr(const DOCTEST_REF_WRAP(L) lhs, const char* op, - const DOCTEST_REF_WRAP(R) rhs) { - return (DOCTEST_STRINGIFY(lhs)) + op + (DOCTEST_STRINGIFY(rhs)); - } - -#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0) -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-comparison") -#endif - -// This will check if there is any way it could find a operator like member or friend and uses it. -// If not it doesn't find the operator or if the operator at global scope is defined after -// this template, the template won't be instantiated due to SFINAE. Once the template is not -// instantiated it can look for global operator using normal conversions. -#define SFINAE_OP(ret,op) decltype((void)(doctest::detail::declval() op doctest::detail::declval()),ret{}) - -#define DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(op, op_str, op_macro) \ - template \ - DOCTEST_NOINLINE SFINAE_OP(Result,op) operator op(R&& rhs) { \ - bool res = op_macro(doctest::detail::forward(lhs), doctest::detail::forward(rhs)); \ - if(m_at & assertType::is_false) \ - res = !res; \ - if(!res || doctest::getContextOptions()->success) \ - return Result(res, stringifyBinaryExpr(lhs, op_str, rhs)); \ - return Result(res); \ - } - - // more checks could be added - like in Catch: - // https://github.com/catchorg/Catch2/pull/1480/files - // https://github.com/catchorg/Catch2/pull/1481/files -#define DOCTEST_FORBIT_EXPRESSION(rt, op) \ - template \ - rt& operator op(const R&) { \ - static_assert(deferred_false::value, \ - "Expression Too Complex Please Rewrite As Binary Comparison!"); \ - return *this; \ - } - - struct DOCTEST_INTERFACE Result // NOLINT(*-member-init) - { - bool m_passed; - String m_decomp; - - Result() = default; // TODO: Why do we need this? (To remove NOLINT) - Result(bool passed, const String& decomposition = String()); - - // forbidding some expressions based on this table: https://en.cppreference.com/w/cpp/language/operator_precedence - DOCTEST_FORBIT_EXPRESSION(Result, &) - DOCTEST_FORBIT_EXPRESSION(Result, ^) - DOCTEST_FORBIT_EXPRESSION(Result, |) - DOCTEST_FORBIT_EXPRESSION(Result, &&) - DOCTEST_FORBIT_EXPRESSION(Result, ||) - DOCTEST_FORBIT_EXPRESSION(Result, ==) - DOCTEST_FORBIT_EXPRESSION(Result, !=) - DOCTEST_FORBIT_EXPRESSION(Result, <) - DOCTEST_FORBIT_EXPRESSION(Result, >) - DOCTEST_FORBIT_EXPRESSION(Result, <=) - DOCTEST_FORBIT_EXPRESSION(Result, >=) - DOCTEST_FORBIT_EXPRESSION(Result, =) - DOCTEST_FORBIT_EXPRESSION(Result, +=) - DOCTEST_FORBIT_EXPRESSION(Result, -=) - DOCTEST_FORBIT_EXPRESSION(Result, *=) - DOCTEST_FORBIT_EXPRESSION(Result, /=) - DOCTEST_FORBIT_EXPRESSION(Result, %=) - DOCTEST_FORBIT_EXPRESSION(Result, <<=) - DOCTEST_FORBIT_EXPRESSION(Result, >>=) - DOCTEST_FORBIT_EXPRESSION(Result, &=) - DOCTEST_FORBIT_EXPRESSION(Result, ^=) - DOCTEST_FORBIT_EXPRESSION(Result, |=) - }; - -#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - - DOCTEST_CLANG_SUPPRESS_WARNING_PUSH - DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-conversion") - DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-compare") - //DOCTEST_CLANG_SUPPRESS_WARNING("-Wdouble-promotion") - //DOCTEST_CLANG_SUPPRESS_WARNING("-Wconversion") - //DOCTEST_CLANG_SUPPRESS_WARNING("-Wfloat-equal") - - DOCTEST_GCC_SUPPRESS_WARNING_PUSH - DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-conversion") - DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-compare") - //DOCTEST_GCC_SUPPRESS_WARNING("-Wdouble-promotion") - //DOCTEST_GCC_SUPPRESS_WARNING("-Wconversion") - //DOCTEST_GCC_SUPPRESS_WARNING("-Wfloat-equal") - - DOCTEST_MSVC_SUPPRESS_WARNING_PUSH - // https://stackoverflow.com/questions/39479163 what's the difference between 4018 and 4389 - DOCTEST_MSVC_SUPPRESS_WARNING(4388) // signed/unsigned mismatch - DOCTEST_MSVC_SUPPRESS_WARNING(4389) // 'operator' : signed/unsigned mismatch - DOCTEST_MSVC_SUPPRESS_WARNING(4018) // 'expression' : signed/unsigned mismatch - //DOCTEST_MSVC_SUPPRESS_WARNING(4805) // 'operation' : unsafe mix of type 'type' and type 'type' in operation - -#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - - // clang-format off -#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_COMPARISON_RETURN_TYPE bool -#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_COMPARISON_RETURN_TYPE typename types::enable_if::value || can_use_op::value, bool>::type - inline bool eq(const char* lhs, const char* rhs) { return String(lhs) == String(rhs); } - inline bool ne(const char* lhs, const char* rhs) { return String(lhs) != String(rhs); } - inline bool lt(const char* lhs, const char* rhs) { return String(lhs) < String(rhs); } - inline bool gt(const char* lhs, const char* rhs) { return String(lhs) > String(rhs); } - inline bool le(const char* lhs, const char* rhs) { return String(lhs) <= String(rhs); } - inline bool ge(const char* lhs, const char* rhs) { return String(lhs) >= String(rhs); } -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - // clang-format on - -#define DOCTEST_RELATIONAL_OP(name, op) \ - template \ - DOCTEST_COMPARISON_RETURN_TYPE name(const DOCTEST_REF_WRAP(L) lhs, \ - const DOCTEST_REF_WRAP(R) rhs) { \ - return lhs op rhs; \ - } - - DOCTEST_RELATIONAL_OP(eq, ==) - DOCTEST_RELATIONAL_OP(ne, !=) - DOCTEST_RELATIONAL_OP(lt, <) - DOCTEST_RELATIONAL_OP(gt, >) - DOCTEST_RELATIONAL_OP(le, <=) - DOCTEST_RELATIONAL_OP(ge, >=) - -#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_CMP_EQ(l, r) l == r -#define DOCTEST_CMP_NE(l, r) l != r -#define DOCTEST_CMP_GT(l, r) l > r -#define DOCTEST_CMP_LT(l, r) l < r -#define DOCTEST_CMP_GE(l, r) l >= r -#define DOCTEST_CMP_LE(l, r) l <= r -#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -#define DOCTEST_CMP_EQ(l, r) eq(l, r) -#define DOCTEST_CMP_NE(l, r) ne(l, r) -#define DOCTEST_CMP_GT(l, r) gt(l, r) -#define DOCTEST_CMP_LT(l, r) lt(l, r) -#define DOCTEST_CMP_GE(l, r) ge(l, r) -#define DOCTEST_CMP_LE(l, r) le(l, r) -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - - template - // cppcheck-suppress copyCtorAndEqOperator - struct Expression_lhs - { - L lhs; - assertType::Enum m_at; - - explicit Expression_lhs(L&& in, assertType::Enum at) - : lhs(static_cast(in)) - , m_at(at) {} - - DOCTEST_NOINLINE operator Result() { -// this is needed only for MSVC 2015 -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4800) // 'int': forcing value to bool - bool res = static_cast(lhs); -DOCTEST_MSVC_SUPPRESS_WARNING_POP - if(m_at & assertType::is_false) { //!OCLINT bitwise operator in conditional - res = !res; - } - - if(!res || getContextOptions()->success) { - return { res, (DOCTEST_STRINGIFY(lhs)) }; - } - return { res }; - } - - /* This is required for user-defined conversions from Expression_lhs to L */ - operator L() const { return lhs; } - - // clang-format off - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, " == ", DOCTEST_CMP_EQ) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(!=, " != ", DOCTEST_CMP_NE) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>, " > ", DOCTEST_CMP_GT) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<, " < ", DOCTEST_CMP_LT) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>=, " >= ", DOCTEST_CMP_GE) //!OCLINT bitwise operator in conditional - DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<=, " <= ", DOCTEST_CMP_LE) //!OCLINT bitwise operator in conditional - // clang-format on - - // forbidding some expressions based on this table: https://en.cppreference.com/w/cpp/language/operator_precedence - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &&) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ||) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, =) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, +=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, -=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, *=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, /=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, %=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^=) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |=) - // these 2 are unfortunate because they should be allowed - they have higher precedence over the comparisons, but the - // ExpressionDecomposer class uses the left shift operator to capture the left operand of the binary expression... - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<) - DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>) - }; - -#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_MSVC_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP - -#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION - -#if DOCTEST_CLANG && DOCTEST_CLANG < DOCTEST_COMPILER(3, 6, 0) -DOCTEST_CLANG_SUPPRESS_WARNING_POP -#endif - - struct DOCTEST_INTERFACE ExpressionDecomposer - { - assertType::Enum m_at; - - ExpressionDecomposer(assertType::Enum at); - - // The right operator for capturing expressions is "<=" instead of "<<" (based on the operator precedence table) - // but then there will be warnings from GCC about "-Wparentheses" and since "_Pragma()" is problematic this will stay for now... - // https://github.com/catchorg/Catch2/issues/870 - // https://github.com/catchorg/Catch2/issues/565 - template - Expression_lhs operator<<(L&& operand) { - return Expression_lhs(static_cast(operand), m_at); - } - - template ::value,void >::type* = nullptr> - Expression_lhs operator<<(const L &operand) { - return Expression_lhs(operand, m_at); - } - }; - - struct DOCTEST_INTERFACE TestSuite - { - const char* m_test_suite = nullptr; - const char* m_description = nullptr; - bool m_skip = false; - bool m_no_breaks = false; - bool m_no_output = false; - bool m_may_fail = false; - bool m_should_fail = false; - int m_expected_failures = 0; - double m_timeout = 0; - - TestSuite& operator*(const char* in); - - template - TestSuite& operator*(const T& in) { - in.fill(*this); - return *this; - } - }; - - using funcType = void (*)(); - - struct DOCTEST_INTERFACE TestCase : public TestCaseData - { - funcType m_test; // a function pointer to the test case - - String m_type; // for templated test cases - gets appended to the real name - int m_template_id; // an ID used to distinguish between the different versions of a templated test case - String m_full_name; // contains the name (only for templated test cases!) + the template type - - TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite, - const String& type = String(), int template_id = -1); - - TestCase(const TestCase& other); - TestCase(TestCase&&) = delete; - - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function - TestCase& operator=(const TestCase& other); - DOCTEST_MSVC_SUPPRESS_WARNING_POP - - TestCase& operator=(TestCase&&) = delete; - - TestCase& operator*(const char* in); - - template - TestCase& operator*(const T& in) { - in.fill(*this); - return *this; - } - - bool operator<(const TestCase& other) const; - - ~TestCase() = default; - }; - - // forward declarations of functions used by the macros - DOCTEST_INTERFACE int regTest(const TestCase& tc); - DOCTEST_INTERFACE int setTestSuite(const TestSuite& ts); - DOCTEST_INTERFACE bool isDebuggerActive(); - - template - int instantiationHelper(const T&) { return 0; } - - namespace binaryAssertComparison { - enum Enum - { - eq = 0, - ne, - gt, - lt, - ge, - le - }; - } // namespace binaryAssertComparison - - // clang-format off - template struct RelationalComparator { bool operator()(const DOCTEST_REF_WRAP(L), const DOCTEST_REF_WRAP(R) ) const { return false; } }; - -#define DOCTEST_BINARY_RELATIONAL_OP(n, op) \ - template struct RelationalComparator { bool operator()(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) const { return op(lhs, rhs); } }; - // clang-format on - - DOCTEST_BINARY_RELATIONAL_OP(0, doctest::detail::eq) - DOCTEST_BINARY_RELATIONAL_OP(1, doctest::detail::ne) - DOCTEST_BINARY_RELATIONAL_OP(2, doctest::detail::gt) - DOCTEST_BINARY_RELATIONAL_OP(3, doctest::detail::lt) - DOCTEST_BINARY_RELATIONAL_OP(4, doctest::detail::ge) - DOCTEST_BINARY_RELATIONAL_OP(5, doctest::detail::le) - - struct DOCTEST_INTERFACE ResultBuilder : public AssertData - { - ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type = "", const String& exception_string = ""); - - ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type, const Contains& exception_string); - - void setResult(const Result& res); - - template - DOCTEST_NOINLINE bool binary_assert(const DOCTEST_REF_WRAP(L) lhs, - const DOCTEST_REF_WRAP(R) rhs) { - m_failed = !RelationalComparator()(lhs, rhs); - if (m_failed || getContextOptions()->success) { - m_decomp = stringifyBinaryExpr(lhs, ", ", rhs); - } - return !m_failed; - } - - template - DOCTEST_NOINLINE bool unary_assert(const DOCTEST_REF_WRAP(L) val) { - m_failed = !val; - - if (m_at & assertType::is_false) { //!OCLINT bitwise operator in conditional - m_failed = !m_failed; - } - - if (m_failed || getContextOptions()->success) { - m_decomp = (DOCTEST_STRINGIFY(val)); - } - - return !m_failed; - } - - void translateException(); - - bool log(); - void react() const; - }; - - namespace assertAction { - enum Enum - { - nothing = 0, - dbgbreak = 1, - shouldthrow = 2 - }; - } // namespace assertAction - - DOCTEST_INTERFACE void failed_out_of_a_testing_context(const AssertData& ad); - - DOCTEST_INTERFACE bool decomp_assert(assertType::Enum at, const char* file, int line, - const char* expr, const Result& result); - -#define DOCTEST_ASSERT_OUT_OF_TESTS(decomp) \ - do { \ - if(!is_running_in_test) { \ - if(failed) { \ - ResultBuilder rb(at, file, line, expr); \ - rb.m_failed = failed; \ - rb.m_decomp = decomp; \ - failed_out_of_a_testing_context(rb); \ - if(isDebuggerActive() && !getContextOptions()->no_breaks) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - if(checkIfShouldThrow(at)) \ - throwException(); \ - } \ - return !failed; \ - } \ - } while(false) - -#define DOCTEST_ASSERT_IN_TESTS(decomp) \ - ResultBuilder rb(at, file, line, expr); \ - rb.m_failed = failed; \ - if(rb.m_failed || getContextOptions()->success) \ - rb.m_decomp = decomp; \ - if(rb.log()) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - if(rb.m_failed && checkIfShouldThrow(at)) \ - throwException() - - template - DOCTEST_NOINLINE bool binary_assert(assertType::Enum at, const char* file, int line, - const char* expr, const DOCTEST_REF_WRAP(L) lhs, - const DOCTEST_REF_WRAP(R) rhs) { - bool failed = !RelationalComparator()(lhs, rhs); - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT - // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); - DOCTEST_ASSERT_IN_TESTS(stringifyBinaryExpr(lhs, ", ", rhs)); - return !failed; - } - - template - DOCTEST_NOINLINE bool unary_assert(assertType::Enum at, const char* file, int line, - const char* expr, const DOCTEST_REF_WRAP(L) val) { - bool failed = !val; - - if(at & assertType::is_false) //!OCLINT bitwise operator in conditional - failed = !failed; - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT - // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS((DOCTEST_STRINGIFY(val))); - DOCTEST_ASSERT_IN_TESTS((DOCTEST_STRINGIFY(val))); - return !failed; - } - - struct DOCTEST_INTERFACE IExceptionTranslator - { - DOCTEST_DECLARE_INTERFACE(IExceptionTranslator) - virtual bool translate(String&) const = 0; - }; - - template - class ExceptionTranslator : public IExceptionTranslator //!OCLINT destructor of virtual class - { - public: - explicit ExceptionTranslator(String (*translateFunction)(T)) - : m_translateFunction(translateFunction) {} - - bool translate(String& res) const override { -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - try { - throw; // lgtm [cpp/rethrow-no-exception] - // cppcheck-suppress catchExceptionByValue - } catch(const T& ex) { - res = m_translateFunction(ex); //!OCLINT parameter reassignment - return true; - } catch(...) {} //!OCLINT - empty catch statement -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - static_cast(res); // to silence -Wunused-parameter - return false; - } - - private: - String (*m_translateFunction)(T); - }; - - DOCTEST_INTERFACE void registerExceptionTranslatorImpl(const IExceptionTranslator* et); - - // ContextScope base class used to allow implementing methods of ContextScope - // that don't depend on the template parameter in doctest.cpp. - struct DOCTEST_INTERFACE ContextScopeBase : public IContextScope { - ContextScopeBase(const ContextScopeBase&) = delete; - - ContextScopeBase& operator=(const ContextScopeBase&) = delete; - ContextScopeBase& operator=(ContextScopeBase&&) = delete; - - ~ContextScopeBase() override = default; - - protected: - ContextScopeBase(); - ContextScopeBase(ContextScopeBase&& other) noexcept; - - void destroy(); - bool need_to_destroy{true}; - }; - - template class ContextScope : public ContextScopeBase - { - L lambda_; - - public: - explicit ContextScope(const L &lambda) : lambda_(lambda) {} - explicit ContextScope(L&& lambda) : lambda_(static_cast(lambda)) { } - - ContextScope(const ContextScope&) = delete; - ContextScope(ContextScope&&) noexcept = default; - - ContextScope& operator=(const ContextScope&) = delete; - ContextScope& operator=(ContextScope&&) = delete; - - void stringify(std::ostream* s) const override { lambda_(s); } - - ~ContextScope() override { - if (need_to_destroy) { - destroy(); - } - } - }; - - struct DOCTEST_INTERFACE MessageBuilder : public MessageData - { - std::ostream* m_stream; - bool logged = false; - - MessageBuilder(const char* file, int line, assertType::Enum severity); - - MessageBuilder(const MessageBuilder&) = delete; - MessageBuilder(MessageBuilder&&) = delete; - - MessageBuilder& operator=(const MessageBuilder&) = delete; - MessageBuilder& operator=(MessageBuilder&&) = delete; - - ~MessageBuilder(); - - // the preferred way of chaining parameters for stringification -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4866) - template - MessageBuilder& operator,(const T& in) { - *m_stream << (DOCTEST_STRINGIFY(in)); - return *this; - } -DOCTEST_MSVC_SUPPRESS_WARNING_POP - - // kept here just for backwards-compatibility - the comma operator should be preferred now - template - MessageBuilder& operator<<(const T& in) { return this->operator,(in); } - - // the `,` operator has the lowest operator precedence - if `<<` is used by the user then - // the `,` operator will be called last which is not what we want and thus the `*` operator - // is used first (has higher operator precedence compared to `<<`) so that we guarantee that - // an operator of the MessageBuilder class is called first before the rest of the parameters - template - MessageBuilder& operator*(const T& in) { return this->operator,(in); } - - bool log(); - void react(); - }; - - template - ContextScope MakeContextScope(const L &lambda) { - return ContextScope(lambda); - } -} // namespace detail - -#define DOCTEST_DEFINE_DECORATOR(name, type, def) \ - struct name \ - { \ - type data; \ - name(type in = def) \ - : data(in) {} \ - void fill(detail::TestCase& state) const { state.DOCTEST_CAT(m_, name) = data; } \ - void fill(detail::TestSuite& state) const { state.DOCTEST_CAT(m_, name) = data; } \ - } - -DOCTEST_DEFINE_DECORATOR(test_suite, const char*, ""); -DOCTEST_DEFINE_DECORATOR(description, const char*, ""); -DOCTEST_DEFINE_DECORATOR(skip, bool, true); -DOCTEST_DEFINE_DECORATOR(no_breaks, bool, true); -DOCTEST_DEFINE_DECORATOR(no_output, bool, true); -DOCTEST_DEFINE_DECORATOR(timeout, double, 0); -DOCTEST_DEFINE_DECORATOR(may_fail, bool, true); -DOCTEST_DEFINE_DECORATOR(should_fail, bool, true); -DOCTEST_DEFINE_DECORATOR(expected_failures, int, 0); - -template -int registerExceptionTranslator(String (*translateFunction)(T)) { - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wexit-time-destructors") - static detail::ExceptionTranslator exceptionTranslator(translateFunction); - DOCTEST_CLANG_SUPPRESS_WARNING_POP - detail::registerExceptionTranslatorImpl(&exceptionTranslator); - return 0; -} - -} // namespace doctest - -// in a separate namespace outside of doctest because the DOCTEST_TEST_SUITE macro -// introduces an anonymous namespace in which getCurrentTestSuite gets overridden -namespace doctest_detail_test_suite_ns { -DOCTEST_INTERFACE doctest::detail::TestSuite& getCurrentTestSuite(); -} // namespace doctest_detail_test_suite_ns - -namespace doctest { -#else // DOCTEST_CONFIG_DISABLE -template -int registerExceptionTranslator(String (*)(T)) { - return 0; -} -#endif // DOCTEST_CONFIG_DISABLE - -namespace detail { - using assert_handler = void (*)(const AssertData&); - struct ContextState; -} // namespace detail - -class DOCTEST_INTERFACE Context -{ - detail::ContextState* p; - - void parseArgs(int argc, const char* const* argv, bool withDefaults = false); - -public: - explicit Context(int argc = 0, const char* const* argv = nullptr); - - Context(const Context&) = delete; - Context(Context&&) = delete; - - Context& operator=(const Context&) = delete; - Context& operator=(Context&&) = delete; - - ~Context(); // NOLINT(performance-trivially-destructible) - - void applyCommandLine(int argc, const char* const* argv); - - void addFilter(const char* filter, const char* value); - void clearFilters(); - void setOption(const char* option, bool value); - void setOption(const char* option, int value); - void setOption(const char* option, const char* value); - - bool shouldExit(); - - void setAsDefaultForAssertsOutOfTestCases(); - - void setAssertHandler(detail::assert_handler ah); - - void setCout(std::ostream* out); - - int run(); -}; - -namespace TestCaseFailureReason { - enum Enum - { - None = 0, - AssertFailure = 1, // an assertion has failed in the test case - Exception = 2, // test case threw an exception - Crash = 4, // a crash... - TooManyFailedAsserts = 8, // the abort-after option - Timeout = 16, // see the timeout decorator - ShouldHaveFailedButDidnt = 32, // see the should_fail decorator - ShouldHaveFailedAndDid = 64, // see the should_fail decorator - DidntFailExactlyNumTimes = 128, // see the expected_failures decorator - FailedExactlyNumTimes = 256, // see the expected_failures decorator - CouldHaveFailedAndDid = 512 // see the may_fail decorator - }; -} // namespace TestCaseFailureReason - -struct DOCTEST_INTERFACE CurrentTestCaseStats -{ - int numAssertsCurrentTest; - int numAssertsFailedCurrentTest; - double seconds; - int failure_flags; // use TestCaseFailureReason::Enum - bool testCaseSuccess; -}; - -struct DOCTEST_INTERFACE TestCaseException -{ - String error_string; - bool is_crash; -}; - -struct DOCTEST_INTERFACE TestRunStats -{ - unsigned numTestCases; - unsigned numTestCasesPassingFilters; - unsigned numTestSuitesPassingFilters; - unsigned numTestCasesFailed; - int numAsserts; - int numAssertsFailed; -}; - -struct QueryData -{ - const TestRunStats* run_stats = nullptr; - const TestCaseData** data = nullptr; - unsigned num_data = 0; -}; - -struct DOCTEST_INTERFACE IReporter -{ - // The constructor has to accept "const ContextOptions&" as a single argument - // which has most of the options for the run + a pointer to the stdout stream - // Reporter(const ContextOptions& in) - - // called when a query should be reported (listing test cases, printing the version, etc.) - virtual void report_query(const QueryData&) = 0; - - // called when the whole test run starts - virtual void test_run_start() = 0; - // called when the whole test run ends (caching a pointer to the input doesn't make sense here) - virtual void test_run_end(const TestRunStats&) = 0; - - // called when a test case is started (safe to cache a pointer to the input) - virtual void test_case_start(const TestCaseData&) = 0; - // called when a test case is reentered because of unfinished subcases (safe to cache a pointer to the input) - virtual void test_case_reenter(const TestCaseData&) = 0; - // called when a test case has ended - virtual void test_case_end(const CurrentTestCaseStats&) = 0; - - // called when an exception is thrown from the test case (or it crashes) - virtual void test_case_exception(const TestCaseException&) = 0; - - // called whenever a subcase is entered (don't cache pointers to the input) - virtual void subcase_start(const SubcaseSignature&) = 0; - // called whenever a subcase is exited (don't cache pointers to the input) - virtual void subcase_end() = 0; - - // called for each assert (don't cache pointers to the input) - virtual void log_assert(const AssertData&) = 0; - // called for each message (don't cache pointers to the input) - virtual void log_message(const MessageData&) = 0; - - // called when a test case is skipped either because it doesn't pass the filters, has a skip decorator - // or isn't in the execution range (between first and last) (safe to cache a pointer to the input) - virtual void test_case_skipped(const TestCaseData&) = 0; - - DOCTEST_DECLARE_INTERFACE(IReporter) - - // can obtain all currently active contexts and stringify them if one wishes to do so - static int get_num_active_contexts(); - static const IContextScope* const* get_active_contexts(); - - // can iterate through contexts which have been stringified automatically in their destructors when an exception has been thrown - static int get_num_stringified_contexts(); - static const String* get_stringified_contexts(); -}; - -namespace detail { - using reporterCreatorFunc = IReporter* (*)(const ContextOptions&); - - DOCTEST_INTERFACE void registerReporterImpl(const char* name, int prio, reporterCreatorFunc c, bool isReporter); - - template - IReporter* reporterCreator(const ContextOptions& o) { - return new Reporter(o); - } -} // namespace detail - -template -int registerReporter(const char* name, int priority, bool isReporter) { - detail::registerReporterImpl(name, priority, detail::reporterCreator, isReporter); - return 0; -} -} // namespace doctest - -#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES -#define DOCTEST_FUNC_EMPTY [] { return false; }() -#else -#define DOCTEST_FUNC_EMPTY (void)0 -#endif - -// if registering is not disabled -#ifndef DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_ASSERTS_RETURN_VALUES -#define DOCTEST_FUNC_SCOPE_BEGIN [&] -#define DOCTEST_FUNC_SCOPE_END () -#define DOCTEST_FUNC_SCOPE_RET(v) return v -#else -#define DOCTEST_FUNC_SCOPE_BEGIN do -#define DOCTEST_FUNC_SCOPE_END while(false) -#define DOCTEST_FUNC_SCOPE_RET(v) (void)0 -#endif - -// common code in asserts - for convenience -#define DOCTEST_ASSERT_LOG_REACT_RETURN(b) \ - if(b.log()) DOCTEST_BREAK_INTO_DEBUGGER(); \ - b.react(); \ - DOCTEST_FUNC_SCOPE_RET(!b.m_failed) - -#ifdef DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#define DOCTEST_WRAP_IN_TRY(x) x; -#else // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS -#define DOCTEST_WRAP_IN_TRY(x) \ - try { \ - x; \ - } catch(...) { DOCTEST_RB.translateException(); } -#endif // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS - -#ifdef DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS -#define DOCTEST_CAST_TO_VOID(...) \ - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wuseless-cast") \ - static_cast(__VA_ARGS__); \ - DOCTEST_GCC_SUPPRESS_WARNING_POP -#else // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS -#define DOCTEST_CAST_TO_VOID(...) __VA_ARGS__; -#endif // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS - -// registers the test by initializing a dummy var with a function -#define DOCTEST_REGISTER_FUNCTION(global_prefix, f, decorators) \ - global_prefix DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT */ \ - doctest::detail::regTest( \ - doctest::detail::TestCase( \ - f, __FILE__, __LINE__, \ - doctest_detail_test_suite_ns::getCurrentTestSuite()) * \ - decorators)) - -#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators) \ - namespace { /* NOLINT */ \ - struct der : public base \ - { \ - void f(); \ - }; \ - static inline DOCTEST_NOINLINE void func() { \ - der v; \ - v.f(); \ - } \ - DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators) \ - } \ - inline DOCTEST_NOINLINE void der::f() // NOLINT(misc-definitions-in-headers) - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, decorators) \ - static void f(); \ - DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, f, decorators) \ - static void f() - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(f, proxy, decorators) \ - static doctest::detail::funcType proxy() { return f; } \ - DOCTEST_REGISTER_FUNCTION(inline, proxy(), decorators) \ - static void f() - -// for registering test -#define DOCTEST_TEST_CASE(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators) - -// for registering test in classes - requires C++17 for inline variables! -#if DOCTEST_CPLUSPLUS >= 201703L -#define DOCTEST_TEST_CASE_CLASS(decorators) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_PROXY_), \ - decorators) -#else // DOCTEST_TEST_CASE_CLASS -#define DOCTEST_TEST_CASE_CLASS(...) \ - TEST_CASES_CAN_BE_REGISTERED_IN_CLASSES_ONLY_IN_CPP17_MODE_OR_WITH_VS_2017_OR_NEWER -#endif // DOCTEST_TEST_CASE_CLASS - -// for registering test with a fixture -#define DOCTEST_TEST_CASE_FIXTURE(c, decorators) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), c, \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), decorators) - -// for converting types to strings without the header and demangling -#define DOCTEST_TYPE_TO_STRING_AS(str, ...) \ - namespace doctest { \ - template <> \ - inline String toString<__VA_ARGS__>() { \ - return str; \ - } \ - } \ - static_assert(true, "") - -#define DOCTEST_TYPE_TO_STRING(...) DOCTEST_TYPE_TO_STRING_AS(#__VA_ARGS__, __VA_ARGS__) - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, iter, func) \ - template \ - static void func(); \ - namespace { /* NOLINT */ \ - template \ - struct iter; \ - template \ - struct iter> \ - { \ - iter(const char* file, unsigned line, int index) { \ - doctest::detail::regTest(doctest::detail::TestCase(func, file, line, \ - doctest_detail_test_suite_ns::getCurrentTestSuite(), \ - doctest::toString(), \ - int(line) * 1000 + index) \ - * dec); \ - iter>(file, line, index + 1); \ - } \ - }; \ - template <> \ - struct iter> \ - { \ - iter(const char*, unsigned, int) {} \ - }; \ - } \ - template \ - static void func() - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(dec, T, id) \ - DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(id, ITERATOR), \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)) - -#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, anon, ...) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_CAT(anon, DUMMY), /* NOLINT(cert-err58-cpp, fuchsia-statically-constructed-objects) */ \ - doctest::detail::instantiationHelper( \ - DOCTEST_CAT(id, ITERATOR)<__VA_ARGS__>(__FILE__, __LINE__, 0))) - -#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \ - static_assert(true, "") - -#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) \ - static_assert(true, "") - -#define DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, anon, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(anon, ITERATOR), anon); \ - DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(anon, anon, std::tuple<__VA_ARGS__>) \ - template \ - static void anon() - -#define DOCTEST_TEST_CASE_TEMPLATE(dec, T, ...) \ - DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_), __VA_ARGS__) - -// for subcases -#define DOCTEST_SUBCASE(name) \ - if(const doctest::detail::Subcase & DOCTEST_ANONYMOUS(DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \ - doctest::detail::Subcase(name, __FILE__, __LINE__)) - -// for grouping test in test suites by using code blocks -#define DOCTEST_TEST_SUITE_IMPL(decorators, ns_name) \ - namespace ns_name { namespace doctest_detail_test_suite_ns { \ - static DOCTEST_NOINLINE doctest::detail::TestSuite& getCurrentTestSuite() noexcept { \ - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4640) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wexit-time-destructors") \ - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wmissing-field-initializers") \ - static doctest::detail::TestSuite data{}; \ - static bool inited = false; \ - DOCTEST_MSVC_SUPPRESS_WARNING_POP \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP \ - DOCTEST_GCC_SUPPRESS_WARNING_POP \ - if(!inited) { \ - data* decorators; \ - inited = true; \ - } \ - return data; \ - } \ - } \ - } \ - namespace ns_name - -#define DOCTEST_TEST_SUITE(decorators) \ - DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(DOCTEST_ANON_SUITE_)) - -// for starting a testsuite block -#define DOCTEST_TEST_SUITE_BEGIN(decorators) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators)) \ - static_assert(true, "") - -// for ending a testsuite block -#define DOCTEST_TEST_SUITE_END \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_VAR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::detail::setTestSuite(doctest::detail::TestSuite() * "")) \ - using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int - -// for registering exception translators -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(translatorName, signature) \ - inline doctest::String translatorName(signature); \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerExceptionTranslator(translatorName)) \ - doctest::String translatorName(signature) - -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ - DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_), \ - signature) - -// for registering reporters -#define DOCTEST_REGISTER_REPORTER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerReporter(name, priority, true)) \ - static_assert(true, "") - -// for registering listeners -#define DOCTEST_REGISTER_LISTENER(name, priority, reporter) \ - DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(DOCTEST_ANON_REPORTER_), /* NOLINT(cert-err58-cpp) */ \ - doctest::registerReporter(name, priority, false)) \ - static_assert(true, "") - -// clang-format off -// for logging - disabling formatting because it's important to have these on 2 separate lines - see PR #557 -#define DOCTEST_INFO(...) \ - DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_), \ - DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_OTHER_), \ - __VA_ARGS__) -// clang-format on - -#define DOCTEST_INFO_IMPL(mb_name, s_name, ...) \ - auto DOCTEST_ANONYMOUS(DOCTEST_CAPTURE_) = doctest::detail::MakeContextScope( \ - [&](std::ostream* s_name) { \ - doctest::detail::MessageBuilder mb_name(__FILE__, __LINE__, doctest::assertType::is_warn); \ - mb_name.m_stream = s_name; \ - mb_name * __VA_ARGS__; \ - }) - -#define DOCTEST_CAPTURE(x) DOCTEST_INFO(#x " := ", x) - -#define DOCTEST_ADD_AT_IMPL(type, file, line, mb, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - doctest::detail::MessageBuilder mb(file, line, doctest::assertType::type); \ - mb * __VA_ARGS__; \ - if(mb.log()) \ - DOCTEST_BREAK_INTO_DEBUGGER(); \ - mb.react(); \ - } DOCTEST_FUNC_SCOPE_END - -// clang-format off -#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -#define DOCTEST_ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(DOCTEST_MESSAGE_), __VA_ARGS__) -// clang-format on - -#define DOCTEST_MESSAGE(...) DOCTEST_ADD_MESSAGE_AT(__FILE__, __LINE__, __VA_ARGS__) -#define DOCTEST_FAIL_CHECK(...) DOCTEST_ADD_FAIL_CHECK_AT(__FILE__, __LINE__, __VA_ARGS__) -#define DOCTEST_FAIL(...) DOCTEST_ADD_FAIL_AT(__FILE__, __LINE__, __VA_ARGS__) - -#define DOCTEST_TO_LVALUE(...) __VA_ARGS__ // Not removed to keep backwards compatibility. - -#ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -#define DOCTEST_ASSERT_IMPLEMENT_2(assert_type, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Woverloaded-shift-op-parentheses") \ - /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) */ \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(DOCTEST_RB.setResult( \ - doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type) \ - << __VA_ARGS__)) /* NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) */ \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB) \ - DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__); \ - } DOCTEST_FUNC_SCOPE_END // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) - -#define DOCTEST_BINARY_ASSERT(assert_type, comp, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY( \ - DOCTEST_RB.binary_assert( \ - __VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_UNARY_ASSERT(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, #__VA_ARGS__); \ - DOCTEST_WRAP_IN_TRY(DOCTEST_RB.unary_assert(__VA_ARGS__)) \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } DOCTEST_FUNC_SCOPE_END - -#else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -// necessary for _MESSAGE -#define DOCTEST_ASSERT_IMPLEMENT_2 DOCTEST_ASSERT_IMPLEMENT_1 - -#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...) \ - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Woverloaded-shift-op-parentheses") \ - doctest::detail::decomp_assert( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__, \ - doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type) \ - << __VA_ARGS__) DOCTEST_CLANG_SUPPRESS_WARNING_POP - -#define DOCTEST_BINARY_ASSERT(assert_type, comparison, ...) \ - doctest::detail::binary_assert( \ - doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__, __VA_ARGS__) - -#define DOCTEST_UNARY_ASSERT(assert_type, ...) \ - doctest::detail::unary_assert(doctest::assertType::assert_type, __FILE__, __LINE__, \ - #__VA_ARGS__, __VA_ARGS__) - -#endif // DOCTEST_CONFIG_SUPER_FAST_ASSERTS - -#define DOCTEST_WARN(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN, __VA_ARGS__) -#define DOCTEST_CHECK(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK, __VA_ARGS__) -#define DOCTEST_REQUIRE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE, __VA_ARGS__) -#define DOCTEST_WARN_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN_FALSE, __VA_ARGS__) -#define DOCTEST_CHECK_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK_FALSE, __VA_ARGS__) -#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE_FALSE, __VA_ARGS__) - -// clang-format off -#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); } DOCTEST_FUNC_SCOPE_END -// clang-format on - -#define DOCTEST_WARN_EQ(...) DOCTEST_BINARY_ASSERT(DT_WARN_EQ, eq, __VA_ARGS__) -#define DOCTEST_CHECK_EQ(...) DOCTEST_BINARY_ASSERT(DT_CHECK_EQ, eq, __VA_ARGS__) -#define DOCTEST_REQUIRE_EQ(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_EQ, eq, __VA_ARGS__) -#define DOCTEST_WARN_NE(...) DOCTEST_BINARY_ASSERT(DT_WARN_NE, ne, __VA_ARGS__) -#define DOCTEST_CHECK_NE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_NE, ne, __VA_ARGS__) -#define DOCTEST_REQUIRE_NE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_NE, ne, __VA_ARGS__) -#define DOCTEST_WARN_GT(...) DOCTEST_BINARY_ASSERT(DT_WARN_GT, gt, __VA_ARGS__) -#define DOCTEST_CHECK_GT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GT, gt, __VA_ARGS__) -#define DOCTEST_REQUIRE_GT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GT, gt, __VA_ARGS__) -#define DOCTEST_WARN_LT(...) DOCTEST_BINARY_ASSERT(DT_WARN_LT, lt, __VA_ARGS__) -#define DOCTEST_CHECK_LT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LT, lt, __VA_ARGS__) -#define DOCTEST_REQUIRE_LT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LT, lt, __VA_ARGS__) -#define DOCTEST_WARN_GE(...) DOCTEST_BINARY_ASSERT(DT_WARN_GE, ge, __VA_ARGS__) -#define DOCTEST_CHECK_GE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GE, ge, __VA_ARGS__) -#define DOCTEST_REQUIRE_GE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GE, ge, __VA_ARGS__) -#define DOCTEST_WARN_LE(...) DOCTEST_BINARY_ASSERT(DT_WARN_LE, le, __VA_ARGS__) -#define DOCTEST_CHECK_LE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LE, le, __VA_ARGS__) -#define DOCTEST_REQUIRE_LE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LE, le, __VA_ARGS__) - -#define DOCTEST_WARN_UNARY(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY, __VA_ARGS__) -#define DOCTEST_CHECK_UNARY(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY, __VA_ARGS__) -#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY, __VA_ARGS__) -#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY_FALSE, __VA_ARGS__) -#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY_FALSE, __VA_ARGS__) -#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY_FALSE, __VA_ARGS__) - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_ASSERT_THROWS_AS(expr, assert_type, message, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - if(!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, #expr, #__VA_ARGS__, message); \ - try { \ - DOCTEST_CAST_TO_VOID(expr) \ - } catch(const typename doctest::detail::types::remove_const< \ - typename doctest::detail::types::remove_reference<__VA_ARGS__>::type>::type&) {\ - DOCTEST_RB.translateException(); \ - DOCTEST_RB.m_threw_as = true; \ - } catch(...) { DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } else { /* NOLINT(*-else-after-return) */ \ - DOCTEST_FUNC_SCOPE_RET(false); \ - } \ - } DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_ASSERT_THROWS_WITH(expr, expr_str, assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - if(!doctest::getContextOptions()->no_throw) { \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, expr_str, "", __VA_ARGS__); \ - try { \ - DOCTEST_CAST_TO_VOID(expr) \ - } catch(...) { DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } else { /* NOLINT(*-else-after-return) */ \ - DOCTEST_FUNC_SCOPE_RET(false); \ - } \ - } DOCTEST_FUNC_SCOPE_END - -#define DOCTEST_ASSERT_NOTHROW(assert_type, ...) \ - DOCTEST_FUNC_SCOPE_BEGIN { \ - doctest::detail::ResultBuilder DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \ - __LINE__, #__VA_ARGS__); \ - try { \ - DOCTEST_CAST_TO_VOID(__VA_ARGS__) \ - } catch(...) { DOCTEST_RB.translateException(); } \ - DOCTEST_ASSERT_LOG_REACT_RETURN(DOCTEST_RB); \ - } DOCTEST_FUNC_SCOPE_END - -// clang-format off -#define DOCTEST_WARN_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_WARN_THROWS, "") -#define DOCTEST_CHECK_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_CHECK_THROWS, "") -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_ASSERT_THROWS_WITH((__VA_ARGS__), #__VA_ARGS__, DT_REQUIRE_THROWS, "") - -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_AS, "", __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_AS, "", __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_AS, "", __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_WARN_THROWS_WITH, __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_CHECK_THROWS_WITH, __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, #expr, DT_REQUIRE_THROWS_WITH, __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_WITH_AS, message, __VA_ARGS__) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_WITH_AS, message, __VA_ARGS__) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_WITH_AS, message, __VA_ARGS__) - -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_WARN_NOTHROW, __VA_ARGS__) -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_CHECK_NOTHROW, __VA_ARGS__) -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_ASSERT_NOTHROW(DT_REQUIRE_NOTHROW, __VA_ARGS__) - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_AS(expr, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH(expr, with); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_WARN_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_CHECK_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_SCOPE_BEGIN { DOCTEST_INFO(__VA_ARGS__); DOCTEST_REQUIRE_NOTHROW(expr); } DOCTEST_FUNC_SCOPE_END -// clang-format on - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -// ================================================================================================= -// == WHAT FOLLOWS IS VERSIONS OF THE MACROS THAT DO NOT DO ANY REGISTERING! == -// == THIS CAN BE ENABLED BY DEFINING DOCTEST_CONFIG_DISABLE GLOBALLY! == -// ================================================================================================= -#else // DOCTEST_CONFIG_DISABLE - -#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, name) \ - namespace /* NOLINT */ { \ - template \ - struct der : public base \ - { void f(); }; \ - } \ - template \ - inline void der::f() - -#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, name) \ - template \ - static inline void f() - -// for registering test -#define DOCTEST_TEST_CASE(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) - -// for registering test in classes -#define DOCTEST_TEST_CASE_CLASS(name) \ - DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) - -// for registering test with a fixture -#define DOCTEST_TEST_CASE_FIXTURE(x, name) \ - DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(DOCTEST_ANON_CLASS_), x, \ - DOCTEST_ANONYMOUS(DOCTEST_ANON_FUNC_), name) - -// for converting types to strings without the header and demangling -#define DOCTEST_TYPE_TO_STRING_AS(str, ...) static_assert(true, "") -#define DOCTEST_TYPE_TO_STRING(...) static_assert(true, "") - -// for typed test -#define DOCTEST_TEST_CASE_TEMPLATE(name, type, ...) \ - template \ - inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() - -#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, type, id) \ - template \ - inline void DOCTEST_ANONYMOUS(DOCTEST_ANON_TMP_)() - -#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...) static_assert(true, "") -#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...) static_assert(true, "") - -// for subcases -#define DOCTEST_SUBCASE(name) - -// for a testsuite block -#define DOCTEST_TEST_SUITE(name) namespace // NOLINT - -// for starting a testsuite block -#define DOCTEST_TEST_SUITE_BEGIN(name) static_assert(true, "") - -// for ending a testsuite block -#define DOCTEST_TEST_SUITE_END using DOCTEST_ANONYMOUS(DOCTEST_ANON_FOR_SEMICOLON_) = int - -#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) \ - template \ - static inline doctest::String DOCTEST_ANONYMOUS(DOCTEST_ANON_TRANSLATOR_)(signature) - -#define DOCTEST_REGISTER_REPORTER(name, priority, reporter) -#define DOCTEST_REGISTER_LISTENER(name, priority, reporter) - -#define DOCTEST_INFO(...) (static_cast(0)) -#define DOCTEST_CAPTURE(x) (static_cast(0)) -#define DOCTEST_ADD_MESSAGE_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_ADD_FAIL_AT(file, line, ...) (static_cast(0)) -#define DOCTEST_MESSAGE(...) (static_cast(0)) -#define DOCTEST_FAIL_CHECK(...) (static_cast(0)) -#define DOCTEST_FAIL(...) (static_cast(0)) - -#if defined(DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED) \ - && defined(DOCTEST_CONFIG_ASSERTS_RETURN_VALUES) - -#define DOCTEST_WARN(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_CHECK(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_REQUIRE(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_WARN_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_CHECK_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_FALSE(...) [&] { return !(__VA_ARGS__); }() - -#define DOCTEST_WARN_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_CHECK_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) [&] { return cond; }() -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) [&] { return !(cond); }() - -namespace doctest { -namespace detail { -#define DOCTEST_RELATIONAL_OP(name, op) \ - template \ - bool name(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) { return lhs op rhs; } - - DOCTEST_RELATIONAL_OP(eq, ==) - DOCTEST_RELATIONAL_OP(ne, !=) - DOCTEST_RELATIONAL_OP(lt, <) - DOCTEST_RELATIONAL_OP(gt, >) - DOCTEST_RELATIONAL_OP(le, <=) - DOCTEST_RELATIONAL_OP(ge, >=) -} // namespace detail -} // namespace doctest - -#define DOCTEST_WARN_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_CHECK_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_EQ(...) [&] { return doctest::detail::eq(__VA_ARGS__); }() -#define DOCTEST_WARN_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_CHECK_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_NE(...) [&] { return doctest::detail::ne(__VA_ARGS__); }() -#define DOCTEST_WARN_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_CHECK_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_LT(...) [&] { return doctest::detail::lt(__VA_ARGS__); }() -#define DOCTEST_WARN_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_CHECK_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_GT(...) [&] { return doctest::detail::gt(__VA_ARGS__); }() -#define DOCTEST_WARN_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_CHECK_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_LE(...) [&] { return doctest::detail::le(__VA_ARGS__); }() -#define DOCTEST_WARN_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_CHECK_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_GE(...) [&] { return doctest::detail::ge(__VA_ARGS__); }() -#define DOCTEST_WARN_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_CHECK_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_REQUIRE_UNARY(...) [&] { return __VA_ARGS__; }() -#define DOCTEST_WARN_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_CHECK_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() -#define DOCTEST_REQUIRE_UNARY_FALSE(...) [&] { return !(__VA_ARGS__); }() - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_WARN_THROWS_WITH(expr, with, ...) [] { static_assert(false, "Exception translation is not available when doctest is disabled."); return false; }() -#define DOCTEST_CHECK_THROWS_WITH(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_REQUIRE_THROWS_WITH(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) - -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH(,,) - -#define DOCTEST_WARN_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_CHECK_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_REQUIRE_THROWS(...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_WARN_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_CHECK_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_WARN_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() -#define DOCTEST_CHECK_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() -#define DOCTEST_REQUIRE_NOTHROW(...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return false; } catch (...) { return true; } }() -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) [&] { try { expr; } catch (__VA_ARGS__) { return true; } catch (...) { } return false; }() -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) [&] { try { __VA_ARGS__; return true; } catch (...) { return false; } }() - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#else // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED - -#define DOCTEST_WARN(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_EQ(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_GT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_LT(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_GE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_LE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_LE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_LE(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_FUNC_EMPTY - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - -#define DOCTEST_WARN_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_FUNC_EMPTY - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_FUNC_EMPTY - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -#endif // DOCTEST_CONFIG_EVALUATE_ASSERTS_EVEN_WHEN_DISABLED - -#endif // DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS - -#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#define DOCTEST_EXCEPTION_EMPTY_FUNC DOCTEST_FUNC_EMPTY -#else // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS -#define DOCTEST_EXCEPTION_EMPTY_FUNC [] { static_assert(false, "Exceptions are disabled! " \ - "Use DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS if you want to compile with exceptions disabled."); return false; }() - -#undef DOCTEST_REQUIRE -#undef DOCTEST_REQUIRE_FALSE -#undef DOCTEST_REQUIRE_MESSAGE -#undef DOCTEST_REQUIRE_FALSE_MESSAGE -#undef DOCTEST_REQUIRE_EQ -#undef DOCTEST_REQUIRE_NE -#undef DOCTEST_REQUIRE_GT -#undef DOCTEST_REQUIRE_LT -#undef DOCTEST_REQUIRE_GE -#undef DOCTEST_REQUIRE_LE -#undef DOCTEST_REQUIRE_UNARY -#undef DOCTEST_REQUIRE_UNARY_FALSE - -#define DOCTEST_REQUIRE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_FALSE_MESSAGE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_EQ DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_GT DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_LT DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_GE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_LE DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_UNARY DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_UNARY_FALSE DOCTEST_EXCEPTION_EMPTY_FUNC - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS - -#define DOCTEST_WARN_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NOTHROW(...) DOCTEST_EXCEPTION_EMPTY_FUNC - -#define DOCTEST_WARN_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC -#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_EXCEPTION_EMPTY_FUNC - -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - -// clang-format off -// KEPT FOR BACKWARDS COMPATIBILITY - FORWARDING TO THE RIGHT MACROS -#define DOCTEST_FAST_WARN_EQ DOCTEST_WARN_EQ -#define DOCTEST_FAST_CHECK_EQ DOCTEST_CHECK_EQ -#define DOCTEST_FAST_REQUIRE_EQ DOCTEST_REQUIRE_EQ -#define DOCTEST_FAST_WARN_NE DOCTEST_WARN_NE -#define DOCTEST_FAST_CHECK_NE DOCTEST_CHECK_NE -#define DOCTEST_FAST_REQUIRE_NE DOCTEST_REQUIRE_NE -#define DOCTEST_FAST_WARN_GT DOCTEST_WARN_GT -#define DOCTEST_FAST_CHECK_GT DOCTEST_CHECK_GT -#define DOCTEST_FAST_REQUIRE_GT DOCTEST_REQUIRE_GT -#define DOCTEST_FAST_WARN_LT DOCTEST_WARN_LT -#define DOCTEST_FAST_CHECK_LT DOCTEST_CHECK_LT -#define DOCTEST_FAST_REQUIRE_LT DOCTEST_REQUIRE_LT -#define DOCTEST_FAST_WARN_GE DOCTEST_WARN_GE -#define DOCTEST_FAST_CHECK_GE DOCTEST_CHECK_GE -#define DOCTEST_FAST_REQUIRE_GE DOCTEST_REQUIRE_GE -#define DOCTEST_FAST_WARN_LE DOCTEST_WARN_LE -#define DOCTEST_FAST_CHECK_LE DOCTEST_CHECK_LE -#define DOCTEST_FAST_REQUIRE_LE DOCTEST_REQUIRE_LE - -#define DOCTEST_FAST_WARN_UNARY DOCTEST_WARN_UNARY -#define DOCTEST_FAST_CHECK_UNARY DOCTEST_CHECK_UNARY -#define DOCTEST_FAST_REQUIRE_UNARY DOCTEST_REQUIRE_UNARY -#define DOCTEST_FAST_WARN_UNARY_FALSE DOCTEST_WARN_UNARY_FALSE -#define DOCTEST_FAST_CHECK_UNARY_FALSE DOCTEST_CHECK_UNARY_FALSE -#define DOCTEST_FAST_REQUIRE_UNARY_FALSE DOCTEST_REQUIRE_UNARY_FALSE - -#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id,__VA_ARGS__) -// clang-format on - -// BDD style macros -// clang-format off -#define DOCTEST_SCENARIO(name) DOCTEST_TEST_CASE(" Scenario: " name) -#define DOCTEST_SCENARIO_CLASS(name) DOCTEST_TEST_CASE_CLASS(" Scenario: " name) -#define DOCTEST_SCENARIO_TEMPLATE(name, T, ...) DOCTEST_TEST_CASE_TEMPLATE(" Scenario: " name, T, __VA_ARGS__) -#define DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(" Scenario: " name, T, id) - -#define DOCTEST_GIVEN(name) DOCTEST_SUBCASE(" Given: " name) -#define DOCTEST_WHEN(name) DOCTEST_SUBCASE(" When: " name) -#define DOCTEST_AND_WHEN(name) DOCTEST_SUBCASE("And when: " name) -#define DOCTEST_THEN(name) DOCTEST_SUBCASE(" Then: " name) -#define DOCTEST_AND_THEN(name) DOCTEST_SUBCASE(" And: " name) -// clang-format on - -// == SHORT VERSIONS OF THE MACROS -#ifndef DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES - -#define TEST_CASE(name) DOCTEST_TEST_CASE(name) -#define TEST_CASE_CLASS(name) DOCTEST_TEST_CASE_CLASS(name) -#define TEST_CASE_FIXTURE(x, name) DOCTEST_TEST_CASE_FIXTURE(x, name) -#define TYPE_TO_STRING_AS(str, ...) DOCTEST_TYPE_TO_STRING_AS(str, __VA_ARGS__) -#define TYPE_TO_STRING(...) DOCTEST_TYPE_TO_STRING(__VA_ARGS__) -#define TEST_CASE_TEMPLATE(name, T, ...) DOCTEST_TEST_CASE_TEMPLATE(name, T, __VA_ARGS__) -#define TEST_CASE_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, T, id) -#define TEST_CASE_TEMPLATE_INVOKE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, __VA_ARGS__) -#define TEST_CASE_TEMPLATE_APPLY(id, ...) DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, __VA_ARGS__) -#define SUBCASE(name) DOCTEST_SUBCASE(name) -#define TEST_SUITE(decorators) DOCTEST_TEST_SUITE(decorators) -#define TEST_SUITE_BEGIN(name) DOCTEST_TEST_SUITE_BEGIN(name) -#define TEST_SUITE_END DOCTEST_TEST_SUITE_END -#define REGISTER_EXCEPTION_TRANSLATOR(signature) DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature) -#define REGISTER_REPORTER(name, priority, reporter) DOCTEST_REGISTER_REPORTER(name, priority, reporter) -#define REGISTER_LISTENER(name, priority, reporter) DOCTEST_REGISTER_LISTENER(name, priority, reporter) -#define INFO(...) DOCTEST_INFO(__VA_ARGS__) -#define CAPTURE(x) DOCTEST_CAPTURE(x) -#define ADD_MESSAGE_AT(file, line, ...) DOCTEST_ADD_MESSAGE_AT(file, line, __VA_ARGS__) -#define ADD_FAIL_CHECK_AT(file, line, ...) DOCTEST_ADD_FAIL_CHECK_AT(file, line, __VA_ARGS__) -#define ADD_FAIL_AT(file, line, ...) DOCTEST_ADD_FAIL_AT(file, line, __VA_ARGS__) -#define MESSAGE(...) DOCTEST_MESSAGE(__VA_ARGS__) -#define FAIL_CHECK(...) DOCTEST_FAIL_CHECK(__VA_ARGS__) -#define FAIL(...) DOCTEST_FAIL(__VA_ARGS__) -#define TO_LVALUE(...) DOCTEST_TO_LVALUE(__VA_ARGS__) - -#define WARN(...) DOCTEST_WARN(__VA_ARGS__) -#define WARN_FALSE(...) DOCTEST_WARN_FALSE(__VA_ARGS__) -#define WARN_THROWS(...) DOCTEST_WARN_THROWS(__VA_ARGS__) -#define WARN_THROWS_AS(expr, ...) DOCTEST_WARN_THROWS_AS(expr, __VA_ARGS__) -#define WARN_THROWS_WITH(expr, ...) DOCTEST_WARN_THROWS_WITH(expr, __VA_ARGS__) -#define WARN_THROWS_WITH_AS(expr, with, ...) DOCTEST_WARN_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define WARN_NOTHROW(...) DOCTEST_WARN_NOTHROW(__VA_ARGS__) -#define CHECK(...) DOCTEST_CHECK(__VA_ARGS__) -#define CHECK_FALSE(...) DOCTEST_CHECK_FALSE(__VA_ARGS__) -#define CHECK_THROWS(...) DOCTEST_CHECK_THROWS(__VA_ARGS__) -#define CHECK_THROWS_AS(expr, ...) DOCTEST_CHECK_THROWS_AS(expr, __VA_ARGS__) -#define CHECK_THROWS_WITH(expr, ...) DOCTEST_CHECK_THROWS_WITH(expr, __VA_ARGS__) -#define CHECK_THROWS_WITH_AS(expr, with, ...) DOCTEST_CHECK_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define CHECK_NOTHROW(...) DOCTEST_CHECK_NOTHROW(__VA_ARGS__) -#define REQUIRE(...) DOCTEST_REQUIRE(__VA_ARGS__) -#define REQUIRE_FALSE(...) DOCTEST_REQUIRE_FALSE(__VA_ARGS__) -#define REQUIRE_THROWS(...) DOCTEST_REQUIRE_THROWS(__VA_ARGS__) -#define REQUIRE_THROWS_AS(expr, ...) DOCTEST_REQUIRE_THROWS_AS(expr, __VA_ARGS__) -#define REQUIRE_THROWS_WITH(expr, ...) DOCTEST_REQUIRE_THROWS_WITH(expr, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_AS(expr, with, ...) DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, __VA_ARGS__) -#define REQUIRE_NOTHROW(...) DOCTEST_REQUIRE_NOTHROW(__VA_ARGS__) - -#define WARN_MESSAGE(cond, ...) DOCTEST_WARN_MESSAGE(cond, __VA_ARGS__) -#define WARN_FALSE_MESSAGE(cond, ...) DOCTEST_WARN_FALSE_MESSAGE(cond, __VA_ARGS__) -#define WARN_THROWS_MESSAGE(expr, ...) DOCTEST_WARN_THROWS_MESSAGE(expr, __VA_ARGS__) -#define WARN_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define WARN_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define WARN_NOTHROW_MESSAGE(expr, ...) DOCTEST_WARN_NOTHROW_MESSAGE(expr, __VA_ARGS__) -#define CHECK_MESSAGE(cond, ...) DOCTEST_CHECK_MESSAGE(cond, __VA_ARGS__) -#define CHECK_FALSE_MESSAGE(cond, ...) DOCTEST_CHECK_FALSE_MESSAGE(cond, __VA_ARGS__) -#define CHECK_THROWS_MESSAGE(expr, ...) DOCTEST_CHECK_THROWS_MESSAGE(expr, __VA_ARGS__) -#define CHECK_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define CHECK_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define CHECK_NOTHROW_MESSAGE(expr, ...) DOCTEST_CHECK_NOTHROW_MESSAGE(expr, __VA_ARGS__) -#define REQUIRE_MESSAGE(cond, ...) DOCTEST_REQUIRE_MESSAGE(cond, __VA_ARGS__) -#define REQUIRE_FALSE_MESSAGE(cond, ...) DOCTEST_REQUIRE_FALSE_MESSAGE(cond, __VA_ARGS__) -#define REQUIRE_THROWS_MESSAGE(expr, ...) DOCTEST_REQUIRE_THROWS_MESSAGE(expr, __VA_ARGS__) -#define REQUIRE_THROWS_AS_MESSAGE(expr, ex, ...) DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_MESSAGE(expr, with, ...) DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, __VA_ARGS__) -#define REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, ...) DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, __VA_ARGS__) -#define REQUIRE_NOTHROW_MESSAGE(expr, ...) DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, __VA_ARGS__) - -#define SCENARIO(name) DOCTEST_SCENARIO(name) -#define SCENARIO_CLASS(name) DOCTEST_SCENARIO_CLASS(name) -#define SCENARIO_TEMPLATE(name, T, ...) DOCTEST_SCENARIO_TEMPLATE(name, T, __VA_ARGS__) -#define SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) -#define GIVEN(name) DOCTEST_GIVEN(name) -#define WHEN(name) DOCTEST_WHEN(name) -#define AND_WHEN(name) DOCTEST_AND_WHEN(name) -#define THEN(name) DOCTEST_THEN(name) -#define AND_THEN(name) DOCTEST_AND_THEN(name) - -#define WARN_EQ(...) DOCTEST_WARN_EQ(__VA_ARGS__) -#define CHECK_EQ(...) DOCTEST_CHECK_EQ(__VA_ARGS__) -#define REQUIRE_EQ(...) DOCTEST_REQUIRE_EQ(__VA_ARGS__) -#define WARN_NE(...) DOCTEST_WARN_NE(__VA_ARGS__) -#define CHECK_NE(...) DOCTEST_CHECK_NE(__VA_ARGS__) -#define REQUIRE_NE(...) DOCTEST_REQUIRE_NE(__VA_ARGS__) -#define WARN_GT(...) DOCTEST_WARN_GT(__VA_ARGS__) -#define CHECK_GT(...) DOCTEST_CHECK_GT(__VA_ARGS__) -#define REQUIRE_GT(...) DOCTEST_REQUIRE_GT(__VA_ARGS__) -#define WARN_LT(...) DOCTEST_WARN_LT(__VA_ARGS__) -#define CHECK_LT(...) DOCTEST_CHECK_LT(__VA_ARGS__) -#define REQUIRE_LT(...) DOCTEST_REQUIRE_LT(__VA_ARGS__) -#define WARN_GE(...) DOCTEST_WARN_GE(__VA_ARGS__) -#define CHECK_GE(...) DOCTEST_CHECK_GE(__VA_ARGS__) -#define REQUIRE_GE(...) DOCTEST_REQUIRE_GE(__VA_ARGS__) -#define WARN_LE(...) DOCTEST_WARN_LE(__VA_ARGS__) -#define CHECK_LE(...) DOCTEST_CHECK_LE(__VA_ARGS__) -#define REQUIRE_LE(...) DOCTEST_REQUIRE_LE(__VA_ARGS__) -#define WARN_UNARY(...) DOCTEST_WARN_UNARY(__VA_ARGS__) -#define CHECK_UNARY(...) DOCTEST_CHECK_UNARY(__VA_ARGS__) -#define REQUIRE_UNARY(...) DOCTEST_REQUIRE_UNARY(__VA_ARGS__) -#define WARN_UNARY_FALSE(...) DOCTEST_WARN_UNARY_FALSE(__VA_ARGS__) -#define CHECK_UNARY_FALSE(...) DOCTEST_CHECK_UNARY_FALSE(__VA_ARGS__) -#define REQUIRE_UNARY_FALSE(...) DOCTEST_REQUIRE_UNARY_FALSE(__VA_ARGS__) - -// KEPT FOR BACKWARDS COMPATIBILITY -#define FAST_WARN_EQ(...) DOCTEST_FAST_WARN_EQ(__VA_ARGS__) -#define FAST_CHECK_EQ(...) DOCTEST_FAST_CHECK_EQ(__VA_ARGS__) -#define FAST_REQUIRE_EQ(...) DOCTEST_FAST_REQUIRE_EQ(__VA_ARGS__) -#define FAST_WARN_NE(...) DOCTEST_FAST_WARN_NE(__VA_ARGS__) -#define FAST_CHECK_NE(...) DOCTEST_FAST_CHECK_NE(__VA_ARGS__) -#define FAST_REQUIRE_NE(...) DOCTEST_FAST_REQUIRE_NE(__VA_ARGS__) -#define FAST_WARN_GT(...) DOCTEST_FAST_WARN_GT(__VA_ARGS__) -#define FAST_CHECK_GT(...) DOCTEST_FAST_CHECK_GT(__VA_ARGS__) -#define FAST_REQUIRE_GT(...) DOCTEST_FAST_REQUIRE_GT(__VA_ARGS__) -#define FAST_WARN_LT(...) DOCTEST_FAST_WARN_LT(__VA_ARGS__) -#define FAST_CHECK_LT(...) DOCTEST_FAST_CHECK_LT(__VA_ARGS__) -#define FAST_REQUIRE_LT(...) DOCTEST_FAST_REQUIRE_LT(__VA_ARGS__) -#define FAST_WARN_GE(...) DOCTEST_FAST_WARN_GE(__VA_ARGS__) -#define FAST_CHECK_GE(...) DOCTEST_FAST_CHECK_GE(__VA_ARGS__) -#define FAST_REQUIRE_GE(...) DOCTEST_FAST_REQUIRE_GE(__VA_ARGS__) -#define FAST_WARN_LE(...) DOCTEST_FAST_WARN_LE(__VA_ARGS__) -#define FAST_CHECK_LE(...) DOCTEST_FAST_CHECK_LE(__VA_ARGS__) -#define FAST_REQUIRE_LE(...) DOCTEST_FAST_REQUIRE_LE(__VA_ARGS__) - -#define FAST_WARN_UNARY(...) DOCTEST_FAST_WARN_UNARY(__VA_ARGS__) -#define FAST_CHECK_UNARY(...) DOCTEST_FAST_CHECK_UNARY(__VA_ARGS__) -#define FAST_REQUIRE_UNARY(...) DOCTEST_FAST_REQUIRE_UNARY(__VA_ARGS__) -#define FAST_WARN_UNARY_FALSE(...) DOCTEST_FAST_WARN_UNARY_FALSE(__VA_ARGS__) -#define FAST_CHECK_UNARY_FALSE(...) DOCTEST_FAST_CHECK_UNARY_FALSE(__VA_ARGS__) -#define FAST_REQUIRE_UNARY_FALSE(...) DOCTEST_FAST_REQUIRE_UNARY_FALSE(__VA_ARGS__) - -#define TEST_CASE_TEMPLATE_INSTANTIATE(id, ...) DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE(id, __VA_ARGS__) - -#endif // DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES - -#ifndef DOCTEST_CONFIG_DISABLE - -// this is here to clear the 'current test suite' for the current translation unit - at the top -DOCTEST_TEST_SUITE_END(); - -#endif // DOCTEST_CONFIG_DISABLE - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_POP - -#endif // DOCTEST_LIBRARY_INCLUDED - -#ifndef DOCTEST_SINGLE_HEADER -#define DOCTEST_SINGLE_HEADER -#endif // DOCTEST_SINGLE_HEADER - -#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER) - -#ifndef DOCTEST_SINGLE_HEADER -#include "doctest_fwd.h" -#endif // DOCTEST_SINGLE_HEADER - -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wunused-macros") - -#ifndef DOCTEST_LIBRARY_IMPLEMENTATION -#define DOCTEST_LIBRARY_IMPLEMENTATION - -DOCTEST_CLANG_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_PUSH - -DOCTEST_CLANG_SUPPRESS_WARNING_PUSH -DOCTEST_CLANG_SUPPRESS_WARNING("-Wglobal-constructors") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wexit-time-destructors") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wshorten-64-to-32") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-variable-declarations") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wswitch-enum") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wcovered-switch-default") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-noreturn") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wdisabled-macro-expansion") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-braces") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wmissing-field-initializers") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wunused-member-function") -DOCTEST_CLANG_SUPPRESS_WARNING("-Wnonportable-system-include-path") - -DOCTEST_GCC_SUPPRESS_WARNING_PUSH -DOCTEST_GCC_SUPPRESS_WARNING("-Wconversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsign-conversion") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-field-initializers") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmissing-braces") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-enum") -DOCTEST_GCC_SUPPRESS_WARNING("-Wswitch-default") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunsafe-loop-optimizations") -DOCTEST_GCC_SUPPRESS_WARNING("-Wold-style-cast") -DOCTEST_GCC_SUPPRESS_WARNING("-Wunused-function") -DOCTEST_GCC_SUPPRESS_WARNING("-Wmultiple-inheritance") -DOCTEST_GCC_SUPPRESS_WARNING("-Wsuggest-attribute") - -DOCTEST_MSVC_SUPPRESS_WARNING_PUSH -DOCTEST_MSVC_SUPPRESS_WARNING(4267) // 'var' : conversion from 'x' to 'y', possible loss of data -DOCTEST_MSVC_SUPPRESS_WARNING(4530) // C++ exception handler used, but unwind semantics not enabled -DOCTEST_MSVC_SUPPRESS_WARNING(4577) // 'noexcept' used with no exception handling mode specified -DOCTEST_MSVC_SUPPRESS_WARNING(4774) // format string expected in argument is not a string literal -DOCTEST_MSVC_SUPPRESS_WARNING(4365) // conversion from 'int' to 'unsigned', signed/unsigned mismatch -DOCTEST_MSVC_SUPPRESS_WARNING(5039) // pointer to potentially throwing function passed to extern C -DOCTEST_MSVC_SUPPRESS_WARNING(4800) // forcing value to bool 'true' or 'false' (performance warning) -DOCTEST_MSVC_SUPPRESS_WARNING(5245) // unreferenced function with internal linkage has been removed - -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN - -// required includes - will go only in one translation unit! -#include -#include -#include -// borland (Embarcadero) compiler requires math.h and not cmath - https://github.com/doctest/doctest/pull/37 -#ifdef __BORLANDC__ -#include -#endif // __BORLANDC__ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef DOCTEST_CONFIG_NO_MULTITHREADING -#include -#include -#define DOCTEST_DECLARE_MUTEX(name) std::mutex name; -#define DOCTEST_DECLARE_STATIC_MUTEX(name) static DOCTEST_DECLARE_MUTEX(name) -#define DOCTEST_LOCK_MUTEX(name) std::lock_guard DOCTEST_ANONYMOUS(DOCTEST_ANON_LOCK_)(name); -#else // DOCTEST_CONFIG_NO_MULTITHREADING -#define DOCTEST_DECLARE_MUTEX(name) -#define DOCTEST_DECLARE_STATIC_MUTEX(name) -#define DOCTEST_LOCK_MUTEX(name) -#endif // DOCTEST_CONFIG_NO_MULTITHREADING -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef DOCTEST_PLATFORM_MAC -#include -#include -#include -#endif // DOCTEST_PLATFORM_MAC - -#ifdef DOCTEST_PLATFORM_WINDOWS - -// defines for a leaner windows.h -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif // WIN32_LEAN_AND_MEAN -#ifndef NOMINMAX -#define NOMINMAX -#endif // NOMINMAX - -// not sure what AfxWin.h is for - here I do what Catch does -#ifdef __AFXDLL -#include -#else -#include -#endif -#include - -#else // DOCTEST_PLATFORM_WINDOWS - -#include -#include - -#endif // DOCTEST_PLATFORM_WINDOWS - -// this is a fix for https://github.com/doctest/doctest/issues/348 -// https://mail.gnome.org/archives/xml/2012-January/msg00000.html -#if !defined(HAVE_UNISTD_H) && !defined(STDOUT_FILENO) -#define STDOUT_FILENO fileno(stdout) -#endif // HAVE_UNISTD_H - -DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END - -// counts the number of elements in a C array -#define DOCTEST_COUNTOF(x) (sizeof(x) / sizeof(x[0])) - -#ifdef DOCTEST_CONFIG_DISABLE -#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_disabled -#else // DOCTEST_CONFIG_DISABLE -#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_not_disabled -#endif // DOCTEST_CONFIG_DISABLE - -#ifndef DOCTEST_CONFIG_OPTIONS_PREFIX -#define DOCTEST_CONFIG_OPTIONS_PREFIX "dt-" -#endif - -#ifndef DOCTEST_THREAD_LOCAL -#if defined(DOCTEST_CONFIG_NO_MULTITHREADING) || DOCTEST_MSVC && (DOCTEST_MSVC < DOCTEST_COMPILER(19, 0, 0)) -#define DOCTEST_THREAD_LOCAL -#else // DOCTEST_MSVC -#define DOCTEST_THREAD_LOCAL thread_local -#endif // DOCTEST_MSVC -#endif // DOCTEST_THREAD_LOCAL - -#ifndef DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES -#define DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES 32 -#endif - -#ifndef DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE -#define DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE 64 -#endif - -#ifdef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS -#define DOCTEST_OPTIONS_PREFIX_DISPLAY DOCTEST_CONFIG_OPTIONS_PREFIX -#else -#define DOCTEST_OPTIONS_PREFIX_DISPLAY "" -#endif - -#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -#define DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS -#endif - -#ifndef DOCTEST_CDECL -#define DOCTEST_CDECL __cdecl -#endif - -namespace doctest { - -bool is_running_in_test = false; - -namespace { - using namespace detail; - - template - DOCTEST_NORETURN void throw_exception(Ex const& e) { -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - throw e; -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - std::cerr << "doctest will terminate because it needed to throw an exception.\n" - << "The message was: " << e.what() << '\n'; - std::terminate(); -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - } - -#ifndef DOCTEST_INTERNAL_ERROR -#define DOCTEST_INTERNAL_ERROR(msg) \ - throw_exception(std::logic_error( \ - __FILE__ ":" DOCTEST_TOSTR(__LINE__) ": Internal doctest error: " msg)) -#endif // DOCTEST_INTERNAL_ERROR - - // case insensitive strcmp - int stricmp(const char* a, const char* b) { - for(;; a++, b++) { - const int d = tolower(*a) - tolower(*b); - if(d != 0 || !*a) - return d; - } - } - - struct Endianness - { - enum Arch - { - Big, - Little - }; - - static Arch which() { - int x = 1; - // casting any data pointer to char* is allowed - auto ptr = reinterpret_cast(&x); - if(*ptr) - return Little; - return Big; - } - }; -} // namespace - -namespace detail { - DOCTEST_THREAD_LOCAL class - { - std::vector stack; - std::stringstream ss; - - public: - std::ostream* push() { - stack.push_back(ss.tellp()); - return &ss; - } - - String pop() { - if (stack.empty()) - DOCTEST_INTERNAL_ERROR("TLSS was empty when trying to pop!"); - - std::streampos pos = stack.back(); - stack.pop_back(); - unsigned sz = static_cast(ss.tellp() - pos); - ss.rdbuf()->pubseekpos(pos, std::ios::in | std::ios::out); - return String(ss, sz); - } - } g_oss; - - std::ostream* tlssPush() { - return g_oss.push(); - } - - String tlssPop() { - return g_oss.pop(); - } - -#ifndef DOCTEST_CONFIG_DISABLE - -namespace timer_large_integer -{ - -#if defined(DOCTEST_PLATFORM_WINDOWS) - using type = ULONGLONG; -#else // DOCTEST_PLATFORM_WINDOWS - using type = std::uint64_t; -#endif // DOCTEST_PLATFORM_WINDOWS -} - -using ticks_t = timer_large_integer::type; - -#ifdef DOCTEST_CONFIG_GETCURRENTTICKS - ticks_t getCurrentTicks() { return DOCTEST_CONFIG_GETCURRENTTICKS(); } -#elif defined(DOCTEST_PLATFORM_WINDOWS) - ticks_t getCurrentTicks() { - static LARGE_INTEGER hz = { {0} }, hzo = { {0} }; - if(!hz.QuadPart) { - QueryPerformanceFrequency(&hz); - QueryPerformanceCounter(&hzo); - } - LARGE_INTEGER t; - QueryPerformanceCounter(&t); - return ((t.QuadPart - hzo.QuadPart) * LONGLONG(1000000)) / hz.QuadPart; - } -#else // DOCTEST_PLATFORM_WINDOWS - ticks_t getCurrentTicks() { - timeval t; - gettimeofday(&t, nullptr); - return static_cast(t.tv_sec) * 1000000 + static_cast(t.tv_usec); - } -#endif // DOCTEST_PLATFORM_WINDOWS - - struct Timer - { - void start() { m_ticks = getCurrentTicks(); } - unsigned int getElapsedMicroseconds() const { - return static_cast(getCurrentTicks() - m_ticks); - } - //unsigned int getElapsedMilliseconds() const { - // return static_cast(getElapsedMicroseconds() / 1000); - //} - double getElapsedSeconds() const { return static_cast(getCurrentTicks() - m_ticks) / 1000000.0; } - - private: - ticks_t m_ticks = 0; - }; - -#ifdef DOCTEST_CONFIG_NO_MULTITHREADING - template - using Atomic = T; -#else // DOCTEST_CONFIG_NO_MULTITHREADING - template - using Atomic = std::atomic; -#endif // DOCTEST_CONFIG_NO_MULTITHREADING - -#if defined(DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS) || defined(DOCTEST_CONFIG_NO_MULTITHREADING) - template - using MultiLaneAtomic = Atomic; -#else // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS - // Provides a multilane implementation of an atomic variable that supports add, sub, load, - // store. Instead of using a single atomic variable, this splits up into multiple ones, - // each sitting on a separate cache line. The goal is to provide a speedup when most - // operations are modifying. It achieves this with two properties: - // - // * Multiple atomics are used, so chance of congestion from the same atomic is reduced. - // * Each atomic sits on a separate cache line, so false sharing is reduced. - // - // The disadvantage is that there is a small overhead due to the use of TLS, and load/store - // is slower because all atomics have to be accessed. - template - class MultiLaneAtomic - { - struct CacheLineAlignedAtomic - { - Atomic atomic{}; - char padding[DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE - sizeof(Atomic)]; - }; - CacheLineAlignedAtomic m_atomics[DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES]; - - static_assert(sizeof(CacheLineAlignedAtomic) == DOCTEST_MULTI_LANE_ATOMICS_CACHE_LINE_SIZE, - "guarantee one atomic takes exactly one cache line"); - - public: - T operator++() DOCTEST_NOEXCEPT { return fetch_add(1) + 1; } - - T operator++(int) DOCTEST_NOEXCEPT { return fetch_add(1); } - - T fetch_add(T arg, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT { - return myAtomic().fetch_add(arg, order); - } - - T fetch_sub(T arg, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT { - return myAtomic().fetch_sub(arg, order); - } - - operator T() const DOCTEST_NOEXCEPT { return load(); } - - T load(std::memory_order order = std::memory_order_seq_cst) const DOCTEST_NOEXCEPT { - auto result = T(); - for(auto const& c : m_atomics) { - result += c.atomic.load(order); - } - return result; - } - - T operator=(T desired) DOCTEST_NOEXCEPT { // lgtm [cpp/assignment-does-not-return-this] - store(desired); - return desired; - } - - void store(T desired, std::memory_order order = std::memory_order_seq_cst) DOCTEST_NOEXCEPT { - // first value becomes desired", all others become 0. - for(auto& c : m_atomics) { - c.atomic.store(desired, order); - desired = {}; - } - } - - private: - // Each thread has a different atomic that it operates on. If more than NumLanes threads - // use this, some will use the same atomic. So performance will degrade a bit, but still - // everything will work. - // - // The logic here is a bit tricky. The call should be as fast as possible, so that there - // is minimal to no overhead in determining the correct atomic for the current thread. - // - // 1. A global static counter laneCounter counts continuously up. - // 2. Each successive thread will use modulo operation of that counter so it gets an atomic - // assigned in a round-robin fashion. - // 3. This tlsLaneIdx is stored in the thread local data, so it is directly available with - // little overhead. - Atomic& myAtomic() DOCTEST_NOEXCEPT { - static Atomic laneCounter; - DOCTEST_THREAD_LOCAL size_t tlsLaneIdx = - laneCounter++ % DOCTEST_MULTI_LANE_ATOMICS_THREAD_LANES; - - return m_atomics[tlsLaneIdx].atomic; - } - }; -#endif // DOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS - - // this holds both parameters from the command line and runtime data for test - struct ContextState : ContextOptions, TestRunStats, CurrentTestCaseStats - { - MultiLaneAtomic numAssertsCurrentTest_atomic; - MultiLaneAtomic numAssertsFailedCurrentTest_atomic; - - std::vector> filters = decltype(filters)(9); // 9 different filters - - std::vector reporters_currently_used; - - assert_handler ah = nullptr; - - Timer timer; - - std::vector stringifiedContexts; // logging from INFO() due to an exception - - // stuff for subcases - bool reachedLeaf; - std::vector subcaseStack; - std::vector nextSubcaseStack; - std::unordered_set fullyTraversedSubcases; - size_t currentSubcaseDepth; - Atomic shouldLogCurrentException; - - void resetRunData() { - numTestCases = 0; - numTestCasesPassingFilters = 0; - numTestSuitesPassingFilters = 0; - numTestCasesFailed = 0; - numAsserts = 0; - numAssertsFailed = 0; - numAssertsCurrentTest = 0; - numAssertsFailedCurrentTest = 0; - } - - void finalizeTestCaseData() { - seconds = timer.getElapsedSeconds(); - - // update the non-atomic counters - numAsserts += numAssertsCurrentTest_atomic; - numAssertsFailed += numAssertsFailedCurrentTest_atomic; - numAssertsCurrentTest = numAssertsCurrentTest_atomic; - numAssertsFailedCurrentTest = numAssertsFailedCurrentTest_atomic; - - if(numAssertsFailedCurrentTest) - failure_flags |= TestCaseFailureReason::AssertFailure; - - if(Approx(currentTest->m_timeout).epsilon(DBL_EPSILON) != 0 && - Approx(seconds).epsilon(DBL_EPSILON) > currentTest->m_timeout) - failure_flags |= TestCaseFailureReason::Timeout; - - if(currentTest->m_should_fail) { - if(failure_flags) { - failure_flags |= TestCaseFailureReason::ShouldHaveFailedAndDid; - } else { - failure_flags |= TestCaseFailureReason::ShouldHaveFailedButDidnt; - } - } else if(failure_flags && currentTest->m_may_fail) { - failure_flags |= TestCaseFailureReason::CouldHaveFailedAndDid; - } else if(currentTest->m_expected_failures > 0) { - if(numAssertsFailedCurrentTest == currentTest->m_expected_failures) { - failure_flags |= TestCaseFailureReason::FailedExactlyNumTimes; - } else { - failure_flags |= TestCaseFailureReason::DidntFailExactlyNumTimes; - } - } - - bool ok_to_fail = (TestCaseFailureReason::ShouldHaveFailedAndDid & failure_flags) || - (TestCaseFailureReason::CouldHaveFailedAndDid & failure_flags) || - (TestCaseFailureReason::FailedExactlyNumTimes & failure_flags); - - // if any subcase has failed - the whole test case has failed - testCaseSuccess = !(failure_flags && !ok_to_fail); - if(!testCaseSuccess) - numTestCasesFailed++; - } - }; - - ContextState* g_cs = nullptr; - - // used to avoid locks for the debug output - // TODO: figure out if this is indeed necessary/correct - seems like either there still - // could be a race or that there wouldn't be a race even if using the context directly - DOCTEST_THREAD_LOCAL bool g_no_colors; - -#endif // DOCTEST_CONFIG_DISABLE -} // namespace detail - -char* String::allocate(size_type sz) { - if (sz <= last) { - buf[sz] = '\0'; - setLast(last - sz); - return buf; - } else { - setOnHeap(); - data.size = sz; - data.capacity = data.size + 1; - data.ptr = new char[data.capacity]; - data.ptr[sz] = '\0'; - return data.ptr; - } -} - -void String::setOnHeap() noexcept { *reinterpret_cast(&buf[last]) = 128; } -void String::setLast(size_type in) noexcept { buf[last] = char(in); } -void String::setSize(size_type sz) noexcept { - if (isOnStack()) { buf[sz] = '\0'; setLast(last - sz); } - else { data.ptr[sz] = '\0'; data.size = sz; } -} - -void String::copy(const String& other) { - if(other.isOnStack()) { - memcpy(buf, other.buf, len); - } else { - memcpy(allocate(other.data.size), other.data.ptr, other.data.size); - } -} - -String::String() noexcept { - buf[0] = '\0'; - setLast(); -} - -String::~String() { - if(!isOnStack()) - delete[] data.ptr; -} // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks) - -String::String(const char* in) - : String(in, strlen(in)) {} - -String::String(const char* in, size_type in_size) { - memcpy(allocate(in_size), in, in_size); -} - -String::String(std::istream& in, size_type in_size) { - in.read(allocate(in_size), in_size); -} - -String::String(const String& other) { copy(other); } - -String& String::operator=(const String& other) { - if(this != &other) { - if(!isOnStack()) - delete[] data.ptr; - - copy(other); - } - - return *this; -} - -String& String::operator+=(const String& other) { - const size_type my_old_size = size(); - const size_type other_size = other.size(); - const size_type total_size = my_old_size + other_size; - if(isOnStack()) { - if(total_size < len) { - // append to the current stack space - memcpy(buf + my_old_size, other.c_str(), other_size + 1); - // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) - setLast(last - total_size); - } else { - // alloc new chunk - char* temp = new char[total_size + 1]; - // copy current data to new location before writing in the union - memcpy(temp, buf, my_old_size); // skip the +1 ('\0') for speed - // update data in union - setOnHeap(); - data.size = total_size; - data.capacity = data.size + 1; - data.ptr = temp; - // transfer the rest of the data - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } - } else { - if(data.capacity > total_size) { - // append to the current heap block - data.size = total_size; - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } else { - // resize - data.capacity *= 2; - if(data.capacity <= total_size) - data.capacity = total_size + 1; - // alloc new chunk - char* temp = new char[data.capacity]; - // copy current data to new location before releasing it - memcpy(temp, data.ptr, my_old_size); // skip the +1 ('\0') for speed - // release old chunk - delete[] data.ptr; - // update the rest of the union members - data.size = total_size; - data.ptr = temp; - // transfer the rest of the data - memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1); - } - } - - return *this; -} - -String::String(String&& other) noexcept { - memcpy(buf, other.buf, len); - other.buf[0] = '\0'; - other.setLast(); -} - -String& String::operator=(String&& other) noexcept { - if(this != &other) { - if(!isOnStack()) - delete[] data.ptr; - memcpy(buf, other.buf, len); - other.buf[0] = '\0'; - other.setLast(); - } - return *this; -} - -char String::operator[](size_type i) const { - return const_cast(this)->operator[](i); -} - -char& String::operator[](size_type i) { - if(isOnStack()) - return reinterpret_cast(buf)[i]; - return data.ptr[i]; -} - -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wmaybe-uninitialized") -String::size_type String::size() const { - if(isOnStack()) - return last - (size_type(buf[last]) & 31); // using "last" would work only if "len" is 32 - return data.size; -} -DOCTEST_GCC_SUPPRESS_WARNING_POP - -String::size_type String::capacity() const { - if(isOnStack()) - return len; - return data.capacity; -} - -String String::substr(size_type pos, size_type cnt) && { - cnt = std::min(cnt, size() - 1 - pos); - char* cptr = c_str(); - memmove(cptr, cptr + pos, cnt); - setSize(cnt); - return std::move(*this); -} - -String String::substr(size_type pos, size_type cnt) const & { - cnt = std::min(cnt, size() - 1 - pos); - return String{ c_str() + pos, cnt }; -} - -String::size_type String::find(char ch, size_type pos) const { - const char* begin = c_str(); - const char* end = begin + size(); - const char* it = begin + pos; - for (; it < end && *it != ch; it++); - if (it < end) { return static_cast(it - begin); } - else { return npos; } -} - -String::size_type String::rfind(char ch, size_type pos) const { - const char* begin = c_str(); - const char* it = begin + std::min(pos, size() - 1); - for (; it >= begin && *it != ch; it--); - if (it >= begin) { return static_cast(it - begin); } - else { return npos; } -} - -int String::compare(const char* other, bool no_case) const { - if(no_case) - return doctest::stricmp(c_str(), other); - return std::strcmp(c_str(), other); -} - -int String::compare(const String& other, bool no_case) const { - return compare(other.c_str(), no_case); -} - -String operator+(const String& lhs, const String& rhs) { return String(lhs) += rhs; } - -bool operator==(const String& lhs, const String& rhs) { return lhs.compare(rhs) == 0; } -bool operator!=(const String& lhs, const String& rhs) { return lhs.compare(rhs) != 0; } -bool operator< (const String& lhs, const String& rhs) { return lhs.compare(rhs) < 0; } -bool operator> (const String& lhs, const String& rhs) { return lhs.compare(rhs) > 0; } -bool operator<=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) < 0 : true; } -bool operator>=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) > 0 : true; } - -std::ostream& operator<<(std::ostream& s, const String& in) { return s << in.c_str(); } - -Contains::Contains(const String& str) : string(str) { } - -bool Contains::checkWith(const String& other) const { - return strstr(other.c_str(), string.c_str()) != nullptr; -} - -String toString(const Contains& in) { - return "Contains( " + in.string + " )"; -} - -bool operator==(const String& lhs, const Contains& rhs) { return rhs.checkWith(lhs); } -bool operator==(const Contains& lhs, const String& rhs) { return lhs.checkWith(rhs); } -bool operator!=(const String& lhs, const Contains& rhs) { return !rhs.checkWith(lhs); } -bool operator!=(const Contains& lhs, const String& rhs) { return !lhs.checkWith(rhs); } - -namespace { - void color_to_stream(std::ostream&, Color::Enum) DOCTEST_BRANCH_ON_DISABLED({}, ;) -} // namespace - -namespace Color { - std::ostream& operator<<(std::ostream& s, Color::Enum code) { - color_to_stream(s, code); - return s; - } -} // namespace Color - -// clang-format off -const char* assertString(assertType::Enum at) { - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4061) // enum 'x' in switch of enum 'y' is not explicitely handled - #define DOCTEST_GENERATE_ASSERT_TYPE_CASE(assert_type) case assertType::DT_ ## assert_type: return #assert_type - #define DOCTEST_GENERATE_ASSERT_TYPE_CASES(assert_type) \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN_ ## assert_type); \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK_ ## assert_type); \ - DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE_ ## assert_type) - switch(at) { - DOCTEST_GENERATE_ASSERT_TYPE_CASE(WARN); - DOCTEST_GENERATE_ASSERT_TYPE_CASE(CHECK); - DOCTEST_GENERATE_ASSERT_TYPE_CASE(REQUIRE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(FALSE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_AS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(THROWS_WITH_AS); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(NOTHROW); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(EQ); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(NE); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(GT); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(LT); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(GE); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(LE); - - DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY); - DOCTEST_GENERATE_ASSERT_TYPE_CASES(UNARY_FALSE); - - default: DOCTEST_INTERNAL_ERROR("Tried stringifying invalid assert type!"); - } - DOCTEST_MSVC_SUPPRESS_WARNING_POP -} -// clang-format on - -const char* failureString(assertType::Enum at) { - if(at & assertType::is_warn) //!OCLINT bitwise operator in conditional - return "WARNING"; - if(at & assertType::is_check) //!OCLINT bitwise operator in conditional - return "ERROR"; - if(at & assertType::is_require) //!OCLINT bitwise operator in conditional - return "FATAL ERROR"; - return ""; -} - -DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference") -DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wnull-dereference") -// depending on the current options this will remove the path of filenames -const char* skipPathFromFilename(const char* file) { -#ifndef DOCTEST_CONFIG_DISABLE - if(getContextOptions()->no_path_in_filenames) { - auto back = std::strrchr(file, '\\'); - auto forward = std::strrchr(file, '/'); - if(back || forward) { - if(back > forward) - forward = back; - return forward + 1; - } - } -#endif // DOCTEST_CONFIG_DISABLE - return file; -} -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -bool SubcaseSignature::operator==(const SubcaseSignature& other) const { - return m_line == other.m_line - && std::strcmp(m_file, other.m_file) == 0 - && m_name == other.m_name; -} - -bool SubcaseSignature::operator<(const SubcaseSignature& other) const { - if(m_line != other.m_line) - return m_line < other.m_line; - if(std::strcmp(m_file, other.m_file) != 0) - return std::strcmp(m_file, other.m_file) < 0; - return m_name.compare(other.m_name) < 0; -} - -DOCTEST_DEFINE_INTERFACE(IContextScope) - -namespace detail { - void filldata::fill(std::ostream* stream, const void* in) { - if (in) { *stream << in; } - else { *stream << "nullptr"; } - } - - template - String toStreamLit(T t) { - std::ostream* os = tlssPush(); - os->operator<<(t); - return tlssPop(); - } -} - -#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING -String toString(const char* in) { return String("\"") + (in ? in : "{null string}") + "\""; } -#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING - -#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0) -// see this issue on why this is needed: https://github.com/doctest/doctest/issues/183 -String toString(const std::string& in) { return in.c_str(); } -#endif // VS 2019 - -String toString(String in) { return in; } - -String toString(std::nullptr_t) { return "nullptr"; } - -String toString(bool in) { return in ? "true" : "false"; } - -String toString(float in) { return toStreamLit(in); } -String toString(double in) { return toStreamLit(in); } -String toString(double long in) { return toStreamLit(in); } - -String toString(char in) { return toStreamLit(static_cast(in)); } -String toString(char signed in) { return toStreamLit(static_cast(in)); } -String toString(char unsigned in) { return toStreamLit(static_cast(in)); } -String toString(short in) { return toStreamLit(in); } -String toString(short unsigned in) { return toStreamLit(in); } -String toString(signed in) { return toStreamLit(in); } -String toString(unsigned in) { return toStreamLit(in); } -String toString(long in) { return toStreamLit(in); } -String toString(long unsigned in) { return toStreamLit(in); } -String toString(long long in) { return toStreamLit(in); } -String toString(long long unsigned in) { return toStreamLit(in); } - -Approx::Approx(double value) - : m_epsilon(static_cast(std::numeric_limits::epsilon()) * 100) - , m_scale(1.0) - , m_value(value) {} - -Approx Approx::operator()(double value) const { - Approx approx(value); - approx.epsilon(m_epsilon); - approx.scale(m_scale); - return approx; -} - -Approx& Approx::epsilon(double newEpsilon) { - m_epsilon = newEpsilon; - return *this; -} -Approx& Approx::scale(double newScale) { - m_scale = newScale; - return *this; -} - -bool operator==(double lhs, const Approx& rhs) { - // Thanks to Richard Harris for his help refining this formula - return std::fabs(lhs - rhs.m_value) < - rhs.m_epsilon * (rhs.m_scale + std::max(std::fabs(lhs), std::fabs(rhs.m_value))); -} -bool operator==(const Approx& lhs, double rhs) { return operator==(rhs, lhs); } -bool operator!=(double lhs, const Approx& rhs) { return !operator==(lhs, rhs); } -bool operator!=(const Approx& lhs, double rhs) { return !operator==(rhs, lhs); } -bool operator<=(double lhs, const Approx& rhs) { return lhs < rhs.m_value || lhs == rhs; } -bool operator<=(const Approx& lhs, double rhs) { return lhs.m_value < rhs || lhs == rhs; } -bool operator>=(double lhs, const Approx& rhs) { return lhs > rhs.m_value || lhs == rhs; } -bool operator>=(const Approx& lhs, double rhs) { return lhs.m_value > rhs || lhs == rhs; } -bool operator<(double lhs, const Approx& rhs) { return lhs < rhs.m_value && lhs != rhs; } -bool operator<(const Approx& lhs, double rhs) { return lhs.m_value < rhs && lhs != rhs; } -bool operator>(double lhs, const Approx& rhs) { return lhs > rhs.m_value && lhs != rhs; } -bool operator>(const Approx& lhs, double rhs) { return lhs.m_value > rhs && lhs != rhs; } - -String toString(const Approx& in) { - return "Approx( " + doctest::toString(in.m_value) + " )"; -} -const ContextOptions* getContextOptions() { return DOCTEST_BRANCH_ON_DISABLED(nullptr, g_cs); } - -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4738) -template -IsNaN::operator bool() const { - return std::isnan(value) ^ flipped; -} -DOCTEST_MSVC_SUPPRESS_WARNING_POP -template struct DOCTEST_INTERFACE_DEF IsNaN; -template struct DOCTEST_INTERFACE_DEF IsNaN; -template struct DOCTEST_INTERFACE_DEF IsNaN; -template -String toString(IsNaN in) { return String(in.flipped ? "! " : "") + "IsNaN( " + doctest::toString(in.value) + " )"; } -String toString(IsNaN in) { return toString(in); } -String toString(IsNaN in) { return toString(in); } -String toString(IsNaN in) { return toString(in); } - -} // namespace doctest - -#ifdef DOCTEST_CONFIG_DISABLE -namespace doctest { -Context::Context(int, const char* const*) {} -Context::~Context() = default; -void Context::applyCommandLine(int, const char* const*) {} -void Context::addFilter(const char*, const char*) {} -void Context::clearFilters() {} -void Context::setOption(const char*, bool) {} -void Context::setOption(const char*, int) {} -void Context::setOption(const char*, const char*) {} -bool Context::shouldExit() { return false; } -void Context::setAsDefaultForAssertsOutOfTestCases() {} -void Context::setAssertHandler(detail::assert_handler) {} -void Context::setCout(std::ostream*) {} -int Context::run() { return 0; } - -int IReporter::get_num_active_contexts() { return 0; } -const IContextScope* const* IReporter::get_active_contexts() { return nullptr; } -int IReporter::get_num_stringified_contexts() { return 0; } -const String* IReporter::get_stringified_contexts() { return nullptr; } - -int registerReporter(const char*, int, IReporter*) { return 0; } - -} // namespace doctest -#else // DOCTEST_CONFIG_DISABLE - -#if !defined(DOCTEST_CONFIG_COLORS_NONE) -#if !defined(DOCTEST_CONFIG_COLORS_WINDOWS) && !defined(DOCTEST_CONFIG_COLORS_ANSI) -#ifdef DOCTEST_PLATFORM_WINDOWS -#define DOCTEST_CONFIG_COLORS_WINDOWS -#else // linux -#define DOCTEST_CONFIG_COLORS_ANSI -#endif // platform -#endif // DOCTEST_CONFIG_COLORS_WINDOWS && DOCTEST_CONFIG_COLORS_ANSI -#endif // DOCTEST_CONFIG_COLORS_NONE - -namespace doctest_detail_test_suite_ns { -// holds the current test suite -doctest::detail::TestSuite& getCurrentTestSuite() { - static doctest::detail::TestSuite data{}; - return data; -} -} // namespace doctest_detail_test_suite_ns - -namespace doctest { -namespace { - // the int (priority) is part of the key for automatic sorting - sadly one can register a - // reporter with a duplicate name and a different priority but hopefully that won't happen often :| - using reporterMap = std::map, reporterCreatorFunc>; - - reporterMap& getReporters() { - static reporterMap data; - return data; - } - reporterMap& getListeners() { - static reporterMap data; - return data; - } -} // namespace -namespace detail { -#define DOCTEST_ITERATE_THROUGH_REPORTERS(function, ...) \ - for(auto& curr_rep : g_cs->reporters_currently_used) \ - curr_rep->function(__VA_ARGS__) - - bool checkIfShouldThrow(assertType::Enum at) { - if(at & assertType::is_require) //!OCLINT bitwise operator in conditional - return true; - - if((at & assertType::is_check) //!OCLINT bitwise operator in conditional - && getContextOptions()->abort_after > 0 && - (g_cs->numAssertsFailed + g_cs->numAssertsFailedCurrentTest_atomic) >= - getContextOptions()->abort_after) - return true; - - return false; - } - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - DOCTEST_NORETURN void throwException() { - g_cs->shouldLogCurrentException = false; - throw TestFailureException(); // NOLINT(hicpp-exception-baseclass) - } -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - void throwException() {} -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -} // namespace detail - -namespace { - using namespace detail; - // matching of a string against a wildcard mask (case sensitivity configurable) taken from - // https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing - int wildcmp(const char* str, const char* wild, bool caseSensitive) { - const char* cp = str; - const char* mp = wild; - - while((*str) && (*wild != '*')) { - if((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) && - (*wild != '?')) { - return 0; - } - wild++; - str++; - } - - while(*str) { - if(*wild == '*') { - if(!*++wild) { - return 1; - } - mp = wild; - cp = str + 1; - } else if((caseSensitive ? (*wild == *str) : (tolower(*wild) == tolower(*str))) || - (*wild == '?')) { - wild++; - str++; - } else { - wild = mp; //!OCLINT parameter reassignment - str = cp++; //!OCLINT parameter reassignment - } - } - - while(*wild == '*') { - wild++; - } - return !*wild; - } - - // checks if the name matches any of the filters (and can be configured what to do when empty) - bool matchesAny(const char* name, const std::vector& filters, bool matchEmpty, - bool caseSensitive) { - if (filters.empty() && matchEmpty) - return true; - for (auto& curr : filters) - if (wildcmp(name, curr.c_str(), caseSensitive)) - return true; - return false; - } - - unsigned long long hash(unsigned long long a, unsigned long long b) { - return (a << 5) + b; - } - - // C string hash function (djb2) - taken from http://www.cse.yorku.ca/~oz/hash.html - unsigned long long hash(const char* str) { - unsigned long long hash = 5381; - char c; - while ((c = *str++)) - hash = ((hash << 5) + hash) + c; // hash * 33 + c - return hash; - } - - unsigned long long hash(const SubcaseSignature& sig) { - return hash(hash(hash(sig.m_file), hash(sig.m_name.c_str())), sig.m_line); - } - - unsigned long long hash(const std::vector& sigs, size_t count) { - unsigned long long running = 0; - auto end = sigs.begin() + count; - for (auto it = sigs.begin(); it != end; it++) { - running = hash(running, hash(*it)); - } - return running; - } - - unsigned long long hash(const std::vector& sigs) { - unsigned long long running = 0; - for (const SubcaseSignature& sig : sigs) { - running = hash(running, hash(sig)); - } - return running; - } -} // namespace -namespace detail { - bool Subcase::checkFilters() { - if (g_cs->subcaseStack.size() < size_t(g_cs->subcase_filter_levels)) { - if (!matchesAny(m_signature.m_name.c_str(), g_cs->filters[6], true, g_cs->case_sensitive)) - return true; - if (matchesAny(m_signature.m_name.c_str(), g_cs->filters[7], false, g_cs->case_sensitive)) - return true; - } - return false; - } - - Subcase::Subcase(const String& name, const char* file, int line) - : m_signature({name, file, line}) { - if (!g_cs->reachedLeaf) { - if (g_cs->nextSubcaseStack.size() <= g_cs->subcaseStack.size() - || g_cs->nextSubcaseStack[g_cs->subcaseStack.size()] == m_signature) { - // Going down. - if (checkFilters()) { return; } - - g_cs->subcaseStack.push_back(m_signature); - g_cs->currentSubcaseDepth++; - m_entered = true; - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); - } - } else { - if (g_cs->subcaseStack[g_cs->currentSubcaseDepth] == m_signature) { - // This subcase is reentered via control flow. - g_cs->currentSubcaseDepth++; - m_entered = true; - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); - } else if (g_cs->nextSubcaseStack.size() <= g_cs->currentSubcaseDepth - && g_cs->fullyTraversedSubcases.find(hash(hash(g_cs->subcaseStack, g_cs->currentSubcaseDepth), hash(m_signature))) - == g_cs->fullyTraversedSubcases.end()) { - if (checkFilters()) { return; } - // This subcase is part of the one to be executed next. - g_cs->nextSubcaseStack.clear(); - g_cs->nextSubcaseStack.insert(g_cs->nextSubcaseStack.end(), - g_cs->subcaseStack.begin(), g_cs->subcaseStack.begin() + g_cs->currentSubcaseDepth); - g_cs->nextSubcaseStack.push_back(m_signature); - } - } - } - - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - - Subcase::~Subcase() { - if (m_entered) { - g_cs->currentSubcaseDepth--; - - if (!g_cs->reachedLeaf) { - // Leaf. - g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack)); - g_cs->nextSubcaseStack.clear(); - g_cs->reachedLeaf = true; - } else if (g_cs->nextSubcaseStack.empty()) { - // All children are finished. - g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack)); - } - -#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) - if(std::uncaught_exceptions() > 0 -#else - if(std::uncaught_exception() -#endif - && g_cs->shouldLogCurrentException) { - DOCTEST_ITERATE_THROUGH_REPORTERS( - test_case_exception, {"exception thrown in subcase - will translate later " - "when the whole test case has been exited (cannot " - "translate while there is an active exception)", - false}); - g_cs->shouldLogCurrentException = false; - } - - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY); - } - } - - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP - DOCTEST_MSVC_SUPPRESS_WARNING_POP - - Subcase::operator bool() const { return m_entered; } - - Result::Result(bool passed, const String& decomposition) - : m_passed(passed) - , m_decomp(decomposition) {} - - ExpressionDecomposer::ExpressionDecomposer(assertType::Enum at) - : m_at(at) {} - - TestSuite& TestSuite::operator*(const char* in) { - m_test_suite = in; - return *this; - } - - TestCase::TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite, - const String& type, int template_id) { - m_file = file; - m_line = line; - m_name = nullptr; // will be later overridden in operator* - m_test_suite = test_suite.m_test_suite; - m_description = test_suite.m_description; - m_skip = test_suite.m_skip; - m_no_breaks = test_suite.m_no_breaks; - m_no_output = test_suite.m_no_output; - m_may_fail = test_suite.m_may_fail; - m_should_fail = test_suite.m_should_fail; - m_expected_failures = test_suite.m_expected_failures; - m_timeout = test_suite.m_timeout; - - m_test = test; - m_type = type; - m_template_id = template_id; - } - - TestCase::TestCase(const TestCase& other) - : TestCaseData() { - *this = other; - } - - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function - TestCase& TestCase::operator=(const TestCase& other) { - TestCaseData::operator=(other); - m_test = other.m_test; - m_type = other.m_type; - m_template_id = other.m_template_id; - m_full_name = other.m_full_name; - - if(m_template_id != -1) - m_name = m_full_name.c_str(); - return *this; - } - DOCTEST_MSVC_SUPPRESS_WARNING_POP - - TestCase& TestCase::operator*(const char* in) { - m_name = in; - // make a new name with an appended type for templated test case - if(m_template_id != -1) { - m_full_name = String(m_name) + "<" + m_type + ">"; - // redirect the name to point to the newly constructed full name - m_name = m_full_name.c_str(); - } - return *this; - } - - bool TestCase::operator<(const TestCase& other) const { - // this will be used only to differentiate between test cases - not relevant for sorting - if(m_line != other.m_line) - return m_line < other.m_line; - const int name_cmp = strcmp(m_name, other.m_name); - if(name_cmp != 0) - return name_cmp < 0; - const int file_cmp = m_file.compare(other.m_file); - if(file_cmp != 0) - return file_cmp < 0; - return m_template_id < other.m_template_id; - } - - // all the registered test - std::set& getRegisteredTests() { - static std::set data; - return data; - } -} // namespace detail -namespace { - using namespace detail; - // for sorting test by file/line - bool fileOrderComparator(const TestCase* lhs, const TestCase* rhs) { - // this is needed because MSVC gives different case for drive letters - // for __FILE__ when evaluated in a header and a source file - const int res = lhs->m_file.compare(rhs->m_file, bool(DOCTEST_MSVC)); - if(res != 0) - return res < 0; - if(lhs->m_line != rhs->m_line) - return lhs->m_line < rhs->m_line; - return lhs->m_template_id < rhs->m_template_id; - } - - // for sorting test by suite/file/line - bool suiteOrderComparator(const TestCase* lhs, const TestCase* rhs) { - const int res = std::strcmp(lhs->m_test_suite, rhs->m_test_suite); - if(res != 0) - return res < 0; - return fileOrderComparator(lhs, rhs); - } - - // for sorting test by name/suite/file/line - bool nameOrderComparator(const TestCase* lhs, const TestCase* rhs) { - const int res = std::strcmp(lhs->m_name, rhs->m_name); - if(res != 0) - return res < 0; - return suiteOrderComparator(lhs, rhs); - } - - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - void color_to_stream(std::ostream& s, Color::Enum code) { - static_cast(s); // for DOCTEST_CONFIG_COLORS_NONE or DOCTEST_CONFIG_COLORS_WINDOWS - static_cast(code); // for DOCTEST_CONFIG_COLORS_NONE -#ifdef DOCTEST_CONFIG_COLORS_ANSI - if(g_no_colors || - (isatty(STDOUT_FILENO) == false && getContextOptions()->force_colors == false)) - return; - - auto col = ""; - // clang-format off - switch(code) { //!OCLINT missing break in switch statement / unnecessary default statement in covered switch statement - case Color::Red: col = "[0;31m"; break; - case Color::Green: col = "[0;32m"; break; - case Color::Blue: col = "[0;34m"; break; - case Color::Cyan: col = "[0;36m"; break; - case Color::Yellow: col = "[0;33m"; break; - case Color::Grey: col = "[1;30m"; break; - case Color::LightGrey: col = "[0;37m"; break; - case Color::BrightRed: col = "[1;31m"; break; - case Color::BrightGreen: col = "[1;32m"; break; - case Color::BrightWhite: col = "[1;37m"; break; - case Color::Bright: // invalid - case Color::None: - case Color::White: - default: col = "[0m"; - } - // clang-format on - s << "\033" << col; -#endif // DOCTEST_CONFIG_COLORS_ANSI - -#ifdef DOCTEST_CONFIG_COLORS_WINDOWS - if(g_no_colors || - (_isatty(_fileno(stdout)) == false && getContextOptions()->force_colors == false)) - return; - - static struct ConsoleHelper { - HANDLE stdoutHandle; - WORD origFgAttrs; - WORD origBgAttrs; - - ConsoleHelper() { - stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - GetConsoleScreenBufferInfo(stdoutHandle, &csbiInfo); - origFgAttrs = csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED | - BACKGROUND_BLUE | BACKGROUND_INTENSITY); - origBgAttrs = csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED | - FOREGROUND_BLUE | FOREGROUND_INTENSITY); - } - } ch; - -#define DOCTEST_SET_ATTR(x) SetConsoleTextAttribute(ch.stdoutHandle, x | ch.origBgAttrs) - - // clang-format off - switch (code) { - case Color::White: DOCTEST_SET_ATTR(FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break; - case Color::Red: DOCTEST_SET_ATTR(FOREGROUND_RED); break; - case Color::Green: DOCTEST_SET_ATTR(FOREGROUND_GREEN); break; - case Color::Blue: DOCTEST_SET_ATTR(FOREGROUND_BLUE); break; - case Color::Cyan: DOCTEST_SET_ATTR(FOREGROUND_BLUE | FOREGROUND_GREEN); break; - case Color::Yellow: DOCTEST_SET_ATTR(FOREGROUND_RED | FOREGROUND_GREEN); break; - case Color::Grey: DOCTEST_SET_ATTR(0); break; - case Color::LightGrey: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY); break; - case Color::BrightRed: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_RED); break; - case Color::BrightGreen: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN); break; - case Color::BrightWhite: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break; - case Color::None: - case Color::Bright: // invalid - default: DOCTEST_SET_ATTR(ch.origFgAttrs); - } - // clang-format on -#endif // DOCTEST_CONFIG_COLORS_WINDOWS - } - DOCTEST_CLANG_SUPPRESS_WARNING_POP - - std::vector& getExceptionTranslators() { - static std::vector data; - return data; - } - - String translateActiveException() { -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - String res; - auto& translators = getExceptionTranslators(); - for(auto& curr : translators) - if(curr->translate(res)) - return res; - // clang-format off - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wcatch-value") - try { - throw; - } catch(std::exception& ex) { - return ex.what(); - } catch(std::string& msg) { - return msg.c_str(); - } catch(const char* msg) { - return msg; - } catch(...) { - return "unknown exception"; - } - DOCTEST_GCC_SUPPRESS_WARNING_POP -// clang-format on -#else // DOCTEST_CONFIG_NO_EXCEPTIONS - return ""; -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - } -} // namespace - -namespace detail { - // used by the macros for registering test - int regTest(const TestCase& tc) { - getRegisteredTests().insert(tc); - return 0; - } - - // sets the current test suite - int setTestSuite(const TestSuite& ts) { - doctest_detail_test_suite_ns::getCurrentTestSuite() = ts; - return 0; - } - -#ifdef DOCTEST_IS_DEBUGGER_ACTIVE - bool isDebuggerActive() { return DOCTEST_IS_DEBUGGER_ACTIVE(); } -#else // DOCTEST_IS_DEBUGGER_ACTIVE -#ifdef DOCTEST_PLATFORM_LINUX - class ErrnoGuard { - public: - ErrnoGuard() : m_oldErrno(errno) {} - ~ErrnoGuard() { errno = m_oldErrno; } - private: - int m_oldErrno; - }; - // See the comments in Catch2 for the reasoning behind this implementation: - // https://github.com/catchorg/Catch2/blob/v2.13.1/include/internal/catch_debugger.cpp#L79-L102 - bool isDebuggerActive() { - ErrnoGuard guard; - std::ifstream in("/proc/self/status"); - for(std::string line; std::getline(in, line);) { - static const int PREFIX_LEN = 11; - if(line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0) { - return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; - } - } - return false; - } -#elif defined(DOCTEST_PLATFORM_MAC) - // The following function is taken directly from the following technical note: - // https://developer.apple.com/library/archive/qa/qa1361/_index.html - // Returns true if the current process is being debugged (either - // running under the debugger or has a debugger attached post facto). - bool isDebuggerActive() { - int mib[4]; - kinfo_proc info; - size_t size; - // Initialize the flags so that, if sysctl fails for some bizarre - // reason, we get a predictable result. - info.kp_proc.p_flag = 0; - // Initialize mib, which tells sysctl the info we want, in this case - // we're looking for information about a specific process ID. - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - // Call sysctl. - size = sizeof(info); - if(sysctl(mib, DOCTEST_COUNTOF(mib), &info, &size, 0, 0) != 0) { - std::cerr << "\nCall to sysctl failed - unable to determine if debugger is active **\n"; - return false; - } - // We're being debugged if the P_TRACED flag is set. - return ((info.kp_proc.p_flag & P_TRACED) != 0); - } -#elif DOCTEST_MSVC || defined(__MINGW32__) || defined(__MINGW64__) - bool isDebuggerActive() { return ::IsDebuggerPresent() != 0; } -#else - bool isDebuggerActive() { return false; } -#endif // Platform -#endif // DOCTEST_IS_DEBUGGER_ACTIVE - - void registerExceptionTranslatorImpl(const IExceptionTranslator* et) { - if(std::find(getExceptionTranslators().begin(), getExceptionTranslators().end(), et) == - getExceptionTranslators().end()) - getExceptionTranslators().push_back(et); - } - - DOCTEST_THREAD_LOCAL std::vector g_infoContexts; // for logging with INFO() - - ContextScopeBase::ContextScopeBase() { - g_infoContexts.push_back(this); - } - - ContextScopeBase::ContextScopeBase(ContextScopeBase&& other) noexcept { - if (other.need_to_destroy) { - other.destroy(); - } - other.need_to_destroy = false; - g_infoContexts.push_back(this); - } - - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") - - // destroy cannot be inlined into the destructor because that would mean calling stringify after - // ContextScope has been destroyed (base class destructors run after derived class destructors). - // Instead, ContextScope calls this method directly from its destructor. - void ContextScopeBase::destroy() { -#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) - if(std::uncaught_exceptions() > 0) { -#else - if(std::uncaught_exception()) { -#endif - std::ostringstream s; - this->stringify(&s); - g_cs->stringifiedContexts.push_back(s.str().c_str()); - } - g_infoContexts.pop_back(); - } - - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP - DOCTEST_MSVC_SUPPRESS_WARNING_POP -} // namespace detail -namespace { - using namespace detail; - -#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(DOCTEST_CONFIG_WINDOWS_SEH) - struct FatalConditionHandler - { - static void reset() {} - static void allocateAltStackMem() {} - static void freeAltStackMem() {} - }; -#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH - - void reportFatal(const std::string&); - -#ifdef DOCTEST_PLATFORM_WINDOWS - - struct SignalDefs - { - DWORD id; - const char* name; - }; - // There is no 1-1 mapping between signals and windows exceptions. - // Windows can easily distinguish between SO and SigSegV, - // but SigInt, SigTerm, etc are handled differently. - SignalDefs signalDefs[] = { - {static_cast(EXCEPTION_ILLEGAL_INSTRUCTION), - "SIGILL - Illegal instruction signal"}, - {static_cast(EXCEPTION_STACK_OVERFLOW), "SIGSEGV - Stack overflow"}, - {static_cast(EXCEPTION_ACCESS_VIOLATION), - "SIGSEGV - Segmentation violation signal"}, - {static_cast(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error"}, - }; - - struct FatalConditionHandler - { - static LONG CALLBACK handleException(PEXCEPTION_POINTERS ExceptionInfo) { - // Multiple threads may enter this filter/handler at once. We want the error message to be printed on the - // console just once no matter how many threads have crashed. - DOCTEST_DECLARE_STATIC_MUTEX(mutex) - static bool execute = true; - { - DOCTEST_LOCK_MUTEX(mutex) - if(execute) { - bool reported = false; - for(size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - if(ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) { - reportFatal(signalDefs[i].name); - reported = true; - break; - } - } - if(reported == false) - reportFatal("Unhandled SEH exception caught"); - if(isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - } - execute = false; - } - std::exit(EXIT_FAILURE); - } - - static void allocateAltStackMem() {} - static void freeAltStackMem() {} - - FatalConditionHandler() { - isSet = true; - // 32k seems enough for doctest to handle stack overflow, - // but the value was found experimentally, so there is no strong guarantee - guaranteeSize = 32 * 1024; - // Register an unhandled exception filter - previousTop = SetUnhandledExceptionFilter(handleException); - // Pass in guarantee size to be filled - SetThreadStackGuarantee(&guaranteeSize); - - // On Windows uncaught exceptions from another thread, exceptions from - // destructors, or calls to std::terminate are not a SEH exception - - // The terminal handler gets called when: - // - std::terminate is called FROM THE TEST RUNNER THREAD - // - an exception is thrown from a destructor FROM THE TEST RUNNER THREAD - original_terminate_handler = std::get_terminate(); - std::set_terminate([]() DOCTEST_NOEXCEPT { - reportFatal("Terminate handler called"); - if(isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - std::exit(EXIT_FAILURE); // explicitly exit - otherwise the SIGABRT handler may be called as well - }); - - // SIGABRT is raised when: - // - std::terminate is called FROM A DIFFERENT THREAD - // - an exception is thrown from a destructor FROM A DIFFERENT THREAD - // - an uncaught exception is thrown FROM A DIFFERENT THREAD - prev_sigabrt_handler = std::signal(SIGABRT, [](int signal) DOCTEST_NOEXCEPT { - if(signal == SIGABRT) { - reportFatal("SIGABRT - Abort (abnormal termination) signal"); - if(isDebuggerActive() && !g_cs->no_breaks) - DOCTEST_BREAK_INTO_DEBUGGER(); - std::exit(EXIT_FAILURE); - } - }); - - // The following settings are taken from google test, and more - // specifically from UnitTest::Run() inside of gtest.cc - - // the user does not want to see pop-up dialogs about crashes - prev_error_mode_1 = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | - SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); - // This forces the abort message to go to stderr in all circumstances. - prev_error_mode_2 = _set_error_mode(_OUT_TO_STDERR); - // In the debug version, Visual Studio pops up a separate dialog - // offering a choice to debug the aborted program - we want to disable that. - prev_abort_behavior = _set_abort_behavior(0x0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); - // In debug mode, the Windows CRT can crash with an assertion over invalid - // input (e.g. passing an invalid file descriptor). The default handling - // for these assertions is to pop up a dialog and wait for user input. - // Instead ask the CRT to dump such assertions to stderr non-interactively. - prev_report_mode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); - prev_report_file = _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); - } - - static void reset() { - if(isSet) { - // Unregister handler and restore the old guarantee - SetUnhandledExceptionFilter(previousTop); - SetThreadStackGuarantee(&guaranteeSize); - std::set_terminate(original_terminate_handler); - std::signal(SIGABRT, prev_sigabrt_handler); - SetErrorMode(prev_error_mode_1); - _set_error_mode(prev_error_mode_2); - _set_abort_behavior(prev_abort_behavior, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); - static_cast(_CrtSetReportMode(_CRT_ASSERT, prev_report_mode)); - static_cast(_CrtSetReportFile(_CRT_ASSERT, prev_report_file)); - isSet = false; - } - } - - ~FatalConditionHandler() { reset(); } - - private: - static UINT prev_error_mode_1; - static int prev_error_mode_2; - static unsigned int prev_abort_behavior; - static int prev_report_mode; - static _HFILE prev_report_file; - static void (DOCTEST_CDECL *prev_sigabrt_handler)(int); - static std::terminate_handler original_terminate_handler; - static bool isSet; - static ULONG guaranteeSize; - static LPTOP_LEVEL_EXCEPTION_FILTER previousTop; - }; - - UINT FatalConditionHandler::prev_error_mode_1; - int FatalConditionHandler::prev_error_mode_2; - unsigned int FatalConditionHandler::prev_abort_behavior; - int FatalConditionHandler::prev_report_mode; - _HFILE FatalConditionHandler::prev_report_file; - void (DOCTEST_CDECL *FatalConditionHandler::prev_sigabrt_handler)(int); - std::terminate_handler FatalConditionHandler::original_terminate_handler; - bool FatalConditionHandler::isSet = false; - ULONG FatalConditionHandler::guaranteeSize = 0; - LPTOP_LEVEL_EXCEPTION_FILTER FatalConditionHandler::previousTop = nullptr; - -#else // DOCTEST_PLATFORM_WINDOWS - - struct SignalDefs - { - int id; - const char* name; - }; - SignalDefs signalDefs[] = {{SIGINT, "SIGINT - Terminal interrupt signal"}, - {SIGILL, "SIGILL - Illegal instruction signal"}, - {SIGFPE, "SIGFPE - Floating point error signal"}, - {SIGSEGV, "SIGSEGV - Segmentation violation signal"}, - {SIGTERM, "SIGTERM - Termination request signal"}, - {SIGABRT, "SIGABRT - Abort (abnormal termination) signal"}}; - - struct FatalConditionHandler - { - static bool isSet; - static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)]; - static stack_t oldSigStack; - static size_t altStackSize; - static char* altStackMem; - - static void handleSignal(int sig) { - const char* name = ""; - for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - SignalDefs& def = signalDefs[i]; - if(sig == def.id) { - name = def.name; - break; - } - } - reset(); - reportFatal(name); - raise(sig); - } - - static void allocateAltStackMem() { - altStackMem = new char[altStackSize]; - } - - static void freeAltStackMem() { - delete[] altStackMem; - } - - FatalConditionHandler() { - isSet = true; - stack_t sigStack; - sigStack.ss_sp = altStackMem; - sigStack.ss_size = altStackSize; - sigStack.ss_flags = 0; - sigaltstack(&sigStack, &oldSigStack); - struct sigaction sa = {}; - sa.sa_handler = handleSignal; - sa.sa_flags = SA_ONSTACK; - for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); - } - } - - ~FatalConditionHandler() { reset(); } - static void reset() { - if(isSet) { - // Set signals back to previous values -- hopefully nobody overwrote them in the meantime - for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) { - sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); - } - // Return the old stack - sigaltstack(&oldSigStack, nullptr); - isSet = false; - } - } - }; - - bool FatalConditionHandler::isSet = false; - struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {}; - stack_t FatalConditionHandler::oldSigStack = {}; - size_t FatalConditionHandler::altStackSize = 4 * SIGSTKSZ; - char* FatalConditionHandler::altStackMem = nullptr; - -#endif // DOCTEST_PLATFORM_WINDOWS -#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH - -} // namespace - -namespace { - using namespace detail; - -#ifdef DOCTEST_PLATFORM_WINDOWS -#define DOCTEST_OUTPUT_DEBUG_STRING(text) ::OutputDebugStringA(text) -#else - // TODO: integration with XCode and other IDEs -#define DOCTEST_OUTPUT_DEBUG_STRING(text) -#endif // Platform - - void addAssert(assertType::Enum at) { - if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional - g_cs->numAssertsCurrentTest_atomic++; - } - - void addFailedAssert(assertType::Enum at) { - if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional - g_cs->numAssertsFailedCurrentTest_atomic++; - } - -#if defined(DOCTEST_CONFIG_POSIX_SIGNALS) || defined(DOCTEST_CONFIG_WINDOWS_SEH) - void reportFatal(const std::string& message) { - g_cs->failure_flags |= TestCaseFailureReason::Crash; - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, {message.c_str(), true}); - - while (g_cs->subcaseStack.size()) { - g_cs->subcaseStack.pop_back(); - DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY); - } - - g_cs->finalizeTestCaseData(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs); - } -#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH -} // namespace - -AssertData::AssertData(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type, const StringContains& exception_string) - : m_test_case(g_cs->currentTest), m_at(at), m_file(file), m_line(line), m_expr(expr), - m_failed(true), m_threw(false), m_threw_as(false), m_exception_type(exception_type), - m_exception_string(exception_string) { -#if DOCTEST_MSVC - if (m_expr[0] == ' ') // this happens when variadic macros are disabled under MSVC - ++m_expr; -#endif // MSVC -} - -namespace detail { - ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type, const String& exception_string) - : AssertData(at, file, line, expr, exception_type, exception_string) { } - - ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr, - const char* exception_type, const Contains& exception_string) - : AssertData(at, file, line, expr, exception_type, exception_string) { } - - void ResultBuilder::setResult(const Result& res) { - m_decomp = res.m_decomp; - m_failed = !res.m_passed; - } - - void ResultBuilder::translateException() { - m_threw = true; - m_exception = translateActiveException(); - } - - bool ResultBuilder::log() { - if(m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional - m_failed = !m_threw; - } else if((m_at & assertType::is_throws_as) && (m_at & assertType::is_throws_with)) { //!OCLINT - m_failed = !m_threw_as || !m_exception_string.check(m_exception); - } else if(m_at & assertType::is_throws_as) { //!OCLINT bitwise operator in conditional - m_failed = !m_threw_as; - } else if(m_at & assertType::is_throws_with) { //!OCLINT bitwise operator in conditional - m_failed = !m_exception_string.check(m_exception); - } else if(m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional - m_failed = m_threw; - } - - if(m_exception.size()) - m_exception = "\"" + m_exception + "\""; - - if(is_running_in_test) { - addAssert(m_at); - DOCTEST_ITERATE_THROUGH_REPORTERS(log_assert, *this); - - if(m_failed) - addFailedAssert(m_at); - } else if(m_failed) { - failed_out_of_a_testing_context(*this); - } - - return m_failed && isDebuggerActive() && !getContextOptions()->no_breaks && - (g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger - } - - void ResultBuilder::react() const { - if(m_failed && checkIfShouldThrow(m_at)) - throwException(); - } - - void failed_out_of_a_testing_context(const AssertData& ad) { - if(g_cs->ah) - g_cs->ah(ad); - else - std::abort(); - } - - bool decomp_assert(assertType::Enum at, const char* file, int line, const char* expr, - const Result& result) { - bool failed = !result.m_passed; - - // ################################################################################### - // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT - // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED - // ################################################################################### - DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp); - DOCTEST_ASSERT_IN_TESTS(result.m_decomp); - return !failed; - } - - MessageBuilder::MessageBuilder(const char* file, int line, assertType::Enum severity) { - m_stream = tlssPush(); - m_file = file; - m_line = line; - m_severity = severity; - } - - MessageBuilder::~MessageBuilder() { - if (!logged) - tlssPop(); - } - - DOCTEST_DEFINE_INTERFACE(IExceptionTranslator) - - bool MessageBuilder::log() { - if (!logged) { - m_string = tlssPop(); - logged = true; - } - - DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this); - - const bool isWarn = m_severity & assertType::is_warn; - - // warn is just a message in this context so we don't treat it as an assert - if(!isWarn) { - addAssert(m_severity); - addFailedAssert(m_severity); - } - - return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn && - (g_cs->currentTest == nullptr || !g_cs->currentTest->m_no_breaks); // break into debugger - } - - void MessageBuilder::react() { - if(m_severity & assertType::is_require) //!OCLINT bitwise operator in conditional - throwException(); - } -} // namespace detail -namespace { - using namespace detail; - - // clang-format off - -// ================================================================================================= -// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp -// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched. -// ================================================================================================= - - class XmlEncode { - public: - enum ForWhat { ForTextNodes, ForAttributes }; - - XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes ); - - void encodeTo( std::ostream& os ) const; - - friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ); - - private: - std::string m_str; - ForWhat m_forWhat; - }; - - class XmlWriter { - public: - - class ScopedElement { - public: - ScopedElement( XmlWriter* writer ); - - ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT; - ScopedElement& operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT; - - ~ScopedElement(); - - ScopedElement& writeText( std::string const& text, bool indent = true ); - - template - ScopedElement& writeAttribute( std::string const& name, T const& attribute ) { - m_writer->writeAttribute( name, attribute ); - return *this; - } - - private: - mutable XmlWriter* m_writer = nullptr; - }; - - XmlWriter( std::ostream& os = std::cout ); - ~XmlWriter(); - - XmlWriter( XmlWriter const& ) = delete; - XmlWriter& operator=( XmlWriter const& ) = delete; - - XmlWriter& startElement( std::string const& name ); - - ScopedElement scopedElement( std::string const& name ); - - XmlWriter& endElement(); - - XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ); - - XmlWriter& writeAttribute( std::string const& name, const char* attribute ); - - XmlWriter& writeAttribute( std::string const& name, bool attribute ); - - template - XmlWriter& writeAttribute( std::string const& name, T const& attribute ) { - std::stringstream rss; - rss << attribute; - return writeAttribute( name, rss.str() ); - } - - XmlWriter& writeText( std::string const& text, bool indent = true ); - - //XmlWriter& writeComment( std::string const& text ); - - //void writeStylesheetRef( std::string const& url ); - - //XmlWriter& writeBlankLine(); - - void ensureTagClosed(); - - void writeDeclaration(); - - private: - - void newlineIfNecessary(); - - bool m_tagIsOpen = false; - bool m_needsNewline = false; - std::vector m_tags; - std::string m_indent; - std::ostream& m_os; - }; - -// ================================================================================================= -// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp -// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched. -// ================================================================================================= - -using uchar = unsigned char; - -namespace { - - size_t trailingBytes(unsigned char c) { - if ((c & 0xE0) == 0xC0) { - return 2; - } - if ((c & 0xF0) == 0xE0) { - return 3; - } - if ((c & 0xF8) == 0xF0) { - return 4; - } - DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); - } - - uint32_t headerValue(unsigned char c) { - if ((c & 0xE0) == 0xC0) { - return c & 0x1F; - } - if ((c & 0xF0) == 0xE0) { - return c & 0x0F; - } - if ((c & 0xF8) == 0xF0) { - return c & 0x07; - } - DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); - } - - void hexEscapeChar(std::ostream& os, unsigned char c) { - std::ios_base::fmtflags f(os.flags()); - os << "\\x" - << std::uppercase << std::hex << std::setfill('0') << std::setw(2) - << static_cast(c); - os.flags(f); - } - -} // anonymous namespace - - XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat ) - : m_str( str ), - m_forWhat( forWhat ) - {} - - void XmlEncode::encodeTo( std::ostream& os ) const { - // Apostrophe escaping not necessary if we always use " to write attributes - // (see: https://www.w3.org/TR/xml/#syntax) - - for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) { - uchar c = m_str[idx]; - switch (c) { - case '<': os << "<"; break; - case '&': os << "&"; break; - - case '>': - // See: https://www.w3.org/TR/xml/#syntax - if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']') - os << ">"; - else - os << c; - break; - - case '\"': - if (m_forWhat == ForAttributes) - os << """; - else - os << c; - break; - - default: - // Check for control characters and invalid utf-8 - - // Escape control characters in standard ascii - // see https://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0 - if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) { - hexEscapeChar(os, c); - break; - } - - // Plain ASCII: Write it to stream - if (c < 0x7F) { - os << c; - break; - } - - // UTF-8 territory - // Check if the encoding is valid and if it is not, hex escape bytes. - // Important: We do not check the exact decoded values for validity, only the encoding format - // First check that this bytes is a valid lead byte: - // This means that it is not encoded as 1111 1XXX - // Or as 10XX XXXX - if (c < 0xC0 || - c >= 0xF8) { - hexEscapeChar(os, c); - break; - } - - auto encBytes = trailingBytes(c); - // Are there enough bytes left to avoid accessing out-of-bounds memory? - if (idx + encBytes - 1 >= m_str.size()) { - hexEscapeChar(os, c); - break; - } - // The header is valid, check data - // The next encBytes bytes must together be a valid utf-8 - // This means: bitpattern 10XX XXXX and the extracted value is sane (ish) - bool valid = true; - uint32_t value = headerValue(c); - for (std::size_t n = 1; n < encBytes; ++n) { - uchar nc = m_str[idx + n]; - valid &= ((nc & 0xC0) == 0x80); - value = (value << 6) | (nc & 0x3F); - } - - if ( - // Wrong bit pattern of following bytes - (!valid) || - // Overlong encodings - (value < 0x80) || - ( value < 0x800 && encBytes > 2) || // removed "0x80 <= value &&" because redundant - (0x800 < value && value < 0x10000 && encBytes > 3) || - // Encoded value out of range - (value >= 0x110000) - ) { - hexEscapeChar(os, c); - break; - } - - // If we got here, this is in fact a valid(ish) utf-8 sequence - for (std::size_t n = 0; n < encBytes; ++n) { - os << m_str[idx + n]; - } - idx += encBytes - 1; - break; - } - } - } - - std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) { - xmlEncode.encodeTo( os ); - return os; - } - - XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer ) - : m_writer( writer ) - {} - - XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) DOCTEST_NOEXCEPT - : m_writer( other.m_writer ){ - other.m_writer = nullptr; - } - XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) DOCTEST_NOEXCEPT { - if ( m_writer ) { - m_writer->endElement(); - } - m_writer = other.m_writer; - other.m_writer = nullptr; - return *this; - } - - - XmlWriter::ScopedElement::~ScopedElement() { - if( m_writer ) - m_writer->endElement(); - } - - XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) { - m_writer->writeText( text, indent ); - return *this; - } - - XmlWriter::XmlWriter( std::ostream& os ) : m_os( os ) - { - // writeDeclaration(); // called explicitly by the reporters that use the writer class - see issue #627 - } - - XmlWriter::~XmlWriter() { - while( !m_tags.empty() ) - endElement(); - } - - XmlWriter& XmlWriter::startElement( std::string const& name ) { - ensureTagClosed(); - newlineIfNecessary(); - m_os << m_indent << '<' << name; - m_tags.push_back( name ); - m_indent += " "; - m_tagIsOpen = true; - return *this; - } - - XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) { - ScopedElement scoped( this ); - startElement( name ); - return scoped; - } - - XmlWriter& XmlWriter::endElement() { - newlineIfNecessary(); - m_indent = m_indent.substr( 0, m_indent.size()-2 ); - if( m_tagIsOpen ) { - m_os << "/>"; - m_tagIsOpen = false; - } - else { - m_os << m_indent << ""; - } - m_os << std::endl; - m_tags.pop_back(); - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) { - if( !name.empty() && !attribute.empty() ) - m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, const char* attribute ) { - if( !name.empty() && attribute && attribute[0] != '\0' ) - m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) { - m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) { - if( !text.empty() ){ - bool tagWasOpen = m_tagIsOpen; - ensureTagClosed(); - if( tagWasOpen && indent ) - m_os << m_indent; - m_os << XmlEncode( text ); - m_needsNewline = true; - } - return *this; - } - - //XmlWriter& XmlWriter::writeComment( std::string const& text ) { - // ensureTagClosed(); - // m_os << m_indent << ""; - // m_needsNewline = true; - // return *this; - //} - - //void XmlWriter::writeStylesheetRef( std::string const& url ) { - // m_os << "\n"; - //} - - //XmlWriter& XmlWriter::writeBlankLine() { - // ensureTagClosed(); - // m_os << '\n'; - // return *this; - //} - - void XmlWriter::ensureTagClosed() { - if( m_tagIsOpen ) { - m_os << ">" << std::endl; - m_tagIsOpen = false; - } - } - - void XmlWriter::writeDeclaration() { - m_os << "\n"; - } - - void XmlWriter::newlineIfNecessary() { - if( m_needsNewline ) { - m_os << std::endl; - m_needsNewline = false; - } - } - -// ================================================================================================= -// End of copy-pasted code from Catch -// ================================================================================================= - - // clang-format on - - struct XmlReporter : public IReporter - { - XmlWriter xml; - DOCTEST_DECLARE_MUTEX(mutex) - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc = nullptr; - - XmlReporter(const ContextOptions& co) - : xml(*co.cout) - , opt(co) {} - - void log_contexts() { - int num_contexts = get_num_active_contexts(); - if(num_contexts) { - auto contexts = get_active_contexts(); - std::stringstream ss; - for(int i = 0; i < num_contexts; ++i) { - contexts[i]->stringify(&ss); - xml.scopedElement("Info").writeText(ss.str()); - ss.str(""); - } - } - } - - unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; } - - void test_case_start_impl(const TestCaseData& in) { - bool open_ts_tag = false; - if(tc != nullptr) { // we have already opened a test suite - if(std::strcmp(tc->m_test_suite, in.m_test_suite) != 0) { - xml.endElement(); - open_ts_tag = true; - } - } - else { - open_ts_tag = true; // first test case ==> first test suite - } - - if(open_ts_tag) { - xml.startElement("TestSuite"); - xml.writeAttribute("name", in.m_test_suite); - } - - tc = ∈ - xml.startElement("TestCase") - .writeAttribute("name", in.m_name) - .writeAttribute("filename", skipPathFromFilename(in.m_file.c_str())) - .writeAttribute("line", line(in.m_line)) - .writeAttribute("description", in.m_description); - - if(Approx(in.m_timeout) != 0) - xml.writeAttribute("timeout", in.m_timeout); - if(in.m_may_fail) - xml.writeAttribute("may_fail", true); - if(in.m_should_fail) - xml.writeAttribute("should_fail", true); - } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData& in) override { - test_run_start(); - if(opt.list_reporters) { - for(auto& curr : getListeners()) - xml.scopedElement("Listener") - .writeAttribute("priority", curr.first.first) - .writeAttribute("name", curr.first.second); - for(auto& curr : getReporters()) - xml.scopedElement("Reporter") - .writeAttribute("priority", curr.first.first) - .writeAttribute("name", curr.first.second); - } else if(opt.count || opt.list_test_cases) { - for(unsigned i = 0; i < in.num_data; ++i) { - xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name) - .writeAttribute("testsuite", in.data[i]->m_test_suite) - .writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str())) - .writeAttribute("line", line(in.data[i]->m_line)) - .writeAttribute("skipped", in.data[i]->m_skip); - } - xml.scopedElement("OverallResultsTestCases") - .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); - } else if(opt.list_test_suites) { - for(unsigned i = 0; i < in.num_data; ++i) - xml.scopedElement("TestSuite").writeAttribute("name", in.data[i]->m_test_suite); - xml.scopedElement("OverallResultsTestCases") - .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); - xml.scopedElement("OverallResultsTestSuites") - .writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters); - } - xml.endElement(); - } - - void test_run_start() override { - xml.writeDeclaration(); - - // remove .exe extension - mainly to have the same output on UNIX and Windows - std::string binary_name = skipPathFromFilename(opt.binary_name.c_str()); -#ifdef DOCTEST_PLATFORM_WINDOWS - if(binary_name.rfind(".exe") != std::string::npos) - binary_name = binary_name.substr(0, binary_name.length() - 4); -#endif // DOCTEST_PLATFORM_WINDOWS - - xml.startElement("doctest").writeAttribute("binary", binary_name); - if(opt.no_version == false) - xml.writeAttribute("version", DOCTEST_VERSION_STR); - - // only the consequential ones (TODO: filters) - xml.scopedElement("Options") - .writeAttribute("order_by", opt.order_by.c_str()) - .writeAttribute("rand_seed", opt.rand_seed) - .writeAttribute("first", opt.first) - .writeAttribute("last", opt.last) - .writeAttribute("abort_after", opt.abort_after) - .writeAttribute("subcase_filter_levels", opt.subcase_filter_levels) - .writeAttribute("case_sensitive", opt.case_sensitive) - .writeAttribute("no_throw", opt.no_throw) - .writeAttribute("no_skip", opt.no_skip); - } - - void test_run_end(const TestRunStats& p) override { - if(tc) // the TestSuite tag - only if there has been at least 1 test case - xml.endElement(); - - xml.scopedElement("OverallResultsAsserts") - .writeAttribute("successes", p.numAsserts - p.numAssertsFailed) - .writeAttribute("failures", p.numAssertsFailed); - - xml.startElement("OverallResultsTestCases") - .writeAttribute("successes", - p.numTestCasesPassingFilters - p.numTestCasesFailed) - .writeAttribute("failures", p.numTestCasesFailed); - if(opt.no_skipped_summary == false) - xml.writeAttribute("skipped", p.numTestCases - p.numTestCasesPassingFilters); - xml.endElement(); - - xml.endElement(); - } - - void test_case_start(const TestCaseData& in) override { - test_case_start_impl(in); - xml.ensureTagClosed(); - } - - void test_case_reenter(const TestCaseData&) override {} - - void test_case_end(const CurrentTestCaseStats& st) override { - xml.startElement("OverallResultsAsserts") - .writeAttribute("successes", - st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest) - .writeAttribute("failures", st.numAssertsFailedCurrentTest) - .writeAttribute("test_case_success", st.testCaseSuccess); - if(opt.duration) - xml.writeAttribute("duration", st.seconds); - if(tc->m_expected_failures) - xml.writeAttribute("expected_failures", tc->m_expected_failures); - xml.endElement(); - - xml.endElement(); - } - - void test_case_exception(const TestCaseException& e) override { - DOCTEST_LOCK_MUTEX(mutex) - - xml.scopedElement("Exception") - .writeAttribute("crash", e.is_crash) - .writeText(e.error_string.c_str()); - } - - void subcase_start(const SubcaseSignature& in) override { - xml.startElement("SubCase") - .writeAttribute("name", in.m_name) - .writeAttribute("filename", skipPathFromFilename(in.m_file)) - .writeAttribute("line", line(in.m_line)); - xml.ensureTagClosed(); - } - - void subcase_end() override { xml.endElement(); } - - void log_assert(const AssertData& rb) override { - if(!rb.m_failed && !opt.success) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - xml.startElement("Expression") - .writeAttribute("success", !rb.m_failed) - .writeAttribute("type", assertString(rb.m_at)) - .writeAttribute("filename", skipPathFromFilename(rb.m_file)) - .writeAttribute("line", line(rb.m_line)); - - xml.scopedElement("Original").writeText(rb.m_expr); - - if(rb.m_threw) - xml.scopedElement("Exception").writeText(rb.m_exception.c_str()); - - if(rb.m_at & assertType::is_throws_as) - xml.scopedElement("ExpectedException").writeText(rb.m_exception_type); - if(rb.m_at & assertType::is_throws_with) - xml.scopedElement("ExpectedExceptionString").writeText(rb.m_exception_string.c_str()); - if((rb.m_at & assertType::is_normal) && !rb.m_threw) - xml.scopedElement("Expanded").writeText(rb.m_decomp.c_str()); - - log_contexts(); - - xml.endElement(); - } - - void log_message(const MessageData& mb) override { - DOCTEST_LOCK_MUTEX(mutex) - - xml.startElement("Message") - .writeAttribute("type", failureString(mb.m_severity)) - .writeAttribute("filename", skipPathFromFilename(mb.m_file)) - .writeAttribute("line", line(mb.m_line)); - - xml.scopedElement("Text").writeText(mb.m_string.c_str()); - - log_contexts(); - - xml.endElement(); - } - - void test_case_skipped(const TestCaseData& in) override { - if(opt.no_skipped_summary == false) { - test_case_start_impl(in); - xml.writeAttribute("skipped", "true"); - xml.endElement(); - } - } - }; - - DOCTEST_REGISTER_REPORTER("xml", 0, XmlReporter); - - void fulltext_log_assert_to_stream(std::ostream& s, const AssertData& rb) { - if((rb.m_at & (assertType::is_throws_as | assertType::is_throws_with)) == - 0) //!OCLINT bitwise operator in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << " ) " - << Color::None; - - if(rb.m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional - s << (rb.m_threw ? "threw as expected!" : "did NOT throw at all!") << "\n"; - } else if((rb.m_at & assertType::is_throws_as) && - (rb.m_at & assertType::is_throws_with)) { //!OCLINT - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \"" - << rb.m_exception_string.c_str() - << "\", " << rb.m_exception_type << " ) " << Color::None; - if(rb.m_threw) { - if(!rb.m_failed) { - s << "threw as expected!\n"; - } else { - s << "threw a DIFFERENT exception! (contents: " << rb.m_exception << ")\n"; - } - } else { - s << "did NOT throw at all!\n"; - } - } else if(rb.m_at & - assertType::is_throws_as) { //!OCLINT bitwise operator in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", " - << rb.m_exception_type << " ) " << Color::None - << (rb.m_threw ? (rb.m_threw_as ? "threw as expected!" : - "threw a DIFFERENT exception: ") : - "did NOT throw at all!") - << Color::Cyan << rb.m_exception << "\n"; - } else if(rb.m_at & - assertType::is_throws_with) { //!OCLINT bitwise operator in conditional - s << Color::Cyan << assertString(rb.m_at) << "( " << rb.m_expr << ", \"" - << rb.m_exception_string.c_str() - << "\" ) " << Color::None - << (rb.m_threw ? (!rb.m_failed ? "threw as expected!" : - "threw a DIFFERENT exception: ") : - "did NOT throw at all!") - << Color::Cyan << rb.m_exception << "\n"; - } else if(rb.m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional - s << (rb.m_threw ? "THREW exception: " : "didn't throw!") << Color::Cyan - << rb.m_exception << "\n"; - } else { - s << (rb.m_threw ? "THREW exception: " : - (!rb.m_failed ? "is correct!\n" : "is NOT correct!\n")); - if(rb.m_threw) - s << rb.m_exception << "\n"; - else - s << " values: " << assertString(rb.m_at) << "( " << rb.m_decomp << " )\n"; - } - } - - // TODO: - // - log_message() - // - respond to queries - // - honor remaining options - // - more attributes in tags - struct JUnitReporter : public IReporter - { - XmlWriter xml; - DOCTEST_DECLARE_MUTEX(mutex) - Timer timer; - std::vector deepestSubcaseStackNames; - - struct JUnitTestCaseData - { - static std::string getCurrentTimestamp() { - // Beware, this is not reentrant because of backward compatibility issues - // Also, UTC only, again because of backward compatibility (%z is C++11) - time_t rawtime; - std::time(&rawtime); - auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); - - std::tm timeInfo; -#ifdef DOCTEST_PLATFORM_WINDOWS - gmtime_s(&timeInfo, &rawtime); -#else // DOCTEST_PLATFORM_WINDOWS - gmtime_r(&rawtime, &timeInfo); -#endif // DOCTEST_PLATFORM_WINDOWS - - char timeStamp[timeStampSize]; - const char* const fmt = "%Y-%m-%dT%H:%M:%SZ"; - - std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); - return std::string(timeStamp); - } - - struct JUnitTestMessage - { - JUnitTestMessage(const std::string& _message, const std::string& _type, const std::string& _details) - : message(_message), type(_type), details(_details) {} - - JUnitTestMessage(const std::string& _message, const std::string& _details) - : message(_message), type(), details(_details) {} - - std::string message, type, details; - }; - - struct JUnitTestCase - { - JUnitTestCase(const std::string& _classname, const std::string& _name) - : classname(_classname), name(_name), time(0), failures() {} - - std::string classname, name; - double time; - std::vector failures, errors; - }; - - void add(const std::string& classname, const std::string& name) { - testcases.emplace_back(classname, name); - } - - void appendSubcaseNamesToLastTestcase(std::vector nameStack) { - for(auto& curr: nameStack) - if(curr.size()) - testcases.back().name += std::string("/") + curr.c_str(); - } - - void addTime(double time) { - if(time < 1e-4) - time = 0; - testcases.back().time = time; - totalSeconds += time; - } - - void addFailure(const std::string& message, const std::string& type, const std::string& details) { - testcases.back().failures.emplace_back(message, type, details); - ++totalFailures; - } - - void addError(const std::string& message, const std::string& details) { - testcases.back().errors.emplace_back(message, details); - ++totalErrors; - } - - std::vector testcases; - double totalSeconds = 0; - int totalErrors = 0, totalFailures = 0; - }; - - JUnitTestCaseData testCaseData; - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc = nullptr; - - JUnitReporter(const ContextOptions& co) - : xml(*co.cout) - , opt(co) {} - - unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData&) override { - xml.writeDeclaration(); - } - - void test_run_start() override { - xml.writeDeclaration(); - } - - void test_run_end(const TestRunStats& p) override { - // remove .exe extension - mainly to have the same output on UNIX and Windows - std::string binary_name = skipPathFromFilename(opt.binary_name.c_str()); -#ifdef DOCTEST_PLATFORM_WINDOWS - if(binary_name.rfind(".exe") != std::string::npos) - binary_name = binary_name.substr(0, binary_name.length() - 4); -#endif // DOCTEST_PLATFORM_WINDOWS - xml.startElement("testsuites"); - xml.startElement("testsuite").writeAttribute("name", binary_name) - .writeAttribute("errors", testCaseData.totalErrors) - .writeAttribute("failures", testCaseData.totalFailures) - .writeAttribute("test", p.numAsserts); - if(opt.no_time_in_output == false) { - xml.writeAttribute("time", testCaseData.totalSeconds); - xml.writeAttribute("timestamp", JUnitTestCaseData::getCurrentTimestamp()); - } - if(opt.no_version == false) - xml.writeAttribute("doctest_version", DOCTEST_VERSION_STR); - - for(const auto& testCase : testCaseData.testcases) { - xml.startElement("testcase") - .writeAttribute("classname", testCase.classname) - .writeAttribute("name", testCase.name); - if(opt.no_time_in_output == false) - xml.writeAttribute("time", testCase.time); - // This is not ideal, but it should be enough to mimic gtest's junit output. - xml.writeAttribute("status", "run"); - - for(const auto& failure : testCase.failures) { - xml.scopedElement("failure") - .writeAttribute("message", failure.message) - .writeAttribute("type", failure.type) - .writeText(failure.details, false); - } - - for(const auto& error : testCase.errors) { - xml.scopedElement("error") - .writeAttribute("message", error.message) - .writeText(error.details); - } - - xml.endElement(); - } - xml.endElement(); - xml.endElement(); - } - - void test_case_start(const TestCaseData& in) override { - testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name); - timer.start(); - } - - void test_case_reenter(const TestCaseData& in) override { - testCaseData.addTime(timer.getElapsedSeconds()); - testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames); - deepestSubcaseStackNames.clear(); - - timer.start(); - testCaseData.add(skipPathFromFilename(in.m_file.c_str()), in.m_name); - } - - void test_case_end(const CurrentTestCaseStats&) override { - testCaseData.addTime(timer.getElapsedSeconds()); - testCaseData.appendSubcaseNamesToLastTestcase(deepestSubcaseStackNames); - deepestSubcaseStackNames.clear(); - } - - void test_case_exception(const TestCaseException& e) override { - DOCTEST_LOCK_MUTEX(mutex) - testCaseData.addError("exception", e.error_string.c_str()); - } - - void subcase_start(const SubcaseSignature& in) override { - deepestSubcaseStackNames.push_back(in.m_name); - } - - void subcase_end() override {} - - void log_assert(const AssertData& rb) override { - if(!rb.m_failed) // report only failures & ignore the `success` option - return; - - DOCTEST_LOCK_MUTEX(mutex) - - std::ostringstream os; - os << skipPathFromFilename(rb.m_file) << (opt.gnu_file_line ? ":" : "(") - << line(rb.m_line) << (opt.gnu_file_line ? ":" : "):") << std::endl; - - fulltext_log_assert_to_stream(os, rb); - log_contexts(os); - testCaseData.addFailure(rb.m_decomp.c_str(), assertString(rb.m_at), os.str()); - } - - void log_message(const MessageData&) override {} - - void test_case_skipped(const TestCaseData&) override {} - - void log_contexts(std::ostringstream& s) { - int num_contexts = get_num_active_contexts(); - if(num_contexts) { - auto contexts = get_active_contexts(); - - s << " logged: "; - for(int i = 0; i < num_contexts; ++i) { - s << (i == 0 ? "" : " "); - contexts[i]->stringify(&s); - s << std::endl; - } - } - } - }; - - DOCTEST_REGISTER_REPORTER("junit", 0, JUnitReporter); - - struct Whitespace - { - int nrSpaces; - explicit Whitespace(int nr) - : nrSpaces(nr) {} - }; - - std::ostream& operator<<(std::ostream& out, const Whitespace& ws) { - if(ws.nrSpaces != 0) - out << std::setw(ws.nrSpaces) << ' '; - return out; - } - - struct ConsoleReporter : public IReporter - { - std::ostream& s; - bool hasLoggedCurrentTestStart; - std::vector subcasesStack; - size_t currentSubcaseLevel; - DOCTEST_DECLARE_MUTEX(mutex) - - // caching pointers/references to objects of these types - safe to do - const ContextOptions& opt; - const TestCaseData* tc; - - ConsoleReporter(const ContextOptions& co) - : s(*co.cout) - , opt(co) {} - - ConsoleReporter(const ContextOptions& co, std::ostream& ostr) - : s(ostr) - , opt(co) {} - - // ========================================================================================= - // WHAT FOLLOWS ARE HELPERS USED BY THE OVERRIDES OF THE VIRTUAL METHODS OF THE INTERFACE - // ========================================================================================= - - void separator_to_stream() { - s << Color::Yellow - << "===============================================================================" - "\n"; - } - - const char* getSuccessOrFailString(bool success, assertType::Enum at, - const char* success_str) { - if(success) - return success_str; - return failureString(at); - } - - Color::Enum getSuccessOrFailColor(bool success, assertType::Enum at) { - return success ? Color::BrightGreen : - (at & assertType::is_warn) ? Color::Yellow : Color::Red; - } - - void successOrFailColoredStringToStream(bool success, assertType::Enum at, - const char* success_str = "SUCCESS") { - s << getSuccessOrFailColor(success, at) - << getSuccessOrFailString(success, at, success_str) << ": "; - } - - void log_contexts() { - int num_contexts = get_num_active_contexts(); - if(num_contexts) { - auto contexts = get_active_contexts(); - - s << Color::None << " logged: "; - for(int i = 0; i < num_contexts; ++i) { - s << (i == 0 ? "" : " "); - contexts[i]->stringify(&s); - s << "\n"; - } - } - - s << "\n"; - } - - // this was requested to be made virtual so users could override it - virtual void file_line_to_stream(const char* file, int line, - const char* tail = "") { - s << Color::LightGrey << skipPathFromFilename(file) << (opt.gnu_file_line ? ":" : "(") - << (opt.no_line_numbers ? 0 : line) // 0 or the real num depending on the option - << (opt.gnu_file_line ? ":" : "):") << tail; - } - - void logTestStart() { - if(hasLoggedCurrentTestStart) - return; - - separator_to_stream(); - file_line_to_stream(tc->m_file.c_str(), tc->m_line, "\n"); - if(tc->m_description) - s << Color::Yellow << "DESCRIPTION: " << Color::None << tc->m_description << "\n"; - if(tc->m_test_suite && tc->m_test_suite[0] != '\0') - s << Color::Yellow << "TEST SUITE: " << Color::None << tc->m_test_suite << "\n"; - if(strncmp(tc->m_name, " Scenario:", 11) != 0) - s << Color::Yellow << "TEST CASE: "; - s << Color::None << tc->m_name << "\n"; - - for(size_t i = 0; i < currentSubcaseLevel; ++i) { - if(subcasesStack[i].m_name[0] != '\0') - s << " " << subcasesStack[i].m_name << "\n"; - } - - if(currentSubcaseLevel != subcasesStack.size()) { - s << Color::Yellow << "\nDEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):\n" << Color::None; - for(size_t i = 0; i < subcasesStack.size(); ++i) { - if(subcasesStack[i].m_name[0] != '\0') - s << " " << subcasesStack[i].m_name << "\n"; - } - } - - s << "\n"; - - hasLoggedCurrentTestStart = true; - } - - void printVersion() { - if(opt.no_version == false) - s << Color::Cyan << "[doctest] " << Color::None << "doctest version is \"" - << DOCTEST_VERSION_STR << "\"\n"; - } - - void printIntro() { - if(opt.no_intro == false) { - printVersion(); - s << Color::Cyan << "[doctest] " << Color::None - << "run with \"--" DOCTEST_OPTIONS_PREFIX_DISPLAY "help\" for options\n"; - } - } - - void printHelp() { - int sizePrefixDisplay = static_cast(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY)); - printVersion(); - // clang-format off - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "boolean values: \"1/on/yes/true\" or \"0/off/no/false\"\n"; - s << Color::Cyan << "[doctest] " << Color::None; - s << "filter values: \"str1,str2,str3\" (comma separated strings)\n"; - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "filters use wildcards for matching strings\n"; - s << Color::Cyan << "[doctest] " << Color::None; - s << "something passes a filter if any of the strings in a filter matches\n"; -#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \"" DOCTEST_CONFIG_OPTIONS_PREFIX "\" PREFIX!!!\n"; -#endif - s << Color::Cyan << "[doctest]\n" << Color::None; - s << Color::Cyan << "[doctest] " << Color::None; - s << "Query flags - the program quits after them. Available:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "?, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "help, -" DOCTEST_OPTIONS_PREFIX_DISPLAY "h " - << Whitespace(sizePrefixDisplay*0) << "prints this message\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "v, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "version " - << Whitespace(sizePrefixDisplay*1) << "prints the version\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "c, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "count " - << Whitespace(sizePrefixDisplay*1) << "prints the number of matching test\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ltc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-cases " - << Whitespace(sizePrefixDisplay*1) << "lists all matching test by name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-test-suites " - << Whitespace(sizePrefixDisplay*1) << "lists all matching test suites\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "lr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "list-reporters " - << Whitespace(sizePrefixDisplay*1) << "lists all registered reporters\n\n"; - // ================================================================================== << 79 - s << Color::Cyan << "[doctest] " << Color::None; - s << "The available / options/filters are:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case= " - << Whitespace(sizePrefixDisplay*1) << "filters test by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-case-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT test by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file= " - << Whitespace(sizePrefixDisplay*1) << "filters test by their file\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sfe, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "source-file-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT test by their file\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ts, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite= " - << Whitespace(sizePrefixDisplay*1) << "filters test by their test suite\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "tse, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "test-suite-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT test by their test suite\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase= " - << Whitespace(sizePrefixDisplay*1) << "filters subcases by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "sce, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-exclude= " - << Whitespace(sizePrefixDisplay*1) << "filters OUT subcases by their name\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "r, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "reporters= " - << Whitespace(sizePrefixDisplay*1) << "reporters to use (console is default)\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "o, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "out= " - << Whitespace(sizePrefixDisplay*1) << "output filename\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ob, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "order-by= " - << Whitespace(sizePrefixDisplay*1) << "how the test should be ordered\n"; - s << Whitespace(sizePrefixDisplay*3) << " - [file/suite/name/rand/none]\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "rs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "rand-seed= " - << Whitespace(sizePrefixDisplay*1) << "seed for random ordering\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "f, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "first= " - << Whitespace(sizePrefixDisplay*1) << "the first test passing the filters to\n"; - s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "l, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "last= " - << Whitespace(sizePrefixDisplay*1) << "the last test passing the filters to\n"; - s << Whitespace(sizePrefixDisplay*3) << " execute - for range-based execution\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "aa, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "abort-after= " - << Whitespace(sizePrefixDisplay*1) << "stop after failed assertions\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "scfl,--" DOCTEST_OPTIONS_PREFIX_DISPLAY "subcase-filter-levels= " - << Whitespace(sizePrefixDisplay*1) << "apply filters for the first levels\n"; - s << Color::Cyan << "\n[doctest] " << Color::None; - s << "Bool options - can be used like flags and true is assumed. Available:\n\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "s, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "success= " - << Whitespace(sizePrefixDisplay*1) << "include successful assertions in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "cs, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "case-sensitive= " - << Whitespace(sizePrefixDisplay*1) << "filters being treated as case sensitive\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "e, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "exit= " - << Whitespace(sizePrefixDisplay*1) << "exits after the test finish\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "d, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "duration= " - << Whitespace(sizePrefixDisplay*1) << "prints the time duration of each test\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "m, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "minimal= " - << Whitespace(sizePrefixDisplay*1) << "minimal console output (only failures)\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "q, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "quiet= " - << Whitespace(sizePrefixDisplay*1) << "no console output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nt, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-throw= " - << Whitespace(sizePrefixDisplay*1) << "skips exceptions-related assert checks\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ne, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-exitcode= " - << Whitespace(sizePrefixDisplay*1) << "returns (or exits) always with success\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nr, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-run= " - << Whitespace(sizePrefixDisplay*1) << "skips all runtime doctest operations\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ni, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-intro= " - << Whitespace(sizePrefixDisplay*1) << "omit the framework intro in the output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nv, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-version= " - << Whitespace(sizePrefixDisplay*1) << "omit the framework version in the output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-colors= " - << Whitespace(sizePrefixDisplay*1) << "disables colors in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "fc, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "force-colors= " - << Whitespace(sizePrefixDisplay*1) << "use colors even when not in a tty\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nb, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-breaks= " - << Whitespace(sizePrefixDisplay*1) << "disables breakpoints in debuggers\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "ns, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-skip= " - << Whitespace(sizePrefixDisplay*1) << "don't skip test cases marked as skip\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "gfl, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "gnu-file-line= " - << Whitespace(sizePrefixDisplay*1) << ":n: vs (n): for line numbers in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "npf, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-path-filenames= " - << Whitespace(sizePrefixDisplay*1) << "only filenames and no paths in output\n"; - s << " -" DOCTEST_OPTIONS_PREFIX_DISPLAY "nln, --" DOCTEST_OPTIONS_PREFIX_DISPLAY "no-line-numbers= " - << Whitespace(sizePrefixDisplay*1) << "0 instead of real line numbers in output\n"; - // ================================================================================== << 79 - // clang-format on - - s << Color::Cyan << "\n[doctest] " << Color::None; - s << "for more information visit the project documentation\n\n"; - } - - void printRegisteredReporters() { - printVersion(); - auto printReporters = [this] (const reporterMap& reporters, const char* type) { - if(reporters.size()) { - s << Color::Cyan << "[doctest] " << Color::None << "listing all registered " << type << "\n"; - for(auto& curr : reporters) - s << "priority: " << std::setw(5) << curr.first.first - << " name: " << curr.first.second << "\n"; - } - }; - printReporters(getListeners(), "listeners"); - printReporters(getReporters(), "reporters"); - } - - // ========================================================================================= - // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE - // ========================================================================================= - - void report_query(const QueryData& in) override { - if(opt.version) { - printVersion(); - } else if(opt.help) { - printHelp(); - } else if(opt.list_reporters) { - printRegisteredReporters(); - } else if(opt.count || opt.list_test_cases) { - if(opt.list_test_cases) { - s << Color::Cyan << "[doctest] " << Color::None - << "listing all test case names\n"; - separator_to_stream(); - } - - for(unsigned i = 0; i < in.num_data; ++i) - s << Color::None << in.data[i]->m_name << "\n"; - - separator_to_stream(); - - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - - } else if(opt.list_test_suites) { - s << Color::Cyan << "[doctest] " << Color::None << "listing all test suites\n"; - separator_to_stream(); - - for(unsigned i = 0; i < in.num_data; ++i) - s << Color::None << in.data[i]->m_test_suite << "\n"; - - separator_to_stream(); - - s << Color::Cyan << "[doctest] " << Color::None - << "unskipped test cases passing the current filters: " - << g_cs->numTestCasesPassingFilters << "\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "test suites with unskipped test cases passing the current filters: " - << g_cs->numTestSuitesPassingFilters << "\n"; - } - } - - void test_run_start() override { - if(!opt.minimal) - printIntro(); - } - - void test_run_end(const TestRunStats& p) override { - if(opt.minimal && p.numTestCasesFailed == 0) - return; - - separator_to_stream(); - s << std::dec; - - auto totwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters, static_cast(p.numAsserts))) + 1))); - auto passwidth = int(std::ceil(log10((std::max(p.numTestCasesPassingFilters - p.numTestCasesFailed, static_cast(p.numAsserts - p.numAssertsFailed))) + 1))); - auto failwidth = int(std::ceil(log10((std::max(p.numTestCasesFailed, static_cast(p.numAssertsFailed))) + 1))); - const bool anythingFailed = p.numTestCasesFailed > 0 || p.numAssertsFailed > 0; - s << Color::Cyan << "[doctest] " << Color::None << "test cases: " << std::setw(totwidth) - << p.numTestCasesPassingFilters << " | " - << ((p.numTestCasesPassingFilters == 0 || anythingFailed) ? Color::None : - Color::Green) - << std::setw(passwidth) << p.numTestCasesPassingFilters - p.numTestCasesFailed << " passed" - << Color::None << " | " << (p.numTestCasesFailed > 0 ? Color::Red : Color::None) - << std::setw(failwidth) << p.numTestCasesFailed << " failed" << Color::None << " |"; - if(opt.no_skipped_summary == false) { - const int numSkipped = p.numTestCases - p.numTestCasesPassingFilters; - s << " " << (numSkipped == 0 ? Color::None : Color::Yellow) << numSkipped - << " skipped" << Color::None; - } - s << "\n"; - s << Color::Cyan << "[doctest] " << Color::None << "assertions: " << std::setw(totwidth) - << p.numAsserts << " | " - << ((p.numAsserts == 0 || anythingFailed) ? Color::None : Color::Green) - << std::setw(passwidth) << (p.numAsserts - p.numAssertsFailed) << " passed" << Color::None - << " | " << (p.numAssertsFailed > 0 ? Color::Red : Color::None) << std::setw(failwidth) - << p.numAssertsFailed << " failed" << Color::None << " |\n"; - s << Color::Cyan << "[doctest] " << Color::None - << "Status: " << (p.numTestCasesFailed > 0 ? Color::Red : Color::Green) - << ((p.numTestCasesFailed > 0) ? "FAILURE!" : "SUCCESS!") << Color::None << std::endl; - } - - void test_case_start(const TestCaseData& in) override { - hasLoggedCurrentTestStart = false; - tc = ∈ - subcasesStack.clear(); - currentSubcaseLevel = 0; - } - - void test_case_reenter(const TestCaseData&) override { - subcasesStack.clear(); - } - - void test_case_end(const CurrentTestCaseStats& st) override { - if(tc->m_no_output) - return; - - // log the preamble of the test case only if there is something - // else to print - something other than that an assert has failed - if(opt.duration || - (st.failure_flags && st.failure_flags != static_cast(TestCaseFailureReason::AssertFailure))) - logTestStart(); - - if(opt.duration) - s << Color::None << std::setprecision(6) << std::fixed << st.seconds - << " s: " << tc->m_name << "\n"; - - if(st.failure_flags & TestCaseFailureReason::Timeout) - s << Color::Red << "Test case exceeded time limit of " << std::setprecision(6) - << std::fixed << tc->m_timeout << "!\n"; - - if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedButDidnt) { - s << Color::Red << "Should have failed but didn't! Marking it as failed!\n"; - } else if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedAndDid) { - s << Color::Yellow << "Failed as expected so marking it as not failed\n"; - } else if(st.failure_flags & TestCaseFailureReason::CouldHaveFailedAndDid) { - s << Color::Yellow << "Allowed to fail so marking it as not failed\n"; - } else if(st.failure_flags & TestCaseFailureReason::DidntFailExactlyNumTimes) { - s << Color::Red << "Didn't fail exactly " << tc->m_expected_failures - << " times so marking it as failed!\n"; - } else if(st.failure_flags & TestCaseFailureReason::FailedExactlyNumTimes) { - s << Color::Yellow << "Failed exactly " << tc->m_expected_failures - << " times as expected so marking it as not failed!\n"; - } - if(st.failure_flags & TestCaseFailureReason::TooManyFailedAsserts) { - s << Color::Red << "Aborting - too many failed asserts!\n"; - } - s << Color::None; // lgtm [cpp/useless-expression] - } - - void test_case_exception(const TestCaseException& e) override { - DOCTEST_LOCK_MUTEX(mutex) - if(tc->m_no_output) - return; - - logTestStart(); - - file_line_to_stream(tc->m_file.c_str(), tc->m_line, " "); - successOrFailColoredStringToStream(false, e.is_crash ? assertType::is_require : - assertType::is_check); - s << Color::Red << (e.is_crash ? "test case CRASHED: " : "test case THREW exception: ") - << Color::Cyan << e.error_string << "\n"; - - int num_stringified_contexts = get_num_stringified_contexts(); - if(num_stringified_contexts) { - auto stringified_contexts = get_stringified_contexts(); - s << Color::None << " logged: "; - for(int i = num_stringified_contexts; i > 0; --i) { - s << (i == num_stringified_contexts ? "" : " ") - << stringified_contexts[i - 1] << "\n"; - } - } - s << "\n" << Color::None; - } - - void subcase_start(const SubcaseSignature& subc) override { - subcasesStack.push_back(subc); - ++currentSubcaseLevel; - hasLoggedCurrentTestStart = false; - } - - void subcase_end() override { - --currentSubcaseLevel; - hasLoggedCurrentTestStart = false; - } - - void log_assert(const AssertData& rb) override { - if((!rb.m_failed && !opt.success) || tc->m_no_output) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - logTestStart(); - - file_line_to_stream(rb.m_file, rb.m_line, " "); - successOrFailColoredStringToStream(!rb.m_failed, rb.m_at); - - fulltext_log_assert_to_stream(s, rb); - - log_contexts(); - } - - void log_message(const MessageData& mb) override { - if(tc->m_no_output) - return; - - DOCTEST_LOCK_MUTEX(mutex) - - logTestStart(); - - file_line_to_stream(mb.m_file, mb.m_line, " "); - s << getSuccessOrFailColor(false, mb.m_severity) - << getSuccessOrFailString(mb.m_severity & assertType::is_warn, mb.m_severity, - "MESSAGE") << ": "; - s << Color::None << mb.m_string << "\n"; - log_contexts(); - } - - void test_case_skipped(const TestCaseData&) override {} - }; - - DOCTEST_REGISTER_REPORTER("console", 0, ConsoleReporter); - -#ifdef DOCTEST_PLATFORM_WINDOWS - struct DebugOutputWindowReporter : public ConsoleReporter - { - DOCTEST_THREAD_LOCAL static std::ostringstream oss; - - DebugOutputWindowReporter(const ContextOptions& co) - : ConsoleReporter(co, oss) {} - -#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg) \ - void func(type arg) override { \ - bool with_col = g_no_colors; \ - g_no_colors = false; \ - ConsoleReporter::func(arg); \ - if(oss.tellp() != std::streampos{}) { \ - DOCTEST_OUTPUT_DEBUG_STRING(oss.str().c_str()); \ - oss.str(""); \ - } \ - g_no_colors = with_col; \ - } - - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, DOCTEST_EMPTY, DOCTEST_EMPTY) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, const TestCaseData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, const TestCaseData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, const CurrentTestCaseStats&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, const TestCaseException&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, const SubcaseSignature&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, DOCTEST_EMPTY, DOCTEST_EMPTY) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in) - DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, const TestCaseData&, in) - }; - - DOCTEST_THREAD_LOCAL std::ostringstream DebugOutputWindowReporter::oss; -#endif // DOCTEST_PLATFORM_WINDOWS - - // the implementation of parseOption() - bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) { - // going from the end to the beginning and stopping on the first occurrence from the end - for(int i = argc; i > 0; --i) { - auto index = i - 1; - auto temp = std::strstr(argv[index], pattern); - if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue - // eliminate matches in which the chars before the option are not '-' - bool noBadCharsFound = true; - auto curr = argv[index]; - while(curr != temp) { - if(*curr++ != '-') { - noBadCharsFound = false; - break; - } - } - if(noBadCharsFound && argv[index][0] == '-') { - if(value) { - // parsing the value of an option - temp += strlen(pattern); - const unsigned len = strlen(temp); - if(len) { - *value = temp; - return true; - } - } else { - // just a flag - no value - return true; - } - } - } - } - return false; - } - - // parses an option and returns the string after the '=' character - bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr, - const String& defaultVal = String()) { - if(value) - *value = defaultVal; -#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - // offset (normally 3 for "dt-") to skip prefix - if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value)) - return true; -#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS - return parseOptionImpl(argc, argv, pattern, value); - } - - // locates a flag on the command line - bool parseFlag(int argc, const char* const* argv, const char* pattern) { - return parseOption(argc, argv, pattern); - } - - // parses a comma separated list of words after a pattern in one of the arguments in argv - bool parseCommaSepArgs(int argc, const char* const* argv, const char* pattern, - std::vector& res) { - String filtersString; - if(parseOption(argc, argv, pattern, &filtersString)) { - // tokenize with "," as a separator, unless escaped with backslash - std::ostringstream s; - auto flush = [&s, &res]() { - auto string = s.str(); - if(string.size() > 0) { - res.push_back(string.c_str()); - } - s.str(""); - }; - - bool seenBackslash = false; - const char* current = filtersString.c_str(); - const char* end = current + strlen(current); - while(current != end) { - char character = *current++; - if(seenBackslash) { - seenBackslash = false; - if(character == ',' || character == '\\') { - s.put(character); - continue; - } - s.put('\\'); - } - if(character == '\\') { - seenBackslash = true; - } else if(character == ',') { - flush(); - } else { - s.put(character); - } - } - - if(seenBackslash) { - s.put('\\'); - } - flush(); - return true; - } - return false; - } - - enum optionType - { - option_bool, - option_int - }; - - // parses an int/bool option from the command line - bool parseIntOption(int argc, const char* const* argv, const char* pattern, optionType type, - int& res) { - String parsedValue; - if(!parseOption(argc, argv, pattern, &parsedValue)) - return false; - - if(type) { - // integer - // TODO: change this to use std::stoi or something else! currently it uses undefined behavior - assumes '0' on failed parse... - int theInt = std::atoi(parsedValue.c_str()); - if (theInt != 0) { - res = theInt; //!OCLINT parameter reassignment - return true; - } - } else { - // boolean - const char positive[][5] = { "1", "true", "on", "yes" }; // 5 - strlen("true") + 1 - const char negative[][6] = { "0", "false", "off", "no" }; // 6 - strlen("false") + 1 - - // if the value matches any of the positive/negative possibilities - for (unsigned i = 0; i < 4; i++) { - if (parsedValue.compare(positive[i], true) == 0) { - res = 1; //!OCLINT parameter reassignment - return true; - } - if (parsedValue.compare(negative[i], true) == 0) { - res = 0; //!OCLINT parameter reassignment - return true; - } - } - } - return false; - } -} // namespace - -Context::Context(int argc, const char* const* argv) - : p(new detail::ContextState) { - parseArgs(argc, argv, true); - if(argc) - p->binary_name = argv[0]; -} - -Context::~Context() { - if(g_cs == p) - g_cs = nullptr; - delete p; -} - -void Context::applyCommandLine(int argc, const char* const* argv) { - parseArgs(argc, argv); - if(argc) - p->binary_name = argv[0]; -} - -// parses args -void Context::parseArgs(int argc, const char* const* argv, bool withDefaults) { - using namespace detail; - - // clang-format off - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file=", p->filters[0]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sf=", p->filters[0]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "source-file-exclude=",p->filters[1]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sfe=", p->filters[1]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite=", p->filters[2]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ts=", p->filters[2]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-suite-exclude=", p->filters[3]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tse=", p->filters[3]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case=", p->filters[4]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tc=", p->filters[4]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "test-case-exclude=", p->filters[5]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "tce=", p->filters[5]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase=", p->filters[6]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sc=", p->filters[6]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "subcase-exclude=", p->filters[7]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "sce=", p->filters[7]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "reporters=", p->filters[8]); - parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "r=", p->filters[8]); - // clang-format on - - int intRes = 0; - String strRes; - -#define DOCTEST_PARSE_AS_BOOL_OR_FLAG(name, sname, var, default) \ - if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", option_bool, intRes) || \ - parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", option_bool, intRes)) \ - p->var = static_cast(intRes); \ - else if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name) || \ - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname)) \ - p->var = true; \ - else if(withDefaults) \ - p->var = default - -#define DOCTEST_PARSE_INT_OPTION(name, sname, var, default) \ - if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", option_int, intRes) || \ - parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", option_int, intRes)) \ - p->var = intRes; \ - else if(withDefaults) \ - p->var = default - -#define DOCTEST_PARSE_STR_OPTION(name, sname, var, default) \ - if(parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name "=", &strRes, default) || \ - parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname "=", &strRes, default) || \ - withDefaults) \ - p->var = strRes - - // clang-format off - DOCTEST_PARSE_STR_OPTION("out", "o", out, ""); - DOCTEST_PARSE_STR_OPTION("order-by", "ob", order_by, "file"); - DOCTEST_PARSE_INT_OPTION("rand-seed", "rs", rand_seed, 0); - - DOCTEST_PARSE_INT_OPTION("first", "f", first, 0); - DOCTEST_PARSE_INT_OPTION("last", "l", last, UINT_MAX); - - DOCTEST_PARSE_INT_OPTION("abort-after", "aa", abort_after, 0); - DOCTEST_PARSE_INT_OPTION("subcase-filter-levels", "scfl", subcase_filter_levels, INT_MAX); - - DOCTEST_PARSE_AS_BOOL_OR_FLAG("success", "s", success, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("case-sensitive", "cs", case_sensitive, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("exit", "e", exit, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("duration", "d", duration, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("minimal", "m", minimal, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("quiet", "q", quiet, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-throw", "nt", no_throw, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-exitcode", "ne", no_exitcode, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-run", "nr", no_run, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-intro", "ni", no_intro, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-version", "nv", no_version, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-colors", "nc", no_colors, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("force-colors", "fc", force_colors, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-breaks", "nb", no_breaks, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skip", "ns", no_skip, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("gnu-file-line", "gfl", gnu_file_line, !bool(DOCTEST_MSVC)); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-path-filenames", "npf", no_path_in_filenames, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-line-numbers", "nln", no_line_numbers, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-debug-output", "ndo", no_debug_output, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-skipped-summary", "nss", no_skipped_summary, false); - DOCTEST_PARSE_AS_BOOL_OR_FLAG("no-time-in-output", "ntio", no_time_in_output, false); - // clang-format on - - if(withDefaults) { - p->help = false; - p->version = false; - p->count = false; - p->list_test_cases = false; - p->list_test_suites = false; - p->list_reporters = false; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "help") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "h") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "?")) { - p->help = true; - p->exit = true; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "version") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "v")) { - p->version = true; - p->exit = true; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "count") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "c")) { - p->count = true; - p->exit = true; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-cases") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "ltc")) { - p->list_test_cases = true; - p->exit = true; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-test-suites") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lts")) { - p->list_test_suites = true; - p->exit = true; - } - if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "list-reporters") || - parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX "lr")) { - p->list_reporters = true; - p->exit = true; - } -} - -// allows the user to add procedurally to the filters from the command line -void Context::addFilter(const char* filter, const char* value) { setOption(filter, value); } - -// allows the user to clear all filters from the command line -void Context::clearFilters() { - for(auto& curr : p->filters) - curr.clear(); -} - -// allows the user to override procedurally the bool options from the command line -void Context::setOption(const char* option, bool value) { - setOption(option, value ? "true" : "false"); -} - -// allows the user to override procedurally the int options from the command line -void Context::setOption(const char* option, int value) { - setOption(option, toString(value).c_str()); -} - -// allows the user to override procedurally the string options from the command line -void Context::setOption(const char* option, const char* value) { - auto argv = String("-") + option + "=" + value; - auto lvalue = argv.c_str(); - parseArgs(1, &lvalue); -} - -// users should query this in their main() and exit the program if true -bool Context::shouldExit() { return p->exit; } - -void Context::setAsDefaultForAssertsOutOfTestCases() { g_cs = p; } - -void Context::setAssertHandler(detail::assert_handler ah) { p->ah = ah; } - -void Context::setCout(std::ostream* out) { p->cout = out; } - -static class DiscardOStream : public std::ostream -{ -private: - class : public std::streambuf - { - private: - // allowing some buffering decreases the amount of calls to overflow - char buf[1024]; - - protected: - std::streamsize xsputn(const char_type*, std::streamsize count) override { return count; } - - int_type overflow(int_type ch) override { - setp(std::begin(buf), std::end(buf)); - return traits_type::not_eof(ch); - } - } discardBuf; - -public: - DiscardOStream() - : std::ostream(&discardBuf) {} -} discardOut; - -// the main function that does all the filtering and test running -int Context::run() { - using namespace detail; - - // save the old context state in case such was setup - for using asserts out of a testing context - auto old_cs = g_cs; - // this is the current contest - g_cs = p; - is_running_in_test = true; - - g_no_colors = p->no_colors; - p->resetRunData(); - - std::fstream fstr; - if(p->cout == nullptr) { - if(p->quiet) { - p->cout = &discardOut; - } else if(p->out.size()) { - // to a file if specified - fstr.open(p->out.c_str(), std::fstream::out); - p->cout = &fstr; - } else { - // stdout by default - p->cout = &std::cout; - } - } - - FatalConditionHandler::allocateAltStackMem(); - - auto cleanup_and_return = [&]() { - FatalConditionHandler::freeAltStackMem(); - - if(fstr.is_open()) - fstr.close(); - - // restore context - g_cs = old_cs; - is_running_in_test = false; - - // we have to free the reporters which were allocated when the run started - for(auto& curr : p->reporters_currently_used) - delete curr; - p->reporters_currently_used.clear(); - - if(p->numTestCasesFailed && !p->no_exitcode) - return EXIT_FAILURE; - return EXIT_SUCCESS; - }; - - // setup default reporter if none is given through the command line - if(p->filters[8].empty()) - p->filters[8].push_back("console"); - - // check to see if any of the registered reporters has been selected - for(auto& curr : getReporters()) { - if(matchesAny(curr.first.second.c_str(), p->filters[8], false, p->case_sensitive)) - p->reporters_currently_used.push_back(curr.second(*g_cs)); - } - - // TODO: check if there is nothing in reporters_currently_used - - // prepend all listeners - for(auto& curr : getListeners()) - p->reporters_currently_used.insert(p->reporters_currently_used.begin(), curr.second(*g_cs)); - -#ifdef DOCTEST_PLATFORM_WINDOWS - if(isDebuggerActive() && p->no_debug_output == false) - p->reporters_currently_used.push_back(new DebugOutputWindowReporter(*g_cs)); -#endif // DOCTEST_PLATFORM_WINDOWS - - // handle version, help and no_run - if(p->no_run || p->version || p->help || p->list_reporters) { - DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, QueryData()); - - return cleanup_and_return(); - } - - std::vector testArray; - for(auto& curr : getRegisteredTests()) - testArray.push_back(&curr); - p->numTestCases = testArray.size(); - - // sort the collected records - if(!testArray.empty()) { - if(p->order_by.compare("file", true) == 0) { - std::sort(testArray.begin(), testArray.end(), fileOrderComparator); - } else if(p->order_by.compare("suite", true) == 0) { - std::sort(testArray.begin(), testArray.end(), suiteOrderComparator); - } else if(p->order_by.compare("name", true) == 0) { - std::sort(testArray.begin(), testArray.end(), nameOrderComparator); - } else if(p->order_by.compare("rand", true) == 0) { - std::srand(p->rand_seed); - - // random_shuffle implementation - const auto first = &testArray[0]; - for(size_t i = testArray.size() - 1; i > 0; --i) { - int idxToSwap = std::rand() % (i + 1); - - const auto temp = first[i]; - - first[i] = first[idxToSwap]; - first[idxToSwap] = temp; - } - } else if(p->order_by.compare("none", true) == 0) { - // means no sorting - beneficial for death test which call into the executable - // with a specific test case in mind - we don't want to slow down the startup times - } - } - - std::set testSuitesPassingFilt; - - bool query_mode = p->count || p->list_test_cases || p->list_test_suites; - std::vector queryResults; - - if(!query_mode) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_start, DOCTEST_EMPTY); - - // invoke the registered functions if they match the filter criteria (or just count them) - for(auto& curr : testArray) { - const auto& tc = *curr; - - bool skip_me = false; - if(tc.m_skip && !p->no_skip) - skip_me = true; - - if(!matchesAny(tc.m_file.c_str(), p->filters[0], true, p->case_sensitive)) - skip_me = true; - if(matchesAny(tc.m_file.c_str(), p->filters[1], false, p->case_sensitive)) - skip_me = true; - if(!matchesAny(tc.m_test_suite, p->filters[2], true, p->case_sensitive)) - skip_me = true; - if(matchesAny(tc.m_test_suite, p->filters[3], false, p->case_sensitive)) - skip_me = true; - if(!matchesAny(tc.m_name, p->filters[4], true, p->case_sensitive)) - skip_me = true; - if(matchesAny(tc.m_name, p->filters[5], false, p->case_sensitive)) - skip_me = true; - - if(!skip_me) - p->numTestCasesPassingFilters++; - - // skip the test if it is not in the execution range - if((p->last < p->numTestCasesPassingFilters && p->first <= p->last) || - (p->first > p->numTestCasesPassingFilters)) - skip_me = true; - - if(skip_me) { - if(!query_mode) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_skipped, tc); - continue; - } - - // do not execute the test if we are to only count the number of filter passing test - if(p->count) - continue; - - // print the name of the test and don't execute it - if(p->list_test_cases) { - queryResults.push_back(&tc); - continue; - } - - // print the name of the test suite if not done already and don't execute it - if(p->list_test_suites) { - if((testSuitesPassingFilt.count(tc.m_test_suite) == 0) && tc.m_test_suite[0] != '\0') { - queryResults.push_back(&tc); - testSuitesPassingFilt.insert(tc.m_test_suite); - p->numTestSuitesPassingFilters++; - } - continue; - } - - // execute the test if it passes all the filtering - { - p->currentTest = &tc; - - p->failure_flags = TestCaseFailureReason::None; - p->seconds = 0; - - // reset atomic counters - p->numAssertsFailedCurrentTest_atomic = 0; - p->numAssertsCurrentTest_atomic = 0; - - p->fullyTraversedSubcases.clear(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc); - - p->timer.start(); - - bool run_test = true; - - do { - // reset some of the fields for subcases (except for the set of fully passed ones) - p->reachedLeaf = false; - // May not be empty if previous subcase exited via exception. - p->subcaseStack.clear(); - p->currentSubcaseDepth = 0; - - p->shouldLogCurrentException = true; - - // reset stuff for logging with INFO() - p->stringifiedContexts.clear(); - -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - try { -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS -// MSVC 2015 diagnoses fatalConditionHandler as unused (because reset() is a static method) -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4101) // unreferenced local variable - FatalConditionHandler fatalConditionHandler; // Handle signals - // execute the test - tc.m_test(); - fatalConditionHandler.reset(); -DOCTEST_MSVC_SUPPRESS_WARNING_POP -#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS - } catch(const TestFailureException&) { - p->failure_flags |= TestCaseFailureReason::AssertFailure; - } catch(...) { - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, - {translateActiveException(), false}); - p->failure_flags |= TestCaseFailureReason::Exception; - } -#endif // DOCTEST_CONFIG_NO_EXCEPTIONS - - // exit this loop if enough assertions have failed - even if there are more subcases - if(p->abort_after > 0 && - p->numAssertsFailed + p->numAssertsFailedCurrentTest_atomic >= p->abort_after) { - run_test = false; - p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts; - } - - if(!p->nextSubcaseStack.empty() && run_test) - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc); - if(p->nextSubcaseStack.empty()) - run_test = false; - } while(run_test); - - p->finalizeTestCaseData(); - - DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs); - - p->currentTest = nullptr; - - // stop executing test if enough assertions have failed - if(p->abort_after > 0 && p->numAssertsFailed >= p->abort_after) - break; - } - } - - if(!query_mode) { - DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs); - } else { - QueryData qdata; - qdata.run_stats = g_cs; - qdata.data = queryResults.data(); - qdata.num_data = unsigned(queryResults.size()); - DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata); - } - - return cleanup_and_return(); -} - -DOCTEST_DEFINE_INTERFACE(IReporter) - -int IReporter::get_num_active_contexts() { return detail::g_infoContexts.size(); } -const IContextScope* const* IReporter::get_active_contexts() { - return get_num_active_contexts() ? &detail::g_infoContexts[0] : nullptr; -} - -int IReporter::get_num_stringified_contexts() { return detail::g_cs->stringifiedContexts.size(); } -const String* IReporter::get_stringified_contexts() { - return get_num_stringified_contexts() ? &detail::g_cs->stringifiedContexts[0] : nullptr; -} - -namespace detail { - void registerReporterImpl(const char* name, int priority, reporterCreatorFunc c, bool isReporter) { - if(isReporter) - getReporters().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c)); - else - getListeners().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c)); - } -} // namespace detail - -} // namespace doctest - -#endif // DOCTEST_CONFIG_DISABLE - -#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN -DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4007) // 'function' : must be 'attribute' - see issue #182 -int main(int argc, char** argv) { return doctest::Context(argc, argv).run(); } -DOCTEST_MSVC_SUPPRESS_WARNING_POP -#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -DOCTEST_CLANG_SUPPRESS_WARNING_POP -DOCTEST_MSVC_SUPPRESS_WARNING_POP -DOCTEST_GCC_SUPPRESS_WARNING_POP - -DOCTEST_SUPPRESS_COMMON_WARNINGS_POP - -#endif // DOCTEST_LIBRARY_IMPLEMENTATION -#endif // DOCTEST_CONFIG_IMPLEMENT diff --git a/test/local_tests.cpp b/test/local_tests.cpp deleted file mode 100644 index 88296ab6..00000000 --- a/test/local_tests.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN - -#include "../include/mcpp/block.h" -#include "../include/mcpp/coordinate.h" -#include "doctest.h" -#include - -// NOLINTBEGIN - -using namespace mcpp; - -/* - * Used to test code that is not connection dependent such as the implementation - * of Coordinate and various other utility functions as well as Block - * functionality. - */ - -TEST_CASE("Test Coordinate class") { - SUBCASE("Test init") { - Coordinate test_coord; - CHECK_EQ(test_coord.x, 0); - CHECK_EQ(test_coord.y, 0); - CHECK_EQ(test_coord.z, 0); - } - - SUBCASE("Test hash no collision") { - const int seed = 12345; - std::set hashes; - std::mt19937 gen(seed); - std::uniform_int_distribution dis(-3e7, 3e7); - std::uniform_int_distribution dis2(-64, 256); - - Coordinate hashing; - for (int i = 0; i < 100; i++) { - Coordinate testCoord(dis(gen), dis2(gen), dis(gen)); - size_t hash = hashing(testCoord); - hashes.insert(hash); - } - CHECK_EQ(hashes.size(), 100); - } - - SUBCASE("Test double init") { - Coordinate test_coord(1.5, 2.5, 3.5); - Coordinate test_coord_float(1.5F, 2.5F, 3.5F); - Coordinate test_coord_rhs(1, 2, 3); - - CHECK_EQ(test_coord, test_coord_rhs); - CHECK_EQ(test_coord, test_coord_float); - } - - SUBCASE("Test equals") { - Coordinate testCoord(3, 2, 1); - Coordinate testCoordRHS(3, 2, 1); - - CHECK_EQ(testCoord, testCoordRHS); - } - - SUBCASE("Test not equals") { - Coordinate testCoord(3, 2, 1); - Coordinate testCoordRHS(2, 2, 1); - - CHECK(testCoord != testCoordRHS); - CHECK_NE(testCoord, testCoordRHS); - } - - SUBCASE("Test add") { - Coordinate testCoord(3, 2, 1); - Coordinate testCoordRHS(1, 2, 3); - Coordinate result(4, 4, 4); - - CHECK_EQ((testCoord + testCoordRHS), result); - } - - SUBCASE("Test subtract") { - Coordinate testCoord(1, 2, 3); - Coordinate testCoordRHS(0, 2, 4); - - Coordinate result(1, 0, -1); - - CHECK_EQ((testCoord - testCoordRHS), result); - } - - SUBCASE("Test print") { - Coordinate testCoord(1, 2, 3); - std::stringstream ss; - ss << testCoord; - CHECK_EQ(ss.str(), "(1,2,3)"); - } -} - -TEST_CASE("Test block class") { - SUBCASE("Default ctor") { - BlockType def; - CHECK_EQ(def.id, 0); - CHECK_EQ(def.mod, 0); - } - - SUBCASE("Test equality") { - BlockType testBlock(10, 2); - BlockType testBlockRHS(10, 2); - CHECK_EQ(testBlock, testBlockRHS); - } - - SUBCASE("Test non equality") { - BlockType testBlock(10); - BlockType testBlockRHS(11); - CHECK(testBlock != testBlockRHS); - CHECK_NE(testBlock, testBlockRHS); - - BlockType testBlockWithMod(10, 2); - BlockType testBlockWithModRHS(10, 3); - CHECK(testBlockWithMod != testBlockWithModRHS); - CHECK_NE(testBlockWithMod, testBlockWithModRHS); - } - - SUBCASE("Test withMod") { - BlockType testBlock(10); - BlockType testBlockRHS(10, 2); - CHECK_EQ(testBlock.with_mod(2), testBlockRHS); - } - - SUBCASE("Test print") { - BlockType testBlock(2, 3); - std::stringstream ss; - ss << testBlock; - CHECK_EQ(ss.str(), "[2, 3]"); - } -} - -// NOLINTEND diff --git a/test/minecraft_tests.cpp b/test/minecraft_tests.cpp deleted file mode 100644 index 177383c0..00000000 --- a/test/minecraft_tests.cpp +++ /dev/null @@ -1,467 +0,0 @@ -#include "../include/mcpp/mcpp.h" -#include "../src/connection.h" -#include "doctest.h" - -// NOLINTBEGIN - -using namespace std::string_literals; -using namespace mcpp; - -// You may need to set the address to your $(hostname).local if running on WSL2. -SocketConnection tcp_conn("localhost", mcpp::MCPP_PORT); -MinecraftConnection mc; - -/* - * All tests require a running instance of Spigot server with the ELCI Legacy - * plugin in order to run successfully. This requirement stems from the fact - * that it's a pain in the ass to run a local TCP server just in order to test - * if the client is sending across a string successfully, and would probably - * require either writing or importing that TCP server from somewhere and - * writing around it in a way that does not block code execution when waiting - * for a connection. - */ - -// Run test_suite profile to perform tests in this file. -TEST_CASE("Socket connection test") { - SUBCASE("Test send") { - // More or less manual test case used more so to check for errors - // sending - tcp_conn.send("chat.post(test string)\n"); - } - - SUBCASE("Test receive") { - tcp_conn.send("world.setBlock(100,100,100,30)\n"); - tcp_conn.send("world.getBlock(100,100,100)\n"); - std::string return_str = tcp_conn.recv(); - CHECK_EQ(return_str, "30"); - tcp_conn.send("world.setBlock(100,100,100,0)\n"); - } - - SUBCASE("Repeated receive") { - tcp_conn.send("world.setBlock(100,100,100,29)\n"); - tcp_conn.send("world.getBlock(100,100,100)\n"); - std::string return_str = tcp_conn.recv(); - CHECK_EQ(return_str, "29"); - tcp_conn.send("world.setBlock(100,100,100,0)\n"); - } - - SUBCASE("Send command") { tcp_conn.send_command("chat.post", "test message"); } - - SUBCASE("Send receive command") { - tcp_conn.send_command("world.setBlock", 100, 100, 100, 26); - auto result = tcp_conn.send_receive_command("world.getBlock", 100, 100, 100); - CHECK_EQ(result, "26"); - - tcp_conn.send_command("world.setBlock", 100, 100, 100, 25); - result = tcp_conn.send_receive_command("world.getBlock", 100, 100, 100); - CHECK_EQ(result, "25"); - tcp_conn.send_command("world.setBlock", 100, 100, 100, 0); - } - - // TODO: This is no longer the same size for whatever reason. Please fix or - // figure out - /* - * Validates non-existence of a rare bug where specific response sizes - * would hang execution. - */ - // - // SUBCASE("Test receive when response size is divisible by buffer size") { - // // Assuming buffer size is 1024 bytes - // int expected_size = 4096; - // - // int x1 = 0, y1 = 0, z1 = 0; - // int x2 = 31, y2 = 100, z2 = 31; - // - // tcp_conn.sendCommand("world.setBlocks", x1, y1, z1, x2, y2, z2, - // Blocks::DIRT.id, Blocks::DIRT.mod); - // std::string result = - // tcp_conn.sendReceiveCommand("world.getHeights", x1, z1, x2, z2); - // int real_size = result.size(); - // - // // -1 because newline is removed - // CHECK_EQ(real_size, expected_size - 1); - // - // // Cleanup - // tcp_conn.sendCommand("world.setBlocks", x1, y1, z1, x2, y2, z2, - // Blocks::AIR.id, Blocks::AIR.mod); - // } - - SUBCASE("Check fail condition") { - CHECK_THROWS(tcp_conn.send_receive_command("failCommand", "")); - } -} - -TEST_CASE("Test the main mcpp class") { - Coordinate test_loc(100, 100, 100); - - SUBCASE("postToChat") { mc.postToChat("test string"); } - - SUBCASE("setBlock") { mc.setBlock(test_loc, BlockType(50)); } - - SUBCASE("getBlock") { - mc.setBlock(test_loc, BlockType(34)); - CHECK_EQ(mc.getBlock(test_loc), BlockType(34)); - } - - // Using values from the Blocks struct in block.h beyond this point - SUBCASE("getBlock with mod") { - mc.setBlock(test_loc, BlockType(5, 5)); - CHECK_EQ(mc.getBlock(test_loc), BlockType(5, 5)); - - mc.setBlock(test_loc, Blocks::LIGHT_BLUE_CONCRETE); - CHECK_EQ(mc.getBlock(test_loc), Blocks::LIGHT_BLUE_CONCRETE); - } - - SUBCASE("getHeight") { - Coordinate heightTestLoc(300, 200, 300); - mc.setBlock(heightTestLoc, Blocks::DIRT); - auto height = mc.getHeight(heightTestLoc); - CHECK_EQ(height, heightTestLoc.y); - - // Clean up - mc.setBlock(heightTestLoc, Blocks::AIR); - } - - SUBCASE("setBlocks") { - Coordinate loc1{100, 100, 100}; - Coordinate loc2{110, 110, 110}; - mc.setBlocks(loc1, loc2, Blocks::STONE); - } -} - -TEST_CASE("getBlocks and Chunk operations") { - - // Setup - Coordinate test_loc(100, 100, 100); - Coordinate loc1{100, 100, 100}; - Coordinate loc2{110, 111, 112}; - - // Reset blocks that existed before - mc.setBlocks(loc1, loc2, Blocks::AIR); - mc.setBlocks(loc1, loc2, Blocks::BRICKS); - mc.setBlock(loc1, Blocks::GOLD_BLOCK); - mc.setBlock(loc2, Blocks::DIAMOND_BLOCK); - mc.setBlock(loc1 + Coordinate{1, 2, 3}, Blocks::IRON_BLOCK); - Chunk res = mc.getBlocks(loc1, loc2); - const Chunk res_const = mc.getBlocks(loc1, loc2); - - SUBCASE("getters") { - Chunk data = mc.getBlocks(loc1, loc2); - - CHECK_EQ(data.base_pt(), loc1); - CHECK_EQ(data.x_len(), 11); - CHECK_EQ(data.y_len(), 12); - CHECK_EQ(data.z_len(), 13); - - data = mc.getBlocks(loc2, loc1); - - CHECK_EQ(data.base_pt(), loc1); - CHECK_EQ(data.x_len(), 11); - CHECK_EQ(data.y_len(), 12); - CHECK_EQ(data.z_len(), 13); - } - - SUBCASE("Block accessing returns correct block using get()") { - CHECK_EQ(res.get(0, 0, 0), Blocks::GOLD_BLOCK); - CHECK_EQ(res.get(1, 1, 1), Blocks::BRICKS); - CHECK_EQ(res.get(1, 2, 3), Blocks::IRON_BLOCK); - CHECK_EQ(res.get(10, 11, 12), Blocks::DIAMOND_BLOCK); - } - - SUBCASE("Block accessing returns correct block using get_worldspace()") { - CHECK_EQ(res.get_worldspace(loc1), Blocks::GOLD_BLOCK); - CHECK_EQ(res.get_worldspace(loc1 + Coordinate{1, 1, 1}), Blocks::BRICKS); - CHECK_EQ(res.get_worldspace(loc1 + Coordinate{1, 2, 3}), Blocks::IRON_BLOCK); - CHECK_EQ(res.get_worldspace(loc2), Blocks::DIAMOND_BLOCK); - } - - SUBCASE("Access out of bounds correctly throws") { - CHECK_THROWS(res.get(11, 0, 0)); - CHECK_THROWS(res.get(0, 12, 0)); - CHECK_THROWS(res.get(0, 0, 13)); - CHECK_THROWS(res.get(-1, 0, 0)); - CHECK_THROWS(res.get(0, -1, 0)); - CHECK_THROWS(res.get(0, 0, -1)); - CHECK_THROWS(res.get_worldspace(loc1 + Coordinate{-1, -1, -1})); - CHECK_THROWS(res.get_worldspace(loc1 + Coordinate{11, 12, 13})); - } - - SUBCASE("Iterator") { - std::vector blocks; - for (int i = 0; i < res.y_len(); i++) { - for (int j = 0; j < res.x_len(); j++) { - for (int z = 0; z < res.z_len(); z++) { - blocks.push_back(res.get(j, i, z)); - } - } - } - - std::vector expected_blocks; - for (BlockType block : res) { - expected_blocks.push_back(block); - } - CHECK_EQ(blocks, expected_blocks); - } - - SUBCASE("Const iterator") { - std::vector blocks; - for (int i = 0; i < res_const.y_len(); i++) { - for (int j = 0; j < res_const.x_len(); j++) { - for (int z = 0; z < res_const.z_len(); z++) { - blocks.push_back(res_const.get(j, i, z)); - } - } - } - - std::vector expected_blocks; - for (BlockType block : res_const) { - expected_blocks.push_back(block); - } - CHECK_EQ(blocks, expected_blocks); - } - - SUBCASE("Constructors & assignment") { - // Copy assignment - mc.setBlock({10, 10, 10}, Blocks::BLUE_CONCRETE); - auto chunk = mc.getBlocks({10, 10, 10}, {20, 20, 20}); - Chunk chunk_copy = chunk; // Contains BLUE - CHECK_EQ(chunk.get(0, 0, 0), chunk_copy.get(0, 0, 0)); - - // Reassignment - mc.setBlock({10, 10, 10}, Blocks::RED_CONCRETE); - chunk = mc.getBlocks({10, 10, 10}, {20, 20, 20}); // Now contains RED - CHECK_NE(chunk.get(0, 0, 0), chunk_copy.get(0, 0, 0)); - - // Move assignment - chunk = std::move(chunk_copy); // Now contains BLUE - CHECK_EQ(chunk.get(0, 0, 0), Blocks::BLUE_CONCRETE); - - // Copy constructor - auto chunk_copy2 = Chunk(chunk); // Contains BLUE - mc.setBlock({10, 10, 10}, Blocks::WHITE_CONCRETE); - chunk = mc.getBlocks({10, 10, 10}, {20, 20, 20}); // Now contains WHITE - CHECK_NE(chunk_copy2.get(0, 0, 0), Blocks::WHITE_CONCRETE); - - // Move constructor - chunk = Chunk(std::move(chunk_copy2)); // Now contains BLUE - CHECK_EQ(chunk.get(0, 0, 0), Blocks::BLUE_CONCRETE); - } - - mc.setBlock(test_loc, BlockType(0)); -} - -TEST_CASE("Test blocks struct") { - Coordinate testLoc; - mc.setBlock(testLoc, Blocks::AIR); - CHECK_EQ(mc.getBlock(testLoc), Blocks::AIR); - mc.setBlock(testLoc, Blocks::STONE); - CHECK_EQ(mc.getBlock(testLoc), Blocks::STONE); -} - -TEST_CASE("HeightMap functionality") { - // 319 is the build limit in 1.19 - mc.setBlocks(Coordinate{200, 300, 200}, Coordinate{210, 319, 210}, Blocks::AIR); - mc.setBlocks(Coordinate{200, 300, 200}, Coordinate{210, 300, 210}, Blocks::STONE); - mc.setBlock(Coordinate{200, 301, 200}, Blocks::STONE); - mc.setBlock(Coordinate{210, 301, 210}, Blocks::STONE); - mc.setBlock(Coordinate{201, 301, 202}, Blocks::STONE); - - SUBCASE("getters") { - HeightMap data = mc.getHeights(Coordinate{200, 0, 200}, Coordinate{210, 0, 210}); - - CHECK_EQ(data.base_pt(), Coordinate{200, 0, 200}); - CHECK_EQ(data.x_len(), 11); - CHECK_EQ(data.z_len(), 11); - - data = mc.getHeights(Coordinate{210, 300, 210}, Coordinate{200, 310, 200}); - - CHECK_EQ(data.base_pt(), Coordinate{200, 0, 200}); - CHECK_EQ(data.x_len(), 11); - CHECK_EQ(data.z_len(), 11); - } - - SUBCASE("get") { - HeightMap data = mc.getHeights(Coordinate{200, 0, 200}, Coordinate{210, 0, 210}); - CHECK_EQ(data.get(0, 0), 301); - CHECK_EQ(data.get(1, 1), 300); - CHECK_EQ(data.get(10, 10), 301); - CHECK_EQ(data.get(1, 2), 301); - } - - SUBCASE("get_worldspace") { - HeightMap data = mc.getHeights(Coordinate{200, 0, 200}, Coordinate{210, 0, 210}); - CHECK_EQ(data.get_worldspace(Coordinate{200, 0, 200}), 301); - CHECK_EQ(data.get_worldspace(Coordinate{201, 0, 201}), 300); - CHECK_EQ(data.get_worldspace(Coordinate{210, 0, 210}), 301); - CHECK_EQ(data.get_worldspace(Coordinate{201, 0, 202}), 301); - } - - SUBCASE("fill_coord") { - HeightMap data = mc.getHeights(Coordinate{200, 0, 200}, Coordinate{210, 0, 210}); - - Coordinate to_fill{200, 0, 200}; - data.fill_coord(to_fill); - CHECK_EQ(to_fill.y, 301); - } - - SUBCASE("Bounds checking") { - HeightMap data = mc.getHeights(Coordinate{200, 0, 200}, Coordinate{210, 0, 210}); - CHECK_THROWS(data.get(-1, 0)); - CHECK_THROWS(data.get(0, -1)); - CHECK_THROWS(data.get(11, 0)); - CHECK_THROWS(data.get(0, 11)); - - CHECK_THROWS(data.get_worldspace(Coordinate{199, 0, 200})); - CHECK_THROWS(data.get_worldspace(Coordinate{200, 0, 199})); - CHECK_THROWS(data.get_worldspace(Coordinate{211, 0, 200})); - CHECK_THROWS(data.get_worldspace(Coordinate{200, 0, 211})); - - Coordinate to_fill{199, 0, 211}; - CHECK_THROWS(data.fill_coord(to_fill)); - } - - SUBCASE("Negative coord") { - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 319, -210}, Blocks::AIR); - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 300, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-200, 301, -200}, Blocks::STONE); - mc.setBlock(Coordinate{-210, 301, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-201, 301, -202}, Blocks::STONE); - - HeightMap data = mc.getHeights(Coordinate{-200, 0, -200}, Coordinate{-210, 0, -210}); - CHECK_EQ(data.get_worldspace(Coordinate{-200, 0, -200}), 301); - CHECK_EQ(data.get_worldspace(Coordinate{-201, 0, -201}), 300); - CHECK_EQ(data.get_worldspace(Coordinate{-210, 0, -210}), 301); - CHECK_EQ(data.get_worldspace(Coordinate{-201, 0, -202}), 301); - } - - SUBCASE("Iterator") { - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 319, -210}, Blocks::AIR); - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 300, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-200, 301, -200}, Blocks::STONE); - mc.setBlock(Coordinate{-210, 301, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-201, 301, -202}, Blocks::STONE); - - HeightMap data = mc.getHeights(Coordinate{-200, 0, -200}, Coordinate{-210, 0, -210}); - - std::vector expected_heights; - for (int i = 0; i < data.x_len(); i++) { - for (int j = 0; j < data.z_len(); j++) { - expected_heights.push_back(data.get(i, j)); - } - } - - std::vector heights; - for (int height : data) { - heights.push_back(height); - } - CHECK_EQ(heights, expected_heights); - } - - SUBCASE("Const iterator") { - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 319, -210}, Blocks::AIR); - mc.setBlocks(Coordinate{-200, 300, -200}, Coordinate{-210, 300, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-200, 301, -200}, Blocks::STONE); - mc.setBlock(Coordinate{-210, 301, -210}, Blocks::STONE); - mc.setBlock(Coordinate{-201, 301, -202}, Blocks::STONE); - - const HeightMap data = mc.getHeights(Coordinate{-200, 0, -200}, Coordinate{-210, 0, -210}); - - std::vector expected_heights; - for (int i = 0; i < data.x_len(); i++) { - for (int j = 0; j < data.z_len(); j++) { - expected_heights.push_back(data.get(i, j)); - } - } - - std::vector heights; - for (int height : data) { - heights.push_back(height); - } - CHECK_EQ(heights, expected_heights); - } - - SUBCASE("Constructors & assignment") { - // Copy assignment - mc.setBlocks({10, 310, 10}, {20, 320, 20}, Blocks::AIR); - mc.setBlocks({10, 310, 10}, {20, 310, 20}, Blocks::STONE); - auto map = mc.getHeights({10, 10}, {20, 20}); - HeightMap map_copy = map; // Contains 310 - CHECK_EQ(map.get(0, 0), map_copy.get(0, 0)); - CHECK_EQ(map.get(0, 0), 310); - - // Reassignment - mc.setBlock({10, 311, 10}, Blocks::STONE); - map = mc.getHeights({10, 10}, {20, 20}); // Now contains 311 - CHECK_NE(map.get(0, 0), map_copy.get(0, 0)); - CHECK_EQ(map.get(0, 0), 311); - - // Move assignment - map = std::move(map_copy); // Now contains 310 - CHECK_EQ(map.get(0, 0), 310); - - // Copy constructor - auto map_copy2 = HeightMap(map); // Contains 310 - mc.setBlock({10, 312, 10}, Blocks::STONE); - map = mc.getHeights({10, 10}, {20, 20}); // Now contains 312 - CHECK_NE(map_copy2.get(0, 0), 312); - CHECK_EQ(map.get(0, 0), 312); - - // Move constructor - map = HeightMap(std::move(map_copy2)); // Now contains 310 - CHECK_EQ(map.get(0, 0), 310); - - mc.setBlocks({10, 310, 10}, {20, 320, 20}, Blocks::AIR); - } - - // Clean up - mc.setBlocks(Coordinate{200, 300, 200}, Coordinate{210, 301, 210}, Blocks::AIR); -} - -// Requires player joined to server, will throw serverside if player is not -// joined -#ifdef PLAYER_TEST - -TEST_CASE("Player operations") { - Coordinate test_loc{110, 110, 110}; - mc.setBlock(test_loc, Blocks::DIRT); - - SUBCASE("Execute command") { mc.doCommand("time set noon"); } - - SUBCASE("Set position") { mc.setPlayerPosition(test_loc + Coordinate(0, 1, 0)); } - - SUBCASE("Get position") { - mc.setPlayerPosition(Coordinate(0, 0, 0)); - mc.setPlayerPosition(test_loc + Coordinate(0, 1, 0)); - Coordinate player_loc = mc.getPlayerPosition(); - CHECK((player_loc == (test_loc + Coordinate(0, 1, 0)))); - } - - SUBCASE("Check correct flooring") { - Coordinate negative_loc(-2, 100, -2); - mc.doCommand("tp -2 100 -2"); - CHECK_EQ(mc.getPlayerPosition(), negative_loc); - } - - SUBCASE("setPlayerTilePosition and getPlayerTilePosition") { - mc.setPlayerPosition(Coordinate(0, 0, 0)); - - mc.setPlayerTilePosition(test_loc); - - Coordinate result = mc.getPlayerTilePosition(); - Coordinate expected = test_loc; - - CHECK_EQ(result, expected); - - Coordinate p_result = mc.getPlayerPosition(); - Coordinate p_expected = test_loc + Coordinate(0, 1, 0); - - CHECK_EQ(p_result, p_expected); - } - - // Cleanup - mc.setBlock(test_loc, Blocks::AIR); -} - -#endif - -// NOLINTEND diff --git a/toggle-alternative-theme.js b/toggle-alternative-theme.js new file mode 100644 index 00000000..57f74050 --- /dev/null +++ b/toggle-alternative-theme.js @@ -0,0 +1,12 @@ + +let original_theme_active = true; + +function toggle_alternative_theme() { + if(original_theme_active) { + document.documentElement.classList.add("alternative") + original_theme_active = false; + } else { + document.documentElement.classList.remove("alternative") + original_theme_active = true; + } +} \ No newline at end of file