diff --git a/.github/workflows/nightly_test_manual.yml b/.github/workflows/nightly_test_manual.yml
index 5bf32327050..0ad4ce31e52 100644
--- a/.github/workflows/nightly_test_manual.yml
+++ b/.github/workflows/nightly_test_manual.yml
@@ -112,4 +112,5 @@ jobs:
name: nightly_test_results
path: |
vtr_flow/**/*.log
+ vtr_flow/**/vpr.out
vtr_flow/**/parse_results*.txt
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 5977e1221ba..fc80c9d523e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -99,7 +99,26 @@ jobs:
run: ./dev/${{ matrix.script }}
- UniTests:
+ VerifyTestSuites:
+ runs-on: ubuntu-24.04
+ name: 'Verify Test Suites'
+ steps:
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: 3.12.3
+
+ - uses: actions/checkout@v4
+ # NOTE: We do not need sub-modules. This only verifies the tests, does not run them.
+
+ - name: 'Run test suite verification'
+ run: |
+ ./dev/vtr_test_suite_verifier/verify_test_suites.py \
+ -vtr_regression_tests_dir vtr_flow/tasks/regression_tests \
+ -test_suite_info dev/vtr_test_suite_verifier/test_suites_info.json
+
+
+ UnitTests:
name: 'U: C++ Unit Tests'
runs-on: ubuntu-24.04
steps:
@@ -125,36 +144,90 @@ jobs:
run: ./.github/scripts/unittest.sh
- Warnings:
- name: 'W: Check Compilation Warnings'
+ # This test builds different variations of VTR (with different CMake Params)
+ # and ensures that they can run the basic regression tests. This also ensures
+ # that these build variations are warning clean.
+ BuildVariations:
runs-on: ubuntu-24.04
+ name: 'B: Build Variations'
+ env:
+ # For the CI, we want all build variations to be warning clean.
+ # NOTE: Need to turn IPO off due to false warnings being produced.
+ COMMON_CMAKE_PARAMS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off'
steps:
- uses: actions/setup-python@v5
with:
python-version: 3.12.3
+
- uses: actions/checkout@v4
with:
submodules: 'true'
- - name: Get number of CPU cores
+ - name: 'Get number of CPU cores'
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- - name: Install dependencies
+ - name: 'Install dependencies'
run: ./.github/scripts/install_dependencies.sh
- - uses: hendrikmuhs/ccache-action@v1.2
+ - name: 'ccache'
+ uses: hendrikmuhs/ccache-action@v1.2
- - name: Test
+ - name: 'Test with VTR_ASSERT_LEVEL 4'
+ if: success() || failure()
env:
- #In order to get compilation warnings produced per source file, we must do a non-IPO build
- #We also turn warnings into errors for this target by doing a strict compile
- CMAKE_PARAMS: "-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_STRICT_COMPILE=on -DVTR_IPO_BUILD=off"
+ CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ASSERT_LEVEL=4"
NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
run: |
+ rm -f build/CMakeCache.txt
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- ./.github/scripts/build.sh
+ make -j${{ steps.cpu-cores.outputs.count}}
+ ./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
+
+ - name: 'Test with NO_GRAPHICS'
+ if: success() || failure()
+ env:
+ CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_EZGL=off"
+ NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
+ run: |
+ rm -f build/CMakeCache.txt
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ make -j${{ steps.cpu-cores.outputs.count}}
+ ./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
+
+ - name: 'Test with NO_SERVER'
+ if: success() || failure()
+ env:
+ CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_USE_SERVER=off"
+ NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
+ run: |
+ rm -f build/CMakeCache.txt
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ make -j${{ steps.cpu-cores.outputs.count}}
+ ./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
+
+ - name: 'Test with CAPNPROTO disabled'
+ if: success() || failure()
+ env:
+ CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVTR_ENABLE_CAPNPROTO=off"
+ NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
+ run: |
+ rm -f build/CMakeCache.txt
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ make -j${{ steps.cpu-cores.outputs.count}}
+ ./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
+
+ - name: 'Test with serial VPR_EXECUTION_ENGINE'
+ if: success() || failure()
+ env:
+ CMAKE_PARAMS: "${{ env.COMMON_CMAKE_PARAMS }} -DVPR_EXECUTION_ENGINE=serial -DTATUM_EXECUTION_ENGINE=serial"
+ NUM_PROC: ${{ steps.cpu-cores.outputs.count }}
+ run: |
+ rm -f build/CMakeCache.txt
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ make -j${{ steps.cpu-cores.outputs.count}}
+ ./run_reg_test.py vtr_reg_basic -show_failures -j${{ steps.cpu-cores.outputs.count}}
Regression:
@@ -169,36 +242,12 @@ jobs:
suite: 'vtr_reg_basic',
extra_pkgs: ""
},
- {
- name: 'Basic with highest assertion level',
- params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=4 -DWITH_BLIFEXPLORER=on',
- suite: 'vtr_reg_basic',
- extra_pkgs: ""
- },
{
name: 'Basic_odin',
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DWITH_PARMYS=OFF -DWITH_ODIN=on',
suite: 'vtr_reg_basic_odin',
extra_pkgs: ""
},
- {
- name: 'Basic with NO_GRAPHICS',
- params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
- suite: 'vtr_reg_basic',
- extra_pkgs: ""
- },
- {
- name: 'Basic with NO_SERVER',
- params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
- suite: 'vtr_reg_basic',
- extra_pkgs: ""
- },
- {
- name: 'Basic with CAPNPROTO disabled',
- params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',
- suite: 'vtr_reg_basic',
- extra_pkgs: ""
- },
{
name: 'Basic with VTR_ENABLE_DEBUG_LOGGING',
params: '-DCMAKE_COMPILE_WARNING_AS_ERROR=on -DVTR_IPO_BUILD=off -DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_DEBUG_LOGGING=on',
@@ -510,8 +559,9 @@ jobs:
needs:
- Build
- Format
- - UniTests
- - Warnings
+ - VerifyTestSuites
+ - UnitTests
+ - BuildVariations
- Regression
- Sanitized
- Parmys
diff --git a/.gitmodules b/.gitmodules
index 8a35f2bff8c..90a89248c2a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,3 +6,7 @@
[submodule "libs/EXTERNAL/sockpp"]
path = libs/EXTERNAL/sockpp
url = https://github.com/w0lek/sockpp.git
+
+[submodule "libs/EXTERNAL/libezgl"]
+ path = libs/EXTERNAL/libezgl
+ url = https://github.com/verilog-to-routing/ezgl.git
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index 884a834f088..a0652f749e0 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -19,6 +19,10 @@ build:
tools:
python: "3.11"
+submodules:
+ include: all
+
python:
install:
- requirements: doc/requirements.txt
+ - requirements: requirements.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99a3ffa33ef..34504cd898f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,6 @@ set_property(CACHE VTR_IPO_BUILD PROPERTY STRINGS auto on off)
set(VTR_ASSERT_LEVEL "2" CACHE STRING "VTR assertion checking level. 0: no assertions, 1: fast assertions, 2: regular assertions, 3: additional assertions with noticeable run-time overhead, 4: all assertions (including those with significant run-time cost)")
set_property(CACHE VTR_ASSERT_LEVEL PROPERTY STRINGS 0 1 2 3 4)
-option(VTR_ENABLE_STRICT_COMPILE "Specifies whether compiler warnings should be treated as errors (e.g. -Werror)" OFF)
option(VTR_ENABLE_SANITIZE "Enable address/leak/undefined-behaviour sanitizers (i.e. run-time error checking)" OFF)
option(VTR_ENABLE_PROFILING "Enable performance profiler (gprof)" OFF)
option(VTR_ENABLE_COVERAGE "Enable code coverage tracking (gcov)" OFF)
diff --git a/Makefile b/Makefile
index 109288f0344..78b5257dc0f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-#This is a simple wrapper which hides cmake (for convenience, and from non-expert end users).
+# This is a simple wrapper which hides cmake (for convenience, and from non-expert end users).
#
# It supports the targets:
# 'make' - builds everything (all libaries/executables)
@@ -15,12 +15,14 @@
#
# 'make BUILD_TYPE=debug VERBOSE=1'
-#Default build type
-# Possible values:
-# release_pgo #Perform a 2-stage build with profile-guided compiler optimization
-# release #Build with compiler optimization
-# debug #Build with debug info and no compiler optimization
-# strict #Build VPR with warnings treated as errors
+# Build type
+# Possible values (not case sensitive):
+# release #Build with compiler optimization (Default)
+# RelWithDebInfo #Build with debug info and compiler optimizations
+# debug #Build with debug info and no compiler optimization
+# Possible suffixes:
+# _pgo #Perform a 2-stage build with profile-guided compiler optimization
+# _strict #Build VPR with warnings treated as errors
BUILD_TYPE ?= release
#Debugging verbosity enable
@@ -40,7 +42,7 @@ override CMAKE_PARAMS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -G 'Unix Makefil
#Are we doing a strict (i.e. warnings as errors) build?
ifneq (,$(findstring strict,$(BUILD_TYPE)))
#Configure for strict build with VPR warning treated as errors
-override CMAKE_PARAMS := -DVTR_ENABLE_STRICT_COMPILE=on ${CMAKE_PARAMS}
+override CMAKE_PARAMS := -DCMAKE_COMPILE_WARNING_AS_ERROR=on ${CMAKE_PARAMS}
endif #Strict build type
#Enable verbosity
diff --git a/README.developers.md b/README.developers.md
index 4c05edfedca..d2d0d37af39 100644
--- a/README.developers.md
+++ b/README.developers.md
@@ -1131,11 +1131,17 @@ All tests passed (1 assertion in 1 test case)
VTR has support for several additional tools/features to aid debugging.
## Basic
-To build vpr with make in debug mode, simply add `BUILD_TYPE=debug` at the end of your make command.
+To build a tool with make in debug mode, simply add `BUILD_TYPE=debug` at the end of your make command. For example, to build all tools in debug mode use:
```shell
-$ make vpr BUILD_TYPE=debug
+$ make BUILD_TYPE=debug
```
+You can also enable additional (verbose) output from some tools. To build vpr with both debug information and additional output, use:
+```shell
+$ make vpr BUILD_TYPE=debug VERBOSE=1
+```
+
+
## Sanitizers
VTR can be compiled using *sanitizers* which will detect invalid memory accesses, memory leaks and undefined behaviour (supported by both GCC and LLVM):
```shell
diff --git a/dev/subtree_config.xml b/dev/subtree_config.xml
index d2e97bcbd9e..07357619081 100644
--- a/dev/subtree_config.xml
+++ b/dev/subtree_config.xml
@@ -24,11 +24,6 @@
internal_path="libs/EXTERNAL/libtatum"
external_url="https://github.com/verilog-to-routing/tatum.git"
default_external_ref="master"/>
-
List[TestSuite]:
+ """
+ Parses the given test_suite_info file. The test suite info file is expected
+ to be a JSON file which contains information on which test suites in the
+ regression tests to verify and if any of the tasks should be ignored.
+
+ The JSON should have the following form:
+ {"test_suites": [
+ {
+ "name": "",
+ "ignored_tasks": [
+ "",
+ ...
+ ]
+ },
+ {
+ ...
+ }
+ ]}
+ """
+ with open(test_suite_info_file, "r") as file:
+ data = json.load(file)
+
+ assert isinstance(data, dict), "Test suite info should be a dictionary"
+ assert "test_suites" in data, "A list of test suites must be provided"
+
+ test_suites = []
+ for test_suite in data["test_suites"]:
+ assert isinstance(test_suite, dict), "Test suite should be a dictionary"
+ assert "name" in test_suite, "All test suites must have names"
+ assert "ignored_tasks" in test_suite, "All test suite must have an ignored task list"
+
+ test_suites.append(
+ TestSuite(
+ name=test_suite["name"],
+ ignored_tasks=test_suite["ignored_tasks"],
+ )
+ )
+
+ return test_suites
+
+
+def parse_task_list(task_list_file: str) -> Set[str]:
+ """
+ Parses the given task_list file and returns a list of the tasks within
+ the task list.
+ """
+ tasks = set()
+ with open(task_list_file, "r") as file:
+ for line in file:
+ # Strip the whitespace from the line.
+ line.strip()
+ # If this is a comment line, skip it.
+ if line[0] == "#":
+ continue
+ # Split the line. This is used in case there is a comment on the line.
+ split_line = line.split()
+ if split_line:
+ # If the line can be split (i.e. the line is not empty), add
+ # the first part of the line to the tasks list, stripping any
+ # trailing "/" characters.
+ tasks.add(split_line[0].rstrip("/"))
+
+ return tasks
+
+
+def get_expected_task_list(test_suite_dir: str, reg_tests_parent_dir: str) -> Set[str]:
+ """
+ Get the expected task list by parsing the test suite directory and finding
+ all files that look like config files.
+ """
+ # Get all config files in the test suite. These will indicated where all
+ # the tasks are in the suite.
+ base_path = Path(test_suite_dir)
+ assert base_path.is_dir()
+ config_files = list(base_path.rglob("config.txt"))
+
+ # Get a list of all the expected tasks in the task list
+ expected_task_list = set()
+ for config_file in config_files:
+ config_dir = os.path.dirname(config_file)
+ task_dir = os.path.dirname(config_dir)
+ # All tasks in the task list are relative to the parent of the regression
+ # tests directory.
+ expected_task_list.add(os.path.relpath(task_dir, reg_tests_parent_dir))
+
+ return expected_task_list
+
+
+def verify_test_suite(test_suite: TestSuite, regression_tests_dir: str):
+ """
+ Verifies the given test suite by looking into the regression tests directory
+ for the suite and ensures that all expected tasks are present in the suite's
+ task list.
+
+ Returns the number of failures found in the test suite.
+ """
+ # Check that the test suite exists in the regression tests directory
+ test_suite_dir = os.path.join(regression_tests_dir, test_suite.name)
+ if not os.path.exists(test_suite_dir):
+ print("\tError: Test suite not found in regression tests directory")
+ return 1
+
+ # Get the expected tasks list from the test suite directory.
+ reg_tests_parent_dir = os.path.dirname(regression_tests_dir.rstrip("/"))
+ expected_task_list = get_expected_task_list(test_suite_dir, reg_tests_parent_dir)
+
+ # Get the task list file from the test suite and parse it to get the actual
+ # task list.
+ task_list_file = os.path.join(test_suite_dir, "task_list.txt")
+ if not os.path.exists(task_list_file):
+ print("\tError: Test suite does not have a root-level task list")
+ return 1
+ actual_task_list = parse_task_list(task_list_file)
+
+ # Keep track of the number of failures
+ num_failures = 0
+
+ # Process the ignored tests
+ ignored_tasks = set()
+ for ignored_task in test_suite.ignored_tasks:
+ # Ignored tasks are relative to the test directory, get their full path.
+ ignored_task_path = os.path.join(test_suite_dir, ignored_task)
+ # Check that the task exists.
+ if not os.path.exists(ignored_task_path):
+ print(f"\tError: Ignored task '{ignored_task}' not found in test suite")
+ num_failures += 1
+ continue
+ # If the task exists, add it to the ignored tasks list relative to the
+ # reg test's parent directory so it can be compared properly.
+ ignored_tasks.add(os.path.relpath(ignored_task_path, reg_tests_parent_dir))
+
+ if len(ignored_tasks) > 0:
+ print(f"\tWarning: {len(ignored_tasks)} tasks were ignored")
+
+ # Check for any missing tasks in the task list
+ for task in expected_task_list:
+ # If this task is ignored, it is expected to be missing.
+ if task in ignored_tasks:
+ continue
+ # If the task is not in the actual task list, this is an error.
+ if task not in actual_task_list:
+ print(f"\tError: Failed to find task '{task}' in task list!")
+ num_failures += 1
+
+ # Check for any tasks in the task list which should not be there
+ for task in actual_task_list:
+ # If a task is in the task list, but is not in the test directory, this
+ # is a failure.
+ if task not in expected_task_list:
+ print(f"\tError: Task '{task}' found in task list but not in test directory")
+ num_failures += 1
+ # If a task is in the task list, but is marked as ignored, this must be
+ # a mistake.
+ if task in ignored_tasks:
+ print(f"\tError: Task '{task}' found in task list but was marked as ignored")
+
+ return num_failures
+
+
+def verify_test_suites():
+ """
+ Verify the VTR test suites.
+
+ Test suites are verified by checking the tasks within their test directory
+ and the tasks within the task list at the root of that directory and ensuring
+ that they match. If there are any tasks which appear in one but not the other,
+ an error is produced and this script will return an error code.
+ """
+ # Set up the argument parser object.
+ parser = argparse.ArgumentParser(description="Verifies the test suites used in VTR.")
+ parser.add_argument(
+ "-vtr_regression_tests_dir",
+ type=str,
+ required=True,
+ help="The path to the vtr_flow/tasks/regression_tests directory in VTR.",
+ )
+ parser.add_argument(
+ "-test_suite_info",
+ type=str,
+ required=True,
+ help="Information on the test suite (must be a JSON file).",
+ )
+
+ # Parse the arguments from the command line.
+ args = parser.parse_args()
+
+ # Verify each of the test suites.
+ num_failures = 0
+ test_suites = parse_test_suite_info(args.test_suite_info)
+ for test_suite in test_suites:
+ print(f"Verifying test suite: {test_suite.name}")
+ test_suite_failures = verify_test_suite(test_suite, args.vtr_regression_tests_dir)
+ print(f"\tTest suite had {test_suite_failures} failures\n")
+ num_failures += test_suite_failures
+
+ # If any failures were found in any suite, return exit code 1.
+ if num_failures != 0:
+ print(f"Failure: Test suite verifcation failed with {num_failures} failures")
+ print(f"Please fix the failing test suites found in {args.vtr_regression_tests_dir}")
+ print(f"If necessary, update the test suites info found here: {args.test_suite_info}")
+ sys.exit(1)
+
+ print(f"Success: All test suites in {args.test_suite_info} passed")
+
+
+if __name__ == "__main__":
+ verify_test_suites()
diff --git a/doc/_doxygen/ezgl.dox b/doc/_doxygen/ezgl.dox
new file mode 100644
index 00000000000..b0d39c4bce9
--- /dev/null
+++ b/doc/_doxygen/ezgl.dox
@@ -0,0 +1,13 @@
+PROJECT_NAME = "Verilog to Routing - EZGL"
+OUTPUT_DIRECTORY = ../_build/doxygen/ezgl
+FULL_PATH_NAMES = NO
+OPTIMIZE_OUTPUT_FOR_C = YES
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = YES
+EXTRACT_STATIC = YES
+WARN_IF_UNDOCUMENTED = NO
+INPUT = ../../libs/EXTERNAL/libezgl
+RECURSIVE = YES
+GENERATE_HTML = NO
+GENERATE_LATEX = NO
+GENERATE_XML = YES
diff --git a/doc/src/api/ezgl/application.rst b/doc/src/api/ezgl/application.rst
new file mode 100644
index 00000000000..cd1ef7a223a
--- /dev/null
+++ b/doc/src/api/ezgl/application.rst
@@ -0,0 +1,6 @@
+===========
+Application
+===========
+
+.. doxygenfile:: application.hpp
+ :project: ezgl
diff --git a/doc/src/api/ezgl/callback.rst b/doc/src/api/ezgl/callback.rst
new file mode 100644
index 00000000000..73b9b53692d
--- /dev/null
+++ b/doc/src/api/ezgl/callback.rst
@@ -0,0 +1,56 @@
+=========
+Callbacks
+=========
+
+This module provides callback functions for handling keyboard and mouse input, as well as predefined button actions in EZGL applications.
+
+Input Event Callbacks
+--------------------
+
+.. doxygenfunction:: press_key
+ :project: ezgl
+
+.. doxygenfunction:: press_mouse
+ :project: ezgl
+
+.. doxygenfunction:: release_mouse
+ :project: ezgl
+
+.. doxygenfunction:: move_mouse
+ :project: ezgl
+
+.. doxygenfunction:: scroll_mouse
+ :project: ezgl
+
+Button Action Callbacks
+----------------------
+
+.. doxygenfunction:: press_zoom_fit
+ :project: ezgl
+
+.. doxygenfunction:: press_zoom_in
+ :project: ezgl
+
+.. doxygenfunction:: press_zoom_out
+ :project: ezgl
+
+Navigation Callbacks
+------------------
+
+.. doxygenfunction:: press_up
+ :project: ezgl
+
+.. doxygenfunction:: press_down
+ :project: ezgl
+
+.. doxygenfunction:: press_left
+ :project: ezgl
+
+.. doxygenfunction:: press_right
+ :project: ezgl
+
+Other Callbacks
+-------------
+
+.. doxygenfunction:: press_proceed
+ :project: ezgl
\ No newline at end of file
diff --git a/doc/src/api/ezgl/camera.rst b/doc/src/api/ezgl/camera.rst
new file mode 100644
index 00000000000..9a7b7b9108f
--- /dev/null
+++ b/doc/src/api/ezgl/camera.rst
@@ -0,0 +1,5 @@
+======
+Camera
+======
+.. doxygenfile:: camera.hpp
+ :project: ezgl
diff --git a/doc/src/api/ezgl/canvas.rst b/doc/src/api/ezgl/canvas.rst
new file mode 100644
index 00000000000..a19065e7497
--- /dev/null
+++ b/doc/src/api/ezgl/canvas.rst
@@ -0,0 +1,5 @@
+======
+Canvas
+======
+.. doxygenfile:: canvas.hpp
+ :project: ezgl
diff --git a/doc/src/api/ezgl/color.rst b/doc/src/api/ezgl/color.rst
new file mode 100644
index 00000000000..ebb245e8639
--- /dev/null
+++ b/doc/src/api/ezgl/color.rst
@@ -0,0 +1,5 @@
+=====
+Color
+=====
+.. doxygenfile:: color.hpp
+ :project: ezgl
diff --git a/doc/src/api/ezgl/control.rst b/doc/src/api/ezgl/control.rst
new file mode 100644
index 00000000000..5c8d6cce10e
--- /dev/null
+++ b/doc/src/api/ezgl/control.rst
@@ -0,0 +1,41 @@
+=======
+Control
+=======
+
+Functions to manipulate what is visible on the EZGL canvas. These functions are used by EZGL's predefined buttons, but application code can also call them directly when needed.
+
+Zoom Functions
+-------------
+
+.. doxygenfunction:: ezgl::zoom_in(canvas*, double)
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::zoom_out(canvas*, double)
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::zoom_in(canvas*, point2d, double)
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::zoom_out(canvas*, point2d, double)
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::zoom_fit
+ :project: ezgl
+
+Translation Functions
+--------------------
+
+.. doxygenfunction:: ezgl::translate
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::translate_up
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::translate_down
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::translate_left
+ :project: ezgl
+
+.. doxygenfunction:: ezgl::translate_right
+ :project: ezgl
\ No newline at end of file
diff --git a/doc/src/api/ezgl/graphics.rst b/doc/src/api/ezgl/graphics.rst
new file mode 100644
index 00000000000..d6425154c40
--- /dev/null
+++ b/doc/src/api/ezgl/graphics.rst
@@ -0,0 +1,5 @@
+========
+Graphics
+========
+.. doxygenfile:: graphics.hpp
+ :project: ezgl
diff --git a/doc/src/api/ezgl/index.rst b/doc/src/api/ezgl/index.rst
new file mode 100644
index 00000000000..0429b42af1d
--- /dev/null
+++ b/doc/src/api/ezgl/index.rst
@@ -0,0 +1,20 @@
+.. _ezgl:
+
+====
+EZGL
+====
+
+EZGL is a graphics layer on top of version 3.x of the GTK graphics library. It allows drawing in an arbitrary 2D world coordinate space (instead of in pixel coordinates), handles panning and zooming automatically, and provides easy-to-use functions for common tasks like setting up a window, setting graphics attributes (like colour and line style) and drawing primitives (like lines and polygons). Most of VPR's drawing is performed in ezgl, and GTK functionality not exposed by ezgl can still be accessed by directly calling the relevant gtk functions.
+
+.. toctree::
+ :maxdepth: 1
+
+ application
+ callback
+ camera
+ canvas
+ color
+ control
+ graphics
+ point
+ rectangle
\ No newline at end of file
diff --git a/doc/src/api/ezgl/point.rst b/doc/src/api/ezgl/point.rst
new file mode 100644
index 00000000000..d335dc3873b
--- /dev/null
+++ b/doc/src/api/ezgl/point.rst
@@ -0,0 +1,6 @@
+=====
+Point
+=====
+.. doxygenfile:: point.hpp
+ :project: ezgl
+
diff --git a/doc/src/api/ezgl/rectangle.rst b/doc/src/api/ezgl/rectangle.rst
new file mode 100644
index 00000000000..0a62cdb542e
--- /dev/null
+++ b/doc/src/api/ezgl/rectangle.rst
@@ -0,0 +1,5 @@
+=========
+Rectangle
+=========
+.. doxygenfile:: rectangle.hpp
+ :project: ezgl
diff --git a/doc/src/conf.py b/doc/src/conf.py
index fe2fc79f5b1..7e3a421f7f7 100644
--- a/doc/src/conf.py
+++ b/doc/src/conf.py
@@ -155,6 +155,7 @@
"odin_ii": "../_build/doxygen/odin_ii/xml",
"blifexplorer": "../_build/doxygen/blifexplorer/xml",
"librrgraph": "../_build/doxygen/librrgraph/xml",
+ "ezgl": "../_build/doxygen/ezgl/xml",
}
breathe_default_project = "vpr"
diff --git a/doc/src/index.rst b/doc/src/index.rst
index a7881f79a8d..378e46af087 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -62,6 +62,7 @@ For more specific documentation about VPR see :ref:`vpr`.
api/vpr/index
api/vtrutil/index
+ api/ezgl/index
api/vprinternals/index
Indices and tables
diff --git a/doc/src/tutorials/timing_analysis/index.rst b/doc/src/tutorials/timing_analysis/index.rst
index 6f93faa4c0e..20c6e2aef67 100644
--- a/doc/src/tutorials/timing_analysis/index.rst
+++ b/doc/src/tutorials/timing_analysis/index.rst
@@ -6,6 +6,8 @@ Post-Implementation Timing Analysis
This tutorial describes how to perform static timing analysis (STA) on a circuit which has
been implemented by :ref:`VPR` using OpenSTA, an external timing analysis tool.
+A video of this tutorial can be found here: https://youtu.be/yihFJc7WOfE
+
External timing analysis can be useful since VPR's timing analyzer (Tatum) does
not support all timing constraints and does not provide a TCL interface to allow
you to directly interrogate the timing graph. VPR also has limited support for
diff --git a/doc/src/vpr/command_line_usage.rst b/doc/src/vpr/command_line_usage.rst
index c420ef40f80..916a7986cd2 100644
--- a/doc/src/vpr/command_line_usage.rst
+++ b/doc/src/vpr/command_line_usage.rst
@@ -416,9 +416,14 @@ Use the options below to override this default naming behaviour.
.. option:: --write_placement_delay_lookup
Writes the placement delay lookup to the specified file. Expects a file extension of either ``.capnp`` or ``.bin``.
+
+.. option:: --read_initial_place_file
+
+ Reads in the initial cluster-level placement (in :ref:`.place file format `) from the specified file and uses it as the starting point for annealing improvement, instead of generating an initial placement internally.
+
.. option:: --write_initial_place_file
- Writes out the the placement chosen by the initial placement algorithm to the specified file.
+ Writes out the clustered netlist placement chosen by the initial placement algorithm to the specified file, in :ref:`.place file format `.
.. option:: --outfile_prefix
@@ -838,9 +843,9 @@ If any of init_t, exit_t or alpha_t is specified, the user schedule, with a fixe
Controls how the placer handles blocks (of any type) during placement.
- * ````: A path to a file listing the desired location of blocks in the netlist.
+ * ````: A path to a file listing the desired location of clustered blocks in the netlist.
- This place location file is in the same format as a :ref:`normal placement file `, but does not require the first two lines which are normally at the top of a placement file that specify the netlist file, netlist ID, and array size.
+ This place location file is in the same format as a :ref:`.place file `, but does not require the first two lines which are normally at the top of a placement file that specify the netlist file, netlist ID, and array size.
**Default:** ````.
@@ -1336,6 +1341,15 @@ Analytical Placement is generally split into three stages:
**Default:** ``1``
+.. option:: --ap_generate_mass_report {on | off}
+
+ Controls whether to generate a report on how the partial legalizer
+ within the AP flow calculates the mass of primitives and the
+ capacity of tiles on the device. This report is useful when
+ debugging the partial legalizer.
+
+ **Default:** ``off``
+
.. _router_options:
@@ -2222,6 +2236,16 @@ The following options are used to enable server mode in VPR.
.. seealso:: :ref:`interactive_path_analysis_client`
+
+Show Architecture Resources
+^^^^^^^^^^^^^^^^^^^^^^^^
+.. option:: --show_arch_resources
+
+ Print the architecture resource report for each device layout and exit normally.
+
+ **Default:** ``off``
+
+
Command-line Auto Completion
----------------------------
diff --git a/libs/EXTERNAL/libcatch2 b/libs/EXTERNAL/libcatch2
index 76f70b1403d..74fcff6e5b1 160000
--- a/libs/EXTERNAL/libcatch2
+++ b/libs/EXTERNAL/libcatch2
@@ -1 +1 @@
-Subproject commit 76f70b1403dbc0781216f49e20e45b71f7eccdd8
+Subproject commit 74fcff6e5b190fb833a231b7f7c1829e3c3ac54d
diff --git a/libs/EXTERNAL/libezgl b/libs/EXTERNAL/libezgl
new file mode 160000
index 00000000000..b6beef98a3e
--- /dev/null
+++ b/libs/EXTERNAL/libezgl
@@ -0,0 +1 @@
+Subproject commit b6beef98a3e51907c66fa6c7cc74933fb91faa6c
diff --git a/libs/EXTERNAL/libezgl/.clang-format b/libs/EXTERNAL/libezgl/.clang-format
deleted file mode 100644
index 86a33c1358e..00000000000
--- a/libs/EXTERNAL/libezgl/.clang-format
+++ /dev/null
@@ -1,38 +0,0 @@
----
-AccessModifierOffset: '-2'
-AlignAfterOpenBracket: DontAlign
-AlignConsecutiveAssignments: 'false'
-AlignConsecutiveDeclarations: 'false'
-AlignEscapedNewlinesLeft: 'true'
-AlignOperands: 'true'
-AlignTrailingComments: 'true'
-AllowAllParametersOfDeclarationOnNextLine: 'false'
-AllowShortBlocksOnASingleLine: 'false'
-AllowShortFunctionsOnASingleLine: None
-AllowShortIfStatementsOnASingleLine: 'false'
-AllowShortLoopsOnASingleLine: 'false'
-AlwaysBreakAfterReturnType: None
-AlwaysBreakTemplateDeclarations: 'true'
-BinPackArguments: 'true'
-BinPackParameters: 'false'
-BreakBeforeBraces: WebKit
-BreakConstructorInitializersBeforeComma: 'true'
-ColumnLimit: '100'
-ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
-Cpp11BracedListStyle: 'true'
-ExperimentalAutoDetectBinPacking: 'false'
-IndentWidth: '2'
-Language: Cpp
-NamespaceIndentation: None
-ReflowComments: 'false'
-SortIncludes: 'false'
-SpaceBeforeParens: Never
-SpaceInEmptyParentheses: 'false'
-SpacesBeforeTrailingComments: '1'
-SpacesInAngles: 'false'
-SpacesInSquareBrackets: 'false'
-Standard: Cpp11
-TabWidth: '2'
-UseTab: Never
-
-...
diff --git a/libs/EXTERNAL/libezgl/.gitignore b/libs/EXTERNAL/libezgl/.gitignore
deleted file mode 100644
index f3c566480eb..00000000000
--- a/libs/EXTERNAL/libezgl/.gitignore
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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
-
-# Build Directories
-cmake-build*
-
-# Vim
-.swp
-
-# IDE Files and Folders
-.idea
diff --git a/libs/EXTERNAL/libezgl/CMakeLists.txt b/libs/EXTERNAL/libezgl/CMakeLists.txt
deleted file mode 100644
index d63d2cca64c..00000000000
--- a/libs/EXTERNAL/libezgl/CMakeLists.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
-
-# create the project
-project(
- ezgl
- VERSION 1.0.1
- LANGUAGES CXX
-)
-
-# we rely on GTK3 for the GUI, so make sure the system has it
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(GTK3 QUIET gtk+-3.0)
-pkg_check_modules(X11 QUIET x11)
-
-if(NOT GTK3_FOUND)
- message(WARNING "EZGL: Failed to find required GTK3 library (on debian/ubuntu try 'sudo apt-get install libgtk-3-dev' to install)")
-endif()
-
-# we also rely on glib to compile the GTK resource files
-# a set of macros has been developed by Makman2 on GitHub to help with this
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gcr-cmake/macros)
-
-#Is ezgl the root cmake project?
-set(IS_ROOT_PROJECT TRUE)
-if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
- set(IS_ROOT_PROJECT FALSE)
-endif()
-
-# include the configuration/compile time options for this library
-include(options.cmake)
-
-# create a library that can be linked by executables
-add_library(
- ${PROJECT_NAME}
- include/ezgl/application.hpp
- include/ezgl/camera.hpp
- include/ezgl/canvas.hpp
- include/ezgl/color.hpp
- include/ezgl/control.hpp
- include/ezgl/callback.hpp
- include/ezgl/graphics.hpp
- include/ezgl/point.hpp
- include/ezgl/rectangle.hpp
- src/application.cpp
- src/camera.cpp
- src/canvas.cpp
- src/control.cpp
- src/callback.cpp
- src/graphics.cpp
-)
-
-target_include_directories(
- ${PROJECT_NAME}
- PUBLIC include
-)
-
-#Treat GTK/X11 headers as system headers so they
-#do not generate compilation warnings
-target_include_directories(
- ${PROJECT_NAME}
- SYSTEM
- PUBLIC ${GTK3_INCLUDE_DIRS}
- PUBLIC ${X11_INCLUDE_DIRS}
-)
-
-target_link_libraries(
- ${PROJECT_NAME}
- PUBLIC ${GTK3_LIBRARIES}
- PUBLIC ${X11_LIBRARIES}
-)
-
-# add_compile_options does not seem to be working on the UG machines,
-# and we cannot set target properties in version 3.0.2
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-
-if(EZGL_BUILD_EXAMPLES)
- add_subdirectory(examples)
-endif()
-
-if(EZGL_BUILD_DOCS)
- add_subdirectory(doc)
-endif()
diff --git a/libs/EXTERNAL/libezgl/LICENSE b/libs/EXTERNAL/libezgl/LICENSE
deleted file mode 100644
index 8dada3edaf5..00000000000
--- a/libs/EXTERNAL/libezgl/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/libs/EXTERNAL/libezgl/README.adoc b/libs/EXTERNAL/libezgl/README.adoc
deleted file mode 100644
index 836033efe83..00000000000
--- a/libs/EXTERNAL/libezgl/README.adoc
+++ /dev/null
@@ -1,38 +0,0 @@
-= EZGL - An Easy Graphics Library
-
-image:https://codedocs.xyz/mariobadr/ezgl.svg[link="https://codedocs.xyz/mariobadr/ezgl"]
-
-EZGL is a library for use in ece297 as a simple way to create a GUI application.
-The library provides a thin wrapper around GTK and drawing functionality.
-
-== Dependencies
-
-The library currently depends on GTK 3 and cairo.
-
-== Compilation
-
-This project uses CMake for compiling and works with CMake version 3.0.2 (the version available on the UG machines).
-CMake can configure the project for different build systems and IDEs (type `cmake --help` for a list of generators available for your platform).
-We recommend you create a build directory before invoking CMake to configure the project (`cmake -B`).
-For example, we can perform the configuration step from the project root directory:
-
- cmake -H. -Bcmake-build-release -DCMAKE_BUILD_TYPE=Release
- cmake -H. -Bcmake-build-debug -DCMAKE_BUILD_TYPE=Debug
-
-After the configuration step, you can ask CMake to build the project.
-
- cmake --build cmake-build-release/ --target all
- cmake --build cmake-build-debug/ --target all
-
-=== Build Options
-
-Build options can be found in `options.cmake`.
-Simply specify the build option during the configuration step in CMake.
-Using the already generated `cmake-build-release` directory from the previous section, we can:
-
- cmake -H. -Bcmake-build-release -DEZGL_BUILD_EXAMPLES=ON
-
-Your IDE or Makefile should now include additional targets when you turn these options on.
-For example, enabling `EZGL_BUILD_EXAMPLES` should provide access to the `basic-application` target, which you can build:
-
- cmake --build cmake-build-release/ --target basic-application
diff --git a/libs/EXTERNAL/libezgl/doc/CMakeLists.txt b/libs/EXTERNAL/libezgl/doc/CMakeLists.txt
deleted file mode 100644
index d56545e6c90..00000000000
--- a/libs/EXTERNAL/libezgl/doc/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-find_package(Doxygen)
-
-if(NOT DOXYGEN_FOUND)
- message(FATAL_ERROR "Doxygen is needed to build the documentation.")
-endif()
-
-set(DOXYFILE_IN Doxyfile.in)
-set(DOXYFILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
-
-configure_file(${DOXYFILE_IN} ${DOXYFILE} @ONLY)
-
-# add a target to generate API documentation with Doxygen
-add_custom_target(
- doc
- COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Generating API documentation with Doxygen"
- VERBATIM
-)
diff --git a/libs/EXTERNAL/libezgl/doc/Doxyfile.in b/libs/EXTERNAL/libezgl/doc/Doxyfile.in
deleted file mode 100644
index 8365d2ba95a..00000000000
--- a/libs/EXTERNAL/libezgl/doc/Doxyfile.in
+++ /dev/null
@@ -1,2291 +0,0 @@
-# Doxyfile 1.8.6
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME = "@PROJECT_NAME@"
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER = "@ezgl_VERSION@"
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer a
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF = "An Easy Graphics & GUI Library"
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
-# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
-# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
-# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
-# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
-# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
-# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
-# Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = YES
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = NO
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
-# grouped member an include statement to the documentation, telling the reader
-# which file to include in order to use the member.
-# The default value is: NO.
-
-SHOW_GROUPED_MEMB_INC = NO
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
-# this will also influence the order of the classes in the class list.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if ... \endif and \cond
-# ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = "@PROJECT_SOURCE_DIR@/include" "@PROJECT_SOURCE_DIR@/examples"
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.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, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS =
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-#
-#
-# where is the value of the INPUT_FILTER tag, and is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER =
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use + S
-# (what the is depends on the OS and browser, but it is typically
-# , /, or both). Inside the search box use the to jump into the search results window, the results can be navigated
-# using the . Press to select an item or to cancel
-# the search. The filter options can be selected when the cursor is inside the
-# search box by pressing +. Also here use the
-# to select a filter and or to activate or cancel the filter
-# option.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-SEARCHENGINE = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
-# are two flavours of web server based searching depending on the
-# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
-# searching and an index file used by the script. When EXTERNAL_SEARCH is
-# enabled the indexing and searching needs to be provided by external tools. See
-# the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SERVER_BASED_SEARCH = NO
-
-# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
-# script for searching. Instead the search results are written to an XML file
-# which needs to be processed by an external indexer. Doxygen will invoke an
-# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
-# search results.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
-#
-# See the section "External Indexing and Searching" for details.
-# The default value is: NO.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH = NO
-
-# The SEARCHENGINE_URL should point to a search engine hosted by a web server
-# which will return the search results when EXTERNAL_SEARCH is enabled.
-#
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
-# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHENGINE_URL =
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
-# search data is written to a file for indexing by an external tool. With the
-# SEARCHDATA_FILE tag the name of this file can be specified.
-# The default file is: searchdata.xml.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-SEARCHDATA_FILE = searchdata.xml
-
-# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
-# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
-# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
-# projects and redirect the results back to the right project.
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTERNAL_SEARCH_ID =
-
-# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
-# projects other than the one defined by this configuration file, but that are
-# all added to the same external search index. Each project needs to have a
-# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
-# to a relative location where the documentation can be found. The format is:
-# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
-# This tag requires that the tag SEARCHENGINE is set to YES.
-
-EXTRA_SEARCH_MAPPINGS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
-# The default value is: YES.
-
-GENERATE_LATEX = YES
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked.
-#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
-# index for LaTeX.
-# The default file is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used by the
-# printer.
-# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
-# 14 inches) and executive (7.25 x 10.5 inches).
-# The default value is: a4.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PAPER_TYPE = a4
-
-# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
-# If left blank no extra packages will be included.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
-# generated LaTeX document. The header should contain everything until the first
-# chapter. If it is left blank doxygen will generate a standard header. See
-# section "Doxygen usage" for information on how to let doxygen write the
-# default header to a separate file.
-#
-# Note: Only use a user-defined header if you know what you are doing! The
-# following commands have a special meaning inside the header: $title,
-# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
-# replace them by respectively the title of the page, the current date and time,
-# only the current date, the version number of doxygen, the project name (see
-# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HEADER =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
-# generated LaTeX document. The footer should contain everything after the last
-# chapter. If it is left blank doxygen will generate a standard footer.
-#
-# Note: Only use a user-defined footer if you know what you are doing!
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_FOOTER =
-
-# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the LATEX_OUTPUT output
-# directory. Note that the files will be copied as-is; there are no commands or
-# markers available.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EXTRA_FILES =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
-# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
-# contain links (just like the HTML output) instead of page references. This
-# makes the output suitable for online browsing using a PDF viewer.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-PDF_HYPERLINKS = YES
-
-# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
-# higher quality PDF documentation.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help. This option is also used
-# when generating formulas in HTML.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BATCHMODE = NO
-
-# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
-# index chapters (such as File Index, Compound Index, etc.) in the output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_HIDE_INDICES = NO
-
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
-# The default value is: plain.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_BIB_STYLE = plain
-
-#---------------------------------------------------------------------------
-# Configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
-# RTF output is optimized for Word 97 and may not look too pretty with other RTF
-# readers/editors.
-# The default value is: NO.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: rtf.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
-# documents. This may be useful for small projects and may help to save some
-# trees in general.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
-# contain hyperlink fields. The RTF file will contain links (just like the HTML
-# output) instead of page references. This makes the output suitable for online
-# browsing using Word or some other Word compatible readers that support those
-# fields.
-#
-# Note: WordPad (write) and others do not support links.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
-#
-# See also section "Doxygen usage" for information on how to generate the
-# default style sheet that doxygen normally uses.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
-# classes and files.
-# The default value is: NO.
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it. A directory man3 will be created inside the directory specified by
-# MAN_OUTPUT.
-# The default directory is: man.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to the generated
-# man pages. In case the manual section does not start with a number, the number
-# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
-# optional.
-# The default value is: .3.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
-# will generate one additional man file for each entity documented in the real
-# man page(s). These additional files only source the real man page, but without
-# them the man command would be unable to find the correct page.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_MAN is set to YES.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
-# captures the structure of the code including all documentation.
-# The default value is: NO.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: xml.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_OUTPUT = xml
-
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
-# listings (including syntax highlighting and cross-referencing information) to
-# the XML output. Note that enabling this will significantly increase the size
-# of the XML output.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to the DOCBOOK output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
-# that can be used to generate PDF.
-# The default value is: NO.
-
-GENERATE_DOCBOOK = NO
-
-# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
-# front of it.
-# The default directory is: docbook.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_OUTPUT = docbook
-
-#---------------------------------------------------------------------------
-# Configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# Configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
-# file that captures the structure of the code including all documentation.
-#
-# Note that this feature is still experimental and incomplete at the moment.
-# The default value is: NO.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
-# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
-# output from the Perl module output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
-# formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
-# size of the Perl module output will be much smaller and Perl will parse it
-# just the same.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file are
-# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
-# so different doxyrules.make files included by the same Makefile don't
-# overwrite each other's variables.
-# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
-# C-preprocessor directives found in the sources and include files.
-# The default value is: YES.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
-# performed. Macro expansion can be done in a controlled way by setting
-# EXPAND_ONLY_PREDEF to YES.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
-# the macro expansion is limited to the macros specified with the PREDEFINED and
-# EXPAND_AS_DEFINED tags.
-# The default value is: NO.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
-# INCLUDE_PATH will be searched if a #include is found.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by the
-# preprocessor.
-# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will be
-# used.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that are
-# defined before the preprocessor is started (similar to the -D option of e.g.
-# gcc). The argument of the tag is a list of macros of the form: name or
-# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
-# is assumed. To prevent a macro definition from being undefined via #undef or
-# recursively expanded use the := operator instead of the = operator.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
-# tag can be used to specify a list of macro names that should be expanded. The
-# macro definition that is found in the sources will be used. Use the PREDEFINED
-# tag if you want to use a different macro definition that overrules the
-# definition found in the source code.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
-# remove all refrences to function-like macros that are alone on a line, have an
-# all uppercase name, and do not end with a semicolon. Such function macros are
-# typically used for boiler-plate code, and will confuse the parser if not
-# removed.
-# The default value is: YES.
-# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration options related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES tag can be used to specify one or more tag files. For each tag
-# file the location of the external documentation should be added. The format of
-# a tag file without this location is as follows:
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where loc1 and loc2 can be relative or absolute paths or URLs. See the
-# section "Linking to external documentation" for more information about the use
-# of tag files.
-# Note: Each tag file must have an unique name (where the name does NOT include
-# the path). If a tag file is not located in the directory in which doxygen is
-# run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
-# tag file that is based on the input files it reads. See section "Linking to
-# external documentation" for more information about the usage of tag files.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
-# The default value is: NO.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
-# listed.
-# The default value is: YES.
-
-EXTERNAL_GROUPS = YES
-
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
-# the related pages index. If set to NO, only the current project's pages will
-# be listed.
-# The default value is: YES.
-
-EXTERNAL_PAGES = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
-# and usage relations if the target is undocumented or is not a class.
-# The default value is: YES.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
-# Bell Labs. The other options in this section have no effect if this option is
-# set to NO
-# The default value is: NO.
-
-HAVE_DOT = NO
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
-# to run in parallel. When set to 0 doxygen will base this on the number of
-# processors available in the system. You can set it explicitly to a value
-# larger than 0 to get control over the balance between CPU load and processing
-# speed.
-# Minimum value: 0, maximum value: 32, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NUM_THREADS = 0
-
-# When you want a differently looking font n the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTNAME = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
-# each documented class showing the direct and indirect inheritance relations.
-# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
-# graph for each documented class showing the direct and indirect implementation
-# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LOOK = NO
-
-# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
-# class node. If there are many fields or methods and many nodes the graph may
-# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
-# number of items for each type to make the size more manageable. Set this to 0
-# for no limit. Note that the threshold may be exceeded by 50% before the limit
-# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
-# but if the number exceeds 15, the total amount of fields shown is limited to
-# 10.
-# Minimum value: 0, maximum value: 100, default value: 10.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-UML_LIMIT_NUM_FIELDS = 10
-
-# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
-# collaboration graphs will show the relations between templates and their
-# instances.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-TEMPLATE_RELATIONS = NO
-
-# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
-# YES then doxygen will generate a graph for each documented file showing the
-# direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDE_GRAPH = YES
-
-# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
-# set to YES then doxygen will generate a graph for each documented file showing
-# the direct and indirect include dependencies of the file with other documented
-# files.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
-# dependency graph for every global function or class method.
-#
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
-# hierarchy of all classes instead of a textual one.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
-# dependencies a directory has on other directories in a graphical way. The
-# dependency relations are determined by the #include relations between the
-# files in the directories.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
-# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
-# to make the SVG files visible in IE 9+ (other browsers do not have this
-# requirement).
-# Possible values are: png, jpg, gif and svg.
-# The default value is: png.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_IMAGE_FORMAT = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-#
-# Note that this requires a modern browser other than Internet Explorer. Tested
-# and working are Firefox, Chrome, Safari, and Opera.
-# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
-# the SVG files visible. Older versions of IE do not have SVG support.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-INTERACTIVE_SVG = NO
-
-# The DOT_PATH tag can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the \dotfile
-# command).
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOTFILE_DIRS =
-
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
-
-MSCFILE_DIRS =
-
-# The DIAFILE_DIRS tag can be used to specify one or more directories that
-# contain dia files that are included in the documentation (see the \diafile
-# command).
-
-DIAFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
-# that will be shown in the graph. If the number of nodes in a graph becomes
-# larger than this value, doxygen will truncate the graph, which is visualized
-# by representing a node as a red box. Note that doxygen if the number of direct
-# children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
-# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-# Minimum value: 0, maximum value: 10000, default value: 50.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
-# generated by dot. A depth value of 3 means that only nodes reachable from the
-# root by following a path via at most 3 edges will be shown. Nodes that lay
-# further from the root node will be omitted. Note that setting this option to 1
-# or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-# Minimum value: 0, maximum value: 1000, default value: 0.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS = YES
-
-# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
-# explaining the meaning of the various boxes and arrows in the dot generated
-# graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
-# files that are used to generate the various graphs.
-# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_CLEANUP = YES
diff --git a/libs/EXTERNAL/libezgl/examples/CMakeLists.txt b/libs/EXTERNAL/libezgl/examples/CMakeLists.txt
deleted file mode 100644
index 6df4e808022..00000000000
--- a/libs/EXTERNAL/libezgl/examples/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_subdirectory(basic-application)
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/.gresource.xml b/libs/EXTERNAL/libezgl/examples/basic-application/.gresource.xml
deleted file mode 100644
index 595bb9b4b2d..00000000000
--- a/libs/EXTERNAL/libezgl/examples/basic-application/.gresource.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- main.ui
-
-
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/CMakeLists.txt b/libs/EXTERNAL/libezgl/examples/basic-application/CMakeLists.txt
deleted file mode 100644
index a6308d9a42f..00000000000
--- a/libs/EXTERNAL/libezgl/examples/basic-application/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
-
-project(
- basic-application
- VERSION 0.0.1
- LANGUAGES CXX
-)
-
-# create the resouce list
-set(
- RESOURCE_LIST
- # Strip all the whitespace characters from ui file
- STRIPBLANKS main.ui
-)
-
-# include the macros used to generate/compile the resources
-include(GlibCompileResourcesSupport)
-
-# compile the resources---the generated files will be in the build directory
-compile_gresources(
- # input: the name of our resources
- RESOURCE_FILE
- # output: the filename of the generated XML file
- XML_OUT
- # generate C code to be compiled with our program
- TYPE
- EMBED_C
- # specify the name of the C file that is generated
- TARGET
- resources.C
- # specify the resource prefix (used in the code)
- PREFIX
- /ezgl
- # input: specify the list of files to compile into resources
- RESOURCES
- ${RESOURCE_LIST}
-)
-
-# make sure that the resources are compiled when the project is built
-add_custom_target(
- resource-basic ALL
- DEPENDS
- ${RESOURCE_FILE}
-)
-
-add_executable(
- ${PROJECT_NAME}
- basic_application.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/resources.C
-)
-
-target_link_libraries(
- ${PROJECT_NAME}
- PRIVATE ezgl
-)
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/Makefile b/libs/EXTERNAL/libezgl/examples/basic-application/Makefile
deleted file mode 100644
index 592a672e6bc..00000000000
--- a/libs/EXTERNAL/libezgl/examples/basic-application/Makefile
+++ /dev/null
@@ -1,75 +0,0 @@
-########################################################################
-## Makefile for basic_application
-########################################################################
-
-# turn on/off verbosity with 'make {all|release|debug|clean} VERBOSE=1'. Default is silent.
-ifeq ($(VERBOSE),1)
- ECHO :=
-else
- ECHO := @
-endif
-
-# the compiler
-CXX = g++
-
-# target EXE
-TARGET_DIR = .
-TARGET = basic_application
-
-# Resource files
-RES_TARGET = resources.C
-RES_XML = .gresource.xml
-
-# the version of GTK being used
-GTK_VERSION_NUM = 3.0
-
-# the base directory of EZGL
-EZGL_DIR = ../..
-
-# get the source and header files for the application and from EZGL
-SRCS = $(wildcard ./*.cpp ./$(RES_TARGET) $(EZGL_DIR)/src/*.cpp)
-HDRS = $(wildcard ./*.h $(EZGL_DIR)/include/ezgl/*.hpp)
-
-# the GTK include directories. Runs "pkg-config --cflags gtk+-3.0" to get the include directories.
-GTK_INCLUDE_DIRS := $(shell pkg-config --cflags gtk+-$(GTK_VERSION_NUM) x11)
-
-# the GTK libraries. Runs "pkg-config --libs gtk+-3.0" to get the libraries to include for GTK.
-GTK_LIBS := $(shell pkg-config --libs gtk+-$(GTK_VERSION_NUM) x11)
-
-# set the include directories
-INC_DIRS = $(EZGL_DIR)/include $(EZGL_DIR)/include/ezgl
-
-# compiler flags
-CXX_FLAGS = -g -Wall -std=c++14
-
-# GLIB resource compiler
-GLIB_COMPILE_RESOURCES = $(shell pkg-config --variable=glib_compile_resources gio-2.0)
-
-# resource files
-resources = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-dependencies $(RES_XML))
-
-# 'make all' target
-all: $(RES_TARGET) $(TARGET_DIR)/$(TARGET)
-
-# create the exe
-$(TARGET_DIR)/$(TARGET) : Makefile $(SRCS)
- $(ECHO) $(CXX) $(CXX_FLAGS) $(foreach D,$(INC_DIRS),-I$D) $(GTK_INCLUDE_DIRS) $(SRCS) $(GTK_LIBS) -o $(TARGET_DIR)/$(TARGET)
-
-# create the resource file
-$(RES_TARGET): $(RES_XML) $(resources)
- $(ECHO) $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-source $(RES_XML) --target=$(RES_TARGET)
-
-# clean the EXE
-clean:
- $(ECHO) rm -f $(TARGET_DIR)/$(TARGET)
- $(ECHO) rm -f $(RES_TARGET)
-
-# 'make release' is the same as 'make all' but the -O3 flag is added
-release: all
-CXX_FLAGS += -O3
-
-# 'make debug' is the same as 'make all'. Currently nothing is added here
-debug: all
-
-
-.PHONY: all release debug clean
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/basic_application.cpp b/libs/EXTERNAL/libezgl/examples/basic-application/basic_application.cpp
deleted file mode 100644
index c69ef6eef59..00000000000
--- a/libs/EXTERNAL/libezgl/examples/basic-application/basic_application.cpp
+++ /dev/null
@@ -1,578 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-/**
- * @file
- *
- * This example shows you how to create an application using the EZGL library.
- */
-
-#include
-#include
-#include
-#include "ezgl/application.hpp"
-#include "ezgl/graphics.hpp"
-
-// Callback functions for event handling
-void act_on_mouse_press(ezgl::application *application, GdkEventButton *event, double x, double y);
-void act_on_mouse_move(ezgl::application *application, GdkEventButton *event, double x, double y);
-void act_on_key_press(ezgl::application *application, GdkEventKey *event, char *key_name);
-void initial_setup(ezgl::application *application, bool new_window);
-void test_button(GtkWidget *widget, ezgl::application *application);
-void animate_button(GtkWidget *widget, ezgl::application *application);
-
-/**
- * Draw to the main canvas using the provided graphics object.
- *
- * The graphics object expects that x and y values will be in the main canvas' world coordinate system.
- */
-void draw_main_canvas(ezgl::renderer *g);
-
-/**
- * draw_main_canvas helper functions
- */
-void draw_rectangle_example(ezgl::renderer *g);
-void draw_arc_example(ezgl::renderer *g);
-void rotated_text_example(ezgl::renderer *g);
-void draw_poly_example(ezgl::renderer *g);
-void draw_text_example(ezgl::renderer *g);
-void draw_line_example(ezgl::renderer *g);
-void screen_coordinates_example(ezgl::renderer *g);
-void draw_png_example(ezgl::renderer *g);
-
-static ezgl::rectangle initial_world{{0, 0}, 1100, 1150};
-
-/**
- * The start point of the program.
- *
- * This function initializes an ezgl application and runs it.
- *
- * @param argc The number of arguments provided.
- * @param argv The arguments as an array of c-strings.
- *
- * @return the exit status of the application run.
- */
-int main(int /*argc*/, char **/*argv*/)
-{
- ezgl::application::settings settings;
-
- // Path to the resource that contains an XML description of the UI.
- // Note: this is not a file path, it is a resource path.
- settings.main_ui_resource = "/ezgl/main.ui";
-
- // Note: the "main.ui" file has a GtkWindow called "MainWindow".
- settings.window_identifier = "MainWindow";
-
- // Note: the "main.ui" file has a GtkDrawingArea called "MainCanvas".
- settings.canvas_identifier = "MainCanvas";
-
- // Create our EZGL application.
- ezgl::application application(settings);
-
- application.add_canvas("MainCanvas", draw_main_canvas, initial_world);
-
- // Run the application until the user quits.
- // This hands over all control to the GTK runtime---after this point
- // you will only regain control based on callbacks you have setup.
- // Three callbacks can be provided to handle mouse button presses,
- // mouse movement and keyboard button presses in the graphics area,
- // respectively. Also, an initial_setup function can be passed that will
- // be called before the activation of the application and can be used
- // to create additional buttons, initialize the status message, or
- // connect added widgets to their callback functions.
- // Those callbacks are optional, so we can pass nullptr if
- // we don't need to take any action on those events
- return application.run(initial_setup, act_on_mouse_press, act_on_mouse_move, act_on_key_press);
-}
-
-/**
- * The redrawing function for still pictures
- */
-void draw_main_canvas(ezgl::renderer *g)
-{
- // Draw some rectangles
- draw_rectangle_example(g);
-
- // Draw different arcs
- draw_arc_example(g);
-
- // Draw some rotated text
- rotated_text_example(g);
-
- // Draw different transparent and opaque polys
- draw_poly_example(g);
-
- // Draw some text with different sizes
- draw_text_example(g);
-
- // Draw wide lines with different end shapes
- draw_line_example(g);
-
- // Draw to screen coordinates
- screen_coordinates_example(g);
-
- // Draw a small png
- draw_png_example(g);
-}
-
-/**
- * Draw some rectangles with different colors
- */
-void draw_rectangle_example(ezgl::renderer *g)
-{
- const float rectangle_width = 50;
- const float rectangle_height = rectangle_width;
- const ezgl::point2d start_point(150, 30);
- ezgl::rectangle color_rectangle = {start_point, rectangle_width, rectangle_height};
-
- // Some of the available colors, a complete list is in ezgl/include/color.hpp
- ezgl::color color_indicies[] = {
- ezgl::GREY_55,
- ezgl::GREY_75,
- ezgl::WHITE,
- ezgl::BLACK,
- ezgl::BLUE,
- ezgl::GREEN,
- ezgl::YELLOW,
- ezgl::CYAN,
- ezgl::RED,
- ezgl::DARK_GREEN,
- ezgl::MAGENTA
- };
-
- // format text font and color
- g->set_color(ezgl::BLACK);
- g->format_font("monospace", ezgl::font_slant::normal, ezgl::font_weight::normal, 10);
-
- // draw text
- g->draw_text({110, color_rectangle.center_y()}, "colors", 2 * (start_point.x - 110), rectangle_height);
-
- for (size_t i = 0; i < sizeof (color_indicies) / sizeof (color_indicies[0]); ++i) {
- // Change the color of next draw calls
- g->set_color(color_indicies[i]);
-
- // Draw filled in rectangles
- g->fill_rectangle(color_rectangle);
-
- // Increment the start point
- color_rectangle += {rectangle_width, 0};
- }
-
- // Draw text
- g->draw_text({400, color_rectangle.center_y()}, "fill_rectangle", DBL_MAX, rectangle_height);
-
- /* Draw some rectangles with RGB triplet colors and alpha (transparency) */
-
- // Hack to make the colors change once per second
- std::srand(time(0));
-
- for (size_t i = 0; i < 3; ++i) {
- // Increment the start point
- color_rectangle += {rectangle_width, 0};
-
- // Change the next draw calls color. rgb and alpha values range from 0 to 255
- g->set_color(std::rand() % 256, std::rand() % 256, std::rand() % 256, 255);
-
- // Draw filled in rectangles
- g->fill_rectangle(color_rectangle);
- }
-
- /* Draw a black border rectangle */
-
- // Change the next draw calls color to black
- g->set_color(ezgl::BLACK);
-
- // Change the next draw calls line width
- g->set_line_width(1);
-
- // Draw a rectangle bordering all the drawn rectangles
- g->draw_rectangle(start_point, color_rectangle.top_right());
-}
-
-/**
- * Draw some example lines, shapes, and arcs
- */
-void draw_arc_example(ezgl::renderer *g)
-{
- float radius = 50;
-
- // Draw solid line
- g->set_color(ezgl::BLACK);
- g->draw_text({250, 150}, "draw_line", 150.0, DBL_MAX);
- g->set_line_dash(ezgl::line_dash::none);
- g->draw_line({200, 120}, {200, 200});
-
- // Draw dashed line
- g->set_line_dash(ezgl::line_dash::asymmetric_5_3);
- g->draw_line({300, 120}, {300, 200});
-
- // Draw elliptic arc
- g->set_color(ezgl::MAGENTA);
- g->draw_text({450, 160}, "draw_elliptic_arc", 150.0, DBL_MAX);
- g->draw_elliptic_arc({550, 160}, 30, 60, 90, 270);
-
- // Draw filled in elliptic arc
- g->draw_text({700, 160}, "fill_elliptic_arc", 150.0, DBL_MAX);
- g->fill_elliptic_arc({800, 160}, 30, 60, 90, 270);
-
- // Draw arcs
- g->set_color(ezgl::BLUE);
- g->draw_text({190, 300}, "draw_arc", radius * 2, 150);
- g->draw_arc({190, 300}, radius, 0, 270);
- g->draw_arc({300, 300}, radius, 0, -180);
-
- // Draw filled in arcs
- g->fill_arc({410, 300}, radius, 90, -90);
- g->fill_arc({520, 300}, radius, 0, 360);
- g->set_color(ezgl::BLACK);
- g->draw_text({520, 300}, "fill_arc", radius * 2, 150);
- g->set_color(ezgl::BLUE);
- g->fill_arc({630, 300}, radius, 90, 180);
- g->fill_arc({740, 300}, radius, 90, 270);
- g->fill_arc({850, 300}, radius, 90, 30);
-}
-
-/**
- * Draw some rotated text
- */
-void rotated_text_example(ezgl::renderer *g)
-{
- const float textsquare_width = 200;
-
- ezgl::rectangle textsquare = {{100, 400}, textsquare_width, textsquare_width};
-
- g->set_color(ezgl::BLUE);
- g->draw_rectangle(textsquare);
-
- g->set_color(ezgl::GREEN);
- g->draw_rectangle(textsquare.center(), {textsquare.right(), textsquare.top()});
- g->draw_rectangle({textsquare.left(), textsquare.bottom()}, textsquare.center());
-
- g->set_color(ezgl::RED);
- g->draw_line({textsquare.left(), textsquare.bottom()}, {textsquare.right(), textsquare.top()});
- g->draw_line({textsquare.left(), textsquare.top()}, {textsquare.right(), textsquare.bottom()});
-
- g->set_color(0, 0, 0, 100);
- g->set_font_size(14);
- g->draw_text({textsquare.center_x(), textsquare.bottom()}, "0 degrees", textsquare.width(), textsquare.height());
-
- g->set_text_rotation(90);
- g->draw_text({textsquare.right(), textsquare.center_y()}, "90 degrees", textsquare.width(), textsquare.height());
-
- g->set_text_rotation(180);
- g->draw_text({textsquare.center_x(), textsquare.top()}, "180 degrees", textsquare.width(), textsquare.height());
-
- g->set_text_rotation(270);
- g->draw_text({textsquare.left(), textsquare.center_y()}, "270 degrees", textsquare.width(), textsquare.height());
-
- g->set_text_rotation(45);
- g->draw_text(textsquare.center(), "45 degrees", textsquare.width(), textsquare.height());
-
- g->set_text_rotation(135);
- g->draw_text(textsquare.center(), "135 degrees", textsquare.width(), textsquare.height());
-
- // It is probably a good idea to set text rotation back to zero,
- g->set_text_rotation(0);
-}
-
-/**
- * Draw some Polygons
- */
-void draw_poly_example(ezgl::renderer *g)
-{
- g->set_font_size(10);
- g->set_color(ezgl::RED);
-
- // Draw a triangle
- g->fill_poly({{500, 400}, {440, 480}, {560, 480}});
-
- // Draw a 4-point polygon
- g->fill_poly({{700, 400}, {650, 480}, {750, 480}, {800, 400}});
-
- g->set_color(ezgl::BLACK);
- g->draw_text({500, 450}, "fill_poly", 80.0, DBL_MAX);
- g->draw_text({725, 440}, "fill_poly", 100.0, DBL_MAX);
-
- g->set_color(ezgl::DARK_GREEN);
- g->set_line_dash(ezgl::line_dash::none);
- ezgl::rectangle rect = {{350, 550}, {650, 670}};
- g->draw_text(rect.center(), "draw_rectangle", rect.width(), rect.height());
- g->draw_rectangle(rect);
-
- /* Draw some semi-transparent primitives */
- g->set_font_size(10);
-
- g->set_color(255, 0, 0, 255);
- g->fill_rectangle({1000, 400}, {1050, 800});
-
- g->set_color(0, 0, 255, 255);
- g->fill_rectangle({1000+50, 400}, {1050+50, 800});
-
- g->set_color(0, 255, 0, 255/2); // 50% transparent
- g->fill_rectangle({1000+25, 400-100}, {1050+25, 800-200});
-
- g->set_color(255, 100, 255, 255/2);
- g->fill_poly({{465, 380}, {400, 450}, {765, 450}, {850, 380}});
-
- g->set_color(100, 100, 255, 255/3);
- g->fill_poly({{550, 420}, {475, 500}, {875, 500}});
-
- g->set_color(ezgl::BLACK);
- g->set_text_rotation(90);
- g->draw_text({1000 - 50, 500}, "Partially transparent polys", 500, DBL_MAX);
- g->set_text_rotation(0);
-}
-
-/**
- * Draw some example text, with the bounding box functions
- */
-void draw_text_example(ezgl::renderer *g)
-{
-
- const float text_example_width = 800;
- const int num_lines = 2;
- const int max_strings_per_line = 3;
- const int num_strings_per_line[num_lines] = {3, 2};
-
- const char* const line_text[num_lines][max_strings_per_line] = {
- {
- "8 Point Text",
- "12 Point Text",
- "18 Point Text"
- },
- {
- "24 Point Text",
- "32 Point Text"
- }
- };
-
- const int text_sizes[num_lines][max_strings_per_line] = {
- {8, 12, 15},
- {24, 32}
- };
-
- g->set_color(ezgl::BLACK);
- g->set_line_dash(ezgl::line_dash::asymmetric_5_3);
-
- for (int i = 0; i < num_lines; ++i) {
- ezgl::rectangle text_bbox = {{100., 710. + i * 60.}, text_example_width / num_strings_per_line[i], 60.};
-
- for (int j = 0; j < num_strings_per_line[i]; ++j) {
- g->set_font_size(text_sizes[i][j]);
- g->draw_text(text_bbox.center(), line_text[i][j], text_bbox.width(), text_bbox.height());
- g->draw_rectangle(text_bbox);
- text_bbox = {{text_bbox.left() + text_example_width / num_strings_per_line[i], text_bbox.bottom()} , text_bbox.width(), text_bbox.height()};
- }
- }
-}
-
-/**
- * Draw wide lines with different end shapes
- */
-void draw_line_example(ezgl::renderer *g)
-{
- g->set_font_size(10);
-
- for (int i = 0; i <= 2; ++i)
- {
- double offsetY = 50*i;
-
- g->set_horiz_justification(ezgl::justification::left);
-
- if (i == 0) {
- g->set_color(ezgl::BLACK);
- g->set_line_cap(ezgl::line_cap::butt); // Butt ends
- g->set_line_dash(ezgl::line_dash::none); // Solid line
- g->draw_text({950, 920+offsetY}, "Butt ends, opaque", 400, DBL_MAX);
- }
-
- else if (i == 1) {
- g->set_color(ezgl::GREEN, 255*2/3); // Green line that is 33% transparent)
- g->set_line_cap(ezgl::line_cap::round); // Round ends
- g->set_line_dash(ezgl::line_dash::none); // Solid line
- g->draw_text({950, 920+offsetY}, "Round ends, 33% transparent", 400, DBL_MAX);
- }
-
- else {
- g->set_color(ezgl::RED, 255/3); // Red line that is 67% transparent
- g->set_line_cap(ezgl::line_cap::butt); // butt ends
- g->set_line_dash(ezgl::line_dash::asymmetric_5_3); // Dashed line
- g->draw_text({950, 920+offsetY}, "Butt ends, 67% transparent", 400, DBL_MAX);
- }
-
- g->set_horiz_justification(ezgl::justification::center);
-
- g->draw_text({200, 900+offsetY}, "Thin line (width 1)", 200, DBL_MAX);
- g->set_line_width(1);
- g->draw_line({100, 920+offsetY}, {300, 920+offsetY});
-
- g->draw_text({500, 900+offsetY}, "Width 3 Line", 200, DBL_MAX);
- g->set_line_width(3);
- g->draw_line({400, 920+offsetY}, {600, 920+offsetY});
-
- g->draw_text({800, 900+offsetY}, "Width 6 Line", 200, DBL_MAX);
- g->set_line_width(6);
- g->draw_line({700, 920+offsetY}, {900, 920+offsetY});
-
- g->set_line_width(1);
- }
-}
-
-/**
- * Draw to screen coordinates where (0,0) is the top-left corner of the window
- * These coordinates are not transformed so the object will not pan or zoom.
- */
-void screen_coordinates_example(ezgl::renderer *g)
-{
- // Set the coordinate system to SCREEN
- g->set_coordinate_system(ezgl::SCREEN);
-
- g->set_color(255, 0, 0, 255);
- g->set_line_dash(ezgl::line_dash::none);
- g->draw_rectangle({10, 10}, {100, 100});
- g->set_font_size(10);
- g->draw_text({55, 33}, "Screen coord");
- g->draw_text({55, 66}, "Fixed loc");
-
- // Set the coordinate system back to WORLD
- g->set_coordinate_system(ezgl::WORLD);
-}
-
-/**
- * Draw a small PNG
- */
-void draw_png_example(ezgl::renderer *g)
-{
- ezgl::surface *png_surface = ezgl::renderer::load_png("small_image.png");
- g->draw_surface(png_surface, {50, 200});
- ezgl::renderer::free_surface(png_surface);
- g->set_font_size(10);
- g->set_color(ezgl::BLACK);
- g->draw_text ({50, 225}, "draw_surface", 200, DBL_MAX);
-}
-
-/**
- * Function called before the activation of the application
- * Can be used to create additional buttons, initialize the status message,
- * or connect added widgets to their callback functions
- */
-void initial_setup(ezgl::application *application, bool /*new_window*/)
-{
- // Update the status bar message
- application->update_message("EZGL Application");
-
- // Create a Test button and link it with test_button callback fn.
- application->create_button("Test", 6, test_button);
-
- // Create the Animate button and link it with animate_button callback fn.
- application->create_button("Animate", 7, animate_button);
-}
-
-/**
- * Function to handle mouse press event
- * The current mouse position in the main canvas' world coordinate system is returned
- * A pointer to the application and the entire GDK event are also returned
- */
-void act_on_mouse_press(ezgl::application *application, GdkEventButton *event, double x, double y)
-{
- application->update_message("Mouse Clicked");
-
- std::cout << "User clicked the ";
-
- if (event->button == 1)
- std::cout << "left ";
- else if (event->button == 2)
- std::cout << "middle ";
- else if (event->button == 3)
- std::cout << "right ";
-
- std::cout << "mouse button at coordinates (" << x << "," << y << ") ";
-
- if ((event->state & GDK_CONTROL_MASK) && (event->state & GDK_SHIFT_MASK))
- std::cout << "with control and shift pressed ";
- else if (event->state & GDK_CONTROL_MASK)
- std::cout << "with control pressed ";
- else if (event->state & GDK_SHIFT_MASK)
- std::cout << "with shift pressed ";
-
- std::cout << std::endl;
-}
-
-/**
- * Function to handle mouse move event
- * The current mouse position in the main canvas' world coordinate system is returned
- * A pointer to the application and the entire GDK event are also returned
- */
-void act_on_mouse_move(ezgl::application */*application*/, GdkEventButton */*event*/, double x, double y)
-{
- std::cout << "Mouse move at coordinates (" << x << "," << y << ") "<< std::endl;
-}
-
-/**
- * Function to handle keyboard press event
- * The name of the key pressed is returned (0-9, a-z, A-Z, Up, Down, Left, Right, Shift_R, Control_L, space, Tab, ...)
- * A pointer to the application and the entire GDK event are also returned
- */
-void act_on_key_press(ezgl::application *application, GdkEventKey */*event*/, char *key_name)
-{
- application->update_message("Key Pressed");
-
- std::cout << key_name <<" key is pressed" << std::endl;
-}
-
-/**
- * A callback function to test the Test button
- */
-void test_button(GtkWidget */*widget*/, ezgl::application *application)
-{
- // Update the status bar message
- application->update_message("Test Button Pressed");
-
- // Redraw the main canvas
- application->refresh_drawing();
-}
-
-/**
- * A callback function to the Animate button
- */
-void animate_button(GtkWidget */*widget*/, ezgl::application *application)
-{
- // Get a renderer that can be used to draw on top of the main canvas
- ezgl::renderer *g = application->get_renderer();
-
- // Set line attributes
- g->set_line_width(2);
- g->set_color(ezgl::RED);
- g->set_line_dash(ezgl::line_dash::asymmetric_5_3);
-
- ezgl::point2d start_point = {100, 0};
-
- // Do some animation
- for (int i = 0; i < 50; i++) {
- // Draw a line
- g->draw_line(start_point, start_point + ezgl::point2d(500, 10));
- start_point += {10, 20};
-
- // Flush the drawings done by the renderer to the screen
- application->flush_drawing();
-
- // Add some delay
- std::chrono::milliseconds duration(50);
- std::this_thread::sleep_for(duration);
- }
-}
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/main.ui b/libs/EXTERNAL/libezgl/examples/basic-application/main.ui
deleted file mode 100644
index 2be2fdd0418..00000000000
--- a/libs/EXTERNAL/libezgl/examples/basic-application/main.ui
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
-
- True
- False
- EZGL Example Application
- 800
- 600
-
-
- True
- False
-
-
- True
- False
- True
- True
-
-
- 0
- 0
-
-
-
-
- True
- False
-
-
- True
- False
- True
-
-
- True
- False
- up
-
-
-
-
- 1
- 0
-
-
-
-
- True
- False
- True
-
-
- True
- False
- down
-
-
-
-
- 1
- 2
-
-
-
-
- True
- False
- True
-
-
- True
- False
- left
-
-
-
-
- 0
- 1
-
-
-
-
- True
- False
- True
-
-
- True
- False
-
-
-
-
- 2
- 1
-
-
-
-
- Zoom In
- True
- False
- True
-
-
- 0
- 3
- 3
-
-
-
-
- Zoom Out
- True
- False
- True
-
-
- 0
- 4
- 3
-
-
-
-
- Zoom Fit
- True
- False
- True
-
-
- 0
- 5
- 3
-
-
-
-
- Proceed
- True
- False
- True
-
-
- 0
- 6
- 3
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
- 0
-
-
-
-
- True
- False
- vertical
- 2
-
-
- 0
- 1
-
-
-
-
- True
- False
- vertical
-
-
- 1
- 1
-
-
-
-
-
-
-
-
-
diff --git a/libs/EXTERNAL/libezgl/examples/basic-application/small_image.png b/libs/EXTERNAL/libezgl/examples/basic-application/small_image.png
deleted file mode 100644
index 9ce5a9a7c2f..00000000000
Binary files a/libs/EXTERNAL/libezgl/examples/basic-application/small_image.png and /dev/null differ
diff --git a/libs/EXTERNAL/libezgl/examples/raw-gtk/CMakeLists.txt b/libs/EXTERNAL/libezgl/examples/raw-gtk/CMakeLists.txt
deleted file mode 100644
index 722e13d7a3e..00000000000
--- a/libs/EXTERNAL/libezgl/examples/raw-gtk/CMakeLists.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
-
-project(
- raw-gtk
- VERSION 0.0.1
- LANGUAGES CXX
-)
-
-# create the resouce list
-set(
- RESOURCE_LIST
- # Strip all the whitespace characters from ui file
- STRIPBLANKS main.ui
-)
-
-# include the macros used to generate/compile the resources
-include(GlibCompileResourcesSupport)
-
-# compile the resources---the generated files will be in the build directory
-compile_gresources(
- # input: the name of our resources
- RESOURCE_FILE
- # output: the filename of the generated XML file
- XML_OUT
- # generate C code to be compiled with our program
- TYPE
- EMBED_C
- # specify the name of the C file that is generated
- TARGET
- resources.C
- # specify the resource prefix (used in the code)
- PREFIX
- /edu/toronto/eecg/ezgl/ece297/cd000
- # input: specify the list of files to compile into resources
- RESOURCES
- ${RESOURCE_LIST}
-)
-
-# make sure that the resources are compiled when the project is built
-add_custom_target(
- resource-raw ALL
- DEPENDS
- ${RESOURCE_FILE}
-)
-
-add_executable(
- ${PROJECT_NAME}
- raw-gtk.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/resources.C
-)
-
-target_link_libraries(
- ${PROJECT_NAME}
- PRIVATE ezgl
-)
diff --git a/libs/EXTERNAL/libezgl/examples/raw-gtk/main.ui b/libs/EXTERNAL/libezgl/examples/raw-gtk/main.ui
deleted file mode 100644
index 4573bddd18c..00000000000
--- a/libs/EXTERNAL/libezgl/examples/raw-gtk/main.ui
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
- EZGL Example Application
-
-
- True
-
-
- 800
-
- 600
-
-
-
-
- True
-
-
-
-
- True
-
-
- True
- True
-
-
-
-
- Hello, World!
- False
- True
- True
- True
- False
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/libs/EXTERNAL/libezgl/examples/raw-gtk/raw-gtk.cpp b/libs/EXTERNAL/libezgl/examples/raw-gtk/raw-gtk.cpp
deleted file mode 100644
index 0c06fb74537..00000000000
--- a/libs/EXTERNAL/libezgl/examples/raw-gtk/raw-gtk.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#include
-
-#include
-
-gboolean press_key(GtkWidget *widget, GdkEventKey *event, gpointer data);
-gboolean click_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data);
-gboolean draw_canvas(GtkWidget *widget, cairo_t *cairo, gpointer data);
-
-int main(int argc, char **argv)
-{
- GtkBuilder *builder;
- GObject *window;
- GError *error = nullptr;
-
- gtk_init(&argc, &argv);
-
- /* Construct a GtkBuilder instance and load our UI description */
- builder = gtk_builder_new();
- if(gtk_builder_add_from_file(builder, "main.ui", &error) == 0) {
- g_printerr("Error loading file: %s\n", error->message);
- g_clear_error(&error);
- return 1;
- }
-
- /* Connect signal handlers to the constructed widgets. */
- window = gtk_builder_get_object(builder, "MainWindow");
- g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
-
- gtk_main();
-
- g_object_unref(builder);
-
- return 0;
-}
-
-gboolean press_key(GtkWidget *, GdkEventKey *event, gpointer)
-{
- // see: https://developer.gnome.org/gdk3/stable/gdk3-Keyboard-Handling.html
- std::cout << gdk_keyval_name(event->keyval) << " was pressed.\n";
-
- return FALSE; // propagate the event
-}
-
-gboolean click_mouse(GtkWidget *, GdkEventButton *event, gpointer)
-{
- if(event->type == GDK_BUTTON_PRESS) {
- std::cout << "User clicked mouse at " << event->x << ", " << event->y << "\n";
- } else if(event->type == GDK_BUTTON_RELEASE) {
- std::cout << "User released mouse button at " << event->x << ", " << event->y << "\n";
- }
-
- return TRUE; // consume the event
-}
-
-gboolean draw_canvas(GtkWidget *, cairo_t *cairo, gpointer)
-{
- return FALSE; // propagate event
-}
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/LICENSE b/libs/EXTERNAL/libezgl/gcr-cmake/LICENSE
deleted file mode 100644
index 6b156fe1db9..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/LICENSE
+++ /dev/null
@@ -1,675 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- {project} Copyright (C) {year} {fullname}
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
- .
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
-
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/README.md b/libs/EXTERNAL/libezgl/gcr-cmake/README.md
deleted file mode 100644
index b79e4658c1f..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/README.md
+++ /dev/null
@@ -1,266 +0,0 @@
-# GCR_CMake
-A CMake extension supporting the **glib-compile-resources** tool.
-
-About
------
-
-Inspired from the macros for Vala that I used to build a GTK application, I came
-to the point where I needed resources for it. For that purpose the
-**glib-compile-resources** tool seemed to be the right choice, but the extra XML
-file you need to write bothered me. If I add a resource I don't want to mark it
-explicitly in CMake and in the XML file. So I came up with this macro that does
-everything for you. You just add your resource to a resource list (with
-eventually some attributes like compression) and invoke the resource compilation
-function. It generates the XML automatically for you. Quite simple, isn't it?
-
-Clone
------
-
-To clone this repository, just type
-
-```shell
-git clone https://github.com/Makman2/GCR_CMake
-```
-
-Usage
------
-
-Just add the macro directory to your `CMAKE_MODULE_PATH`, include the CMake
-file and you are ready to go.
-
-```cmake
-list(APPEND CMAKE_MODULE_PATH
- ${PATH_TO_GCR_CMAKE_PARENT_DIR}/GCR_CMake/macros)
-
-include(GlibCompileResourcesSupport)
-```
-
-Reference
----------
-
-The resource compiling macro is quite powerful and handles as much errors as
-possible to make error-finding easier. The function is defined as follows:
-
-```
-compile_gresources(
-
- [TYPE output_type]
- [TARGET output_name]
- [RESOURCES [resources...]]
- [OPTIONS [command_line_options...]]
- [PREFIX resource_prefix]
- [C_PREFIX c_names_prefix]
- [SOURCE_DIR resource_directory]
- [COMPRESS_ALL] [NO_COMPRESS_ALL]
- [STRIPBLANKS_ALL] [NO_STRIPBLANKS_ALL]
- [TOPIXDATA_ALL] [NO_TOPIXDATA_ALL])
-```
-
-- ***output***
-
- The variable name where to set the output file names. Pass this variable to a
- target as a dependency (i.e. `add_custom_target`).
-
-- ***xml_out***
-
- The variable name where to store the output file name of the intermediately
- generated gresource-XML-file.
-
-- **TYPE** ***output_type***
-
- The resource type to generate. Valid values are `EMBED_C`, `EMBED_H`, `BUNDLE`
- or `AUTO`. Anything else will default to `AUTO`.
-
- - `EMBED_C`: Generate a C code file that can be compiled with your program.
-
- - `EMBED_H`: Generate a header file to include in your program.
-
- - `BUNDLE`: Generates a resource disk file to load at runtime.
-
- - `AUTO` (or anything else): Extract mode from file ending specified in
- `TARGET`.
-
- If `TARGET` contains
- an invalid file or file ending not detectable, the function results in a
- **FATAL_ERROR**.
-
- Recognized file formats are: *.gresource*, *.c*, *.h*.
-
-- **TARGET** ***output_name***
-
- Overrides the default output file name. If not specified (and not
- `AUTO`-**TYPE** is set) the output name is *resources.[type-ending]*.
-
-- **RESOURCES** ***[resources...]***
-
- The resource list to process. Each resource must be a relative path inside the
- source directory. Each file can be preceded with resource flags.
-
- - `COMPRESS` flag
-
- Compress the following file. Effectively sets the attribute *compressed* in
- the XML file to true.
-
- - `STRIPBLANKS` flag
-
- Strip whitespace characters in XML files. Sets the *preprocess* attribute in
- XML with *xml-stripblanks* (requires XMLLint).
-
- - `TOPIXDATA` flag
-
- Generates a pixdata ready to use in Gdk. Sets the *preprocess* attribute in
- XML with *to-pixdata*.
-
- Note: Using `STRIPBLANKS` and `TOPIXDATA` together results in a
- **FATAL_ERROR**.
-
-- **OPTIONS** ***command_line_options***
-
- Extra command line arguments passed to **glib_compile_resources**. For example
- `--internal` or `--manual-register`.
-
-- **PREFIX** ***resource_prefix***
-
- Overrides the resource prefix. The resource entries get inside the XML a
- prefix that is prepended to each resource file and represents as a whole the
- resource path.
-
-- **C_PREFIX** ***c_names_prefix***
-
- Specifies the prefix used for the C identifiers in the code generated when
- *EMBED_C* or *EMBED_H* are specified for *TYPE*.
-
-- **SOURCE_DIR** ***resource_directory***
-
- The source directory where the resource files are. If not overridden, this
- value is set to `CMAKE_CURRENT_SOURCE_DIR`.
-
-- **COMPRESS_ALL**, **NO_COMPRESS_ALL**
-
- Overrides the `COMPRESS` flag in all resources. If **COMPRESS_ALL** is
- specified, `COMPRESS` is set everywhere regardless of the specified resource
- flags. If **NO_COMPRESS_ALL** is specified, compression is deactivated in all
- resources.
-
- Specifying **COMPRESS_ALL** and **NO_COMPRESS_ALL** together results in a
- **FATAL_ERROR**.
-
-- **STRIPBLANKS_ALL**, **NO_STRIPBLANKS_ALL**
-
- Overrides the `STRIPBLANKS` flag in all resources. If **STRIPBLANKS_ALL** is
- specified, `STRIPBLANKS` is set everywhere regardless of the specified
- resource flags. If **NO_STRIPBLANKS_ALL** is specified, stripping away
- whitespaces is deactivated in all resources.
-
- Specifying **STRIPBLANKS_ALL** and **NO_STRIPBLANKS_ALL** together results in
- a **FATAL_ERROR**.
-
-- **TOPIXDATA_ALL**, **NO_TOPIXDATA_ALL**
-
- Overrides the `TOPIXDATA` flag in all resources. If **TOPIXDATA_ALL** is
- specified, `TOPIXDATA` is set everywhere regardless of the specified resource
- flags. If **NO_TOPIXDATA_ALL** is specified, converting into pixbufs is
- deactivated in all resources.
-
- Specifying **TOPIXDATA_ALL** and **NO_TOPIXDATA_ALL** together results in a
- **FATAL_ERROR**.
-
-Kickstart
----------
-
-This is a quick start guide to provide you an easy start with this macro.
-
-Starting with a simple example:
-
-```cmake
-set(RESOURCE_LIST
- info.txt
- img/image1.jpg
- img/image2.jpg
- data.xml)
-
-compile_gresources(RESOURCE_FILE
- XML_OUT
- TYPE BUNDLE
- RESOURCES ${RESOURCE_LIST})
-```
-
-What does this snippet do? First it sets some resource files to pack into a
-resource file. They are located in the source directory passed to CMake at
-invocation (`CMAKE_CURENT_SOURCE_DIR`).
-After that we compile the resources. Means we generate a *.gresource.xml*-file
-(it's path is put inside the `XML_OUT` variable) automatically from our
-`RESOURCE_LIST` and create a custom command that compiles the generated
-*.gresource.xml*-file with the provided resources into a resource bundle. Since
-no specific output file is specified via **TARGET** the output file is placed
-into the `CMAKE_CURENT_BINARY_DIR` with the name *resources.gresource*. The
-first argument `RESOURCE_FILE` is a variable that is filled with the output file
-name, so with *resources.gresource* inside the build directory. This variable is
-helpful to create makefile targets (or to process the output file differently).
-
-So here comes a full *CMakeLists.txt* that creates the resources from before.
-
-```cmake
-# Minimum support is guaranteed for CMake 2.8. Everything below needs to be
-# tested.
-cmake_minimum_required(2.8)
-
-project(MyResourceFile)
-
-# Include the extension module.
-list(APPEND CMAKE_MODULE_PATH
- ${PATH_TO_GCR_CMAKE_PARENT_DIR}/GCR_CMake/macros)
-
-include(GlibCompileResourcesSupport)
-
-# Set the resources to bundle.
-set(RESOURCE_LIST
- info.txt
- img/image1.jpg
- img/image2.jpg
- data.xml)
-
-# Compile the resources.
-compile_gresources(RESOURCE_FILE
- XML_OUT
- TYPE BUNDLE
- RESOURCES ${RESOURCE_LIST})
-
-# Add a custom target to the makefile. Now make builds our resource file.
-# It depends on the output RESOURCE_FILE.
-add_custom_target(resource ALL DEPENDS ${RESOURCE_FILE})
-```
-
-A nice feature of the `compile_gresources`-macro is that it supports
-individually setting flags on the resources. So we can extend our resource list
-like that:
-
-```cmake
-set(RESOURCE_LIST
- info.txt
- COMPRESS img/image1.jpg
- COMPRESS img/image2.jpg
- STRIPBLANKS data.xml)
-```
-
-This resource list not only simply includes the resources, it specifies also
-that the two images should be compressed and in *data.xml* the whitespaces
-should be removed. This resource list will include the same files but will
-preprocess some of them.
-
-Very handy are the `COMPRESS_ALL`, `STRIPBLANKS_ALL` or `TOPIXDATA_ALL`
-parameters (and their `NO_`-equivalents). If you are too lazy to write before
-every file the flag, just invoke `compile_gresources` with them.
-
-```cmake
-# Compile the resources. Compresses all files regardless if you specified it
-# explicitly or not.
-compile_gresources(RESOURCE_FILE
- XML_OUT
- TYPE BUNDLE
- RESOURCES ${RESOURCE_LIST}
- COMPRESS_ALL)
-```
-
-So that's a short introduction into the operating mode of the
-`compile-gresources` macro.
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/macros/BuildTargetScript.cmake b/libs/EXTERNAL/libezgl/gcr-cmake/macros/BuildTargetScript.cmake
deleted file mode 100644
index 72434498f1b..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/macros/BuildTargetScript.cmake
+++ /dev/null
@@ -1,57 +0,0 @@
-# This file is used to be invoked at build time. It generates the needed
-# resource XML file.
-
-# Input variables that need to provided when invoking this script:
-# GXML_OUTPUT The output file path where to save the XML file.
-# GXML_COMPRESS_ALL Sets all COMPRESS flags in all resources in resource
-# list.
-# GXML_NO_COMPRESS_ALL Removes all COMPRESS flags in all resources in
-# resource list.
-# GXML_STRIPBLANKS_ALL Sets all STRIPBLANKS flags in all resources in
-# resource list.
-# GXML_NO_STRIPBLANKS_ALL Removes all STRIPBLANKS flags in all resources in
-# resource list.
-# GXML_TOPIXDATA_ALL Sets all TOPIXDATA flags i nall resources in resource
-# list.
-# GXML_NO_TOPIXDATA_ALL Removes all TOPIXDATA flags in all resources in
-# resource list.
-# GXML_PREFIX Overrides the resource prefix that is prepended to
-# each relative name in registered resources.
-# GXML_RESOURCES The list of resource files. Whether absolute or
-# relative path is equal.
-
-# Include the GENERATE_GXML() function.
-include(${CMAKE_CURRENT_LIST_DIR}/GenerateGXML.cmake)
-
-# Set flags to actual invocation flags.
-if(GXML_COMPRESS_ALL)
- set(GXML_COMPRESS_ALL COMPRESS_ALL)
-endif()
-if(GXML_NO_COMPRESS_ALL)
- set(GXML_NO_COMPRESS_ALL NO_COMPRESS_ALL)
-endif()
-if(GXML_STRIPBLANKS_ALL)
- set(GXML_STRIPBLANKS_ALL STRIPBLANKS_ALL)
-endif()
-if(GXML_NO_STRIPBLANKS_ALL)
- set(GXML_NO_STRIPBLANKS_ALL NO_STRIPBLANKS_ALL)
-endif()
-if(GXML_TOPIXDATA_ALL)
- set(GXML_TOPIXDATA_ALL TOPIXDATA_ALL)
-endif()
-if(GXML_NO_TOPIXDATA_ALL)
- set(GXML_NO_TOPIXDATA_ALL NO_TOPIXDATA_ALL)
-endif()
-
-# Replace " " with ";" to import the list over the command line. Otherwise
-# CMake would interprete the passed resources as a whole string.
-string(REPLACE " " ";" GXML_RESOURCES ${GXML_RESOURCES})
-
-# Invoke the gresource XML generation function.
-generate_gxml(${GXML_OUTPUT}
- ${GXML_COMPRESS_ALL} ${GXML_NO_COMPRESS_ALL}
- ${GXML_STRIPBLANKS_ALL} ${GXML_NO_STRIPBLANKS_ALL}
- ${GXML_TOPIXDATA_ALL} ${GXML_NO_TOPIXDATA_ALL}
- PREFIX ${GXML_PREFIX}
- RESOURCES ${GXML_RESOURCES})
-
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/macros/CompileGResources.cmake b/libs/EXTERNAL/libezgl/gcr-cmake/macros/CompileGResources.cmake
deleted file mode 100644
index a041cdcc99e..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/macros/CompileGResources.cmake
+++ /dev/null
@@ -1,228 +0,0 @@
-include(CMakeParseArguments)
-
-# Path to this file.
-set(GCR_CMAKE_MACRO_DIR ${CMAKE_CURRENT_LIST_DIR})
-
-# Compiles a gresource resource file from given resource files. Automatically
-# creates the XML controlling file.
-# The type of resource to generate (header, c-file or bundle) is automatically
-# determined from TARGET file ending, if no TYPE is explicitly specified.
-# The output file is stored in the provided variable "output".
-# "xml_out" contains the variable where to output the XML path. Can be used to
-# create custom targets or doing postprocessing.
-# If you want to use preprocessing, you need to manually check the existence
-# of the tools you use. This function doesn't check this for you, it just
-# generates the XML file. glib-compile-resources will then throw a
-# warning/error.
-function(COMPILE_GRESOURCES output xml_out)
- # Available options:
- # COMPRESS_ALL, NO_COMPRESS_ALL Overrides the COMPRESS flag in all
- # registered resources.
- # STRIPBLANKS_ALL, NO_STRIPBLANKS_ALL Overrides the STRIPBLANKS flag in all
- # registered resources.
- # TOPIXDATA_ALL, NO_TOPIXDATA_ALL Overrides the TOPIXDATA flag in all
- # registered resources.
- set(CG_OPTIONS COMPRESS_ALL NO_COMPRESS_ALL
- STRIPBLANKS_ALL NO_STRIPBLANKS_ALL
- TOPIXDATA_ALL NO_TOPIXDATA_ALL)
-
- # Available one value options:
- # TYPE Type of resource to create. Valid options are:
- # EMBED_C: A C-file that can be compiled with your project.
- # EMBED_H: A header that can be included into your project.
- # BUNDLE: Generates a resource bundle file that can be loaded
- # at runtime.
- # AUTO: Determine from target file ending. Need to specify
- # target argument.
- # PREFIX Overrides the resource prefix that is prepended to each
- # relative file name in registered resources.
- # C_PREFIX Specifies the prefix used for the C identifiers in the code generated
- # when EMBED_C or EMBED_H are specified for TYPE.
- # SOURCE_DIR Overrides the resources base directory to search for resources.
- # Normally this is set to the source directory with that CMake
- # was invoked (CMAKE_CURRENT_SOURCE_DIR).
- # TARGET Overrides the name of the output file/-s. Normally the output
- # names from the glib-compile-resources tool are taken.
- set(CG_ONEVALUEARGS TYPE PREFIX C_PREFIX SOURCE_DIR TARGET)
-
- # Available multi-value options:
- # RESOURCES The list of resource files. Whether absolute or relative path is
- # equal, absolute paths are stripped down to relative ones. If the
- # absolute path is not inside the given base directory SOURCE_DIR
- # or CMAKE_CURRENT_SOURCE_DIR (if SOURCE_DIR is not overriden),
- # this function aborts.
- # OPTIONS Extra command line options passed to glib-compile-resources.
- set(CG_MULTIVALUEARGS RESOURCES OPTIONS)
-
- # Parse the arguments.
- cmake_parse_arguments(CG_ARG
- "${CG_OPTIONS}"
- "${CG_ONEVALUEARGS}"
- "${CG_MULTIVALUEARGS}"
- "${ARGN}")
-
- # Variable to store the double-quote (") string. Since escaping
- # double-quotes in strings is not possible we need a helper variable that
- # does this job for us.
- set(Q \")
-
- # Check invocation validity with the _UNPARSED_ARGUMENTS variable.
- # If other not recognized parameters were passed, throw error.
- if (CG_ARG_UNPARSED_ARGUMENTS)
- set(CG_WARNMSG "Invocation of COMPILE_GRESOURCES with unrecognized")
- set(CG_WARNMSG "${CG_WARNMSG} parameters. Parameters are:")
- set(CG_WARNMSG "${CG_WARNMSG} ${CG_ARG_UNPARSED_ARGUMENTS}.")
- message(WARNING ${CG_WARNMSG})
- endif()
-
- # Check invocation validity depending on generation mode (EMBED_C, EMBED_H
- # or BUNDLE).
- if ("${CG_ARG_TYPE}" STREQUAL "EMBED_C")
- # EMBED_C mode, output compilable C-file.
- list(APPEND CG_GENERATE_COMMAND_LINE --generate-source)
- if (NOT "${CG_ARG_C_PREFIX}" STREQUAL "")
- list(APPEND CG_GENERATE_COMMAND_LINE --c-name "${CG_ARG_C_PREFIX}")
- endif()
- set(CG_TARGET_FILE_ENDING "c")
- elseif ("${CG_ARG_TYPE}" STREQUAL "EMBED_H")
- # EMBED_H mode, output includable header file.
- list(APPEND CG_GENERATE_COMMAND_LINE --generate-header)
- if (NOT "${CG_ARG_C_PREFIX}" STREQUAL "")
- list(APPEND CG_GENERATE_COMMAND_LINE --c-name "${CG_ARG_C_PREFIX}")
- endif()
- set(CG_TARGET_FILE_ENDING "h")
- elseif ("${CG_ARG_TYPE}" STREQUAL "BUNDLE")
- # BUNDLE mode, output resource bundle. Don't do anything since
- # glib-compile-resources outputs a bundle when not specifying
- # something else.
- set(CG_TARGET_FILE_ENDING "gresource")
- if (NOT "${CG_ARG_C_PREFIX}" STREQUAL "")
- message(WARNING "Superfluously provided C_PREFIX=${CG_ARG_C_PREFIX} for BUNDLE.")
- endif()
- else()
- # Everything else is AUTO mode, determine from target file ending.
- if (CG_ARG_TARGET)
- list(APPEND CG_GENERATE_COMMAND_LINE --generate)
- else()
- set(CG_ERRMSG "AUTO mode given, but no target specified. Can't")
- set(CG_ERRMSG "${CG_ERRMSG} determine output type. In function")
- set(CG_ERRMSG "${CG_ERRMSG} COMPILE_GRESOURCES.")
- message(FATAL_ERROR ${CG_ERRMSG})
- endif()
- endif()
-
- # Check flag validity.
- if (CG_ARG_COMPRESS_ALL AND CG_ARG_NO_COMPRESS_ALL)
- set(CG_ERRMSG "COMPRESS_ALL and NO_COMPRESS_ALL simultaneously set. In")
- set(CG_ERRMSG "${CG_ERRMSG} function COMPILE_GRESOURCES.")
- message(FATAL_ERROR ${CG_ERRMSG})
- endif()
- if (CG_ARG_STRIPBLANKS_ALL AND CG_ARG_NO_STRIPBLANKS_ALL)
- set(CG_ERRMSG "STRIPBLANKS_ALL and NO_STRIPBLANKS_ALL simultaneously")
- set(CG_ERRMSG "${CG_ERRMSG} set. In function COMPILE_GRESOURCES.")
- message(FATAL_ERROR ${CG_ERRMSG})
- endif()
- if (CG_ARG_TOPIXDATA_ALL AND CG_ARG_NO_TOPIXDATA_ALL)
- set(CG_ERRMSG "TOPIXDATA_ALL and NO_TOPIXDATA_ALL simultaneously set.")
- set(CG_ERRMSG "${CG_ERRMSG} In function COMPILE_GRESOURCES.")
- message(FATAL_ERROR ${CG_ERRMSG})
- endif()
-
- # Check if there are any resources.
- if (NOT CG_ARG_RESOURCES)
- set(CG_ERRMSG "No resource files to process. In function")
- set(CG_ERRMSG "${CG_ERRMSG} COMPILE_GRESOURCES.")
- message(FATAL_ERROR ${CG_ERRMSG})
- endif()
-
- # Extract all dependencies for targets from resource list.
- foreach(res ${CG_ARG_RESOURCES})
- if (NOT(("${res}" STREQUAL "COMPRESS") OR
- ("${res}" STREQUAL "STRIPBLANKS") OR
- ("${res}" STREQUAL "TOPIXDATA")))
-
- list(APPEND CG_RESOURCES_DEPENDENCIES "${res}")
- endif()
- endforeach()
-
- # Construct .gresource.xml path.
- set(CG_XML_FILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/.gresource.xml")
-
- # Generate gresources XML target.
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_OUTPUT=${Q}${CG_XML_FILE_PATH}${Q}")
- if(CG_ARG_COMPRESS_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_COMPRESS_ALL")
- endif()
- if(CG_ARG_NO_COMPRESS_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_NO_COMPRESS_ALL")
- endif()
- if(CG_ARG_STRPIBLANKS_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_STRIPBLANKS_ALL")
- endif()
- if(CG_ARG_NO_STRIPBLANKS_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_NO_STRIPBLANKS_ALL")
- endif()
- if(CG_ARG_TOPIXDATA_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_TOPIXDATA_ALL")
- endif()
- if(CG_ARG_NO_TOPIXDATA_ALL)
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_NO_TOPIXDATA_ALL")
- endif()
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "GXML_PREFIX=${Q}${CG_ARG_PREFIX}${Q}")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-D")
- list(APPEND CG_CMAKE_SCRIPT_ARGS
- "GXML_RESOURCES=${Q}${CG_ARG_RESOURCES}${Q}")
- list(APPEND CG_CMAKE_SCRIPT_ARGS "-P")
- list(APPEND CG_CMAKE_SCRIPT_ARGS
- "${Q}${GCR_CMAKE_MACRO_DIR}/BuildTargetScript.cmake${Q}")
-
- get_filename_component(CG_XML_FILE_PATH_ONLY_NAME
- "${CG_XML_FILE_PATH}" NAME)
- set(CG_XML_CUSTOM_COMMAND_COMMENT
- "Creating gresources XML file (${CG_XML_FILE_PATH_ONLY_NAME})")
- add_custom_command(OUTPUT ${CG_XML_FILE_PATH}
- COMMAND ${CMAKE_COMMAND}
- ARGS ${CG_CMAKE_SCRIPT_ARGS}
- DEPENDS ${CG_RESOURCES_DEPENDENCIES}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT ${CG_XML_CUSTOM_COMMAND_COMMENT})
-
- # Create target manually if not set (to make sure glib-compile-resources
- # doesn't change behaviour with it's naming standards).
- if (NOT CG_ARG_TARGET)
- set(CG_ARG_TARGET "${CMAKE_CURRENT_BINARY_DIR}/resources")
- set(CG_ARG_TARGET "${CG_ARG_TARGET}.${CG_TARGET_FILE_ENDING}")
- endif()
-
- # Create source directory automatically if not set.
- if (NOT CG_ARG_SOURCE_DIR)
- set(CG_ARG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
- endif()
-
- # Add compilation target for resources.
- add_custom_command(OUTPUT ${CG_ARG_TARGET}
- COMMAND ${GLIB_COMPILE_RESOURCES_EXECUTABLE}
- ARGS
- ${OPTIONS}
- --target ${CG_ARG_TARGET}
- --sourcedir ${CG_ARG_SOURCE_DIR}
- ${CG_GENERATE_COMMAND_LINE}
- ${CG_XML_FILE_PATH}
- VERBATIM
- MAIN_DEPENDENCY ${CG_XML_FILE_PATH}
- DEPENDS ${CG_RESOURCES_DEPENDENCIES}
- WORKING_DIRECTORY ${CMAKE_BUILD_DIR})
-
- # Set output and XML_OUT to parent scope.
- set(${xml_out} ${CG_XML_FILE_PATH} PARENT_SCOPE)
- set(${output} ${CG_ARG_TARGET} PARENT_SCOPE)
-
-endfunction()
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/macros/GenerateGXML.cmake b/libs/EXTERNAL/libezgl/gcr-cmake/macros/GenerateGXML.cmake
deleted file mode 100644
index b3f1a305c80..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/macros/GenerateGXML.cmake
+++ /dev/null
@@ -1,124 +0,0 @@
-include(CMakeParseArguments)
-
-# Generates the resource XML controlling file from resource list (and saves it
-# to xml_path). It's not recommended to use this function directly, since it
-# doesn't handle invalid arguments. It is used by the function
-# COMPILE_GRESOURCES() to create a custom command, so that this function is
-# invoked at build-time in script mode from CMake.
-function(GENERATE_GXML xml_path)
- # Available options:
- # COMPRESS_ALL, NO_COMPRESS_ALL Overrides the COMPRESS flag in all
- # registered resources.
- # STRIPBLANKS_ALL, NO_STRIPBLANKS_ALL Overrides the STRIPBLANKS flag in all
- # registered resources.
- # TOPIXDATA_ALL, NO_TOPIXDATA_ALL Overrides the TOPIXDATA flag in all
- # registered resources.
- set(GXML_OPTIONS COMPRESS_ALL NO_COMPRESS_ALL
- STRIPBLANKS_ALL NO_STRIPBLANKS_ALL
- TOPIXDATA_ALL NO_TOPIXDATA_ALL)
-
- # Available one value options:
- # PREFIX Overrides the resource prefix that is prepended to each
- # relative file name in registered resources.
- set(GXML_ONEVALUEARGS PREFIX)
-
- # Available multi-value options:
- # RESOURCES The list of resource files. Whether absolute or relative path is
- # equal, absolute paths are stripped down to relative ones. If the
- # absolute path is not inside the given base directory SOURCE_DIR
- # or CMAKE_CURRENT_SOURCE_DIR (if SOURCE_DIR is not overriden),
- # this function aborts.
- set(GXML_MULTIVALUEARGS RESOURCES)
-
- # Parse the arguments.
- cmake_parse_arguments(GXML_ARG
- "${GXML_OPTIONS}"
- "${GXML_ONEVALUEARGS}"
- "${GXML_MULTIVALUEARGS}"
- "${ARGN}")
-
- # Variable to store the double-quote (") string. Since escaping
- # double-quotes in strings is not possible we need a helper variable that
- # does this job for us.
- set(Q \")
-
- # Process resources and generate XML file.
- # Begin with the XML header and header nodes.
- set(GXML_XML_FILE "")
- set(GXML_XML_FILE "${GXML_XML_FILE}")
-
- # Process each resource.
- foreach(res ${GXML_ARG_RESOURCES})
- if ("${res}" STREQUAL "COMPRESS")
- set(GXML_COMPRESSION_FLAG ON)
- elseif ("${res}" STREQUAL "STRIPBLANKS")
- set(GXML_STRIPBLANKS_FLAG ON)
- elseif ("${res}" STREQUAL "TOPIXDATA")
- set(GXML_TOPIXDATA_FLAG ON)
- else()
- # The file name.
- set(GXML_RESOURCE_PATH "${res}")
-
- # Append to real resource file dependency list.
- list(APPEND GXML_RESOURCES_DEPENDENCIES ${GXML_RESOURCE_PATH})
-
- # Assemble node.
- set(GXML_RES_LINE "${GXML_RESOURCE_PATH} ")
-
- # Append to file string.
- set(GXML_XML_FILE "${GXML_XML_FILE}${GXML_RES_LINE}")
-
- # Unset variables.
- unset(GXML_COMPRESSION_FLAG)
- unset(GXML_STRIPBLANKS_FLAG)
- unset(GXML_TOPIXDATA_FLAG)
- endif()
-
- endforeach()
-
- # Append closing nodes.
- set(GXML_XML_FILE "${GXML_XML_FILE} ")
-
- # Use "file" function to generate XML controlling file.
- get_filename_component(xml_path_only_name "${xml_path}" NAME)
- file(WRITE ${xml_path} ${GXML_XML_FILE})
-
-endfunction()
-
diff --git a/libs/EXTERNAL/libezgl/gcr-cmake/macros/GlibCompileResourcesSupport.cmake b/libs/EXTERNAL/libezgl/gcr-cmake/macros/GlibCompileResourcesSupport.cmake
deleted file mode 100644
index 2950af34302..00000000000
--- a/libs/EXTERNAL/libezgl/gcr-cmake/macros/GlibCompileResourcesSupport.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-# Path to this file.
-set(GCR_CMAKE_MACRO_DIR ${CMAKE_CURRENT_LIST_DIR})
-
-# Finds the glib-compile-resources executable.
-find_program(GLIB_COMPILE_RESOURCES_EXECUTABLE glib-compile-resources)
-mark_as_advanced(GLIB_COMPILE_RESOURCES_EXECUTABLE)
-
-# Include the cmake files containing the functions.
-include(${GCR_CMAKE_MACRO_DIR}/CompileGResources.cmake)
-include(${GCR_CMAKE_MACRO_DIR}/GenerateGXML.cmake)
-
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/application.hpp b/libs/EXTERNAL/libezgl/include/ezgl/application.hpp
deleted file mode 100644
index 6ec64f57f03..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/application.hpp
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_APPLICATION_HPP
-#define EZGL_APPLICATION_HPP
-
-#include "ezgl/canvas.hpp"
-#include "ezgl/control.hpp"
-#include "ezgl/callback.hpp"
-#include "ezgl/graphics.hpp"
-#include "ezgl/color.hpp"
-
-#include
-#include
-#include
-#include
-
-#include
-
-/**
- * A library for creating a graphical user interface.
- */
-namespace ezgl {
-
-// A flag to specify whether the GUI is built from an XML file or an XML resource
-#ifndef ECE297
-const bool build_ui_from_file = false;
-#else
-const bool build_ui_from_file = true;
-#endif
-
-class application;
-
-/**
- * The signature of a function that connects GObject to functions via signals.
- *
- * @see application::get_object.
- */
-using connect_g_objects_fn = void (*)(application *app);
-
-/**
- * The signature of a setup callback function
- */
-using setup_callback_fn = void (*)(application *app, bool new_window);
-
-/**
- * The signature of a button callback function
- */
-using button_callback_fn = void (*)(GtkWidget *widget, application *app);
-
-/**
- * The signature of a user-defined callback function for mouse events
- */
-using mouse_callback_fn = void (*)(application *app, GdkEventButton *event, double x, double y);
-
-/**
- * The signature of a user-defined callback function for keyboard events
- */
-using key_callback_fn = void (*)(application *app, GdkEventKey *event, char *key_name);
-
-/**
- * The core application.
- *
- * The GUI of an application is created from an XML file. Widgets created in the XML file can be retrieved from an
- * application object, but only after the object has been initialized by GTK via application::run.
- */
-class application {
-public:
- /**
- * Configuration settings for the application.
- *
- * The GUI will be built from the XML description given by main_ui_resource.
- * The XML file must contain a GtkWindow with the name in window_identifier.
- */
- struct settings {
- /**
- * The resource/file path that contains the XML file, which describes the GUI.
- */
- std::string main_ui_resource;
-
- /**
- * The name of the main window in the XML file.
- */
- std::string window_identifier;
-
- /**
- * The name of the main canvas in the XML file.
- */
- std::string canvas_identifier;
-
- /**
- * A user-defined name of the GTK application
- *
- * Application identifiers should follow the following format:
- * https://developer.gnome.org/gio/stable/GApplication.html#g-application-id-is-valid
- * Use g_application_id_is_valid () to check its validity
- */
- std::string application_identifier;
-
- /**
- * Specify the function that will connect GUI objects to user-defined callbacks.
- *
- * GUI objects (i.e., a GObject) can be retrieved from this application object. These objects can then be connected
- * to specific events using g_signal_connect. A list of signals that can be used to make these connections can be
- * found here .
- *
- * If not provided, application::register_default_buttons_callbacks function will be used, which assumes that the
- * UI has GtkButton widgets named "ZoomFitButton", "ZoomInButton", "ZoomOutButton", "UpButton", "DownButton",
- * "LeftButton", "RightButton", "ProceedButton"
- */
- connect_g_objects_fn setup_callbacks;
-
- /**
- * Create the settings structure with default values
- */
- settings()
- : main_ui_resource(build_ui_from_file ? "main_ui" : "/ezgl/main.ui"), window_identifier("MainWindow"), canvas_identifier("MainCanvas"), application_identifier("ezgl.app"),
- setup_callbacks(nullptr)
- {
- // Uniquify the application_identifier by appending a time stamp,
- // so that each instance of the same program has a different application ID.
- // This allows multiple instance of the program to run independelty.
- application_identifier += ".t" + std::to_string(std::time(nullptr));
- }
-
- /**
- * Create the settings structure with user-defined values
- */
- settings(std::string m_resource, std::string w_identifier, std::string c_identifier, std::string a_identifier = "ezgl.app",
- connect_g_objects_fn s_callbacks = nullptr)
- : main_ui_resource(m_resource), window_identifier(w_identifier), canvas_identifier(c_identifier), application_identifier(a_identifier),
- setup_callbacks(s_callbacks)
- {
- // Uniquify the application_identifier by appending a time stamp,
- // so that each instance of the same program has a different application ID.
- // This allows multiple instance of the program to run independelty.
- application_identifier += ".t" + std::to_string(std::time(nullptr));
- }
- };
-
-public:
- /**
- * Create an application.
- *
- * @param s The preconfigured settings.
- */
- explicit application(application::settings s);
-
- /**
- * Add a canvas to the application.
- *
- * If the canvas has already been added, it will not be overwritten and a warning will be displayed.
- *
- * @param canvas_id The id of the GtkDrawingArea in the XML file.
- * @param draw_callback The function to call that draws to this canvas.
- * @param coordinate_system The initial coordinate system of this canvas.
- * @param background_color (OPTIONAL) The color of the canvas background. Default is WHITE.
- *
- * @return A pointer to the newly created canvas.
- */
- canvas *add_canvas(std::string const &canvas_id,
- draw_canvas_fn draw_callback,
- rectangle coordinate_system,
- color background_color = WHITE);
-
- /**
- * Add a button
- *
- * @param button_text the new button text
- * @param left the column number to attach the left side of the new button to
- * @param top the row number to attach the top side of the new button to
- * @param width the number of columns that the button will span
- * @param height the number of rows that the button will span
- * @param button_func callback function for the button
- *
- * The function assumes that the UI has a GtkGrid named "InnerGrid"
- */
- void create_button(const char *button_text,
- int left,
- int top,
- int width,
- int height,
- button_callback_fn button_func);
-
- /**
- * Add a button convenience
- * Adds a button at a given row index (assuming buttons in the right bar use 1 row each)
- * by inserting a row in the grid and adding the button. Uses the default width of 3 and height of 1
- *
- * @param button_text the new button text
- * @param insert_row the row in the right bar to insert the button
- * @param button_func callback function for the button
- *
- * The function assumes that the UI has a GtkGrid named "InnerGrid"
- */
- void create_button(const char *button_text, int insert_row, button_callback_fn button_func);
-
- /**
- * Deletes a button by its label (displayed text)
- *
- * @param the text of the button to delete
- * @return whether the button was found and deleted
- *
- * The function assumes that the UI has a GtkGrid named "InnerGrid"
- */
- bool destroy_button(const char *button_text_to_destroy);
-
- /**
- * Change the label of the button (displayed text)
- *
- * @param button_text the old text of the button
- * @param new_button_text the new button text
- *
- * The function assumes that the UI has a GtkGrid named "InnerGrid"
- */
- void change_button_text(const char *button_text, const char *new_button_text);
-
- /**
- * Update the message in the status bar
- *
- * @param message The message that will be displayed on the status bar
- *
- * The function assumes that the UI has a GtkStatusbar named "StatusBar"
- */
- void update_message(std::string const &message);
-
- /**
- * Change the coordinate system of a created canvas
- *
- * @param canvas_id The id of the GtkDrawingArea in the XML file.
- * @param coordinate_system The new coordinate system of this canvas.
- */
- void change_canvas_world_coordinates(std::string const &canvas_id, rectangle coordinate_system);
-
- /**
- * redraw the main canvas
- */
- void refresh_drawing();
-
- /**
- * Get a renderer that can be used to draw on top of the main canvas
- */
- renderer *get_renderer();
-
- /**
- * Flush the drawings done by the renderer, returned from get_renderer(), to the on-screen buffer
- *
- * The flushing is done immediately
- */
- void flush_drawing();
-
- /**
- * Run the application.
- *
- * Once this is called, the application will be initialized first. Initialization will build the GUI based on the XML
- * resource given in the constructor. Once the GUI has been created, the function initial_setup_user_callback will be
- * called.
- *
- * After initialization, control of the program will be given to GTK. You will only regain control for the signals
- * that you have registered callbacks for.
- *
- * @param initial_setup_user_callback A user-defined function that is called before application activation
- * @param mouse_press_user_callback The user-defined callback function for mouse press
- * @param mouse_move_user_callback The user-defined callback function for mouse move
- * @param key_press_user_callback The user-defined callback function for keyboard press
- *
- * @return The exit status.
- */
- int run(setup_callback_fn initial_setup_user_callback,
- mouse_callback_fn mouse_press_user_callback,
- mouse_callback_fn mouse_move_user_callback,
- key_callback_fn key_press_user_callback);
-
- /**
- * Destructor.
- */
- ~application();
-
- /**
- * Copies are disabled.
- */
- application(application const &) = delete;
-
- /**
- * Copies are disabled.
- */
- application &operator=(application const &) = delete;
-
- /**
- * Ownership of an application is transferrable.
- */
- application(application &&) = default;
-
- /**
- * Ownership of an application is transferrable.
- */
- application &operator=(application &&) = default;
-
- /**
- * Retrieve a pointer to a canvas that was previously added to the application.
- *
- * Calling this function before application::run results in undefined behaviour.
- *
- * @param canvas_id The key used when the canvas was added.
- *
- * @return A non-owning pointer, or nullptr if not found.
- *
- * @see application::get_object
- */
- canvas *get_canvas(std::string const &canvas_id) const;
-
- /**
- * Retrieve a GLib Object (i.e., a GObject).
- *
- * This is useful for retrieving GUI elements specified in your XML file(s). You should only call this function after
- * the application has been run, otherwise the GUI elements will have not been created yet.
- *
- * @param name The ID of the object.
- * @return The object with the ID, or NULL if it could not be found.
- *
- * @see application::run
- */
- GObject *get_object(gchar const *name) const;
-
- /**
- * Get the ID of the main window
- */
- std::string get_main_window_id() const
- {
- return m_window_id;
- }
-
- /**
- * Get the ID of the main canvas
- */
- std::string get_main_canvas_id() const
- {
- return m_canvas_id;
- }
-
- /**
- * Quit the application
- */
- void quit();
-
-private:
- // The package path to the XML file that describes the UI.
- std::string m_main_ui;
-
- // The ID of the main window to add to our GTK application.
- std::string m_window_id;
-
- // The ID of the main canvas
- std::string m_canvas_id;
-
- // The ID of the GTK application
- std::string m_application_id;
-
- // The GTK application.
- GtkApplication *m_application;
-
- // The GUI builder that parses an XML user interface.
- GtkBuilder *m_builder;
-
- // The function to call when the application is starting up.
- connect_g_objects_fn m_register_callbacks;
-
- // The collection of canvases added to the application.
- std::map> m_canvases;
-
- // A flag that indicates if the run() was called before or not to allow multiple reruns
- bool first_run;
-
- // A flag that indicates if we are resuming an older run to allow proper quitting
- bool resume_run;
-
-private:
- // Called when our GtkApplication is initialized for the first time.
- static void startup(GtkApplication *gtk_app, gpointer user_data);
-
- // Called when GTK activates our application for the first time.
- static void activate(GtkApplication *gtk_app, gpointer user_data);
-
- // Called during application activation to setup the default callbacks for the prebuilt buttons
- static void register_default_buttons_callbacks(application *application);
-
- // Called during application activation to setup the default callbacks for the mouse and key events
- static void register_default_events_callbacks(application *application);
-
-public:
- // The user-defined initial setup callback function
- setup_callback_fn initial_setup_callback;
-
- // The user-defined callback function for handling mouse press
- mouse_callback_fn mouse_press_callback;
-
- // The user-defined callback function for handling mouse move
- mouse_callback_fn mouse_move_callback;
-
- // The user-defined callback function for handling keyboard press
- key_callback_fn key_press_callback;
-};
-
-/**
- * Set the disable_event_loop flag to new_setting
- * Call with new_setting == true to make the event_loop immediately return.
- *
- * @param new_setting The new state of disable_event_loop flag
- */
-void set_disable_event_loop(bool new_setting);
-}
-
-#endif //EZGL_APPLICATION_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/callback.hpp b/libs/EXTERNAL/libezgl/include/ezgl/callback.hpp
deleted file mode 100644
index 10414880e1b..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/callback.hpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_CALLBACK_HPP
-#define EZGL_CALLBACK_HPP
-
-#include "ezgl/application.hpp"
-#include "ezgl/camera.hpp"
-#include "ezgl/canvas.hpp"
-#include "ezgl/control.hpp"
-#include "ezgl/graphics.hpp"
-
-#include
-
-// Mouse button used for panning (left button (1) - middle button (2) - right button (3))
-#define PANNING_MOUSE_BUTTON 1
-
-namespace ezgl {
-
-/**** Callback functions for keyboard and mouse input, and for all the ezgl predefined buttons. *****/
-
-/**
- * React to a keyboard
- * press event .
- *
- * @param widget The GUI widget where this event came from.
- * @param event The keyboard event.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_key(GtkWidget *widget, GdkEventKey *event, gpointer data);
-
-/**
- * React to mouse click
- * event
- *
- * @param widget The GUI widget where this event came from.
- * @param event The click event.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data);
-
-/**
- * React to mouse release
- * event
- *
- * @param widget The GUI widget where this event came from.
- * @param event The click event.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean release_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data);
-
-/**
- * React to mouse release
- * event
- *
- * @param widget The GUI widget where this event came from.
- * @param event The click event.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean move_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data);
-
-/**
- * React to scroll_event
- * event
- *
- * @param widget The GUI widget where this event came from.
- * @param event The click event.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean scroll_mouse(GtkWidget *widget, GdkEvent *event, gpointer data);
-
-/**
- * React to the clicked zoom_fit button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_zoom_fit(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked zoom_in button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_zoom_in(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked zoom_out button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_zoom_out(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked up button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_up(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked up button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_down(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked up button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_left(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked up button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_right(GtkWidget *widget, gpointer data);
-
-/**
- * React to the clicked proceed button
- *
- * @param widget The GUI widget where this event came from.
- * @param data A pointer to any user-specified data you passed in.
- *
- * @return FALSE to allow other handlers to see this event, too. TRUE otherwise.
- */
-gboolean press_proceed(GtkWidget *widget, gpointer data);
-}
-
-#endif //EZGL_CALLBACK_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/camera.hpp b/libs/EXTERNAL/libezgl/include/ezgl/camera.hpp
deleted file mode 100644
index fb3e4d1a7e6..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/camera.hpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_CAMERA_HPP
-#define EZGL_CAMERA_HPP
-
-#include "ezgl/point.hpp"
-#include "ezgl/rectangle.hpp"
-
-namespace ezgl {
-
-/**
- * Manages the transformations between coordinate systems.
- * Application code doesn't (and can't) call these functions; they are for ezgl internal use.
- *
- * The camera class manages transformations between a GTK widget, world, and "screen" coordinate system. A GTK widget
- * has dimensions that change based on the user, and its aspect ratio may not match the world coordinate system. The
- * camera maintains a "screen" within the widget that keeps the same aspect ratio as the world coordinate system,
- * regardless of the dimensions of the widget.
- *
- * A camera object can only be created by an ezgl::canvas object, who has the responsibility of updating the camera with
- * changes to the widget's dimensions. The only state that can be mutated outside the library is the camera's world
- * coordinate system.
- */
-class camera {
-public:
- /**
- * Convert a point in world coordinates to screen coordinates.
- */
- point2d world_to_screen(point2d world_coordinates) const;
-
- /**
- * Convert a point in widget coordinates to screen coordinates.
- */
- point2d widget_to_screen(point2d widget_coordinates) const;
-
- /**
- * Convert a point in widget coordinates to world coordinates.
- */
- point2d widget_to_world(point2d widget_coordinates) const;
-
- /**
- * Get the currently visible bounds of the world.
- */
- rectangle get_world() const
- {
- return m_world;
- }
-
- /**
- * Get the dimensions of the screen.
- */
- rectangle get_screen() const
- {
- return m_screen;
- }
-
- /**
- * Get the dimensions of the widget.
- */
- rectangle get_widget() const
- {
- return m_widget;
- }
-
- /**
- * Get the initial bounds of the world. Needed for zoom_fit
- */
- rectangle get_initial_world() const
- {
- return m_initial_world;
- }
-
- /**
- * Update the visible bounds of the world.
- *
- * Used in panning and zooming.
- */
- void set_world(rectangle new_world);
-
- /**
- * Reset the world coordinates
- *
- * Used by change_canvas_world_coordinates().
- */
- void reset_world(rectangle new_world);
-
- /**
- * Get the screen to world scaling factor.
- */
- point2d get_world_scale_factor() const
- {
- return m_screen_to_world;
- }
-
-protected:
- // Only an ezgl::canvas can create a camera.
- friend class canvas;
-
- /**
- * Create a camera.
- *
- * @param bounds The initial bounds of the coordinate system.
- */
- explicit camera(rectangle bounds);
-
- /**
- * Update the dimensions of the widget.
- *
- * This will change the screen where the world is projected. The screen will maintain the aspect ratio of the world's
- * coordinate system while being centered within the screen.
- *
- * @see canvas::configure_event
- */
- void update_widget(int width, int height);
-
- /**
- * Update the scaling factors.
- */
- void update_scale_factors();
-
-private:
- // The dimensions of the parent widget.
- rectangle m_widget = {{0, 0}, 1.0, 1.0};
-
- // The dimensions of the world (user-defined bounding box).
- rectangle m_world;
-
- // The dimensions of the screen, which may not match the widget.
- rectangle m_screen;
-
- // The dimensions of the initial world (user-defined bounding box). Needed for zoom_fit
- rectangle m_initial_world;
-
- // The x and y scaling factors.
- point2d m_world_to_widget = {1.0, 1.0};
- point2d m_widget_to_screen = {1.0, 1.0};
- point2d m_screen_to_world = {1.0, 1.0};
-};
-}
-
-#endif //EZGL_CAMERA_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/canvas.hpp b/libs/EXTERNAL/libezgl/include/ezgl/canvas.hpp
deleted file mode 100644
index b6aa475009e..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/canvas.hpp
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_CANVAS_HPP
-#define EZGL_CANVAS_HPP
-
-#include "ezgl/camera.hpp"
-#include "ezgl/rectangle.hpp"
-#include "ezgl/graphics.hpp"
-#include "ezgl/color.hpp"
-
-#include
-#include
-#include
-#include
-
-#include
-
-namespace ezgl {
-
-/**** Functions in this class are for ezgl internal use; application code doesn't need to call them ****/
-
-class renderer;
-
-/**
- * The signature of a function that draws to an ezgl::canvas.
- */
-using draw_canvas_fn = void (*)(renderer*);
-
-/**
- * Responsible for creating, destroying, and maintaining the rendering context of a GtkWidget.
- *
- * Underneath, the class relies on a GtkDrawingArea as its GUI widget along with cairo to provide the rendering context.
- * The class connects to the relevant GTK signals, namely configure and draw events, to remain responsive.
- *
- * Each canvas is double-buffered. A draw callback (see: ezgl::draw_canvas_fn) is invoked each time the canvas needs to
- * be redrawn. This may be caused by the user (e.g., resizing the screen), but can also be forced by the programmer.
- */
-class canvas {
-public:
- /**
- * Destructor.
- */
- ~canvas();
-
- /**
- * Get the name (identifier) of the canvas.
- */
- char const *id() const
- {
- return m_canvas_id.c_str();
- }
-
- /**
- * Get the width of the canvas in pixels.
- */
- int width() const;
-
- /**
- * Get the height of the canvas in pixels.
- */
- int height() const;
-
- /**
- * Force the canvas to redraw itself.
- *
- * This will invoke the ezgl::draw_canvas_fn callback and queue a redraw of the GtkWidget.
- */
- void redraw();
-
- /**
- * Get an immutable reference to this canvas' camera.
- */
- camera const &get_camera() const
- {
- return m_camera;
- }
-
- /**
- * Get a mutable reference to this canvas' camera.
- */
- camera &get_camera()
- {
- return m_camera;
- }
-
- /**
- * Create an animation renderer that can be used to draw on top of the current canvas
- */
- renderer *create_animation_renderer();
-
- /**
- * print_pdf, print_svg, and print_png generate a PDF, SVG, or PNG output file showing
- * all the graphical content of the current canvas.
- *
- * @param file_name name of the output file
- * @return returns true if the function has successfully generated the output file, otherwise
- * failed due to errors such as out of memory occurs.
- */
- bool print_pdf(const char *file_name, int width = 0, int height = 0);
- bool print_svg(const char *file_name, int width = 0, int height = 0);
- bool print_png(const char *file_name, int width = 0, int height = 0);
-
-
-protected:
- // Only the ezgl::application can create and initialize a canvas object.
- friend class application;
-
- /**
- * Create a canvas that can be drawn to.
- */
- canvas(std::string canvas_id, draw_canvas_fn draw_callback, rectangle coordinate_system, color background_color);
-
- /**
- * Lazy initialization of the canvas class.
- *
- * This function is required because GTK will not send activate/startup signals to an ezgl::application until control
- * of the program has been reliquished. The GUI is not built until ezgl::application receives an activate signal.
- */
- void initialize(GtkWidget *drawing_area);
-
-private:
- // Name of the canvas in XML.
- std::string m_canvas_id;
-
- // The function to call when the widget needs to be redrawn.
- draw_canvas_fn m_draw_callback;
-
- // The transformations between the GUI and the world.
- camera m_camera;
-
- // The background color of the drawing area
- color m_background_color;
-
- // A non-owning pointer to the drawing area inside a GTK window.
- GtkWidget *m_drawing_area = nullptr;
-
- // The off-screen surface that can be drawn to.
- cairo_surface_t *m_surface = nullptr;
-
- // The off-screen cairo context that can be drawn to
- cairo_t *m_context = nullptr;
-
- // The animation renderer
- renderer *m_animation_renderer = nullptr;
-
-private:
- // Called each time our drawing area widget has changed (e.g., in size).
- static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data);
-
- // Called each time we need to draw to our drawing area widget.
- static gboolean draw_surface(GtkWidget *widget, cairo_t *context, gpointer data);
-};
-}
-
-#endif //EZGL_CANVAS_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/color.hpp b/libs/EXTERNAL/libezgl/include/ezgl/color.hpp
deleted file mode 100644
index d963372ff81..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/color.hpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_COLOR_HPP
-#define EZGL_COLOR_HPP
-
-#include
-
-namespace ezgl {
-
-/**
- * Represents a color as a mixture or red, green, and blue as well as the transparency level.
- *
- * Each color channel and transparency level is an 8-bit value, ranging from 0-255.
- */
-struct color {
- /**
- * Default constructor: Create a black color.
- */
- constexpr color() noexcept
- : red(0), green(0), blue(0), alpha(255)
- {
- }
-
- /**
- * Create a color.
- *
- * @param r The amount of red.
- * @param g The amount of green.
- * @param b The amount of blue.
- * @param a The level of transparency.
- */
- constexpr color(std::uint_fast8_t r,
- std::uint_fast8_t g,
- std::uint_fast8_t b,
- std::uint_fast8_t a = 255) noexcept
- : red(r), green(g), blue(b), alpha(a)
- {
- }
-
- /**
- * A red component of the color, between 0 and 255.
- */
- std::uint_fast8_t red;
-
- /**
- * The green component of the color, between 0 and 255.
- */
- std::uint_fast8_t green;
-
- /**
- * The blue component of the color, between 0 and 255.
- */
- std::uint_fast8_t blue;
-
- /**
- * The amount of transparency, between 0 and 255.
- */
- std::uint_fast8_t alpha;
-
- /**
- * Test for equality.
- */
- bool operator==(const color &rhs) const
- {
- return red == rhs.red && green == rhs.green && blue == rhs.blue && alpha == rhs.alpha;
- }
-
- /**
- * Test for inequality.
- */
- bool operator!=(const color &rhs) const
- {
- return !(rhs == *this);
- }
-};
-
-static constexpr color WHITE(0xFF, 0xFF, 0xFF);
-static constexpr color BLACK(0x00, 0x00, 0x00);
-static constexpr color GREY_55(0x8C, 0x8C, 0x8C);
-static constexpr color GREY_75(0xBF, 0xBF, 0xBF);
-static constexpr color RED(0xFF, 0x00, 0x00);
-static constexpr color ORANGE(0xFF, 0xA5, 0x00);
-static constexpr color YELLOW(0xFF, 0xFF, 0x00);
-static constexpr color GREEN(0x00, 0xFF, 0x00);
-static constexpr color CYAN(0x00, 0xFF, 0xFF);
-static constexpr color BLUE(0x00, 0x00, 0xFF);
-static constexpr color PURPLE(0xA0, 0x20, 0xF0);
-static constexpr color PINK(0xFF, 0xC0, 0xCB);
-static constexpr color LIGHT_PINK(0xFF, 0xB6, 0xC1);
-static constexpr color DARK_GREEN(0x00, 0x64, 0x00);
-static constexpr color MAGENTA(0xFF, 0x00, 0xFF);
-static constexpr color BISQUE(0xFF, 0xE4, 0xC4);
-static constexpr color LIGHT_SKY_BLUE(0x87, 0xCE, 0xFA);
-static constexpr color THISTLE(0xD8, 0xBF, 0xD8);
-static constexpr color PLUM(0xDD, 0xA0, 0xDD);
-static constexpr color KHAKI(0xF0, 0xE6, 0x8C);
-static constexpr color CORAL(0xFF, 0x7F, 0x50);
-static constexpr color TURQUOISE(0x40, 0xE0, 0xD0);
-static constexpr color MEDIUM_PURPLE(0x93, 0x70, 0xDB);
-static constexpr color DARK_SLATE_BLUE(0x48, 0x3D, 0x8B);
-static constexpr color DARK_KHAKI(0xBD, 0xB7, 0x6B);
-static constexpr color LIGHT_MEDIUM_BLUE(0x44, 0x44, 0xFF);
-static constexpr color SADDLE_BROWN(0x8B, 0x45, 0x13);
-static constexpr color FIRE_BRICK(0xB2, 0x22, 0x22);
-static constexpr color LIME_GREEN(0x32, 0xCD, 0x32);
-}
-
-#endif //EZGL_COLOR_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/control.hpp b/libs/EXTERNAL/libezgl/include/ezgl/control.hpp
deleted file mode 100644
index 82898e8ff36..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/control.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_CONTROL_HPP
-#define EZGL_CONTROL_HPP
-
-#include "ezgl/point.hpp"
-#include "ezgl/rectangle.hpp"
-
-namespace ezgl {
-
-/**** Functions to manipulate what is visible on the screen; used by ezgl's predefined buttons. ****/
-/**** Application code does not have to ever call these functions. ****/
-
-class canvas;
-
-/**
- * Zoom in on the center of the currently visible world.
- */
-void zoom_in(canvas *cnv, double zoom_factor);
-
-/**
- * Zoom out from the center of the currently visible world.
- */
-void zoom_out(canvas *cnv, double zoom_factor);
-
-/**
- * Zoom in on a specific point in the GTK widget.
- */
-void zoom_in(canvas *cnv, point2d zoom_point, double zoom_factor);
-
-/**
- * Zoom out from a specific point in GTK widget.
- */
-void zoom_out(canvas *cnv, point2d zoom_point, double zoom_factor);
-
-/**
- * Zoom in or out to fit an exact region of the world.
- */
-void zoom_fit(canvas *cnv, rectangle region);
-
-/**
- * Translate by delta x and delta y (dx, dy)
- */
-void translate(canvas *cnv, double dx, double dy);
-
-/**
- * Translate up
- */
-void translate_up(canvas *cnv, double translate_factor);
-
-/**
- * Translate down
- */
-void translate_down(canvas *cnv, double translate_factor);
-
-/**
- * Translate left
- */
-void translate_left(canvas *cnv, double translate_factor);
-
-/**
- * Translate right
- */
-void translate_right(canvas *cnv, double translate_factor);
-}
-
-#endif //EZGL_CONTROL_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/graphics.hpp b/libs/EXTERNAL/libezgl/include/ezgl/graphics.hpp
deleted file mode 100644
index 7b7250baa5c..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/graphics.hpp
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_GRAPHICS_HPP
-#define EZGL_GRAPHICS_HPP
-
-#include "ezgl/color.hpp"
-#include "ezgl/point.hpp"
-#include "ezgl/rectangle.hpp"
-#include "ezgl/camera.hpp"
-
-#include
-#include
-
-#ifdef CAIRO_HAS_XLIB_SURFACE
-#ifdef GDK_WINDOWING_X11
-#include
-
-// Speed up draw calls by using X11 instead of cairo wherever possible.
-#define EZGL_USE_X11
-#endif
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-namespace ezgl {
-
-/**
- * define ezgl::surface type used for drawing pngs
- */
-typedef cairo_surface_t surface;
-
-/**
- * Available coordinate systems
- */
-enum t_coordinate_system {
- /**
- * Default coordinate system
- */
- WORLD,
- /**
- * Screen coordinate system. Screen Coordinates are not transformed so the drawn objects do not pan or zoom.
- */
- SCREEN
-};
-
-/**
- * Justification options (used for text and surfaces)
- */
-enum class justification {
- /**
- * Center Justification: used for both vertical and horizontal justification
- */
- center,
- /**
- * Left justification: used for horizontal justification
- */
- left,
- /**
- * Right justification: used for horizontal justification
- */
- right,
- /**
- * Top justification: used for vertical justification
- */
- top,
- /**
- * Bottom justification: used for vertical justification
- */
- bottom
-};
-
-/**
- * The slant of the font.
- *
- * This enum is setup to match with the cairo graphics library and should not be changed.
- */
-enum class font_slant : int {
- /**
- * No slant.
- */
- normal = CAIRO_FONT_SLANT_NORMAL,
-
- /**
- * Slant is more calligraphic. Make sure the font you're using has an italic design, otherwise it may look ugly.
- */
- italic = CAIRO_FONT_SLANT_ITALIC,
-
- /**
- * Slanted to the right.
- */
- oblique = CAIRO_FONT_SLANT_OBLIQUE
-};
-
-/**
- * The weight of the font.
- */
-enum class font_weight : int {
- /**
- * No additional weight.
- */
- normal = CAIRO_FONT_WEIGHT_NORMAL,
-
- /**
- * Bold font weight.
- */
- bold = CAIRO_FONT_WEIGHT_BOLD
-};
-
-/**
- * The shape of a line's start and end point.
- */
-enum class line_cap : int {
- /**
- * Start and stop the line exactly where it begins/ends.
- */
- butt = CAIRO_LINE_CAP_BUTT,
-
- /**
- * Each end of the line has circles.
- */
- round = CAIRO_LINE_CAP_ROUND
-};
-
-/**
- * The dash style of a line.
- */
-enum class line_dash : int {
- /**
- * No dashes in the line (i.e., solid).
- */
- none,
-
- /**
- * Dash to whitespace ratio is 5:3.
- */
- asymmetric_5_3
-};
-
-/**
- * Provides functions to draw primitives (e.g., lines, shapes) to a rendering context.
- *
- * The renderer modifies a cairo_t context based on draw calls. The renderer uses an ezgl::camera object to convert
- * world coordinates into cairo's expected coordinate system.
- */
-class renderer {
-public:
- /**
- * Change the current coordinate system
- *
- * @param new_coordinate_system The drawing coordinate system SCREEN or WORLD
- */
- void set_coordinate_system(t_coordinate_system new_coordinate_system);
-
- /**
- * Set the visible bounds of the world
- *
- * The function preserves the aspect ratio of the initial world
- *
- * @param new_world The new visible bounds of the world
- */
- void set_visible_world(rectangle new_world);
-
- /**
- * Get the current visible bounds of the world
- */
- rectangle get_visible_world();
-
- /**
- * Get the current visible bounds of the screen
- */
- rectangle get_visible_screen();
-
- /**
- * Get the screen coordinates (i.e. pixel locations) of the world coordinate rectangle box
- *
- * @param box: a rectangle in world coordinates
- */
- rectangle world_to_screen(const rectangle& box);
-
- /**** Functions to set graphics attributes (for all subsequent drawing calls). ****/
-
- /**
- * Change the color for subsequent draw calls.
- *
- * @param new_color The new color to use.
- */
- void set_color(color new_color);
-
- /**
- * Change the color for subsequent draw calls.
- *
- * @param new_color The new color to use.
- * @param alpha Overwrite the alpha channel in the chosen color.
- */
- void set_color(color new_color, uint_fast8_t alpha);
-
- /**
- * Change the color for subsequent draw calls.
- *
- * @param red The amount of red to use, between 0 and 255.
- * @param green The amount of green to use, between 0 and 255.
- * @param blue The amount of blue to use, between 0 and 255.
- * @param alpha The transparency level (0 is fully transparent, 255 is opaque).
- */
- void set_color(uint_fast8_t red, uint_fast8_t green, uint_fast8_t blue, uint_fast8_t alpha = 255);
-
- /**
- * Change how line endpoints will be rendered in subsequent draw calls.
- */
- void set_line_cap(line_cap cap);
-
- /**
- * Change the dash style of the line.
- */
- void set_line_dash(line_dash dash);
-
- /**
- * Set the line width.
- *
- * @param width The width in pixels.
- * A value of 0 is still one pixel wide but about 100x faster
- * to draw than other line widths.
- */
- void set_line_width(int width);
-
- /**
- * Change the font size.
- *
- * @param new_size The new size text should be drawn at.
- */
- void set_font_size(double new_size);
-
- /**
- * Change the font.
- *
- * @param family The font family to use (e.g., serif)
- * @param slant The slant to use (e.g., italic)
- * @param weight The weight of the font (e.g., bold)
- */
- void format_font(std::string const &family, font_slant slant, font_weight weight);
-
- /**
- * Change the font.
- *
- * @param family The font family to use (e.g., serif)
- * @param slant The slant to use (e.g., italic)
- * @param weight The weight of the font (e.g., bold)
- * @param new_size The new size text should be drawn at.
- */
- void
- format_font(std::string const &family, font_slant slant, font_weight weight, double new_size);
-
- /**
- * set the rotation_angle variable that is used in rotating text.
- *
- * @param degrees The angle by which the text should rotate, in degrees.
- */
- void set_text_rotation(double degrees);
-
- /**
- * set horizontal justification (used for text and surfaces).
- *
- * @param horiz_just Options: center, left and right justification.
- */
- void set_horiz_justification(justification horiz_just);
-
- /**
- * set vertical justification (used for text and surfaces).
- *
- * @param vert_just Options: center, top and bottom justification.
- */
- void set_vert_justification(justification vert_just);
-
- /**** Functions to draw various graphics primitives ****/
-
- /**
- * Draw a line.
- *
- * @param start The start point of the line, in pixels.
- * @param end The end point of the line, in pixels.
- */
- void draw_line(point2d start, point2d end);
-
- /**
- * Draw the outline a rectangle.
- *
- * @param start The start point of the rectangle, in pixels.
- * @param end The end point of the rectangle, in pixels.
- */
- void draw_rectangle(point2d start, point2d end);
-
- /**
- * Draw the outline of a rectangle.
- *
- * @param start The start point of the rectangle, in pixels.
- * @param width How wide the rectangle is, in pixels.
- * @param height How high the rectangle is, in pixels.
- */
- void draw_rectangle(point2d start, double width, double height);
-
- /**
- * Draw the outline of a rectangle.
- */
- void draw_rectangle(rectangle r);
-
- /**
- * Draw a filled in rectangle.
- *
- * @param start The start point of the rectangle, in pixels.
- * @param end The end point of the rectangle, in pixels.
- */
- void fill_rectangle(point2d start, point2d end);
-
- /**
- * Draw a filled in rectangle.
- *
- * @param start The start point of the rectangle, in pixels.
- * @param width How wide the rectangle is, in pixels.
- * @param height How high the rectangle is, in pixels.
- */
- void fill_rectangle(point2d start, double width, double height);
-
- /**
- * Draw a filled in rectangle.
- */
- void fill_rectangle(rectangle r);
-
- /**
- * Draw a filled polygon.
- *
- * @param points The points to draw. The first and last points are connected to close the polygon.
- */
- void fill_poly(std::vector const &points);
-
- /**
- * Draw the outline of an elliptic arc.
- *
- * @param center The center of the arc, in pixels.
- * @param radius_x The x radius of the elliptic arc, in pixels.
- * @param radius_y The y radius of the elliptic arc, in pixels.
- * @param start_angle The starting angle of the arc, in degrees.
- * @param extent_angle The extent angle of the arc, in degrees.
- */
- void draw_elliptic_arc(point2d center,
- double radius_x,
- double radius_y,
- double start_angle,
- double extent_angle);
-
- /**
- * Draw the outline of an arc.
- *
- * @param center The center of the arc, in pixels.
- * @param radius The radius of the arc, in pixels.
- * @param start_angle The starting angle of the arc, in degrees.
- * @param extent_angle The extent angle of the arc, in degrees.
- */
- void draw_arc(point2d center, double radius, double start_angle, double extent_angle);
-
- /**
- * Draw a filled in elliptic arc.
- *
- * @param center The center of the arc, in pixels.
- * @param radius_x The x radius of the elliptic arc, in pixels.
- * @param radius_y The y radius of the elliptic arc, in pixels.
- * @param start_angle The starting angle of the arc, in degrees.
- * @param extent_angle The extent angle of the arc, in degrees.
- */
- void fill_elliptic_arc(point2d center,
- double radius_x,
- double radius_y,
- double start_angle,
- double extent_angle);
-
- /**
- * Draw a filled in arc.
- *
- * @param center The center of the arc, in pixels.
- * @param radius The radius of the arc, in pixels.
- * @param start_angle The starting angle of the arc, in degrees.
- * @param extent_angle The extent angle of the arc, in degrees.
- */
- void fill_arc(point2d center, double radius, double start_angle, double extent_angle);
-
- /**
- * Draw text.
- *
- * @param point The point where the text is drawn, in pixels.
- * @param text The text to draw.
- */
- void draw_text(point2d point, std::string const &text);
-
- /**
- * Draw text with bounds.
- *
- * @param point The point where the text is drawn, in pixels.
- * @param text The text to draw.
- * @param bound_x The maximum allowed width of the text
- * @param bound_y The maximum allowed height of the text
- */
- void draw_text(point2d point, std::string const &text, double bound_x, double bound_y);
-
- /**
- * Draw a surface
- *
- * @param surface The surface to draw
- * @param anchor_point The anchor_point point of the drawn surface.
- * @param scale_factor The scaling factor of the drawn surface (optional)
- */
- void draw_surface(surface *p_surface, point2d anchor_point, double scale_factor = 1);
-
- /**
- * load a png image
- *
- * @param file_path The path to the png image.
- *
- * @return a pointer to the created surface. Should be freed using free_surface()
- */
- static surface *load_png(const char *file_path);
-
- /**
- * Free a surface
- *
- * @param surface The surface to destroy
- */
- static void free_surface(surface *surface);
-
- /**
- * Destructor.
- */
- ~renderer();
-
-protected:
- // Only the canvas class can create a renderer.
- friend class canvas;
-
- /**
- * A callback for transforming points from one coordinate system to another.
- */
- using transform_fn = std::function;
-
- /**
- * Constructor.
- *
- * @param cairo The cairo graphics state.
- * @param transform The function to use to transform points to cairo's coordinate system.
- */
- renderer(cairo_t *cairo, transform_fn transform, camera *m_camera, cairo_surface_t *m_surface);
-
- /**
- * Update the renderer when the cairo surface/context changes
- *
- * @param cairo The new cairo graphics state
- * @param m_surface The new cairo surface
- */
- void update_renderer(cairo_t *cairo, cairo_surface_t *m_surface);
-
-private:
- void draw_rectangle_path(point2d start, point2d end, bool fill_flag);
-
- void draw_arc_path(point2d center,
- double radius,
- double start_angle,
- double extent_angle,
- double stretch_factor,
- bool fill_flag);
-
- // Pre-clipping function
- bool rectangle_off_screen(rectangle rect);
-
- // Current coordinate system (World is the default)
- t_coordinate_system current_coordinate_system = WORLD;
-
- // A non-owning pointer to a cairo graphics context.
- cairo_t *m_cairo;
-
-#ifdef EZGL_USE_X11
- // The x11 drawable
- Drawable x11_drawable;
-
- // The x11 display
- Display *x11_display = nullptr;
-
- // The x11 context
- GC x11_context;
-
- // Transparency flag, if set, cairo will be used
- bool transparency_flag = false;
-#endif
-
- transform_fn m_transform;
-
- //A non-owning pointer to camera object
- camera *m_camera;
-
- // the rotation angle variable used in rotating text
- double rotation_angle;
-
- // Current horizontal justification (used for text and surfaces)
- justification horiz_justification = justification::center;
-
- // Current vertical justification (used for text and surfaces)
- justification vert_justification = justification::center;
-
- // Current line width
- int current_line_width = 1;
-
- // Current line cap
- line_cap current_line_cap = line_cap::butt;
-
- // Current line dash
- line_dash current_line_dash = line_dash::none;
-
- // Current color
- color current_color = {0, 0, 0, 255};
-};
-}
-
-#endif //EZGL_GRAPHICS_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/point.hpp b/libs/EXTERNAL/libezgl/include/ezgl/point.hpp
deleted file mode 100644
index a0d39279f19..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/point.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_POINT_HPP
-#define EZGL_POINT_HPP
-
-namespace ezgl {
-
-/**
- * Represents a two-dimensional point.
- */
-class point2d {
-public:
- /**
- * Default constructor: Create a point at (0, 0).
- */
- point2d() : x(0.0), y(0.0)
- {
- }
-
- /**
- * Create a point at the given x and y position.
- */
- point2d(double x_coord, double y_coord) noexcept : x(x_coord), y(y_coord)
- {
- }
-
- /**
- * Location of the x-coordinate.
- */
- double x = 0.0;
-
- /**
- * Location of the y-coordinate.
- */
- double y = 0.0;
-
- /**
- * Test for equality.
- */
- friend bool operator==(point2d const &lhs, point2d const &rhs)
- {
- return (lhs.x == rhs.x) && (lhs.y == rhs.y);
- }
-
- /**
- * Test for inequality.
- */
- friend bool operator!=(point2d const &lhs, point2d const &rhs)
- {
- return !(lhs == rhs);
- }
-
- /**
- * Create a new point that is the sum of two points.
- */
- friend point2d operator+(point2d const &lhs, point2d const &rhs)
- {
- return {lhs.x + rhs.x, lhs.y + rhs.y};
- }
-
- /**
- * Add one point to another point.
- */
- friend point2d &operator+=(point2d &lhs, point2d const &rhs)
- {
- lhs.x += rhs.x;
- lhs.y += rhs.y;
-
- return lhs;
- }
-
- /**
- * Create a new point that is the difference of two points.
- */
- friend point2d operator-(point2d const &lhs, point2d const &rhs)
- {
- return {lhs.x - rhs.x, lhs.y - rhs.y};
- }
-
- /**
- * Subtract one point from another point.
- */
- friend point2d &operator-=(point2d &lhs, point2d const &rhs)
- {
- lhs.x -= rhs.x;
- lhs.y -= rhs.y;
-
- return lhs;
- }
-
- /**
- * Create a new point that is the product of two points.
- */
- friend point2d operator*(point2d const &lhs, point2d const &rhs)
- {
- return {lhs.x * rhs.x, lhs.y * rhs.y};
- }
-
- /**
- * Multiply one point with another point.
- */
- friend point2d &operator*=(point2d &lhs, point2d const &rhs)
- {
- lhs.x *= rhs.x;
- lhs.y *= rhs.y;
-
- return lhs;
- }
-};
-}
-
-#endif //EZGL_POINT_HPP
diff --git a/libs/EXTERNAL/libezgl/include/ezgl/rectangle.hpp b/libs/EXTERNAL/libezgl/include/ezgl/rectangle.hpp
deleted file mode 100644
index a454e7f107c..00000000000
--- a/libs/EXTERNAL/libezgl/include/ezgl/rectangle.hpp
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#ifndef EZGL_RECTANGLE_HPP
-#define EZGL_RECTANGLE_HPP
-
-#include "ezgl/point.hpp"
-
-#include
-
-namespace ezgl {
-
-/**
- * Represents a rectangle as two diagonally opposite points.
- */
-class rectangle {
-public:
- /**
- * Default constructor: Create a zero-sized rectangle at {0,0}.
- */
- rectangle() noexcept : m_first({0, 0}), m_second({0, 0})
- {
- }
-
- /**
- * Create a rectangle from two diagonally opposite points.
- */
- rectangle(point2d origin_pt, point2d top_right_pt) : m_first(origin_pt), m_second(top_right_pt)
- {
- }
-
- /**
- * Create a rectangle with a given width and height.
- */
- rectangle(point2d origin_pt, double rec_width, double rec_height) : m_first(origin_pt), m_second(origin_pt)
- {
- m_second.x += rec_width;
- m_second.y += rec_height;
- }
-
- /**
- * The minimum x-coordinate.
- */
- double left() const
- {
- return std::min(m_first.x, m_second.x);
- }
-
- /**
- * The maximum x-coordinate.
- */
- double right() const
- {
- return std::max(m_first.x, m_second.x);
- }
-
- /**
- * The minimum y-coordinate.
- */
- double bottom() const
- {
- return std::min(m_first.y, m_second.y);
- }
-
- /**
- * The maximum y-coordinate.
- */
- double top() const
- {
- return std::max(m_first.y, m_second.y);
- }
-
- /**
- * The minimum x-coordinate and the minimum y-coordinate.
- */
- point2d bottom_left() const
- {
- return {left(), bottom()};
- }
-
- /**
- * The minimum x-coordinate and the maximum y-coordinate.
- */
- point2d top_left() const
- {
- return {left(), top()};
- }
-
- /**
- * The maximum x-coordinate and the minimum y-coordinate.
- */
- point2d bottom_right() const
- {
- return {right(), bottom()};
- }
-
- /**
- * The maximum x-coordinate and the maximum y-coordinate.
- */
- point2d top_right() const
- {
- return {right(), top()};
- }
-
- /**
- * Test if the x and y values are within the rectangle.
- */
- bool contains(double x, double y) const
- {
- if(x < left() || right() < x || y < bottom() || top() < y) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Test if the x and y values are within the rectangle.
- */
- bool contains(point2d point) const
- {
- return contains(point.x, point.y);
- }
-
- /**
- * The width of the rectangle.
- */
- double width() const
- {
- return right() - left();
- }
-
- /**
- * The height of the rectangle.
- */
- double height() const
- {
- return top() - bottom();
- }
-
- /**
- *
- * The area of the rectangle.
- */
- double area() const
- {
- return width() * height();
- }
-
- /**
- * The center of the rectangle in the x plane.
- */
- double center_x() const
- {
- return (right() + left()) * 0.5;
- }
-
- /**
- * The center of the rectangle in the y plane.
- */
- double center_y() const
- {
- return (top() + bottom()) * 0.5;
- }
-
- /**
- * The center of the recangle.
- */
- point2d center() const
- {
- return {center_x(), center_y()};
- }
-
- /**
- * Test for equality.
- */
- bool operator==(const rectangle &rhs) const
- {
- return m_first == rhs.m_first && m_second == rhs.m_second;
- }
-
- /**
- * Test for inequality.
- */
- bool operator!=(const rectangle &rhs) const
- {
- return !(rhs == *this);
- }
-
- /**
- * translate the rectangle by positive offsets.
- */
- friend rectangle &operator+=(rectangle &lhs, point2d const &rhs)
- {
- lhs.m_first += rhs;
- lhs.m_second += rhs;
-
- return lhs;
- }
-
- /**
- * translate the rectangle by negative offsets.
- */
- friend rectangle &operator-=(rectangle &lhs, point2d const &rhs)
- {
- lhs.m_first -= rhs;
- lhs.m_second -= rhs;
-
- return lhs;
- }
-
- /**
- * Create a new rectangle that is translated (negative offsets).
- */
- friend rectangle operator-(rectangle &lhs, point2d const &rhs)
- {
- return rectangle(lhs.m_first - rhs, lhs.m_second - rhs);
- }
-
- /**
- * Create a new rectangle that is translated (positive offsets).
- */
- friend rectangle operator+(rectangle &lhs, point2d const &rhs)
- {
- return rectangle(lhs.m_first + rhs, lhs.m_second + rhs);
- }
-
- /** The first point of the rectangle */
- point2d m_first;
-
- /** The second point of the rectangle */
- point2d m_second;
-};
-}
-
-#endif //EZGL_RECTANGLE_HPP
diff --git a/libs/EXTERNAL/libezgl/options.cmake b/libs/EXTERNAL/libezgl/options.cmake
deleted file mode 100644
index 59f85dbb102..00000000000
--- a/libs/EXTERNAL/libezgl/options.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-option(
- EZGL_BUILD_EXAMPLES
- "Build the EZGL example executables."
- ${IS_ROOT_PROJECT} #Only build examples by default if EZGL is the root cmake project
-)
-
-option(
- EZGL_BUILD_DOCS
- "Create HTML/PDF documentation (requires Doygen)."
- OFF
-)
diff --git a/libs/EXTERNAL/libezgl/src/application.cpp b/libs/EXTERNAL/libezgl/src/application.cpp
deleted file mode 100644
index 27f8e04d1ad..00000000000
--- a/libs/EXTERNAL/libezgl/src/application.cpp
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#include "ezgl/application.hpp"
-
-// GLib deprecated G_APPLICATION_FLAGS_NONE and replaced it with G_APPLICATION_DEFAULT_FLAGS,
-// however, this enum was not introduced until GLib 2.74. These lines of code allow EZGL
-// to be backwards compatible with older versions of GLib, while not using the deprecated
-// enum.
-#if GLIB_CHECK_VERSION(2, 74, 0)
-static constexpr GApplicationFlags EZGL_APPLICATION_DEFAULT_FLAGS = G_APPLICATION_DEFAULT_FLAGS;
-#else
-static constexpr GApplicationFlags EZGL_APPLICATION_DEFAULT_FLAGS = G_APPLICATION_FLAGS_NONE;
-#endif
-
-namespace ezgl {
-
-// A flag to disable event loop (default is false)
-// This allows basic scripted testing even if the GUI is on (return immediately when the event loop is called)
-bool disable_event_loop = false;
-
-void application::startup(GtkApplication *, gpointer user_data)
-{
- auto ezgl_app = static_cast(user_data);
- g_return_if_fail(ezgl_app != nullptr);
-
- char const *main_ui_resource = ezgl_app->m_main_ui.c_str();
-
- if (!build_ui_from_file) {
- // Build the main user interface from the XML resource.
- // The XML resource is built from an XML file using the glib-compile-resources tool.
- // This adds an extra compilation step, but it embeds the UI description in the executable.
- GError *error = nullptr;
- if(gtk_builder_add_from_resource(ezgl_app->m_builder, main_ui_resource, &error) == 0) {
- g_error("%s.", error->message);
- }
- }
- else {
- // Build the main user interface from the XML file.
- GError *error = nullptr;
- if(gtk_builder_add_from_file(ezgl_app->m_builder, main_ui_resource, &error) == 0) {
- g_error("%s.", error->message);
- }
- }
-
- for(auto &c_pair : ezgl_app->m_canvases) {
- GObject *drawing_area = ezgl_app->get_object(c_pair.second->id());
- c_pair.second->initialize(GTK_WIDGET(drawing_area));
- }
-
- g_info("application::startup successful.");
-}
-
-void application::activate(GtkApplication *, gpointer user_data)
-{
- auto ezgl_app = static_cast(user_data);
- g_return_if_fail(ezgl_app != nullptr);
-
- // The main parent window needs to be explicitly added to our GTK application.
- GObject *window = ezgl_app->get_object(ezgl_app->m_window_id.c_str());
- gtk_application_add_window(ezgl_app->m_application, GTK_WINDOW(window));
-
- // Setup the default callbacks for the mouse and key events
- register_default_events_callbacks(ezgl_app);
-
- if(ezgl_app->m_register_callbacks != nullptr) {
- ezgl_app->m_register_callbacks(ezgl_app);
- } else {
- // Setup the default callbacks for the prebuilt buttons
- register_default_buttons_callbacks(ezgl_app);
- }
-
- if(ezgl_app->initial_setup_callback != nullptr)
- ezgl_app->initial_setup_callback(ezgl_app, true);
-
- g_info("application::activate successful.");
-}
-
-application::application(application::settings s)
- : m_main_ui(s.main_ui_resource)
- , m_window_id(s.window_identifier)
- , m_canvas_id(s.canvas_identifier)
- , m_application_id(s.application_identifier)
- , m_application(gtk_application_new(s.application_identifier.c_str(), EZGL_APPLICATION_DEFAULT_FLAGS))
- , m_builder(gtk_builder_new())
- , m_register_callbacks(s.setup_callbacks)
-{
-#ifdef EZGL_USE_X11
- // Prefer x11 first, then other backends.
- gdk_set_allowed_backends("x11,*");
-#endif
-
- // Connect our static functions application::{startup, activate} to their callbacks. We pass 'this' as the userdata
- // so that we can use it in our static functions.
- g_signal_connect(m_application, "startup", G_CALLBACK(startup), this);
- g_signal_connect(m_application, "activate", G_CALLBACK(activate), this);
-
- first_run = true;
- resume_run = false;
-}
-
-application::~application()
-{
- // GTK uses reference counting to track object lifetime. Since we called *_new() for our application and builder, we
- // need to unreference them. This should set their reference count to 0, letting GTK know that they should be cleaned
- // up in memory.
- g_object_unref(m_builder);
- g_object_unref(m_application);
-}
-
-canvas *application::get_canvas(const std::string &canvas_id) const
-{
- auto it = m_canvases.find(canvas_id);
- if(it != m_canvases.end()) {
- return it->second.get();
- }
-
- g_warning("Could not find canvas with name %s.", canvas_id.c_str());
- return nullptr;
-}
-
-canvas *application::add_canvas(std::string const &canvas_id,
- draw_canvas_fn draw_callback,
- rectangle coordinate_system,
- color background_color)
-{
- if(draw_callback == nullptr) {
- // A NULL draw callback means the canvas will never render anything to the screen.
- g_warning("Canvas %s's draw callback is NULL.", canvas_id.c_str());
- }
-
- // Can't use make_unique with protected constructor without fancy code that will confuse students, so we use new
- // instead.
- std::unique_ptr canvas_ptr(new canvas(canvas_id, draw_callback, coordinate_system, background_color));
- auto it = m_canvases.emplace(canvas_id, std::move(canvas_ptr));
-
- if(!it.second) {
- // std::map's emplace does not insert the value when the key is already present.
- g_warning("Duplicate key (%s) ignored in application::add_canvas.", canvas_id.c_str());
- } else {
- g_info("The %s canvas has been added to the application.", canvas_id.c_str());
- }
-
- return it.first->second.get();
-}
-
-GObject *application::get_object(gchar const *name) const
-{
- // Getting an object from the GTK builder does not increase its reference count.
- GObject *object = gtk_builder_get_object(m_builder, name);
- g_return_val_if_fail(object != nullptr, nullptr);
-
- return object;
-}
-
-int application::run(setup_callback_fn initial_setup_user_callback,
- mouse_callback_fn mouse_press_user_callback,
- mouse_callback_fn mouse_move_user_callback,
- key_callback_fn key_press_user_callback)
-{
- if(disable_event_loop)
- return 0;
-
- initial_setup_callback = initial_setup_user_callback;
- mouse_press_callback = mouse_press_user_callback;
- mouse_move_callback = mouse_move_user_callback;
- key_press_callback = key_press_user_callback;
-
- if(first_run) {
- // set the first_run flag to false
- first_run = false;
-
- g_info("The event loop is now starting.");
-
- // see: https://developer.gnome.org/gio/stable/GApplication.html#g-application-run
- return g_application_run(G_APPLICATION(m_application), 0, 0);
- }
- // The result of calling g_application_run() again after it returns is unspecified.
- // So in the subsequent runs instead of calling g_application_run(), we will go back to the event loop using gtk_main()
- else if(!first_run && gtk_application_get_active_window(m_application) != nullptr) {
-
- // Call user's initial setup call
- if(initial_setup_callback != nullptr)
- initial_setup_callback(this, false);
-
- // set the resume_run flag to true
- resume_run = true;
-
- g_info("The event loop is now resuming.");
-
- // see: https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main
- gtk_main();
-
- return 0;
- }
- // But if the GTK window is closed, we will have to destruct and reconstruct the GTKApplication
- else {
- // Destroy the GTK application
- g_object_unref(m_application);
- g_object_unref(m_builder);
-
- // Reconstruct the GTK application
- m_application = (gtk_application_new(m_application_id.c_str(), EZGL_APPLICATION_DEFAULT_FLAGS));
- m_builder = (gtk_builder_new());
- g_signal_connect(m_application, "startup", G_CALLBACK(startup), this);
- g_signal_connect(m_application, "activate", G_CALLBACK(activate), this);
-
- // set the resume_run flag to false
- resume_run = false;
-
- g_info("The event loop is now restarting.");
-
- // see: https://developer.gnome.org/gio/stable/GApplication.html#g-application-run
- return g_application_run(G_APPLICATION(m_application), 0, 0);
- }
-}
-
-void application::quit()
-{
- if(resume_run) {
- // Quit the event loop (exit gtk_main())
- gtk_main_quit();
- } else {
- // Quit the GTK application (exit g_application_run())
- g_application_quit(G_APPLICATION(m_application));
- }
-}
-
-void application::register_default_events_callbacks(ezgl::application *application)
-{
- // Get a pointer to the main window GUI object by using its name.
- std::string main_window_id = application->get_main_window_id();
- GObject *window = application->get_object(main_window_id.c_str());
-
- // Get a pointer to the main canvas GUI object by using its name.
- std::string main_canvas_id = application->get_main_canvas_id();
- GObject *main_canvas = application->get_object(main_canvas_id.c_str());
-
- // Connect press_key function to keyboard presses in the MainWindow.
- g_signal_connect(window, "key_press_event", G_CALLBACK(press_key), application);
-
- // Connect press_mouse function to mouse presses and releases in the MainWindow.
- g_signal_connect(main_canvas, "button_press_event", G_CALLBACK(press_mouse), application);
-
- // Connect release_mouse function to mouse presses and releases in the MainWindow.
- g_signal_connect(main_canvas, "button_release_event", G_CALLBACK(release_mouse), application);
-
- // Connect release_mouse function to mouse presses and releases in the MainWindow.
- g_signal_connect(main_canvas, "motion_notify_event", G_CALLBACK(move_mouse), application);
-
- // Connect scroll_mouse function to the mouse scroll event (up, down, left and right)
- g_signal_connect(main_canvas, "scroll_event", G_CALLBACK(scroll_mouse), application);
-
- // Connect press_proceed function to the close button of the MainWindow
- g_signal_connect(window, "destroy", G_CALLBACK(press_proceed), application);
-}
-
-void application::register_default_buttons_callbacks(ezgl::application *application)
-{
- // Connect press_zoom_fit function to the Zoom-fit button
- GObject *zoom_fit_button = application->get_object("ZoomFitButton");
- g_signal_connect(zoom_fit_button, "clicked", G_CALLBACK(press_zoom_fit), application);
-
- // Connect press_zoom_in function to the Zoom-in button
- GObject *zoom_in_button = application->get_object("ZoomInButton");
- g_signal_connect(zoom_in_button, "clicked", G_CALLBACK(press_zoom_in), application);
-
- // Connect press_zoom_out function to the Zoom-out button
- GObject *zoom_out_button = application->get_object("ZoomOutButton");
- g_signal_connect(zoom_out_button, "clicked", G_CALLBACK(press_zoom_out), application);
-
- // Connect press_up function to the Up button
- GObject *shift_up_button = application->get_object("UpButton");
- g_signal_connect(shift_up_button, "clicked", G_CALLBACK(press_up), application);
-
- // Connect press_down function to the Down button
- GObject *shift_down_button = application->get_object("DownButton");
- g_signal_connect(shift_down_button, "clicked", G_CALLBACK(press_down), application);
-
- // Connect press_left function to the Left button
- GObject *shift_left_button = application->get_object("LeftButton");
- g_signal_connect(shift_left_button, "clicked", G_CALLBACK(press_left), application);
-
- // Connect press_right function to the Right button
- GObject *shift_right_button = application->get_object("RightButton");
- g_signal_connect(shift_right_button, "clicked", G_CALLBACK(press_right), application);
-
- // Connect press_proceed function to the Proceed button
- GObject *proceed_button = application->get_object("ProceedButton");
- g_signal_connect(proceed_button, "clicked", G_CALLBACK(press_proceed), application);
-}
-
-void application::update_message(std::string const &message)
-{
- // Get the StatusBar Object
- GtkStatusbar *status_bar = (GtkStatusbar *)get_object("StatusBar");
-
- // Remove all previous messages from the message stack
- gtk_statusbar_remove_all(status_bar, 0);
-
- // Push user message to the message stack
- gtk_statusbar_push(status_bar, 0, message.c_str());
-}
-
-void application::create_button(const char *button_text,
- int left,
- int top,
- int width,
- int height,
- button_callback_fn button_func)
-{
- // get the internal Gtk grid
- GtkGrid *in_grid = (GtkGrid *)get_object("InnerGrid");
-
- // create the new button with the given label
- GtkWidget *new_button = gtk_button_new_with_label(button_text);
-
- // set can_focus property to false
-#if GTK_CHECK_VERSION (3, 20, 0)
- gtk_widget_set_focus_on_click(new_button, false);
-#endif
-
- // connect the buttons clicked event to the callback
- if(button_func != NULL) {
- g_signal_connect(G_OBJECT(new_button), "clicked", G_CALLBACK(button_func), this);
- }
-
- // add the new button
- gtk_grid_attach(in_grid, new_button, left, top, width, height);
-
- // show the button
- gtk_widget_show(new_button);
-}
-
-void application::create_button(const char *button_text,
- int insert_row,
- button_callback_fn button_func)
-{
- // get the internal Gtk grid
- GtkGrid *in_grid = (GtkGrid *)get_object("InnerGrid");
-
- // add a row where we want to insert
- gtk_grid_insert_row(in_grid, insert_row);
-
- // create the button
- create_button(button_text, 0, insert_row, 3, 1, button_func);
-}
-
-bool application::destroy_button(const char *button_text_to_destroy)
-{
- // get the inner grid
- GtkGrid *in_grid = (GtkGrid *)get_object("InnerGrid");
-
- // the text to delete, in c++ string form
- std::string text_to_del = std::string(button_text_to_destroy);
-
- // iterate over all of the children in the grid and find the button by it's text
- GList *children, *iter;
- children = gtk_container_get_children(GTK_CONTAINER(in_grid));
- for(iter = children; iter != NULL; iter = g_list_next(iter)) {
- // iterator to widget
- GtkWidget *widget = GTK_WIDGET(iter->data);
-
- // check if widget is a button
- if(GTK_IS_BUTTON(widget)) {
- // convert to button
- GtkButton *button = GTK_BUTTON(widget);
-
- // get the button label
- const char *button_label = gtk_button_get_label(button);
- if(button_label != nullptr) {
- std::string button_text = std::string(button_label);
-
- // does the label of the button match the one we want to delete?
- if(button_text == text_to_del) {
- // destroy the button (widget) and return true
- gtk_widget_destroy(widget);
- // free the children list
- g_list_free (children);
- return true;
- }
- }
- }
- }
-
- // free the children list
- g_list_free (children);
- // couldn't find the button with the label 'button_text_to_destroy'
- return false;
-}
-
-void application::change_button_text(const char *button_text, const char *new_button_text)
-{
- // get the inner grid
- GtkGrid *in_grid = (GtkGrid *)get_object("InnerGrid");
-
- // the text to change, in c++ string form
- std::string text_to_change = std::string(button_text);
-
- // iterate over all of the children in the grid and find the button by it's text
- GList *children, *iter;
- children = gtk_container_get_children(GTK_CONTAINER(in_grid));
- for(iter = children; iter != NULL; iter = g_list_next(iter)) {
- // iterator to widget
- GtkWidget *widget = GTK_WIDGET(iter->data);
-
- // check if widget is a button
- if(GTK_IS_BUTTON(widget)) {
- // convert to button
- GtkButton *button = GTK_BUTTON(widget);
-
- // get the button label
- const char *button_label = gtk_button_get_label(button);
- if(button_label != nullptr) {
- std::string button_text_str = std::string(button_label);
-
- // does the label of the button match the one we want to change?
- if(button_text_str == text_to_change) {
- // change button label
- gtk_button_set_label(button, new_button_text);
- }
- }
- }
- }
-
- // free the children list
- g_list_free (children);
-}
-
-void application::change_canvas_world_coordinates(std::string const &canvas_id,
- rectangle coordinate_system)
-{
- // get the canvas
- canvas *cnv = get_canvas(canvas_id);
-
- // reset the camera system with the new coordinates
- if (cnv != nullptr) {
- cnv->get_camera().reset_world(coordinate_system);
- }
-}
-
-void application::refresh_drawing()
-{
- // get the main canvas
- canvas *cnv = get_canvas(m_canvas_id);
-
- // force redrawing
- cnv->redraw();
-}
-
-void application::flush_drawing()
-{
- // get the main drawing area widget
- GtkWidget *drawing_area = (GtkWidget *)get_object(m_canvas_id.c_str());
-
- // queue a redraw of the GtkWidget
- gtk_widget_queue_draw(drawing_area);
-
- // run the main loop on pending events
- while(gtk_events_pending())
- gtk_main_iteration();
-}
-
-renderer *application::get_renderer()
-{
- // get the main canvas
- canvas *cnv = get_canvas(m_canvas_id);
-
- return cnv->create_animation_renderer();
-}
-
-void set_disable_event_loop(bool new_setting)
-{
- disable_event_loop = new_setting;
-}
-}
diff --git a/libs/EXTERNAL/libezgl/src/callback.cpp b/libs/EXTERNAL/libezgl/src/callback.cpp
deleted file mode 100644
index 33e2ff1d7d9..00000000000
--- a/libs/EXTERNAL/libezgl/src/callback.cpp
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright 2019-2022 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia, Tanner Young-Schultz and Vaughn Betz
- */
-
-#include "ezgl/callback.hpp"
-
-namespace ezgl {
-
-/**
- * Provides file wide variables to support mouse panning. We store some
- * state about mouse panning so we can determine when click & drag mouse
- * panning (handled by ezgl) is happening vs. simple mouse clicks (sent to
- * user mouse click callback).
- */
-struct mouse_pan {
- /**
- * Tracks whether the mouse button used for panning is currently pressed
- */
- bool panning_mouse_button_pressed = false;
- /**
- * Holds the timestamp of the last panning event
- */
- int last_panning_event_time = 0;
- /**
- * The old x and y positions of the mouse pointer, in the previous pan
- * event.
- */
- double prev_x = 0;
- double prev_y = 0;
-
- /* Has any panning happened since the mouse button was held down?
- */
- bool has_panned = false;
-} g_mouse_pan;
-
-gboolean press_key(GtkWidget *, GdkEventKey *event, gpointer data)
-{
- auto application = static_cast(data);
-
- // Call the user-defined key press callback if defined
- if(application->key_press_callback != nullptr) {
- // see: https://developer.gnome.org/gdk3/stable/gdk3-Keyboard-Handling.html
- application->key_press_callback(application, event, gdk_keyval_name(event->keyval));
- }
-
- // Returning FALSE to indicate this event should be propagated on to other
- // gtk widgets. This is important since we're grabbing keyboard events
- // for the whole main window. It can have unexpected effects though, such
- // as Enter/Space being treated as press any highlighted button.
- // return TRUE (event consumed) if you want to avoid that, and don't have
- // any widgets that need keyboard events.
- return FALSE;
-}
-
-gboolean press_mouse(GtkWidget *, GdkEventButton *event, gpointer data)
-{
- auto application = static_cast(data);
-
- if(event->type == GDK_BUTTON_PRESS) {
-
- // Check for mouse press to support dragging.
- if(event->button == PANNING_MOUSE_BUTTON) {
- g_mouse_pan.panning_mouse_button_pressed = true;
- g_mouse_pan.prev_x = event->x;
- g_mouse_pan.prev_y = event->y;
- g_mouse_pan.has_panned = false; /* Haven't shifted the view yet */
- }
- // Call the user-defined mouse press callback if defined
- // The user-defined callback is called for mouse buttons other than
- // the PANNING_MOUSE_BUTTON button. If the user pressed the PANNING_MOUSE_BUTTON button,
- // the callback will be called at mouse release only if no panning occurs
- else if(application->mouse_press_callback != nullptr) {
- ezgl::point2d const widget_coordinates(event->x, event->y);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- ezgl::canvas *canvas = application->get_canvas(main_canvas_id);
-
- ezgl::point2d const world = canvas->get_camera().widget_to_world(widget_coordinates);
- application->mouse_press_callback(application, event, world.x, world.y);
- }
- }
-
- return TRUE; // consume the event
-}
-
-gboolean release_mouse(GtkWidget *, GdkEventButton *event, gpointer data)
-{
- auto application = static_cast(data);
-
- if(event->type == GDK_BUTTON_RELEASE) {
- // Check for mouse release to support dragging
- if(event->button == PANNING_MOUSE_BUTTON) {
- g_mouse_pan.panning_mouse_button_pressed = false;
-
- // Call the user-defined mouse press callback for the PANNING_MOUSE_BUTTON button only if no panning occurs.
- // This lets the user use one mouse button for both click-and-drag
- // panning and simple clicking.
- if (!g_mouse_pan.has_panned && application->mouse_press_callback != nullptr) {
- ezgl::point2d const widget_coordinates(event->x, event->y);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- ezgl::canvas *canvas = application->get_canvas(main_canvas_id);
-
- ezgl::point2d const world = canvas->get_camera().widget_to_world(widget_coordinates);
- application->mouse_press_callback(application, event, world.x, world.y);
- }
- g_mouse_pan.has_panned = false; /* Done pan; reset for next time */
- }
- }
-
- return TRUE; // consume the event
-}
-
-gboolean move_mouse(GtkWidget *, GdkEventButton *event, gpointer data)
-{
- auto application = static_cast(data);
-
- if(event->type == GDK_MOTION_NOTIFY) {
-
- // Check if the mouse button is pressed to support dragging
- if(g_mouse_pan.panning_mouse_button_pressed) {
- // Code below drops a panning event if we served anothe one
- // less than 100 ms. I believe it was intended to avoid having panning
- // fall behind and queue up many events if redraws were slow. However,
- // it is not necessary on the UG machines (debian) in person, or over
- // VNC or on a VM and it has the bad effect of limiting refresh to 10 Hz.
- // Commenting it out for now and will delete if there
- // are no reported issues. - VB
- // if(gtk_get_current_event_time() - g_mouse_pan.last_panning_event_time < 100)
- // return true;
-
- g_mouse_pan.last_panning_event_time = gtk_get_current_event_time();
-
- GdkEventMotion *motion_event = (GdkEventMotion *)event;
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- point2d curr_trans = canvas->get_camera().widget_to_world({motion_event->x, motion_event->y});
- point2d prev_trans = canvas->get_camera().widget_to_world({g_mouse_pan.prev_x, g_mouse_pan.prev_y});
-
- double dx = curr_trans.x - prev_trans.x;
- double dy = curr_trans.y - prev_trans.y;
-
- g_mouse_pan.prev_x = motion_event->x;
- g_mouse_pan.prev_y = motion_event->y;
-
- // Flip the delta x to avoid inverted dragging
- translate(canvas, -dx, -dy);
- g_mouse_pan.has_panned = true;
- }
- // Else call the user-defined mouse move callback if defined
- else if(application->mouse_move_callback != nullptr) {
- ezgl::point2d const widget_coordinates(event->x, event->y);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- ezgl::canvas *canvas = application->get_canvas(main_canvas_id);
-
- ezgl::point2d const world = canvas->get_camera().widget_to_world(widget_coordinates);
- application->mouse_move_callback(application, event, world.x, world.y);
- }
- }
-
- return TRUE; // consume the event
-}
-
-gboolean scroll_mouse(GtkWidget *, GdkEvent *event, gpointer data)
-{
-
- if(event->type == GDK_SCROLL) {
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- GdkEventScroll *scroll_event = (GdkEventScroll *)event;
-
- ezgl::point2d scroll_point(scroll_event->x, scroll_event->y);
-
- if(scroll_event->direction == GDK_SCROLL_UP) {
- // Zoom in at the scroll point
- ezgl::zoom_in(canvas, scroll_point, 5.0 / 3.0);
- } else if(scroll_event->direction == GDK_SCROLL_DOWN) {
- // Zoom out at the scroll point
- ezgl::zoom_out(canvas, scroll_point, 5.0 / 3.0);
- } else if(scroll_event->direction == GDK_SCROLL_SMOOTH) {
- // Doesn't seem to be happening
- } // NOTE: We ignore scroll GDK_SCROLL_LEFT and GDK_SCROLL_RIGHT
- }
- return TRUE;
-}
-
-gboolean press_zoom_fit(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::zoom_fit(canvas, canvas->get_camera().get_initial_world());
-
- return TRUE;
-}
-
-gboolean press_zoom_in(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::zoom_in(canvas, 5.0 / 3.0);
-
- return TRUE;
-}
-
-gboolean press_zoom_out(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::zoom_out(canvas, 5.0 / 3.0);
-
- return TRUE;
-}
-
-gboolean press_up(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::translate_up(canvas, 5.0);
-
- return TRUE;
-}
-
-gboolean press_down(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::translate_down(canvas, 5.0);
-
- return TRUE;
-}
-
-gboolean press_left(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::translate_left(canvas, 5.0);
-
- return TRUE;
-}
-
-gboolean press_right(GtkWidget *, gpointer data)
-{
-
- auto application = static_cast(data);
-
- std::string main_canvas_id = application->get_main_canvas_id();
- auto canvas = application->get_canvas(main_canvas_id);
-
- ezgl::translate_right(canvas, 5.0);
-
- return TRUE;
-}
-
-gboolean press_proceed(GtkWidget *, gpointer data)
-{
- auto ezgl_app = static_cast(data);
- ezgl_app->quit();
-
- return TRUE;
-}
-}
\ No newline at end of file
diff --git a/libs/EXTERNAL/libezgl/src/camera.cpp b/libs/EXTERNAL/libezgl/src/camera.cpp
deleted file mode 100644
index 17afc4ea61e..00000000000
--- a/libs/EXTERNAL/libezgl/src/camera.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#include "ezgl/camera.hpp"
-
-#include
-#include
-
-namespace ezgl {
-
-static rectangle maintain_aspect_ratio(rectangle const &view, double widget_width, double widget_height)
-{
- double const x_scale = widget_width / view.width();
- double const y_scale = widget_height / view.height();
-
- double x_start = 0.0;
- double y_start = 0.0;
- double new_width;
- double new_height;
-
- if(x_scale * view.height() > widget_height) {
- // Using x_scale causes the view to be larger than the widget's height.
-
- // Keep the same height as the widget.
- new_height = widget_height;
- // Scale the width to maintain the aspect ratio.
- new_width = view.width() * y_scale;
- // Keep the view in the center of the widget.
- x_start = 0.5 * std::fabs(widget_width - new_width);
- } else {
- // Using x_scale keeps the view within the widget's height.
-
- // Keep the width the same as the widget.
- new_width = widget_width;
- // Scale the height to maintain the aspect ratio.
- new_height = view.height() * x_scale;
- // Keep the view in the center of the widget.
- y_start = 0.5 * std::fabs(widget_height - new_height);
- }
-
- return {{x_start, y_start}, new_width, new_height};
-}
-
-camera::camera(rectangle bounds) : m_world(bounds), m_screen(bounds), m_initial_world(bounds)
-{
-}
-
-point2d camera::widget_to_screen(point2d widget_coordinates) const
-{
- point2d const screen_origin = {m_screen.left(), m_screen.bottom()};
- point2d screen_coordinates = widget_coordinates - screen_origin;
-
- return screen_coordinates;
-}
-
-point2d camera::widget_to_world(point2d widget_coordinates) const
-{
- point2d const screen_coordinates = widget_to_screen(widget_coordinates);
-
- point2d world_coordinates = screen_coordinates * m_screen_to_world;
-
- world_coordinates.x += m_world.left();
-
- // GTK and cairo use a flipped y-axis.
- world_coordinates.y = (world_coordinates.y - m_world.top()) * -1.0;
-
- return world_coordinates;
-}
-
-/**
- * Some X11 implementations overflow with sufficiently large pixel
- * coordinates and start drawing strangely. We will clip all pixels
- * to lie in the range below.
- * TODO: We can also switch to cairo for large pixel coordinates
- */
-#define MAXPIXEL 10000.0
-#define MINPIXEL -10000.0
-
-point2d camera::world_to_screen(point2d world_coordinates) const
-{
- point2d const world_origin{m_world.left(), m_world.bottom()};
- point2d widget_coordinates = (world_coordinates - world_origin) * m_world_to_widget;
-
- // GTK and cairo use a flipped y-axis.
- widget_coordinates.y = (widget_coordinates.y - m_widget.top()) * -1.0;
-
- point2d screen_coordinates = widget_coordinates * m_widget_to_screen;
-
- point2d const screen_origin = {m_screen.left(), m_screen.bottom()};
- screen_coordinates = screen_coordinates + screen_origin;
-
- screen_coordinates.x = std::max(screen_coordinates.x, MINPIXEL);
- screen_coordinates.y = std::max(screen_coordinates.y, MINPIXEL);
- screen_coordinates.x = std::min(screen_coordinates.x, MAXPIXEL);
- screen_coordinates.y = std::min(screen_coordinates.y, MAXPIXEL);
-
- return screen_coordinates;
-}
-
-void camera::set_world(rectangle new_world)
-{
- m_world = new_world;
-
- update_scale_factors();
-}
-
-void camera::reset_world(rectangle new_world)
-{
- // Change the coordinates to the new bounds
- m_world = new_world;
- m_screen = new_world;
- m_initial_world = new_world;
-
- m_screen = maintain_aspect_ratio(m_screen, m_widget.width(), m_widget.height());
- update_scale_factors();
-}
-
-void camera::update_widget(int width, int height)
-{
- m_widget = rectangle{{0, 0}, static_cast(width), static_cast(height)};
-
- m_screen = maintain_aspect_ratio(m_screen, m_widget.width(), m_widget.height());
- update_scale_factors();
-}
-
-void camera::update_scale_factors()
-{
- m_widget_to_screen.x = m_screen.width() / m_widget.width();
- m_widget_to_screen.y = m_screen.height() / m_widget.height();
-
- m_world_to_widget.x = m_widget.width() / m_world.width();
- m_world_to_widget.y = m_widget.height() / m_world.height();
-
- m_screen_to_world.x = m_world.width() / m_screen.width();
- m_screen_to_world.y = m_world.height() / m_screen.height();
-}
-}
diff --git a/libs/EXTERNAL/libezgl/src/canvas.cpp b/libs/EXTERNAL/libezgl/src/canvas.cpp
deleted file mode 100644
index 75452a3225f..00000000000
--- a/libs/EXTERNAL/libezgl/src/canvas.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#include "ezgl/canvas.hpp"
-
-#include "ezgl/graphics.hpp"
-
-#include
-
-#include
-#include
-#include
-
-namespace ezgl {
-
-static cairo_surface_t *create_surface(GtkWidget *widget)
-{
- GdkWindow *parent_window = gtk_widget_get_window(widget);
- int const width = gtk_widget_get_allocated_width(widget);
- int const height = gtk_widget_get_allocated_height(widget);
-
- // Cairo image surfaces are more efficient than normal Cairo surfaces
- // However, you cannot use X11 functions to draw on image surfaces
-#ifdef EZGL_USE_X11
- cairo_surface_t *p_surface = gdk_window_create_similar_surface(
- parent_window, CAIRO_CONTENT_COLOR_ALPHA, width, height);
-#else
- cairo_surface_t *p_surface = gdk_window_create_similar_image_surface(
- parent_window, CAIRO_FORMAT_ARGB32, width, height, 0);
-#endif
-
- // On HiDPI displays, Cairos surfaces are scaled to 2x or more
- // However, EZGL doesn't support scaling yet
- // Force the scaling factor to 1 for both x and y
- cairo_surface_set_device_scale(p_surface, 1, 1);
-
- return p_surface;
-}
-
-static cairo_t *create_context(cairo_surface_t *p_surface)
-{
- cairo_t *context = cairo_create(p_surface);
-
- // Set the antialiasing mode of the rasterizer used for drawing shapes
- // Set to CAIRO_ANTIALIAS_NONE for maximum speed
- // See https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t
- cairo_set_antialias(context, CAIRO_ANTIALIAS_NONE);
-
- return context;
-}
-
-bool canvas::print_pdf(const char *file_name, int output_width, int output_height)
-{
- cairo_surface_t *pdf_surface;
- cairo_t *context;
- int surface_width = 0;
- int surface_height = 0;
-
- // create pdf surface based on canvas size
- if(output_width == 0 && output_height == 0){
- surface_width = gtk_widget_get_allocated_width(m_drawing_area);
- surface_height = gtk_widget_get_allocated_height(m_drawing_area);
- }else{
- surface_width = output_width;
- surface_height = output_height;
- }
- pdf_surface = cairo_pdf_surface_create(file_name, surface_width, surface_height);
-
- if(pdf_surface == NULL)
- return false; // failed to create due to errors such as out of memory
- context = create_context(pdf_surface);
-
- // draw on the newly created pdf surface & context
- cairo_set_source_rgb(context, m_background_color.red / 255.0, m_background_color.green / 255.0,
- m_background_color.blue / 255.0);
- cairo_paint(context);
-
- using namespace std::placeholders;
- camera pdf_cam = m_camera;
- pdf_cam.update_widget(surface_width, surface_height);
- renderer g(context, std::bind(&camera::world_to_screen, pdf_cam, _1), &pdf_cam, pdf_surface);
- m_draw_callback(&g);
-
- // free surface & context
- cairo_surface_destroy(pdf_surface);
- cairo_destroy(context);
-
- return true;
-}
-
-bool canvas::print_svg(const char *file_name, int output_width, int output_height)
-{
- cairo_surface_t *svg_surface;
- cairo_t *context;
- int surface_width = 0;
- int surface_height = 0;
-
- // create pdf surface based on canvas size
- if(output_width == 0 && output_height == 0){
- surface_width = gtk_widget_get_allocated_width(m_drawing_area);
- surface_height = gtk_widget_get_allocated_height(m_drawing_area);
- }else{
- surface_width = output_width;
- surface_height = output_height;
- }
- svg_surface = cairo_svg_surface_create(file_name, surface_width, surface_height);
-
- if(svg_surface == NULL)
- return false; // failed to create due to errors such as out of memory
- context = create_context(svg_surface);
-
- // draw on the newly created svg surface & context
- cairo_set_source_rgb(context, m_background_color.red / 255.0, m_background_color.green / 255.0,
- m_background_color.blue / 255.0);
- cairo_paint(context);
-
- using namespace std::placeholders;
- camera svg_cam = m_camera;
- svg_cam.update_widget(surface_width, surface_height);
- renderer g(context, std::bind(&camera::world_to_screen, svg_cam, _1), &svg_cam, svg_surface);
- m_draw_callback(&g);
-
- // free surface & context
- cairo_surface_destroy(svg_surface);
- cairo_destroy(context);
-
- return true;
-}
-
-bool canvas::print_png(const char *file_name, int output_width, int output_height)
-{
- cairo_surface_t *png_surface;
- cairo_t *context;
- int surface_width = 0;
- int surface_height = 0;
-
- // create pdf surface based on canvas size
- if(output_width == 0 && output_height == 0){
- surface_width = gtk_widget_get_allocated_width(m_drawing_area);
- surface_height = gtk_widget_get_allocated_height(m_drawing_area);
- }else{
- surface_width = output_width;
- surface_height = output_height;
- }
- png_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, surface_width, surface_height);
-
- if(png_surface == NULL)
- return false; // failed to create due to errors such as out of memory
- context = create_context(png_surface);
-
- // draw on the newly created png surface & context
- cairo_set_source_rgb(context, m_background_color.red / 255.0, m_background_color.green / 255.0,
- m_background_color.blue / 255.0);
- cairo_paint(context);
-
- using namespace std::placeholders;
- camera png_cam = m_camera;
- png_cam.update_widget(surface_width, surface_height);
- renderer g(context, std::bind(&camera::world_to_screen, png_cam, _1), &png_cam, png_surface);
- m_draw_callback(&g);
-
- // create png output file
- cairo_surface_write_to_png(png_surface, file_name);
-
- // free surface & context
- cairo_surface_destroy(png_surface);
- cairo_destroy(context);
-
- return true;
-}
-
-gboolean canvas::configure_event(GtkWidget *widget, GdkEventConfigure *, gpointer data)
-{
- // User data should have been set during the signal connection.
- g_return_val_if_fail(data != nullptr, FALSE);
-
- auto ezgl_canvas = static_cast(data);
- auto &p_surface = ezgl_canvas->m_surface;
- auto &p_context = ezgl_canvas->m_context;
-
- if(p_surface != nullptr) {
- cairo_surface_destroy(p_surface);
- }
-
- if(p_context != nullptr) {
- cairo_destroy(p_context);
- }
-
- // Something has changed, recreate the surface.
- p_surface = create_surface(widget);
-
- // Recreate the context
- p_context = create_context(p_surface);
-
- // The camera needs to be updated before we start drawing again.
- ezgl_canvas->m_camera.update_widget(ezgl_canvas->width(), ezgl_canvas->height());
-
- // Draw to the newly created surface.
- ezgl_canvas->redraw();
-
- // Update the animation renderer
- if(ezgl_canvas->m_animation_renderer != nullptr)
- ezgl_canvas->m_animation_renderer->update_renderer(p_context, p_surface);
-
- g_info("canvas::configure_event has been handled.");
- return TRUE; // the configure event was handled
-}
-
-gboolean canvas::draw_surface(GtkWidget *, cairo_t *context, gpointer data)
-{
- // Assume context and data are non-null.
- auto &p_surface = static_cast(data)->m_surface;
-
- // Assume surface is non-null.
- cairo_set_source_surface(context, p_surface, 0, 0);
- cairo_paint(context);
-
- return FALSE;
-}
-
-canvas::canvas(std::string canvas_id,
- draw_canvas_fn draw_callback,
- rectangle coordinate_system,
- color background_color)
- : m_canvas_id(std::move(canvas_id))
- , m_draw_callback(draw_callback)
- , m_camera(coordinate_system)
- , m_background_color(background_color)
-{
-}
-
-canvas::~canvas()
-{
- if(m_surface != nullptr) {
- cairo_surface_destroy(m_surface);
- }
-
- if(m_context != nullptr) {
- cairo_destroy(m_context);
- }
-
- if(m_animation_renderer != nullptr) {
- delete m_animation_renderer;
- }
-}
-
-int canvas::width() const
-{
- return gtk_widget_get_allocated_width(m_drawing_area);
-}
-
-int canvas::height() const
-{
- return gtk_widget_get_allocated_height(m_drawing_area);
-}
-
-void canvas::initialize(GtkWidget *drawing_area)
-{
- g_return_if_fail(drawing_area != nullptr);
-
- m_drawing_area = drawing_area;
- m_surface = create_surface(m_drawing_area);
- m_context = create_context(m_surface);
- m_camera.update_widget(width(), height());
-
- // Draw to the newly created surface for the first time.
- redraw();
-
- // Connect to configure events in case our widget changes shape.
- g_signal_connect(m_drawing_area, "configure-event", G_CALLBACK(configure_event), this);
- // Connect to draw events so that we draw our surface to the drawing area.
- g_signal_connect(m_drawing_area, "draw", G_CALLBACK(draw_surface), this);
-
- // GtkDrawingArea objects need specific events enabled explicitly.
- gtk_widget_add_events(GTK_WIDGET(m_drawing_area), GDK_BUTTON_PRESS_MASK);
- gtk_widget_add_events(GTK_WIDGET(m_drawing_area), GDK_BUTTON_RELEASE_MASK);
- gtk_widget_add_events(GTK_WIDGET(m_drawing_area), GDK_POINTER_MOTION_MASK);
- gtk_widget_add_events(GTK_WIDGET(m_drawing_area), GDK_SCROLL_MASK);
-
- g_info("canvas::initialize successful.");
-}
-
-void canvas::redraw()
-{
- // Clear the screen and set the background color
- cairo_set_source_rgb(m_context, m_background_color.red / 255.0, m_background_color.green / 255.0,
- m_background_color.blue / 255.0);
- cairo_paint(m_context);
-
- using namespace std::placeholders;
- renderer g(m_context, std::bind(&camera::world_to_screen, &m_camera, _1), &m_camera, m_surface);
- m_draw_callback(&g);
-
- gtk_widget_queue_draw(m_drawing_area);
-
- g_info("The canvas will be redrawn.");
-}
-
-renderer *canvas::create_animation_renderer()
-{
- if(m_animation_renderer == nullptr) {
- using namespace std::placeholders;
- m_animation_renderer = new renderer(m_context, std::bind(&camera::world_to_screen, &m_camera, _1), &m_camera, m_surface);
- }
-
- return m_animation_renderer;
-}
-} // namespace ezgl
diff --git a/libs/EXTERNAL/libezgl/src/control.cpp b/libs/EXTERNAL/libezgl/src/control.cpp
deleted file mode 100644
index 43ef651e968..00000000000
--- a/libs/EXTERNAL/libezgl/src/control.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#include "ezgl/control.hpp"
-
-#include "ezgl/camera.hpp"
-#include "ezgl/canvas.hpp"
-
-namespace ezgl {
-
-static rectangle zoom_in_world(point2d zoom_point, rectangle world, double zoom_factor)
-{
- double const left = zoom_point.x - (zoom_point.x - world.left()) / zoom_factor;
- double const bottom = zoom_point.y + (world.bottom() - zoom_point.y) / zoom_factor;
-
- double const right = zoom_point.x + (world.right() - zoom_point.x) / zoom_factor;
- double const top = zoom_point.y - (zoom_point.y - world.top()) / zoom_factor;
-
- return {{left, bottom}, {right, top}};
-}
-
-static rectangle zoom_out_world(point2d zoom_point, rectangle world, double zoom_factor)
-{
- double const left = zoom_point.x - (zoom_point.x - world.left()) * zoom_factor;
- double const bottom = zoom_point.y + (world.bottom() - zoom_point.y) * zoom_factor;
-
- double const right = zoom_point.x + (world.right() - zoom_point.x) * zoom_factor;
- double const top = zoom_point.y - (zoom_point.y - world.top()) * zoom_factor;
-
- return {{left, bottom}, {right, top}};
-}
-
-void zoom_in(canvas *cnv, double zoom_factor)
-{
- point2d const zoom_point = cnv->get_camera().get_world().center();
- rectangle const world = cnv->get_camera().get_world();
-
- cnv->get_camera().set_world(zoom_in_world(zoom_point, world, zoom_factor));
- cnv->redraw();
-}
-
-void zoom_in(canvas *cnv, point2d zoom_point, double zoom_factor)
-{
- zoom_point = cnv->get_camera().widget_to_world(zoom_point);
- rectangle const world = cnv->get_camera().get_world();
-
- cnv->get_camera().set_world(zoom_in_world(zoom_point, world, zoom_factor));
- cnv->redraw();
-}
-
-void zoom_out(canvas *cnv, double zoom_factor)
-{
- point2d const zoom_point = cnv->get_camera().get_world().center();
- rectangle const world = cnv->get_camera().get_world();
-
- cnv->get_camera().set_world(zoom_out_world(zoom_point, world, zoom_factor));
- cnv->redraw();
-}
-
-void zoom_out(canvas *cnv, point2d zoom_point, double zoom_factor)
-{
- zoom_point = cnv->get_camera().widget_to_world(zoom_point);
- rectangle const world = cnv->get_camera().get_world();
-
- cnv->get_camera().set_world(zoom_out_world(zoom_point, world, zoom_factor));
- cnv->redraw();
-}
-
-void zoom_fit(canvas *cnv, rectangle region)
-{
- cnv->get_camera().set_world(region);
- cnv->redraw();
-}
-
-void translate(canvas *cnv, double dx, double dy)
-{
- rectangle new_world = cnv->get_camera().get_world();
- new_world += ezgl::point2d(dx, dy);
-
- cnv->get_camera().set_world(new_world);
- cnv->redraw();
-}
-
-void translate_up(canvas *cnv, double translate_factor)
-{
- rectangle new_world = cnv->get_camera().get_world();
- double dy = new_world.height() / translate_factor;
-
- translate(cnv, 0.0, dy);
-}
-
-void translate_down(canvas *cnv, double translate_factor)
-{
- rectangle new_world = cnv->get_camera().get_world();
- double dy = new_world.height() / translate_factor;
-
- translate(cnv, 0.0, -dy);
-}
-
-void translate_left(canvas *cnv, double translate_factor)
-{
- rectangle new_world = cnv->get_camera().get_world();
- double dx = new_world.width() / translate_factor;
-
- translate(cnv, -dx, 0.0);
-}
-
-void translate_right(canvas *cnv, double translate_factor)
-{
- rectangle new_world = cnv->get_camera().get_world();
- double dx = new_world.width() / translate_factor;
-
- translate(cnv, dx, 0.0);
-}
-}
diff --git a/libs/EXTERNAL/libezgl/src/graphics.cpp b/libs/EXTERNAL/libezgl/src/graphics.cpp
deleted file mode 100644
index 344658de323..00000000000
--- a/libs/EXTERNAL/libezgl/src/graphics.cpp
+++ /dev/null
@@ -1,801 +0,0 @@
-/*
- * Copyright 2019 University of Toronto
- *
- * 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.
- *
- * Authors: Mario Badr, Sameh Attia and Tanner Young-Schultz
- */
-
-#include "ezgl/graphics.hpp"
-
-#include
-#include
-
-namespace ezgl {
-
-renderer::renderer(cairo_t *cairo,
- transform_fn transform,
- camera *p_camera,
- cairo_surface_t *m_surface)
- : m_cairo(cairo), m_transform(std::move(transform)), m_camera(p_camera), rotation_angle(0)
-{
-#ifdef EZGL_USE_X11
- // Check if the created cairo surface is an XLIB surface
- if (cairo_surface_get_type(m_surface) == CAIRO_SURFACE_TYPE_XLIB) {
- // get the underlying x11 drawable used by cairo surface
- x11_drawable = cairo_xlib_surface_get_drawable(m_surface);
-
- // get the x11 display
- x11_display = cairo_xlib_surface_get_display(m_surface);
-
- // create the x11 context from the drawable of the cairo surface
- if (x11_display != nullptr) {
- x11_context = XCreateGC(x11_display, x11_drawable, 0, 0);
- }
- }
-#endif
-}
-
-renderer::~renderer()
-{
-#ifdef EZGL_USE_X11
- // free the x11 context
- if (x11_display != nullptr) {
- XFreeGC(x11_display, x11_context);
- }
-#endif
-}
-
-void renderer::update_renderer(cairo_t *cairo, cairo_surface_t *m_surface)
-{
- // Update Cairo Context
- m_cairo = cairo;
-
- // Update X11 Context
-#ifdef EZGL_USE_X11
- // Check if the created cairo surface is an XLIB surface
- if (cairo_surface_get_type(m_surface) == CAIRO_SURFACE_TYPE_XLIB) {
- // get the underlying x11 drawable used by cairo surface
- x11_drawable = cairo_xlib_surface_get_drawable(m_surface);
-
- // get the x11 display
- x11_display = cairo_xlib_surface_get_display(m_surface);
-
- // create the x11 context from the drawable of the cairo surface
- if (x11_display != nullptr) {
- XFreeGC(x11_display, x11_context);
- x11_context = XCreateGC(x11_display, x11_drawable, 0, 0);
- }
- }
-#endif
-
- // Restore graphics attributes
- set_color(current_color);
- set_line_width(current_line_width);
- set_line_cap(current_line_cap);
- set_line_dash(current_line_dash);
-}
-
-void renderer::set_coordinate_system(t_coordinate_system new_coordinate_system)
-{
- current_coordinate_system = new_coordinate_system;
-}
-
-void renderer::set_visible_world(rectangle new_world)
-{
- // Change the aspect ratio of the new_world to align with the aspect ratio of the initial world
- // Get the width and height of the new_world
- point2d n_center = new_world.center();
- double n_width = new_world.width();
- double n_height = new_world.height();
-
- // Get the aspect ratio of the initial world
- double i_width = m_camera->get_initial_world().width();
- double i_height = m_camera->get_initial_world().height();
- double i_aspect_ratio = i_width / i_height;
-
- // Make sure the required area is entirely visible
- if (n_width/i_aspect_ratio >= n_height) {
- // Change the height
- double new_height = n_width/i_aspect_ratio;
- new_world ={{n_center.x-n_width/2, n_center.y-new_height/2}, n_width, new_height};
- }
- else {
- // Change the width
- double new_width = n_height*i_aspect_ratio;
- new_world ={{n_center.x-new_width/2, n_center.y-n_height/2}, new_width, n_height};
- }
-
- // set the visible bounds of the world
- m_camera->set_world(new_world);
-}
-
-rectangle renderer::get_visible_world()
-{
- // m_camera->get_world() is not good representative of the visible world since it doesn't
- // account for the drawable margins.
- // TODO: precalculate the visible world in camera class to speedup the clipping
-
- // Get the world and screen dimensions
- rectangle world = m_camera->get_world();
- rectangle screen = m_camera->get_screen();
-
- // Calculate the margins by converting the screen origin to world coordinates
- point2d margin = screen.bottom_left() * m_camera->get_world_scale_factor();
-
- // The actual visible world
- return {(world.bottom_left() - margin), (world.top_right() + margin)};
-}
-
-rectangle renderer::get_visible_screen()
-{
- // Get the widget dimensions
- return m_camera->get_widget();
-}
-
-rectangle renderer::world_to_screen(const rectangle& box)
-{
- point2d origin = m_transform(box.bottom_left());
- point2d top_right = m_transform(box.top_right());
-
- return rectangle(origin, top_right);
-}
-
-bool renderer::rectangle_off_screen(rectangle rect)
-{
- if(current_coordinate_system == SCREEN)
- return false;
-
- rectangle visible = get_visible_world();
-
- if(rect.right() < visible.left())
- return true;
-
- if(rect.left() > visible.right())
- return true;
-
- if(rect.top() < visible.bottom())
- return true;
-
- if(rect.bottom() > visible.top())
- return true;
-
- return false;
-}
-
-void renderer::set_color(color c)
-{
- set_color(c.red, c.green, c.blue, c.alpha);
-}
-
-void renderer::set_color(color c, uint_fast8_t alpha)
-{
- set_color(c.red, c.green, c.blue, alpha);
-}
-
-void renderer::set_color(uint_fast8_t red,
- uint_fast8_t green,
- uint_fast8_t blue,
- uint_fast8_t alpha)
-{
- // set color for cairo
- cairo_set_source_rgba(m_cairo, red / 255.0, green / 255.0, blue / 255.0, alpha / 255.0);
-
- // set current_color
- current_color = {red, green, blue, alpha};
-
-#ifdef EZGL_USE_X11
- // check transparency
- if(alpha != 255)
- transparency_flag = true;
- else
- transparency_flag = false;
-
- // set color for x11 (no transparency)
- if (x11_display != nullptr) {
- unsigned long xcolor = 0;
- xcolor |= (red << 2 * 8 | red << 8 | red) & 0xFF0000;
- xcolor |= (green << 2 * 8 | green << 8 | green) & 0xFF00;
- xcolor |= (blue << 2 * 8 | blue << 8 | blue) & 0xFF;
- xcolor |= 0xFF000000;
- XSetForeground(x11_display, x11_context, xcolor);
- }
-#endif
-}
-
-void renderer::set_line_cap(line_cap cap)
-{
- auto cairo_cap = static_cast(cap);
- cairo_set_line_cap(m_cairo, cairo_cap);
-
- current_line_cap = cap;
-
-#ifdef EZGL_USE_X11
- if (x11_display != nullptr) {
- XSetLineAttributes(x11_display, x11_context, current_line_width,
- current_line_dash == line_dash::none ? LineSolid : LineOnOffDash,
- current_line_cap == line_cap::butt ? CapButt : CapRound, JoinMiter);
- }
-#endif
-}
-
-void renderer::set_line_dash(line_dash dash)
-{
- if(dash == line_dash::none) {
- int num_dashes = 0; // disables dashing
-
- cairo_set_dash(m_cairo, nullptr, num_dashes, 0);
- } else if(dash == line_dash::asymmetric_5_3) {
- static double dashes[] = {5.0, 3.0};
- int num_dashes = 2; // asymmetric dashing
-
- cairo_set_dash(m_cairo, dashes, num_dashes, 0);
- }
-
- current_line_dash = dash;
-
-#ifdef EZGL_USE_X11
- if (x11_display != nullptr) {
- XSetLineAttributes(x11_display, x11_context, current_line_width,
- current_line_dash == line_dash::none ? LineSolid : LineOnOffDash,
- current_line_cap == line_cap::butt ? CapButt : CapRound, JoinMiter);
- }
-#endif
-}
-
-void renderer::set_line_width(int width)
-{
- cairo_set_line_width(m_cairo, width == 0 ? 1 : width);
-
- current_line_width = width;
-
-#ifdef EZGL_USE_X11
- if (x11_display != nullptr) {
- XSetLineAttributes(x11_display, x11_context, current_line_width,
- current_line_dash == line_dash::none ? LineSolid : LineOnOffDash,
- current_line_cap == line_cap::butt ? CapButt : CapRound, JoinMiter);
- }
-#endif
-}
-
-void renderer::set_font_size(double new_size)
-{
- cairo_set_font_size(m_cairo, new_size);
-}
-
-void renderer::format_font(std::string const &family, font_slant slant, font_weight weight)
-{
- cairo_select_font_face(m_cairo, family.c_str(), static_cast(slant),
- static_cast(weight));
-}
-
-void renderer::format_font(std::string const &family,
- font_slant slant,
- font_weight weight,
- double new_size)
-{
- set_font_size(new_size);
- format_font(family, slant, weight);
-}
-
-void renderer::set_text_rotation(double degrees)
-{
- // Bad rotation values (inf, NaN) can cause permanent problems in the
- // graphics, as the cairo_restore to undo the rotation doesn't work.
- // Check for them before changing the angle.
- if (degrees >= -360. && degrees <= 360.) {
- // convert the given angle to rad
- rotation_angle = -degrees * M_PI / 180;
- }
- else {
- g_warning("set_text_rotation: bad rotation angle of %f. Ignored!", degrees);
- }
-}
-
-void renderer::set_horiz_justification(justification horiz_just)
-{
- // Ignore illegal values for horizontal justification
- if (horiz_just != justification::top && horiz_just != justification::bottom)
- horiz_justification = horiz_just;
-}
-
-void renderer::set_vert_justification(justification vert_just)
-{
- // Ignore illegal values for vertical justification
- if (vert_just != justification::right && vert_just != justification::left)
- vert_justification = vert_just;
-}
-
-void renderer::draw_line(point2d start, point2d end)
-{
- if(rectangle_off_screen({start, end}))
- return;
-
- if(current_coordinate_system == WORLD) {
- start = m_transform(start);
- end = m_transform(end);
- }
-
-#ifdef EZGL_USE_X11
- if(!transparency_flag && x11_display != nullptr) {
- XDrawLine(x11_display, x11_drawable, x11_context, start.x, start.y, end.x, end.y);
- return;
- }
-#endif
-
- cairo_move_to(m_cairo, start.x, start.y);
- cairo_line_to(m_cairo, end.x, end.y);
-
- cairo_stroke(m_cairo);
-}
-
-void renderer::draw_rectangle(point2d start, point2d end)
-{
- if(rectangle_off_screen({start, end}))
- return;
-
- draw_rectangle_path(start, end, false);
-}
-
-void renderer::draw_rectangle(point2d start, double width, double height)
-{
- if(rectangle_off_screen({start, {start.x + width, start.y + height}}))
- return;
-
- draw_rectangle_path(start, {start.x + width, start.y + height}, false);
-}
-
-void renderer::draw_rectangle(rectangle r)
-{
- if(rectangle_off_screen({{r.left(), r.bottom()}, {r.right(), r.top()}}))
- return;
-
- draw_rectangle_path({r.left(), r.bottom()}, {r.right(), r.top()}, false);
-}
-
-void renderer::fill_rectangle(point2d start, point2d end)
-{
- if(rectangle_off_screen({start, end}))
- return;
-
- draw_rectangle_path(start, end, true);
-}
-
-void renderer::fill_rectangle(point2d start, double width, double height)
-{
- if(rectangle_off_screen({start, {start.x + width, start.y + height}}))
- return;
-
- draw_rectangle_path(start, {start.x + width, start.y + height}, true);
-}
-
-void renderer::fill_rectangle(rectangle r)
-{
- if(rectangle_off_screen({{r.left(), r.bottom()}, {r.right(), r.top()}}))
- return;
-
- draw_rectangle_path({r.left(), r.bottom()}, {r.right(), r.top()}, true);
-}
-
-// For speed, use a fixed size polygon point buffer when possible
-// Dynamically allocate an arbitrary size buffer only when necessary.
-#define X11_MAX_FIXED_POLY_PTS 100
-
-void renderer::fill_poly(std::vector const &points)
-{
- assert(points.size() > 1);
-
- // Conservative but fast clip test -- check containing rectangle of polygon
- double x_min = points[0].x;
- double x_max = points[0].x;
- double y_min = points[0].y;
- double y_max = points[0].y;
-
- for(std::size_t i = 1; i < points.size(); ++i) {
- x_min = std::min(x_min, points[i].x);
- x_max = std::max(x_max, points[i].x);
- y_min = std::min(y_min, points[i].y);
- y_max = std::max(y_max, points[i].y);
- }
-
- if(rectangle_off_screen({{x_min, y_min}, {x_max, y_max}}))
- return;
-
- point2d next_point = points[0];
-
-#ifdef EZGL_USE_X11
- if(!transparency_flag && x11_display != nullptr) {
- XPoint fixed_trans_points[X11_MAX_FIXED_POLY_PTS];
- XPoint *trans_points = fixed_trans_points;
-
- if(points.size() > X11_MAX_FIXED_POLY_PTS) {
- trans_points = new XPoint[points.size()];
- }
-
- for(size_t i = 0; i < points.size(); i++) {
- if(current_coordinate_system == WORLD)
- next_point = m_transform(points[i]);
- else
- next_point = points[i];
- trans_points[i].x = static_cast(next_point.x);
- trans_points[i].y = static_cast(next_point.y);
- }
-
- XFillPolygon(x11_display, x11_drawable, x11_context, trans_points, points.size(), Complex,
- CoordModeOrigin);
-
- if(points.size() > X11_MAX_FIXED_POLY_PTS)
- delete[] trans_points;
- return;
- }
-#endif
-
- if(current_coordinate_system == WORLD)
- next_point = m_transform(points[0]);
-
- cairo_move_to(m_cairo, next_point.x, next_point.y);
-
- for(std::size_t i = 1; i < points.size(); ++i) {
- if(current_coordinate_system == WORLD)
- next_point = m_transform(points[i]);
- else
- next_point = points[i];
- cairo_line_to(m_cairo, next_point.x, next_point.y);
- }
-
- cairo_close_path(m_cairo);
- cairo_fill(m_cairo);
-}
-
-void renderer::draw_elliptic_arc(point2d center,
- double radius_x,
- double radius_y,
- double start_angle,
- double extent_angle)
-{
- if(rectangle_off_screen(
- {{center.x - radius_x, center.y - radius_y}, {center.x + radius_x, center.y + radius_y}}))
- return;
-
- // define the stretch factor (i.e. An ellipse is a stretched circle)
- double stretch_factor = radius_y / radius_x;
-
- draw_arc_path(center, radius_x, start_angle, extent_angle, stretch_factor, false);
-}
-
-void renderer::draw_arc(point2d center, double radius, double start_angle, double extent_angle)
-{
- if(rectangle_off_screen(
- {{center.x - radius, center.y - radius}, {center.x + radius, center.y + radius}}))
- return;
-
- draw_arc_path(center, radius, start_angle, extent_angle, 1, false);
-}
-
-void renderer::fill_elliptic_arc(point2d center,
- double radius_x,
- double radius_y,
- double start_angle,
- double extent_angle)
-{
- if(rectangle_off_screen(
- {{center.x - radius_x, center.y - radius_y}, {center.x + radius_x, center.y + radius_y}}))
- return;
-
- // define the stretch factor (i.e. An ellipse is a stretched circle)
- double stretch_factor = radius_y / radius_x;
-
- draw_arc_path(center, radius_x, start_angle, extent_angle, stretch_factor, true);
-}
-
-void renderer::fill_arc(point2d center, double radius, double start_angle, double extent_angle)
-{
- if(rectangle_off_screen(
- {{center.x - radius, center.y - radius}, {center.x + radius, center.y + radius}}))
- return;
-
- draw_arc_path(center, radius, start_angle, extent_angle, 1, true);
-}
-
-void renderer::draw_text(point2d point, std::string const &text)
-{
- // call the draw_text function with no bounds
- draw_text(point, text, DBL_MAX, DBL_MAX);
-}
-
-void renderer::draw_text(point2d point, std::string const &text, double bound_x, double bound_y)
-{
- // the center point of the text
- point2d center = point;
-
- // roughly calculate the center point for pre-clipping
- if (horiz_justification == justification::left)
- center.x += bound_x/2;
- else if (horiz_justification == justification::right)
- center.x -= bound_x/2;
- if (vert_justification == justification::top)
- center.y -= bound_y/2;
- else if (vert_justification == justification::bottom)
- center.y += bound_y/2;
-
- if(rectangle_off_screen({{center.x - bound_x / 2, center.y - bound_y / 2}, bound_x, bound_y}))
- return;
-
- // get the width and height of the drawn text
- cairo_text_extents_t text_extents{0,0,0,0,0,0};
- cairo_text_extents(m_cairo, text.c_str(), &text_extents);
-
- // get more information about the font used
- cairo_font_extents_t font_extents{0,0,0,0,0};
- cairo_font_extents(m_cairo, &font_extents);
-
- // get text width and height in world coordinates (text width and height are constant in widget coordinates)
- double scaled_width = text_extents.width * m_camera->get_world_scale_factor().x;
- double scaled_height = text_extents.height * m_camera->get_world_scale_factor().y;
-
- // if text width or height is greater than the given bounds, don't draw the text.
- // NOTE: text rotation is NOT taken into account in bounding check (i.e. text width is compared to bound_x)
- if(scaled_width > bound_x || scaled_height > bound_y) {
- return;
- }
-
- // save the current state to undo the rotation needed for drawing rotated text
- cairo_save(m_cairo);
-
- // transform the given point
- if(current_coordinate_system == WORLD)
- center = m_transform(point);
- else
- center = point;
-
- // calculating the reference point to center the text around "center" taking into account the rotation_angle
- // for more info about reference point location: see https://www.cairographics.org/tutorial/#L1understandingtext
- point2d ref_point = {0, 0};
-
- ref_point.x = center.x -
- (text_extents.x_bearing + (text_extents.width / 2)) * cos(rotation_angle) -
- (-font_extents.descent + (text_extents.height / 2)) * sin(rotation_angle);
-
- ref_point.y = center.y -
- (text_extents.y_bearing + (text_extents.height / 2)) * cos(rotation_angle) -
- (text_extents.x_bearing + (text_extents.width / 2)) * sin(rotation_angle);
-
- // adjust the reference point according to the required justification
- if (horiz_justification == justification::left) {
- ref_point.x += (text_extents.width / 2) * cos(rotation_angle);
- ref_point.y += (text_extents.width / 2) * sin(rotation_angle);
- }
- else if (horiz_justification == justification::right) {
- ref_point.x -= (text_extents.width / 2) * cos(rotation_angle);
- ref_point.y -= (text_extents.width / 2) * sin(rotation_angle);
- }
- if (vert_justification == justification::top) {
- ref_point.x -= (text_extents.height / 2) * sin(rotation_angle);
- ref_point.y += (text_extents.height / 2) * cos(rotation_angle);
- }
- else if (vert_justification == justification::bottom) {
- ref_point.x += (text_extents.height / 2) * sin(rotation_angle);
- ref_point.y -= (text_extents.height / 2) * cos(rotation_angle);
- }
-
- // move to the reference point, perform the rotation, and draw the text
- cairo_move_to(m_cairo, ref_point.x, ref_point.y);
- cairo_rotate(m_cairo, rotation_angle);
- cairo_show_text(m_cairo, text.c_str());
-
- // restore the old state to undo the performed rotation
- cairo_restore(m_cairo);
-}
-
-void renderer::draw_rectangle_path(point2d start, point2d end, bool fill_flag)
-{
- if(current_coordinate_system == WORLD) {
- start = m_transform(start);
- end = m_transform(end);
- }
-
-#ifdef EZGL_USE_X11
- if(!transparency_flag && x11_display != nullptr) {
- // Add 0.5 for extra half-pixel accuracy
- int start_x = static_cast(start.x + 0.5);
- int start_y = static_cast(start.y + 0.5);
- int end_x = static_cast(end.x + 0.5);
- int end_y = static_cast(end.y + 0.5);
-
- if(fill_flag)
- XFillRectangle(x11_display, x11_drawable, x11_context, std::min(start_x, end_x),
- std::min(start_y, end_y), std::abs(end_x - start_x), std::abs(end_y - start_y));
- else
- XDrawRectangle(x11_display, x11_drawable, x11_context, std::min(start_x, end_x),
- std::min(start_y, end_y), std::abs(end_x - start_x), std::abs(end_y - start_y));
- return;
- }
-#endif
-
- cairo_move_to(m_cairo, start.x, start.y);
- cairo_line_to(m_cairo, start.x, end.y);
- cairo_line_to(m_cairo, end.x, end.y);
- cairo_line_to(m_cairo, end.x, start.y);
-
- cairo_close_path(m_cairo);
-
- // actual drawing
- if(fill_flag)
- cairo_fill(m_cairo);
- else
- cairo_stroke(m_cairo);
-}
-
-void renderer::draw_arc_path(point2d center,
- double radius,
- double start_angle,
- double extent_angle,
- double stretch_factor,
- bool fill_flag)
-{
- // point_x is a point on the arc outline
- point2d point_x = {center.x + radius, center.y};
-
- // transform the center point of the arc, and the other point
- if(current_coordinate_system == WORLD) {
- center = m_transform(center);
- point_x = m_transform(point_x);
- }
-
- // calculate the new radius after transforming to the new coordinates
- radius = point_x.x - center.x;
-
-#ifdef EZGL_USE_X11
- if(!transparency_flag && x11_display != nullptr) {
- if(fill_flag)
- XFillArc(x11_display, x11_drawable, x11_context, center.x - radius,
- center.y - radius * stretch_factor, 2 * radius, 2 * radius * stretch_factor,
- start_angle * 64, extent_angle * 64);
- else
- XDrawArc(x11_display, x11_drawable, x11_context, center.x - radius,
- center.y - radius * stretch_factor, 2 * radius, 2 * radius * stretch_factor,
- start_angle * 64, extent_angle * 64);
- return;
- }
-#endif
-
- // save the current state to undo the scaling needed for drawing ellipse
- cairo_save(m_cairo);
-
- // scale the drawing by the stretch factor to draw elliptic circles
- cairo_scale(m_cairo, 1 / stretch_factor, 1);
- center.x = center.x * stretch_factor;
- radius = radius * stretch_factor;
-
- // start a new path (forget the current point). Alternative for cairo_move_to() for drawing non-filled arc
- cairo_new_path(m_cairo);
-
- // if the arc will be filled in, start drawing from the center of the arc
- if(fill_flag)
- cairo_move_to(m_cairo, center.x, center.y);
-
- // calculating the ending angle
- double end_angle = start_angle + extent_angle;
-
- // draw the arc in counter clock-wise direction if the extent angle is positive
- if(extent_angle >= 0) {
- cairo_arc_negative(
- m_cairo, center.x, center.y, radius, -start_angle * M_PI / 180, -end_angle * M_PI / 180);
- }
- // draw the arc in clock-wise direction if the extent angle is negative
- else {
- cairo_arc(
- m_cairo, center.x, center.y, radius, -start_angle * M_PI / 180, -end_angle * M_PI / 180);
- }
-
- // if the arc will be filled in, return back to the center of the arc
- if(fill_flag)
- cairo_close_path(m_cairo);
-
- // restore the old state to undo the scaling needed for drawing ellipse
- cairo_restore(m_cairo);
-
- // actual drawing
- if(fill_flag)
- cairo_fill(m_cairo);
- else
- cairo_stroke(m_cairo);
-}
-
-void renderer::draw_surface(surface *p_surface, point2d point, double scale_factor)
-{
- // Check if the surface is properly created
- if(cairo_surface_status(p_surface) != CAIRO_STATUS_SUCCESS) {
- g_warning("renderer::draw_surface: Error drawing surface at address %p; surface is not valid.", p_surface);
- return;
- }
-
- // calculate surface width and height in screen coordinates
- double s_width = (double)cairo_image_surface_get_width(p_surface) * scale_factor;
- double s_height = (double)cairo_image_surface_get_height(p_surface) * scale_factor;
-
- // calculate surface width and height in world coordinates
- if (current_coordinate_system == WORLD) {
- s_width *= m_camera->get_world_scale_factor().x;
- s_height *= m_camera->get_world_scale_factor().y;
- }
-
- // Calculate the top left point
- point2d top_left = point;
- if (horiz_justification == justification::center)
- top_left.x -= s_width/2;
- else if (horiz_justification == justification::right)
- top_left.x -= s_width;
- // Vertical justifaction is calculated differently based on the current coordinate system
- // Since the origin point of screen coordinates is at the top left,
- // while the origin point of world coordinates is at the bottom left
- if (vert_justification == justification::center)
- top_left.y += (current_coordinate_system == WORLD) ? s_height/2 : -s_height/2;
- else if (vert_justification == justification::bottom)
- top_left.y += (current_coordinate_system == WORLD) ? s_height : -s_height;
-
- if (rectangle_off_screen({{top_left.x, top_left.y - s_height}, s_width, s_height}))
- return;
-
- // transform the given point
- if(current_coordinate_system == WORLD)
- top_left = m_transform(top_left);
-
- if (scale_factor != 1) {
- // save the current state to undo the scaling
- cairo_save(m_cairo);
-
- // scale the cairo context with the given scale factor
- cairo_scale(m_cairo, scale_factor, scale_factor);
-
- // adjust the corner point based on the context scaling
- top_left.x /= scale_factor;
- top_left.y /= scale_factor;
- }
-
- // Create a source for painting from the surface
- cairo_set_source_surface(m_cairo, p_surface, top_left.x, top_left.y);
-
- // Actual drawing
- cairo_paint(m_cairo);
-
- if (scale_factor != 1) {
- // restore the old state to undo the performed scaling
- cairo_restore(m_cairo);
- }
-}
-
-surface *renderer::load_png(const char *file_path)
-{
- // Create an image surface from a PNG image
- cairo_surface_t *png_surface = cairo_image_surface_create_from_png(file_path);
-
- cairo_status_t status = cairo_surface_status(png_surface);
-
- if (status == CAIRO_STATUS_FILE_NOT_FOUND) {
- g_warning("renderer::load_png: File %s not found.", file_path);
- }
- else if (status != CAIRO_STATUS_SUCCESS) {
- g_warning("renderer::load_png: Error loading file %s.", file_path);
- }
-
- return png_surface;
-}
-
-void renderer::free_surface(surface *p_surface)
-{
- // Check if the surface is properly created
- if (cairo_surface_status(p_surface) == CAIRO_STATUS_SUCCESS)
- cairo_surface_destroy(p_surface);
-}
-}
diff --git a/libs/libarchfpga/src/arch_check.cpp b/libs/libarchfpga/src/arch_check.cpp
index 75c96aa3cfb..a008dc80cf3 100644
--- a/libs/libarchfpga/src/arch_check.cpp
+++ b/libs/libarchfpga/src/arch_check.cpp
@@ -1,5 +1,7 @@
#include
+#include
+#include "arch_util.h"
#include "logic_types.h"
#include "vtr_log.h"
#include "arch_error.h"
@@ -157,20 +159,18 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
//Check from the pb_type's delay annotations match the model
//
// This ensures that the pb_types' delay annotations are consistent with the model
- for (int i = 0; i < pb_type->num_annotations; ++i) {
- const t_pin_to_pin_annotation* annot = &pb_type->annotations[i];
-
- if (annot->type == E_ANNOT_PIN_TO_PIN_DELAY) {
+ for (const t_pin_to_pin_annotation& annotation : pb_type->annotations) {
+ if (annotation.type == E_ANNOT_PIN_TO_PIN_DELAY) {
//Check that any combinational delays specified match the 'combinational_sinks_ports' in the model
- if (annot->clock) {
+ if (annotation.clock) {
//Sequential annotation, check that the clock on the specified port matches the model
//Annotations always put the pin in the input_pins field
- VTR_ASSERT(annot->input_pins);
- for (const std::string& input_pin : vtr::split(annot->input_pins)) {
+ VTR_ASSERT(annotation.input_pins);
+ for (const std::string& input_pin : vtr::split(annotation.input_pins)) {
InstPort annot_port(input_pin);
- for (const std::string& clock : vtr::split(annot->clock)) {
+ for (const std::string& clock : vtr::split(annotation.clock)) {
InstPort annot_clock(clock);
//Find the model port
@@ -185,7 +185,7 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
if (model_port != nullptr) break;
}
if (model_port == nullptr) {
- archfpga_throw(get_arch_file_name(), annot->line_num,
+ archfpga_throw(get_arch_file_name(), annotation.line_num,
"Failed to find port '%s' on '%s' for sequential delay annotation",
annot_port.port_name().c_str(), annot_port.instance_name().c_str());
}
@@ -193,13 +193,13 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
//Check that the clock matches the model definition
std::string model_clock = model_port->clock;
if (model_clock.empty()) {
- archfpga_throw(get_arch_file_name(), annot->line_num,
+ archfpga_throw(get_arch_file_name(), annotation.line_num,
" timing-annotation/ mismatch on port '%s' of model '%s', model specifies"
" no clock but timing annotation specifies '%s'",
annot_port.port_name().c_str(), model.name, annot_clock.port_name().c_str());
}
if (model_port->clock != annot_clock.port_name()) {
- archfpga_throw(get_arch_file_name(), annot->line_num,
+ archfpga_throw(get_arch_file_name(), annotation.line_num,
" timing-annotation/ mismatch on port '%s' of model '%s', model specifies"
" clock as '%s' but timing annotation specifies '%s'",
annot_port.port_name().c_str(), model.name, model_clock.c_str(), annot_clock.port_name().c_str());
@@ -207,12 +207,12 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
}
}
- } else if (annot->input_pins && annot->output_pins) {
+ } else if (annotation.input_pins && annotation.output_pins) {
//Combinational annotation
- VTR_ASSERT_MSG(!annot->clock, "Combinational annotations should have no clock");
- for (const std::string& input_pin : vtr::split(annot->input_pins)) {
+ VTR_ASSERT_MSG(!annotation.clock, "Combinational annotations should have no clock");
+ for (const std::string& input_pin : vtr::split(annotation.input_pins)) {
InstPort annot_in(input_pin);
- for (const std::string& output_pin : vtr::split(annot->output_pins)) {
+ for (const std::string& output_pin : vtr::split(annotation.output_pins)) {
InstPort annot_out(output_pin);
//Find the input model port
@@ -225,7 +225,7 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
}
if (model_port == nullptr) {
- archfpga_throw(get_arch_file_name(), annot->line_num,
+ archfpga_throw(get_arch_file_name(), annotation.line_num,
"Failed to find port '%s' on '%s' for combinational delay annotation",
annot_in.port_name().c_str(), annot_in.instance_name().c_str());
}
@@ -235,7 +235,7 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
auto e = model_port->combinational_sink_ports.end();
auto iter = std::find(b, e, annot_out.port_name());
if (iter == e) {
- archfpga_throw(get_arch_file_name(), annot->line_num,
+ archfpga_throw(get_arch_file_name(), annotation.line_num,
" timing-annotation/ mismatch on port '%s' of model '%s', timing annotation"
" specifies combinational connection to port '%s' but the connection does not exist in the model",
model_port->name, model.name, annot_out.port_name().c_str());
@@ -274,8 +274,8 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
if (model_port->dir == IN_PORT) {
//Sequential inputs must have a T_setup or T_hold
- if (find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_TSETUP) == nullptr
- && find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_THOLD) == nullptr) {
+ if (!has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_TSETUP)
+ && !has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_THOLD)) {
std::stringstream msg;
msg << " '" << pb_type->name << "' timing-annotation/ mismatch on";
msg << " port '" << model_port->name << "' of model '" << model.name << "',";
@@ -291,8 +291,8 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
if (!model_port->combinational_sink_ports.empty()) {
//Sequential input with internal combinational connectsion it must also have T_clock_to_Q
- if (find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX) == nullptr
- && find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN) == nullptr) {
+ if (!has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX)
+ && !has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN)) {
std::stringstream msg;
msg << " '" << pb_type->name << "' timing-annotation/ mismatch on";
msg << " port '" << model_port->name << "' of model '" << model.name << "',";
@@ -311,8 +311,8 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
} else {
VTR_ASSERT(model_port->dir == OUT_PORT);
//Sequential outputs must have T_clock_to_Q
- if (find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX) == nullptr
- && find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN) == nullptr) {
+ if (!has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX)
+ && !has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN)) {
std::stringstream msg;
msg << " '" << pb_type->name << "' timing-annotation/ mismatch on";
msg << " port '" << model_port->name << "' of model '" << model.name << "',";
@@ -328,8 +328,8 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
if (comb_connected_outputs.count(model_port->name)) {
//Sequential output with internal combinational connectison must have T_setup/T_hold
- if (find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_TSETUP) == nullptr
- && find_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_THOLD) == nullptr) {
+ if (!has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_TSETUP)
+ && !has_sequential_annotation(pb_type, model_port, E_ANNOT_PIN_TO_PIN_DELAY_THOLD)) {
std::stringstream msg;
msg << " '" << pb_type->name << "' timing-annotation/ mismatch on";
msg << " port '" << model_port->name << "' of model '" << model.name << "',";
@@ -350,7 +350,7 @@ bool check_leaf_pb_model_timing_consistency(const t_pb_type* pb_type, const t_ar
//Check that combinationally connected inputs/outputs have combinational delays between them
if (model_port->dir == IN_PORT) {
for (const auto& sink_port : model_port->combinational_sink_ports) {
- if (find_combinational_annotation(pb_type, model_port->name, sink_port) == nullptr) {
+ if (!has_combinational_annotation(pb_type, model_port->name, sink_port)) {
std::stringstream msg;
msg << " '" << pb_type->name << "' timing-annotation/ mismatch on";
msg << " port '" << model_port->name << "' of model '" << model.name << "',";
diff --git a/libs/libarchfpga/src/arch_check.h b/libs/libarchfpga/src/arch_check.h
index b057cbde347..cd154d022ee 100644
--- a/libs/libarchfpga/src/arch_check.h
+++ b/libs/libarchfpga/src/arch_check.h
@@ -1,5 +1,4 @@
-#ifndef ARCH_CHECK_H
-#define ARCH_CHECK_H
+#pragma once
/**
* This file includes all the definitions of functions which purpose is to
@@ -8,12 +7,9 @@
* All new functions corresponding to the architecture checking should end up here.
*/
-#include "arch_types.h"
-#include "arch_util.h"
-
-#include "physical_types_util.h"
-
-#include "vtr_util.h"
+#include
+#include "logic_types.h"
+#include "physical_types.h"
#ifdef __cplusplus
extern "C" {
@@ -76,5 +72,3 @@ void check_models(t_arch* arch);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libs/libarchfpga/src/arch_error.h b/libs/libarchfpga/src/arch_error.h
index 0dae1d8592e..b6f3cc3f9e0 100644
--- a/libs/libarchfpga/src/arch_error.h
+++ b/libs/libarchfpga/src/arch_error.h
@@ -1,5 +1,4 @@
-#ifndef ARCH_ERROR_H
-#define ARCH_ERROR_H
+#pragma once
#include "vtr_error.h"
#include
@@ -14,5 +13,3 @@ class ArchFpgaError : public vtr::VtrError {
ArchFpgaError(std::string msg = "", std::string new_filename = "", size_t new_linenumber = -1)
: vtr::VtrError(msg, new_filename, new_linenumber) {}
};
-
-#endif
diff --git a/libs/libarchfpga/src/arch_types.h b/libs/libarchfpga/src/arch_types.h
index bc2e65a4ca2..6b4f4338a60 100644
--- a/libs/libarchfpga/src/arch_types.h
+++ b/libs/libarchfpga/src/arch_types.h
@@ -1,3 +1,4 @@
+#pragma once
/*
* Data types describing the FPGA architecture.
*
@@ -5,13 +6,6 @@
* Authors: Jason Luu and Kenneth Kent
*/
-#ifndef ARCH_TYPES_H
-#define ARCH_TYPES_H
-
-#include "logic_types.h"
-#include "physical_types.h"
-#include "cad_types.h"
-
/* Input file parsing. */
#define TOKENS " \t\n"
@@ -25,5 +19,3 @@ enum class e_arch_format {
VTR, ///
#include
#include
+#include
#include "logic_types.h"
#include "vtr_assert.h"
@@ -162,10 +163,6 @@ void free_arch(t_arch* arch) {
vtr::free(arch->architecture_id);
- if (arch->clocks) {
- vtr::free(arch->clocks->clock_inf);
- }
-
delete (arch->noc);
}
@@ -309,8 +306,7 @@ static void free_pb_graph(t_pb_graph_node* pb_graph_node) {
static void free_pb_type(t_pb_type* pb_type) {
vtr::free(pb_type->name);
- if (pb_type->blif_model)
- vtr::free(pb_type->blif_model);
+ vtr::free(pb_type->blif_model);
for (int i = 0; i < pb_type->num_modes; ++i) {
for (int j = 0; j < pb_type->modes[i].num_pb_type_children; ++j) {
@@ -323,67 +319,35 @@ static void free_pb_type(t_pb_type* pb_type) {
vtr::free(pb_type->modes[i].interconnect[j].output_string);
vtr::free(pb_type->modes[i].interconnect[j].name);
- for (int k = 0; k < pb_type->modes[i].interconnect[j].num_annotations; ++k) {
- if (pb_type->modes[i].interconnect[j].annotations[k].clock)
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].clock);
- if (pb_type->modes[i].interconnect[j].annotations[k].input_pins) {
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].input_pins);
- }
- if (pb_type->modes[i].interconnect[j].annotations[k].output_pins) {
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].output_pins);
- }
- for (int m = 0; m < pb_type->modes[i].interconnect[j].annotations[k].num_value_prop_pairs; ++m) {
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].value[m]);
- }
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].prop);
- vtr::free(pb_type->modes[i].interconnect[j].annotations[k].value);
+ for (t_pin_to_pin_annotation& annotation : pb_type->modes[i].interconnect[j].annotations) {
+ vtr::free(annotation.clock);
+ vtr::free(annotation.input_pins);
+ vtr::free(annotation.output_pins);
}
- vtr::free(pb_type->modes[i].interconnect[j].annotations);
- if (pb_type->modes[i].interconnect[j].interconnect_power)
- vtr::free(pb_type->modes[i].interconnect[j].interconnect_power);
+ pb_type->modes[i].interconnect[j].annotations.clear();
+ delete pb_type->modes[i].interconnect[j].interconnect_power;
}
- if (pb_type->modes[i].interconnect)
- delete[] pb_type->modes[i].interconnect;
- if (pb_type->modes[i].mode_power)
- vtr::free(pb_type->modes[i].mode_power);
+ delete[] pb_type->modes[i].interconnect;
+ delete (pb_type->modes[i].mode_power);
}
- if (pb_type->modes)
- delete[] pb_type->modes;
- for (int i = 0; i < pb_type->num_annotations; ++i) {
- for (int j = 0; j < pb_type->annotations[i].num_value_prop_pairs; ++j) {
- vtr::free(pb_type->annotations[i].value[j]);
- }
- vtr::free(pb_type->annotations[i].value);
- vtr::free(pb_type->annotations[i].prop);
- if (pb_type->annotations[i].input_pins) {
- vtr::free(pb_type->annotations[i].input_pins);
- }
- if (pb_type->annotations[i].output_pins) {
- vtr::free(pb_type->annotations[i].output_pins);
- }
- if (pb_type->annotations[i].clock) {
- vtr::free(pb_type->annotations[i].clock);
- }
- }
- if (pb_type->num_annotations > 0) {
- vtr::free(pb_type->annotations);
- }
+ delete[] pb_type->modes;
- if (pb_type->pb_type_power) {
- vtr::free(pb_type->pb_type_power);
+ for (t_pin_to_pin_annotation& annotation : pb_type->annotations) {
+ vtr::free(annotation.input_pins);
+ vtr::free(annotation.output_pins);
+ vtr::free(annotation.clock);
}
+ pb_type->annotations.clear();
+
+ delete pb_type->pb_type_power;
for (int i = 0; i < pb_type->num_ports; ++i) {
vtr::free(pb_type->ports[i].name);
- if (pb_type->ports[i].port_class) {
- vtr::free(pb_type->ports[i].port_class);
- }
- if (pb_type->ports[i].port_power) {
- vtr::free(pb_type->ports[i].port_power);
- }
+ vtr::free(pb_type->ports[i].port_class);
+ delete pb_type->ports[i].port_power;
}
- vtr::free(pb_type->ports);
+ delete[] pb_type->ports;
}
t_port* findPortByName(const char* name, t_pb_type* pb_type, int* high_index, int* low_index) {
@@ -476,7 +440,6 @@ std::unordered_set get_equivalent_sites_set(t_physical
void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
char* new_name,
t_pb_type* copy) {
- int i, j;
char* dot;
VTR_ASSERT(pb_type->blif_model != nullptr);
@@ -495,14 +458,13 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
copy->num_pb = 1;
/* Power */
- copy->pb_type_power = (t_pb_type_power*)vtr::calloc(1,
- sizeof(t_pb_type_power));
+ copy->pb_type_power = new t_pb_type_power();
copy->pb_type_power->estimation_method = power_method_inherited(pb_type->pb_type_power->estimation_method);
/* Ports */
copy->num_ports = pb_type->num_ports;
- copy->ports = (t_port*)vtr::calloc(pb_type->num_ports, sizeof(t_port));
- for (i = 0; i < pb_type->num_ports; i++) {
+ copy->ports = new t_port[pb_type->num_ports]();
+ for (int i = 0; i < pb_type->num_ports; i++) {
copy->ports[i].is_clock = pb_type->ports[i].is_clock;
copy->ports[i].model_port = pb_type->ports[i].model_port;
copy->ports[i].type = pb_type->ports[i].type;
@@ -514,8 +476,7 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
copy->ports[i].index = pb_type->ports[i].index;
copy->ports[i].absolute_first_pin_index = pb_type->ports[i].absolute_first_pin_index;
- copy->ports[i].port_power = (t_port_power*)vtr::calloc(1,
- sizeof(t_port_power));
+ copy->ports[i].port_power = new t_port_power();
//Defaults
if (copy->pb_type_power->estimation_method == POWER_METHOD_AUTO_SIZES) {
copy->ports[i].port_power->wire_type = POWER_WIRE_TYPE_AUTO;
@@ -527,9 +488,9 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
}
}
- copy->annotations = (t_pin_to_pin_annotation*)vtr::calloc(pb_type->num_annotations, sizeof(t_pin_to_pin_annotation));
- copy->num_annotations = pb_type->num_annotations;
- for (i = 0; i < copy->num_annotations; i++) {
+ size_t num_annotations = pb_type->annotations.size();
+ copy->annotations.resize(num_annotations);
+ for (size_t i = 0; i < num_annotations; i++) {
copy->annotations[i].clock = vtr::strdup(pb_type->annotations[i].clock);
dot = strstr(pb_type->annotations[i].input_pins, ".");
copy->annotations[i].input_pins = (char*)vtr::malloc(sizeof(char) * (strlen(new_name) + strlen(dot) + 1));
@@ -548,13 +509,7 @@ void alloc_and_load_default_child_for_pb_type(t_pb_type* pb_type,
copy->annotations[i].line_num = pb_type->annotations[i].line_num;
copy->annotations[i].format = pb_type->annotations[i].format;
copy->annotations[i].type = pb_type->annotations[i].type;
- copy->annotations[i].num_value_prop_pairs = pb_type->annotations[i].num_value_prop_pairs;
- copy->annotations[i].prop = (int*)vtr::malloc(sizeof(int) * pb_type->annotations[i].num_value_prop_pairs);
- copy->annotations[i].value = (char**)vtr::malloc(sizeof(char*) * pb_type->annotations[i].num_value_prop_pairs);
- for (j = 0; j < pb_type->annotations[i].num_value_prop_pairs; j++) {
- copy->annotations[i].prop[j] = pb_type->annotations[i].prop[j];
- copy->annotations[i].value[j] = vtr::strdup(pb_type->annotations[i].value[j]);
- }
+ copy->annotations[i].annotation_entries = pb_type->annotations[i].annotation_entries;
}
}
@@ -563,7 +518,6 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
char* default_name;
t_port* in_port;
t_port* out_port;
- int i, j;
if (strcmp(lut_pb_type->name, "lut") != 0) {
default_name = vtr::strdup("lut");
@@ -580,8 +534,7 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
lut_pb_type->modes[0].parent_pb_type = lut_pb_type;
lut_pb_type->modes[0].index = 0;
lut_pb_type->modes[0].num_pb_type_children = 0;
- lut_pb_type->modes[0].mode_power = (t_mode_power*)vtr::calloc(1,
- sizeof(t_mode_power));
+ lut_pb_type->modes[0].mode_power = new t_mode_power();
/* Process interconnect */
/* TODO: add timing annotations to route-through */
@@ -613,28 +566,19 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
lut_pb_type->modes[0].interconnect[0].parent_mode_index = 0;
lut_pb_type->modes[0].interconnect[0].parent_mode = &lut_pb_type->modes[0];
- lut_pb_type->modes[0].interconnect[0].interconnect_power = (t_interconnect_power*)vtr::calloc(1, sizeof(t_interconnect_power));
+ lut_pb_type->modes[0].interconnect[0].interconnect_power = new t_interconnect_power();
- lut_pb_type->modes[0].interconnect[0].annotations = (t_pin_to_pin_annotation*)vtr::calloc(lut_pb_type->num_annotations,
- sizeof(t_pin_to_pin_annotation));
- lut_pb_type->modes[0].interconnect[0].num_annotations = lut_pb_type->num_annotations;
- for (i = 0; i < lut_pb_type->modes[0].interconnect[0].num_annotations;
- i++) {
+ size_t num_annotations = lut_pb_type->annotations.size();
+ lut_pb_type->modes[0].interconnect[0].annotations.resize(num_annotations);
+ for (size_t i = 0; i < num_annotations; i++) {
lut_pb_type->modes[0].interconnect[0].annotations[i].clock = vtr::strdup(lut_pb_type->annotations[i].clock);
lut_pb_type->modes[0].interconnect[0].annotations[i].input_pins = vtr::strdup(lut_pb_type->annotations[i].input_pins);
lut_pb_type->modes[0].interconnect[0].annotations[i].output_pins = vtr::strdup(lut_pb_type->annotations[i].output_pins);
lut_pb_type->modes[0].interconnect[0].annotations[i].line_num = lut_pb_type->annotations[i].line_num;
lut_pb_type->modes[0].interconnect[0].annotations[i].format = lut_pb_type->annotations[i].format;
lut_pb_type->modes[0].interconnect[0].annotations[i].type = lut_pb_type->annotations[i].type;
- lut_pb_type->modes[0].interconnect[0].annotations[i].num_value_prop_pairs = lut_pb_type->annotations[i].num_value_prop_pairs;
- lut_pb_type->modes[0].interconnect[0].annotations[i].prop = (int*)vtr::malloc(sizeof(int)
- * lut_pb_type->annotations[i].num_value_prop_pairs);
- lut_pb_type->modes[0].interconnect[0].annotations[i].value = (char**)vtr::malloc(sizeof(char*)
- * lut_pb_type->annotations[i].num_value_prop_pairs);
- for (j = 0; j < lut_pb_type->annotations[i].num_value_prop_pairs; j++) {
- lut_pb_type->modes[0].interconnect[0].annotations[i].prop[j] = lut_pb_type->annotations[i].prop[j];
- lut_pb_type->modes[0].interconnect[0].annotations[i].value[j] = vtr::strdup(lut_pb_type->annotations[i].value[j]);
- }
+
+ lut_pb_type->modes[0].interconnect[0].annotations[i].annotation_entries = lut_pb_type->annotations[i].annotation_entries;
}
/* Second mode, LUT */
@@ -643,34 +587,20 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
lut_pb_type->modes[1].parent_pb_type = lut_pb_type;
lut_pb_type->modes[1].index = 1;
lut_pb_type->modes[1].num_pb_type_children = 1;
- lut_pb_type->modes[1].mode_power = (t_mode_power*)vtr::calloc(1,
- sizeof(t_mode_power));
+ lut_pb_type->modes[1].mode_power = new t_mode_power();
lut_pb_type->modes[1].pb_type_children = new t_pb_type[1];
alloc_and_load_default_child_for_pb_type(lut_pb_type, default_name,
lut_pb_type->modes[1].pb_type_children);
/* moved annotations to child so delete old annotations */
- for (i = 0; i < lut_pb_type->num_annotations; i++) {
- for (j = 0; j < lut_pb_type->annotations[i].num_value_prop_pairs; j++) {
- free(lut_pb_type->annotations[i].value[j]);
- }
- free(lut_pb_type->annotations[i].value);
- free(lut_pb_type->annotations[i].prop);
- if (lut_pb_type->annotations[i].input_pins) {
- free(lut_pb_type->annotations[i].input_pins);
- }
- if (lut_pb_type->annotations[i].output_pins) {
- free(lut_pb_type->annotations[i].output_pins);
- }
- if (lut_pb_type->annotations[i].clock) {
- free(lut_pb_type->annotations[i].clock);
- }
+ for (size_t i = 0; i < num_annotations; i++) {
+ vtr::free(lut_pb_type->annotations[i].input_pins);
+ vtr::free(lut_pb_type->annotations[i].output_pins);
+ vtr::free(lut_pb_type->annotations[i].clock);
}
- lut_pb_type->num_annotations = 0;
- free(lut_pb_type->annotations);
- lut_pb_type->annotations = nullptr;
+ lut_pb_type->annotations.clear();
lut_pb_type->modes[1].pb_type_children[0].depth = lut_pb_type->depth + 1;
lut_pb_type->modes[1].pb_type_children[0].parent_mode = &lut_pb_type->modes[1];
- for (i = 0; i < lut_pb_type->modes[1].pb_type_children[0].num_ports; i++) {
+ for (int i = 0; i < lut_pb_type->modes[1].pb_type_children[0].num_ports; i++) {
if (lut_pb_type->modes[1].pb_type_children[0].ports[i].type == IN_PORT) {
lut_pb_type->modes[1].pb_type_children[0].ports[i].equivalent = PortEquivalence::FULL;
}
@@ -694,7 +624,7 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
lut_pb_type->modes[1].interconnect[0].parent_mode_index = 1;
lut_pb_type->modes[1].interconnect[0].parent_mode = &lut_pb_type->modes[1];
- lut_pb_type->modes[1].interconnect[0].interconnect_power = (t_interconnect_power*)vtr::calloc(1, sizeof(t_interconnect_power));
+ lut_pb_type->modes[1].interconnect[0].interconnect_power = new t_interconnect_power();
lut_pb_type->modes[1].interconnect[1].name = (char*)vtr::calloc(strlen(lut_pb_type->name) + 11, sizeof(char));
sprintf(lut_pb_type->modes[1].interconnect[1].name, "direct:%s",
@@ -713,7 +643,7 @@ void ProcessLutClass(t_pb_type* lut_pb_type) {
lut_pb_type->modes[1].interconnect[1].parent_mode_index = 1;
lut_pb_type->modes[1].interconnect[1].parent_mode = &lut_pb_type->modes[1];
- lut_pb_type->modes[1].interconnect[1].interconnect_power = (t_interconnect_power*)vtr::calloc(1, sizeof(t_interconnect_power));
+ lut_pb_type->modes[1].interconnect[1].interconnect_power = new t_interconnect_power();
free(default_name);
@@ -738,8 +668,7 @@ void ProcessMemoryClass(t_pb_type* mem_pb_type) {
mem_pb_type->modes[0].name = vtr::strdup(default_name);
mem_pb_type->modes[0].parent_pb_type = mem_pb_type;
mem_pb_type->modes[0].index = 0;
- mem_pb_type->modes[0].mode_power = (t_mode_power*)vtr::calloc(1,
- sizeof(t_mode_power));
+ mem_pb_type->modes[0].mode_power = new t_mode_power();
num_pb = OPEN;
for (i = 0; i < mem_pb_type->num_ports; i++) {
if (mem_pb_type->ports[i].port_class != nullptr
@@ -836,8 +765,7 @@ void ProcessMemoryClass(t_pb_type* mem_pb_type) {
}
/* Allocate interconnect power structures */
- mem_pb_type->modes[0].interconnect[i_inter].interconnect_power = (t_interconnect_power*)vtr::calloc(1,
- sizeof(t_interconnect_power));
+ mem_pb_type->modes[0].interconnect[i_inter].interconnect_power = new t_interconnect_power();
i_inter++;
} else {
for (j = 0; j < num_pb; j++) {
@@ -877,8 +805,7 @@ void ProcessMemoryClass(t_pb_type* mem_pb_type) {
}
/* Allocate interconnect power structures */
- mem_pb_type->modes[0].interconnect[i_inter].interconnect_power = (t_interconnect_power*)vtr::calloc(1,
- sizeof(t_interconnect_power));
+ mem_pb_type->modes[0].interconnect[i_inter].interconnect_power = new t_interconnect_power();
i_inter++;
}
}
@@ -945,7 +872,7 @@ void SyncModelsPbTypes_rec(t_arch* arch,
pb_type->model_id = model_match_prim_id;
vtr::t_linked_vptr* old = model_match_prim.pb_types;
- model_match_prim.pb_types = (vtr::t_linked_vptr*)vtr::malloc(sizeof(vtr::t_linked_vptr));
+ model_match_prim.pb_types = new vtr::t_linked_vptr;
model_match_prim.pb_types->next = old;
model_match_prim.pb_types->data_vptr = pb_type;
@@ -1100,39 +1027,37 @@ bool pb_type_contains_blif_model(const t_pb_type* pb_type, const std::string& bl
return false;
}
-const t_pin_to_pin_annotation* find_sequential_annotation(const t_pb_type* pb_type, const t_model_ports* port, enum e_pin_to_pin_delay_annotations annot_type) {
+bool has_sequential_annotation(const t_pb_type* pb_type, const t_model_ports* port, enum e_pin_to_pin_delay_annotations annot_type) {
VTR_ASSERT(annot_type == E_ANNOT_PIN_TO_PIN_DELAY_TSETUP
|| annot_type == E_ANNOT_PIN_TO_PIN_DELAY_THOLD
|| annot_type == E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX
|| annot_type == E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN);
- for (int iannot = 0; iannot < pb_type->num_annotations; ++iannot) {
- const t_pin_to_pin_annotation* annot = &pb_type->annotations[iannot];
- InstPort annot_in(annot->input_pins);
+ for (const t_pin_to_pin_annotation& annotation : pb_type->annotations) {
+ InstPort annot_in(annotation.input_pins);
if (annot_in.port_name() == port->name) {
- for (int iprop = 0; iprop < annot->num_value_prop_pairs; ++iprop) {
- if (annot->prop[iprop] == annot_type) {
- return annot;
+ for (const auto& [key, val] : annotation.annotation_entries) {
+ if (key == annot_type) {
+ return true;
}
}
}
}
- return nullptr;
+ return false;
}
-const t_pin_to_pin_annotation* find_combinational_annotation(const t_pb_type* pb_type, std::string_view in_port, std::string_view out_port) {
- for (int iannot = 0; iannot < pb_type->num_annotations; ++iannot) {
- const t_pin_to_pin_annotation* annot = &pb_type->annotations[iannot];
- for (const auto& annot_in_str : vtr::split(annot->input_pins)) {
+bool has_combinational_annotation(const t_pb_type* pb_type, std::string_view in_port, std::string_view out_port) {
+ for (const t_pin_to_pin_annotation& annotation : pb_type->annotations) {
+ for (const auto& annot_in_str : vtr::split(annotation.input_pins)) {
InstPort in_pins(annot_in_str);
- for (const auto& annot_out_str : vtr::split(annot->output_pins)) {
+ for (const auto& annot_out_str : vtr::split(annotation.output_pins)) {
InstPort out_pins(annot_out_str);
if (in_pins.port_name() == in_port && out_pins.port_name() == out_port) {
- for (int iprop = 0; iprop < annot->num_value_prop_pairs; ++iprop) {
- if (annot->prop[iprop] == E_ANNOT_PIN_TO_PIN_DELAY_MAX
- || annot->prop[iprop] == E_ANNOT_PIN_TO_PIN_DELAY_MIN) {
- return annot;
+ for (const auto& [key, val] : annotation.annotation_entries) {
+ if (key == E_ANNOT_PIN_TO_PIN_DELAY_MAX
+ || key == E_ANNOT_PIN_TO_PIN_DELAY_MIN) {
+ return true;
}
}
}
@@ -1140,7 +1065,7 @@ const t_pin_to_pin_annotation* find_combinational_annotation(const t_pb_type* pb
}
}
- return nullptr;
+ return false;
}
void link_physical_logical_types(std::vector& PhysicalTileTypes,
diff --git a/libs/libarchfpga/src/arch_util.h b/libs/libarchfpga/src/arch_util.h
index fb87262878c..52660e7da82 100644
--- a/libs/libarchfpga/src/arch_util.h
+++ b/libs/libarchfpga/src/arch_util.h
@@ -1,7 +1,5 @@
-#ifndef ARCH_UTIL_H
-#define ARCH_UTIL_H
+#pragma once
-#include
#include
#include "physical_types.h"
@@ -98,8 +96,8 @@ bool block_type_contains_blif_model(t_logical_block_type_ptr type, const std::st
//Returns true of a pb_type (or it's children) contain the specified blif model name
bool pb_type_contains_blif_model(const t_pb_type* pb_type, const std::string& blif_model_name);
-const t_pin_to_pin_annotation* find_sequential_annotation(const t_pb_type* pb_type, const t_model_ports* port, enum e_pin_to_pin_delay_annotations annot_type);
-const t_pin_to_pin_annotation* find_combinational_annotation(const t_pb_type* pb_type, std::string_view in_port, std::string_view out_port);
+bool has_sequential_annotation(const t_pb_type* pb_type, const t_model_ports* port, enum e_pin_to_pin_delay_annotations annot_type);
+bool has_combinational_annotation(const t_pb_type* pb_type, std::string_view in_port, std::string_view out_port);
/**
* @brief Updates the physical and logical types based on the equivalence between one and the other.
@@ -114,4 +112,3 @@ void link_physical_logical_types(std::vector& PhysicalTile
std::vector& LogicalBlockTypes);
void setup_pin_classes(t_physical_tile_type* type);
-#endif
diff --git a/libs/libarchfpga/src/cad_types.h b/libs/libarchfpga/src/cad_types.h
index af0aac9a994..9b4610f029b 100644
--- a/libs/libarchfpga/src/cad_types.h
+++ b/libs/libarchfpga/src/cad_types.h
@@ -1,10 +1,8 @@
+#pragma once
/*
* Data types used to give architectural hints for the CAD algorithm
*/
-#ifndef CAD_TYPES_H
-#define CAD_TYPES_H
-#include "logic_types.h"
#include "physical_types.h"
struct t_pack_pattern_connections;
@@ -128,5 +126,3 @@ struct t_cluster_placement_primitive {
float base_cost; /* cost independent of current status of packing */
float incremental_cost; /* cost dependent on current status of packing */
};
-
-#endif
diff --git a/libs/libarchfpga/src/clock_types.h b/libs/libarchfpga/src/clock_types.h
index ac622d29a95..bde96f56436 100644
--- a/libs/libarchfpga/src/clock_types.h
+++ b/libs/libarchfpga/src/clock_types.h
@@ -1,8 +1,6 @@
-#ifndef CLOCK_TYPES_H
-#define CLOCK_TYPES_H
+#pragma once
#include
-#include
enum class e_clock_type {
SPINE,
@@ -59,5 +57,3 @@ struct t_clock_connection_arch {
std::string locationy;
float fc;
};
-
-#endif
diff --git a/libs/libarchfpga/src/device_grid.h b/libs/libarchfpga/src/device_grid.h
index c04e3f8dc4e..1c89164d8d9 100644
--- a/libs/libarchfpga/src/device_grid.h
+++ b/libs/libarchfpga/src/device_grid.h
@@ -1,5 +1,4 @@
-#ifndef DEVICE_GRID
-#define DEVICE_GRID
+#pragma once
#include
#include
@@ -149,5 +148,3 @@ class DeviceGrid {
std::vector limiting_resources_;
};
-
-#endif
diff --git a/libs/libarchfpga/src/echo_arch.cpp b/libs/libarchfpga/src/echo_arch.cpp
index 2e08c196946..b7985e471f1 100644
--- a/libs/libarchfpga/src/echo_arch.cpp
+++ b/libs/libarchfpga/src/echo_arch.cpp
@@ -5,6 +5,7 @@
#include "echo_arch.h"
#include "arch_util.h"
#include "logic_types.h"
+#include "physical_types.h"
#include "vtr_list.h"
#include "vtr_util.h"
#include "vtr_memory.h"
@@ -335,19 +336,19 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
fprintf(Echo, "*************************************************\n");
fprintf(Echo, "Clock:\n");
if (arch->clocks) {
- for (int i = 0; i < arch->clocks->num_global_clocks; i++) {
- if (arch->clocks->clock_inf[i].autosize_buffer) {
- fprintf(Echo, "\tClock[%d]: buffer_size auto C_wire %e", i + 1,
- arch->clocks->clock_inf->C_wire);
+ for (size_t i = 0; i < arch->clocks->size(); i++) {
+ if ((*arch->clocks)[i].autosize_buffer) {
+ fprintf(Echo, "\tClock[%zu]: buffer_size auto C_wire %e", i + 1,
+ (*arch->clocks)[i].C_wire);
} else {
- fprintf(Echo, "\tClock[%d]: buffer_size %e C_wire %e", i + 1,
- arch->clocks->clock_inf[i].buffer_size,
- arch->clocks->clock_inf[i].C_wire);
+ fprintf(Echo, "\tClock[%zu]: buffer_size %e C_wire %e", i + 1,
+ (*arch->clocks)[i].buffer_size,
+ (*arch->clocks)[i].C_wire);
}
fprintf(Echo, "\t\t\t\tstat_prob %f switch_density %f period %e",
- arch->clocks->clock_inf[i].prob,
- arch->clocks->clock_inf[i].dens,
- arch->clocks->clock_inf[i].period);
+ (*arch->clocks)[i].prob,
+ (*arch->clocks)[i].dens,
+ (*arch->clocks)[i].period);
}
}
@@ -381,51 +382,43 @@ static void print_model(FILE* echo, const t_model& model) {
}
static void PrintPb_types_rec(FILE* Echo, const t_pb_type* pb_type, int level, const LogicalModels& models) {
- char* tabs;
+ std::string tabs = std::string(level, '\t');
- tabs = (char*)vtr::malloc((level + 1) * sizeof(char));
- for (int i = 0; i < level; i++) {
- tabs[i] = '\t';
- }
- tabs[level] = '\0';
-
- fprintf(Echo, "%spb_type name: %s\n", tabs, pb_type->name);
- fprintf(Echo, "%s\tblif_model: %s\n", tabs, pb_type->blif_model);
- fprintf(Echo, "%s\tclass_type: %d\n", tabs, pb_type->class_type);
- fprintf(Echo, "%s\tnum_modes: %d\n", tabs, pb_type->num_modes);
- fprintf(Echo, "%s\tnum_ports: %d\n", tabs, pb_type->num_ports);
+ fprintf(Echo, "%spb_type name: %s\n", tabs.c_str(), pb_type->name);
+ fprintf(Echo, "%s\tblif_model: %s\n", tabs.c_str(), pb_type->blif_model);
+ fprintf(Echo, "%s\tclass_type: %d\n", tabs.c_str(), pb_type->class_type);
+ fprintf(Echo, "%s\tnum_modes: %d\n", tabs.c_str(), pb_type->num_modes);
+ fprintf(Echo, "%s\tnum_ports: %d\n", tabs.c_str(), pb_type->num_ports);
for (int i = 0; i < pb_type->num_ports; i++) {
- fprintf(Echo, "%s\tport %s type %d num_pins %d\n", tabs,
+ fprintf(Echo, "%s\tport %s type %d num_pins %d\n", tabs.c_str(),
pb_type->ports[i].name, pb_type->ports[i].type,
pb_type->ports[i].num_pins);
}
if (pb_type->num_modes > 0) { /*one or more modes*/
for (int i = 0; i < pb_type->num_modes; i++) {
- fprintf(Echo, "%s\tmode %s:\n", tabs, pb_type->modes[i].name);
+ fprintf(Echo, "%s\tmode %s:\n", tabs.c_str(), pb_type->modes[i].name);
for (int j = 0; j < pb_type->modes[i].num_pb_type_children; j++) {
PrintPb_types_rec(Echo, &pb_type->modes[i].pb_type_children[j],
level + 2, models);
}
for (int j = 0; j < pb_type->modes[i].num_interconnect; j++) {
- fprintf(Echo, "%s\t\tinterconnect %d %s %s\n", tabs,
+ fprintf(Echo, "%s\t\tinterconnect %d %s %s\n", tabs.c_str(),
pb_type->modes[i].interconnect[j].type,
pb_type->modes[i].interconnect[j].input_string,
pb_type->modes[i].interconnect[j].output_string);
- for (int k = 0;
- k < pb_type->modes[i].interconnect[j].num_annotations;
- k++) {
- fprintf(Echo, "%s\t\t\tannotation %s %s %d: %s\n", tabs,
- pb_type->modes[i].interconnect[j].annotations[k].input_pins,
- pb_type->modes[i].interconnect[j].annotations[k].output_pins,
- pb_type->modes[i].interconnect[j].annotations[k].format,
- pb_type->modes[i].interconnect[j].annotations[k].value[0]);
+ for (const t_pin_to_pin_annotation& annotation : pb_type->modes[i].interconnect[j].annotations) {
+ fprintf(Echo, "%s\t\t\tannotation %s %s %d: %s\n", tabs.c_str(),
+ annotation.input_pins,
+ annotation.output_pins,
+ annotation.format,
+ annotation.annotation_entries[0].second.c_str());
}
//Print power info for interconnects
if (pb_type->modes[i].interconnect[j].interconnect_power) {
if (pb_type->modes[i].interconnect[j].interconnect_power->power_usage.dynamic
|| pb_type->modes[i].interconnect[j].interconnect_power->power_usage.leakage) {
- fprintf(Echo, "%s\t\t\tpower %e %e\n", tabs,
+ fprintf(Echo, "%s\t\t\tpower %e %e\n", tabs.c_str(),
pb_type->modes[i].interconnect[j].interconnect_power->power_usage.dynamic,
pb_type->modes[i].interconnect[j].interconnect_power->power_usage.leakage);
}
@@ -441,21 +434,20 @@ static void PrintPb_types_rec(FILE* Echo, const t_pb_type* pb_type, int level, c
if (pb_type_model_name != LogicalModels::MODEL_NAMES
&& pb_type_model_name != LogicalModels::MODEL_INPUT
&& pb_type_model_name != LogicalModels::MODEL_OUTPUT) {
- for (int k = 0; k < pb_type->num_annotations; k++) {
- fprintf(Echo, "%s\t\t\tannotation %s %s %s %d: %s\n", tabs,
- pb_type->annotations[k].clock,
- pb_type->annotations[k].input_pins,
- pb_type->annotations[k].output_pins,
- pb_type->annotations[k].format,
- pb_type->annotations[k].value[0]);
+ for (const t_pin_to_pin_annotation& annotation : pb_type->annotations) {
+ fprintf(Echo, "%s\t\t\tannotation %s %s %s %d: %s\n", tabs.c_str(),
+ annotation.clock,
+ annotation.input_pins,
+ annotation.output_pins,
+ annotation.format,
+ annotation.annotation_entries[0].second.c_str());
}
}
}
if (pb_type->pb_type_power) {
- PrintPb_types_recPower(Echo, pb_type, tabs);
+ PrintPb_types_recPower(Echo, pb_type, tabs.c_str());
}
- free(tabs);
}
//Added May 2013 Daniel Chen, help dump arch info after loading from XML
diff --git a/libs/libarchfpga/src/echo_arch.h b/libs/libarchfpga/src/echo_arch.h
index 4e9d2300167..38a8c4f8146 100644
--- a/libs/libarchfpga/src/echo_arch.h
+++ b/libs/libarchfpga/src/echo_arch.h
@@ -1,11 +1,9 @@
-#ifndef ECHO_ARCH_H
-#define ECHO_ARCH_H
+#pragma once
-#include "arch_types.h"
+#include
+#include "physical_types.h"
void EchoArch(const char* EchoFile,
const std::vector& PhysicalTileTypes,
const std::vector& LogicalBlockTypes,
const t_arch* arch);
-
-#endif
diff --git a/libs/libarchfpga/src/histogram.cpp b/libs/libarchfpga/src/histogram.cpp
index aa00ec2ae6b..4d6cf9eaca9 100644
--- a/libs/libarchfpga/src/histogram.cpp
+++ b/libs/libarchfpga/src/histogram.cpp
@@ -1,6 +1,5 @@
#include
#include
-#include
#include
#include "vtr_log.h"
diff --git a/libs/libarchfpga/src/histogram.h b/libs/libarchfpga/src/histogram.h
index 29a0ae47040..2d46e24b6be 100644
--- a/libs/libarchfpga/src/histogram.h
+++ b/libs/libarchfpga/src/histogram.h
@@ -1,7 +1,7 @@
-#ifndef VPR_HISTOGRAM_H
-#define VPR_HISTOGRAM_H
+#pragma once
#include
+#include
#include
struct HistogramBucket {
@@ -22,5 +22,3 @@ void print_histogram(std::vector histogram);
float get_histogram_mode(std::vector histogram);
std::vector format_histogram(std::vector histogram, size_t width = 80);
-
-#endif
diff --git a/libs/libarchfpga/src/logic_types.cpp b/libs/libarchfpga/src/logic_types.cpp
index dc4801d3347..b878c1f202b 100644
--- a/libs/libarchfpga/src/logic_types.cpp
+++ b/libs/libarchfpga/src/logic_types.cpp
@@ -28,6 +28,7 @@ LogicalModels::LogicalModels() {
//INPAD
{
LogicalModelId inpad_model_id = create_logical_model(MODEL_INPUT);
+ VTR_ASSERT_OPT(inpad_model_id == MODEL_INPUT_ID);
t_model& inpad_model = get_model(inpad_model_id);
inpad_model.inputs = nullptr;
@@ -47,6 +48,7 @@ LogicalModels::LogicalModels() {
//OUTPAD
{
LogicalModelId outpad_model_id = create_logical_model(MODEL_OUTPUT);
+ VTR_ASSERT_OPT(outpad_model_id == MODEL_OUTPUT_ID);
t_model& outpad_model = get_model(outpad_model_id);
outpad_model.inputs = new t_model_ports;
@@ -66,6 +68,7 @@ LogicalModels::LogicalModels() {
//LATCH
{
LogicalModelId latch_model_id = create_logical_model(MODEL_LATCH);
+ VTR_ASSERT_OPT(latch_model_id == MODEL_LATCH_ID);
t_model& latch_model = get_model(latch_model_id);
t_model_ports* latch_model_input_port_1 = new t_model_ports;
t_model_ports* latch_model_input_port_2 = new t_model_ports;
@@ -104,6 +107,7 @@ LogicalModels::LogicalModels() {
//NAMES
{
LogicalModelId names_model_id = create_logical_model(MODEL_NAMES);
+ VTR_ASSERT_OPT(names_model_id == MODEL_NAMES_ID);
t_model& names_model = get_model(names_model_id);
names_model.inputs = new t_model_ports;
@@ -144,7 +148,7 @@ void LogicalModels::free_model_data(t_model& model) {
while (vptr) {
vtr::t_linked_vptr* vptr_prev = vptr;
vptr = vptr->next;
- vtr::free(vptr_prev);
+ delete vptr_prev;
}
if (model.instances)
diff --git a/libs/libarchfpga/src/logic_types.h b/libs/libarchfpga/src/logic_types.h
index 0a23b23d8e9..602ec5c2f12 100644
--- a/libs/libarchfpga/src/logic_types.h
+++ b/libs/libarchfpga/src/logic_types.h
@@ -1,3 +1,4 @@
+#pragma once
/*
* Data types describing the logic (technology-mapped) models that the architecture can implement.
* Logic models include LUT (.names), flipflop (.latch), inpad, outpad, memory slice, etc.
@@ -10,9 +11,6 @@
* Date: April, 2025
*/
-#ifndef LOGIC_TYPES_H
-#define LOGIC_TYPES_H
-
#include "vtr_assert.h"
#include "vtr_list.h"
#include "vtr_memory.h"
@@ -97,6 +95,13 @@ class LogicalModels {
static constexpr const char* MODEL_INPUT = ".input";
static constexpr const char* MODEL_OUTPUT = ".output";
+ // The IDs of each of the library models. These are known ahead of time,
+ // and making these constexpr can save having to look them up in this class.
+ static constexpr LogicalModelId MODEL_INPUT_ID = LogicalModelId(0);
+ static constexpr LogicalModelId MODEL_OUTPUT_ID = LogicalModelId(1);
+ static constexpr LogicalModelId MODEL_LATCH_ID = LogicalModelId(2);
+ static constexpr LogicalModelId MODEL_NAMES_ID = LogicalModelId(3);
+
// Iterator for the logical model IDs array.
typedef typename vtr::vector_map::const_iterator model_iterator;
@@ -268,5 +273,3 @@ class LogicalModels {
/// @brief A lookup between the name of a logical model and its ID.
std::unordered_map model_name_to_logical_model_id_;
};
-
-#endif
diff --git a/libs/libarchfpga/src/parse_switchblocks.h b/libs/libarchfpga/src/parse_switchblocks.h
index 93777f965b6..fd5664818b9 100644
--- a/libs/libarchfpga/src/parse_switchblocks.h
+++ b/libs/libarchfpga/src/parse_switchblocks.h
@@ -1,9 +1,8 @@
-#ifndef PARSE_SWITCHBLOCKS_H
-#define PARSE_SWITCHBLOCKS_H
+#pragma once
-#include
+#include "physical_types.h"
#include "pugixml.hpp"
-#include "pugixml_util.hpp"
+#include "pugixml_loc.hpp"
#include "vtr_expr_eval.h"
/**** Function Declarations ****/
@@ -18,5 +17,3 @@ void check_switchblock(const t_switchblock_inf* sb, const t_arch* arch);
/* returns integer result according to the specified formula and data */
int get_sb_formula_raw_result(vtr::FormulaParser& formula_parser, const char* formula, const vtr::t_formula_data& mydata);
-
-#endif /* PARSE_SWITCHBLOCKS_H */
diff --git a/libs/libarchfpga/src/physical_types.cpp b/libs/libarchfpga/src/physical_types.cpp
index 6032bcb6d26..162ff81f4e9 100644
--- a/libs/libarchfpga/src/physical_types.cpp
+++ b/libs/libarchfpga/src/physical_types.cpp
@@ -230,9 +230,20 @@ bool t_logical_block_type::is_empty() const {
return name == std::string(EMPTY_BLOCK_NAME);
}
+bool t_logical_block_type::is_io() const {
+ // Iterate over all equivalent tiles and return true if any
+ // of them are IO tiles
+ for (t_physical_tile_type_ptr tile : equivalent_tiles) {
+ if (tile->is_io()) {
+ return true;
+ }
+ }
+ return false;
+}
+
const t_port* t_logical_block_type::get_port(std::string_view port_name) const {
for (int i = 0; i < pb_type->num_ports; i++) {
- auto port = pb_type->ports[i];
+ const t_port& port = pb_type->ports[i];
if (port_name == port.name) {
return &pb_type->ports[port.index];
}
diff --git a/libs/libarchfpga/src/physical_types.h b/libs/libarchfpga/src/physical_types.h
index f5ffa481395..cafe99ec0db 100644
--- a/libs/libarchfpga/src/physical_types.h
+++ b/libs/libarchfpga/src/physical_types.h
@@ -1,3 +1,4 @@
+#pragma once
/*
* Data types describing the physical components on the FPGA architecture.
*
@@ -24,8 +25,6 @@
* Authors: Jason Luu and Kenneth Kent
*/
-#pragma once
-
#include
#include
#include
@@ -34,12 +33,9 @@
#include
#include
#include
-#include
-#include
#include
#include "vtr_ndmatrix.h"
-#include "vtr_hash.h"
#include "vtr_bimap.h"
#include "vtr_string_interning.h"
@@ -49,7 +45,6 @@
#include "vib_inf.h"
//Forward declarations
-struct t_clock_arch;
struct t_clock_network;
struct t_power_arch;
struct t_interconnect_pins;
@@ -168,11 +163,8 @@ enum e_pin_type {
enum e_interconnect {
COMPLETE_INTERC = 1,
DIRECT_INTERC = 2,
- MUX_INTERC = 3,
- NUM_INTERC_TYPES /* Invalid type */
+ MUX_INTERC = 3
};
-/* String version of interconnect types. Use for debugging messages */
-constexpr std::array INTERCONNECT_TYPE_STRING = {{"unknown", "complete", "direct", "mux"}};
/* Orientations. */
enum e_side : unsigned char {
@@ -416,12 +408,6 @@ struct t_grid_def {
/************************* POWER ***********************************/
-/* Global clock architecture */
-struct t_clock_arch {
- int num_global_clocks;
- t_clock_network* clock_inf; /* Details about each clock */
-};
-
/* Architecture information for a single clock */
struct t_clock_network {
bool autosize_buffer; /* autosize clock buffers */
@@ -431,6 +417,15 @@ struct t_clock_network {
float prob; /* Static probability of net assigned to this clock */
float dens; /* Switching density of net assigned to this clock */
float period; /* Period of clock */
+
+ t_clock_network() {
+ autosize_buffer = false;
+ buffer_size = 0.0f;
+ C_wire = 0.0f;
+ prob = 0.0f;
+ dens = 0.0f;
+ period = 0.0f;
+ }
};
/* Power-related architecture information */
@@ -443,12 +438,26 @@ struct t_power_arch {
float mux_transistor_size;
float FF_size;
float LUT_transistor_size;
+
+ t_power_arch() {
+ C_wire_local = 0.0f;
+ logical_effort_factor = 0.0f;
+ local_interc_factor = 0.0f;
+ transistors_per_SRAM_bit = 0.0f;
+ mux_transistor_size = 0.0f;
+ FF_size = 0.0f;
+ LUT_transistor_size = 0.0f;
+ }
};
/* Power usage for an entity */
struct t_power_usage {
float dynamic;
float leakage;
+ t_power_usage() {
+ dynamic = 0.0f;
+ leakage = 0.0f;
+ }
};
/*************************************************************************************************/
@@ -543,6 +552,18 @@ struct t_port_power {
t_port* scaled_by_port;
int scaled_by_port_pin_idx;
bool reverse_scaled; /* Scale by (1-prob) */
+
+ t_port_power() {
+ wire_type = (e_power_wire_type)0;
+ wire = {0.0f}; // Default to C = 0.0f
+ buffer_type = (e_power_buffer_type)0;
+ buffer_size = 0.0f;
+ pin_toggle_initialized = false;
+ energy_per_toggle = 0.0f;
+ scaled_by_port = nullptr;
+ scaled_by_port_pin_idx = 0;
+ reverse_scaled = false;
+ }
};
/**
@@ -690,6 +711,7 @@ struct t_physical_tile_type {
std::unordered_map> on_tile_pin_num_to_pb_pin; // [root_pin_physical_num][logical_block] -> t_pb_graph_pin*
std::unordered_map pin_num_to_pb_pin; // [intra_tile_pin_physical_num] -> t_pb_graph_pin
+ std::unordered_map pb_pin_to_pin_num; // [t_pb_graph_pin*] -> intra_tile_pin_physical_num
std::vector fc_specs;
@@ -983,6 +1005,9 @@ struct t_logical_block_type {
// Is this t_logical_block_type empty?
bool is_empty() const;
+ // Returns true if this logical block type is an IO block
+ bool is_io() const;
+
public:
/**
* @brief Returns the logical block port given the port name and the corresponding logical block type
@@ -1069,8 +1094,7 @@ struct t_pb_type {
t_mode* parent_mode = nullptr;
int depth = 0; /* depth of pb_type */
- t_pin_to_pin_annotation* annotations = nullptr; /* [0..num_annotations-1] */
- int num_annotations = 0;
+ std::vector annotations;
int index_in_logical_block = 0; /* assign a unique id to each pb_type in a logical block */
@@ -1141,6 +1165,43 @@ struct t_mode {
t_metadata_dict meta;
};
+/** Info placed between pins in the architecture file (e.g. delay annotations),
+ *
+ * This is later for additional information.
+ *
+ * Data Members:
+ * annotation_entries: pairs of annotation subtypes and the annotation values
+ * type: type of annotation
+ * format: formatting of data
+ * input_pins: input pins as string affected by annotation
+ * output_pins: output pins as string affected by annotation
+ * clock_pin: clock as string affected by annotation
+ */
+struct t_pin_to_pin_annotation {
+
+ std::vector> annotation_entries;
+
+ enum e_pin_to_pin_annotation_type type;
+ enum e_pin_to_pin_annotation_format format;
+
+ char* input_pins;
+ char* output_pins;
+ char* clock;
+
+ int line_num; /* used to report what line number this annotation is found in architecture file */
+
+ t_pin_to_pin_annotation() noexcept {
+ annotation_entries = std::vector>();
+ input_pins = nullptr;
+ output_pins = nullptr;
+ clock = nullptr;
+
+ line_num = 0;
+ type = (e_pin_to_pin_annotation_type)0;
+ format = (e_pin_to_pin_annotation_format)0;
+ }
+};
+
/** Describes an interconnect edge inside a cluster
*
* This forms part of the t_pb_type hierarchical description of a clustered logic block.
@@ -1152,31 +1213,42 @@ struct t_mode {
* input_string: input string verbatim to parse later
* output_string: input string output to parse later
* annotations: Annotations for delay, power, etc
- * num_annotations: Total number of annotations
* infer_annotations: This interconnect is autogenerated, if true, infer pack_patterns
* such as carry-chains and forced packs based on interconnect linked to it
* parent_mode_index: Mode of parent as int
*/
struct t_interconnect {
enum e_interconnect type;
- char* name = nullptr;
+ char* name;
- char* input_string = nullptr;
- char* output_string = nullptr;
+ char* input_string;
+ char* output_string;
- t_pin_to_pin_annotation* annotations = nullptr; /* [0..num_annotations-1] */
- int num_annotations = 0;
- bool infer_annotations = false;
+ std::vector annotations;
+ bool infer_annotations;
- int line_num = 0; /* Interconnect is processed later, need to know what line number it messed up on to give proper error message */
+ int line_num; /* Interconnect is processed later, need to know what line number it messed up on to give proper error message */
- int parent_mode_index = 0;
+ int parent_mode_index;
/* Power related members */
- t_mode* parent_mode = nullptr;
+ t_mode* parent_mode;
- t_interconnect_power* interconnect_power = nullptr;
+ t_interconnect_power* interconnect_power;
t_metadata_dict meta;
+
+ t_interconnect() {
+ type = (e_interconnect)0;
+ name = nullptr;
+ input_string = nullptr;
+ output_string = nullptr;
+ infer_annotations = false;
+ line_num = 0;
+ parent_mode_index = 0;
+ parent_mode = nullptr;
+ interconnect_power = nullptr;
+ meta = t_metadata_dict();
+ }
};
/** Describes I/O and clock ports
@@ -1214,6 +1286,22 @@ struct t_port {
int absolute_first_pin_index;
t_port_power* port_power;
+
+ t_port() {
+ name = nullptr;
+ model_port = nullptr;
+ type = (PORTS)0;
+ is_clock = false;
+ is_non_clock_global = false;
+ num_pins = 0;
+ equivalent = (PortEquivalence)0;
+ parent_pb_type = nullptr;
+ port_class = nullptr;
+ index = 0;
+ port_index_by_type = 0;
+ absolute_first_pin_index = 0;
+ port_power = nullptr;
+ }
};
struct t_pb_type_power {
@@ -1240,6 +1328,15 @@ struct t_interconnect_power {
int num_output_ports;
int num_pins_per_port;
float transistor_cnt;
+
+ t_interconnect_power() {
+ power_usage = t_power_usage();
+ port_info_initialized = false;
+ num_input_ports = 0;
+ num_output_ports = 0;
+ num_pins_per_port = 0;
+ transistor_cnt = 0.0f;
+ }
};
struct t_interconnect_pins {
@@ -1253,34 +1350,6 @@ struct t_mode_power {
t_power_usage power_usage; /* Power usage of this mode */
};
-/** Info placed between pins in the architecture file (e.g. delay annotations),
- *
- * This is later for additional information.
- *
- * Data Members:
- * value: value/property pair
- * prop: value/property pair
- * type: type of annotation
- * format: formatting of data
- * input_pins: input pins as string affected by annotation
- * output_pins: output pins as string affected by annotation
- * clock_pin: clock as string affected by annotation
- */
-struct t_pin_to_pin_annotation {
- char** value; /* [0..num_value_prop_pairs - 1] */
- int* prop; /* [0..num_value_prop_pairs - 1] */
- int num_value_prop_pairs;
-
- enum e_pin_to_pin_annotation_type type;
- enum e_pin_to_pin_annotation_format format;
-
- char* input_pins;
- char* output_pins;
- char* clock;
-
- int line_num; /* used to report what line number this annotation is found in architecture file */
-};
-
/*************************************************************************************************
* PB Graph *
*************************************************************************************************
@@ -2245,7 +2314,8 @@ struct t_arch {
LogicalModels models;
t_power_arch* power = nullptr;
- t_clock_arch* clocks = nullptr;
+
+ std::shared_ptr> clocks;
//determine which layers in multi-die FPGAs require to build global routing resources
std::vector layer_global_routing;
diff --git a/libs/libarchfpga/src/physical_types_util.cpp b/libs/libarchfpga/src/physical_types_util.cpp
index 74ad3aa6f1e..c0535943391 100644
--- a/libs/libarchfpga/src/physical_types_util.cpp
+++ b/libs/libarchfpga/src/physical_types_util.cpp
@@ -1,10 +1,7 @@
-#include
+#include
#include "vtr_assert.h"
-#include "vtr_memory.h"
#include "vtr_util.h"
-#include "arch_types.h"
-#include "arch_util.h"
#include "arch_error.h"
#include "physical_types_util.h"
diff --git a/libs/libarchfpga/src/physical_types_util.h b/libs/libarchfpga/src/physical_types_util.h
index 84cad62a845..a89ff092b47 100644
--- a/libs/libarchfpga/src/physical_types_util.h
+++ b/libs/libarchfpga/src/physical_types_util.h
@@ -1,8 +1,4 @@
-
#pragma once
-
-#include "physical_types.h"
-
/********************************************************************
* *
* Physical types utility functions *
@@ -114,6 +110,8 @@
* and CLK_2 (physical pin) from the BUFG (logical block) and CLOCK TILE (physical tile).
*/
+#include "physical_types.h"
+
///@brief Returns true if the absolute physical pin index is an output of the given physical tile type
bool is_opin(int ipin, t_physical_tile_type_ptr type);
diff --git a/libs/libarchfpga/src/read_fpga_interchange_arch.cpp b/libs/libarchfpga/src/read_fpga_interchange_arch.cpp
index 265991c23f2..53760953a7a 100644
--- a/libs/libarchfpga/src/read_fpga_interchange_arch.cpp
+++ b/libs/libarchfpga/src/read_fpga_interchange_arch.cpp
@@ -1,10 +1,15 @@
-
#include "read_fpga_interchange_arch.h"
-#include "logic_types.h"
#ifdef VTR_ENABLE_CAPNPROTO
+#include
+#include "LogicalNetlist.capnp.h"
+#include "logic_types.h"
+#include "DeviceResources.capnp.h"
+#include "LogicalNetlist.capnp.h"
+#include "capnp/serialize.h"
+
#include
#include
#include
@@ -19,13 +24,21 @@
#include "vtr_assert.h"
#include "vtr_digest.h"
-#include "vtr_memory.h"
#include "vtr_util.h"
#include "arch_check.h"
#include "arch_error.h"
#include "arch_util.h"
+#else // VTR_ENABLE_CAPNPROTO
+
+#include
+#include "physical_types.h"
+#include "vtr_error.h"
+
+#endif // VTR_ENABLE_CAPNPROTO
+
+#ifdef VTR_ENABLE_CAPNPROTO
/*
* FPGA Interchange Device frontend
*
@@ -219,7 +232,7 @@ static t_port get_generic_port(t_arch* arch,
port.is_non_clock_global = false;
port.model_port = nullptr;
port.port_class = vtr::strdup(nullptr);
- port.port_power = (t_port_power*)vtr::calloc(1, sizeof(t_port_power));
+ port.port_power = new t_port_power();
if (!model.empty())
port.model_port = get_model_port(arch, model, name);
@@ -243,16 +256,12 @@ static bool block_port_exists(t_pb_type* pb_type, std::string port_name) {
static t_pin_to_pin_annotation get_pack_pattern(std::string pp_name, std::string input, std::string output) {
t_pin_to_pin_annotation pp;
- pp.prop = (int*)vtr::calloc(1, sizeof(int));
- pp.value = (char**)vtr::calloc(1, sizeof(char*));
-
pp.type = E_ANNOT_PIN_TO_PIN_PACK_PATTERN;
pp.format = E_ANNOT_PIN_TO_PIN_CONSTANT;
- pp.prop[0] = (int)E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME;
- pp.value[0] = vtr::strdup(pp_name.c_str());
+ pp.annotation_entries.push_back({E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME, pp_name});
pp.input_pins = vtr::strdup(input.c_str());
pp.output_pins = vtr::strdup(output.c_str());
- pp.num_value_prop_pairs = 1;
+
pp.clock = nullptr;
return pp;
@@ -1290,10 +1299,10 @@ struct ArchReader {
lut->parent_mode = mode;
lut->blif_model = vtr::strdup(LogicalModels::MODEL_NAMES);
- lut->model_id = get_model(arch_, LogicalModels::MODEL_NAMES);
+ lut->model_id = LogicalModels::MODEL_NAMES_ID;
lut->num_ports = 2;
- lut->ports = (t_port*)vtr::calloc(lut->num_ports, sizeof(t_port));
+ lut->ports = new t_port[lut->num_ports]();
lut->ports[0] = get_generic_port(arch_, lut, IN_PORT, "in", LogicalModels::MODEL_NAMES, width);
lut->ports[1] = get_generic_port(arch_, lut, OUT_PORT, "out", LogicalModels::MODEL_NAMES);
@@ -1377,7 +1386,7 @@ struct ArchReader {
port->name = is_input ? vtr::strdup(ipin.c_str()) : vtr::strdup(opin.c_str());
port->model_port = nullptr;
port->port_class = vtr::strdup(nullptr);
- port->port_power = (t_port_power*)vtr::calloc(1, sizeof(t_port_power));
+ port->port_power = new t_port_power();
}
// OPAD mode
@@ -1395,9 +1404,9 @@ struct ArchReader {
num_ports = 1;
opad->num_ports = num_ports;
- opad->ports = (t_port*)vtr::calloc(num_ports, sizeof(t_port));
+ opad->ports = new t_port[num_ports]();
opad->blif_model = vtr::strdup(LogicalModels::MODEL_OUTPUT);
- opad->model_id = get_model(arch_, LogicalModels::MODEL_OUTPUT);
+ opad->model_id = LogicalModels::MODEL_OUTPUT_ID;
opad->ports[0] = get_generic_port(arch_, opad, IN_PORT, "outpad", LogicalModels::MODEL_OUTPUT);
omode->pb_type_children[0] = *opad;
@@ -1417,9 +1426,9 @@ struct ArchReader {
num_ports = 1;
ipad->num_ports = num_ports;
- ipad->ports = (t_port*)vtr::calloc(num_ports, sizeof(t_port));
+ ipad->ports = new t_port[num_ports]();
ipad->blif_model = vtr::strdup(LogicalModels::MODEL_INPUT);
- ipad->model_id = get_model(arch_, LogicalModels::MODEL_INPUT);
+ ipad->model_id = LogicalModels::MODEL_INPUT_ID;
ipad->ports[0] = get_generic_port(arch_, ipad, OUT_PORT, "inpad", LogicalModels::MODEL_INPUT);
imode->pb_type_children[0] = *ipad;
@@ -1544,7 +1553,7 @@ struct ArchReader {
int num_ports = ic_count;
leaf->num_ports = num_ports;
- leaf->ports = (t_port*)vtr::calloc(num_ports, sizeof(t_port));
+ leaf->ports = new t_port[num_ports]();
leaf->blif_model = vtr::strdup((std::string(".subckt ") + name).c_str());
leaf->model_id = get_model(arch_, name);
@@ -1819,8 +1828,7 @@ struct ArchReader {
t_interconnect* pp_ic = pair.first;
auto num_pp = pair.second.size();
- pp_ic->num_annotations = num_pp;
- pp_ic->annotations = new t_pin_to_pin_annotation[num_pp];
+ pp_ic->annotations.resize(num_pp);
int idx = 0;
for (auto pp_name : pair.second)
@@ -2082,7 +2090,7 @@ struct ArchReader {
pb_type->modes = new t_mode[pb_type->num_modes];
pb_type->num_ports = 2;
- pb_type->ports = (t_port*)vtr::calloc(pb_type->num_ports, sizeof(t_port));
+ pb_type->ports = new t_port[pb_type->num_ports]();
pb_type->num_output_pins = 2;
pb_type->num_input_pins = 0;
@@ -2118,7 +2126,7 @@ struct ArchReader {
int num_ports = 1;
leaf_pb_type->num_ports = num_ports;
- leaf_pb_type->ports = (t_port*)vtr::calloc(num_ports, sizeof(t_port));
+ leaf_pb_type->ports = new t_port[num_ports]();
leaf_pb_type->blif_model = vtr::strdup(const_cell.first.c_str());
leaf_pb_type->model_id = get_model(arch_, const_cell.first);
diff --git a/libs/libarchfpga/src/read_fpga_interchange_arch.h b/libs/libarchfpga/src/read_fpga_interchange_arch.h
index 753b44d3010..cdae78fb516 100644
--- a/libs/libarchfpga/src/read_fpga_interchange_arch.h
+++ b/libs/libarchfpga/src/read_fpga_interchange_arch.h
@@ -1,18 +1,7 @@
-#ifndef READ_FPGAINTERCHANGE_ARCH_FILE_H
-#define READ_FPGAINTERCHANGE_ARCH_FILE_H
+#pragma once
-#include "arch_types.h"
-
-#ifdef VTR_ENABLE_CAPNPROTO
-
-#include "DeviceResources.capnp.h"
-#include "LogicalNetlist.capnp.h"
-#include "capnp/serialize.h"
-#include "capnp/serialize-packed.h"
-#include
-#include
-
-#endif // VTR_ENABLE_CAPNPROTO
+#include
+#include "physical_types.h"
#ifdef __cplusplus
extern "C" {
@@ -34,5 +23,3 @@ void FPGAInterchangeReadArch(const char* FPGAInterchangeDeviceFile,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libs/libarchfpga/src/read_xml_arch_file.cpp b/libs/libarchfpga/src/read_xml_arch_file.cpp
index a4c0200d053..0865f7311ce 100644
--- a/libs/libarchfpga/src/read_xml_arch_file.cpp
+++ b/libs/libarchfpga/src/read_xml_arch_file.cpp
@@ -50,7 +50,6 @@
#include "vtr_assert.h"
#include "vtr_log.h"
#include "vtr_util.h"
-#include "vtr_memory.h"
#include "vtr_digest.h"
#include "vtr_token.h"
#include "vtr_bimap.h"
@@ -378,7 +377,7 @@ static void ProcessPower(pugi::xml_node parent,
t_power_arch* power_arch,
const pugiutil::loc_data& loc_data);
-static void ProcessClocks(pugi::xml_node Parent, t_clock_arch* clocks, const pugiutil::loc_data& loc_data);
+static void ProcessClocks(pugi::xml_node Parent, std::vector& clocks, const pugiutil::loc_data& loc_data);
static void ProcessPb_TypePowerEstMethod(pugi::xml_node Parent, t_pb_type* pb_type, const pugiutil::loc_data& loc_data);
static void ProcessPb_TypePort_Power(pugi::xml_node Parent, t_port* port, e_power_estimation_method power_method, const pugiutil::loc_data& loc_data);
@@ -566,10 +565,9 @@ void XmlReadArch(const char* ArchFile,
/* This information still needs to be read, even if it is just
* thrown away.
*/
- t_power_arch* power_arch_fake = (t_power_arch*)vtr::calloc(1,
- sizeof(t_power_arch));
+ t_power_arch* power_arch_fake = new t_power_arch();
ProcessPower(Next, power_arch_fake, loc_data);
- free(power_arch_fake);
+ delete power_arch_fake;
}
}
@@ -577,16 +575,13 @@ void XmlReadArch(const char* ArchFile,
Next = get_single_child(architecture, "clocks", loc_data, POWER_REQD);
if (Next) {
if (arch->clocks) {
- ProcessClocks(Next, arch->clocks, loc_data);
+ ProcessClocks(Next, *arch->clocks, loc_data);
} else {
/* This information still needs to be read, even if it is just
* thrown away.
*/
- t_clock_arch* clocks_fake = (t_clock_arch*)vtr::calloc(1,
- sizeof(t_clock_arch));
+ std::vector clocks_fake;
ProcessClocks(Next, clocks_fake, loc_data);
- free(clocks_fake->clock_inf);
- free(clocks_fake);
}
}
@@ -1047,9 +1042,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
i = 1;
}
- annotation->num_value_prop_pairs = i;
- annotation->prop = (int*)vtr::calloc(i, sizeof(int));
- annotation->value = (char**)vtr::calloc(i, sizeof(char*));
+ annotation->annotation_entries.resize(i);
annotation->line_num = loc_data.line(Parent);
/* Todo: This is slow, I should use a case lookup */
i = 0;
@@ -1058,14 +1051,12 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->format = E_ANNOT_PIN_TO_PIN_CONSTANT;
Prop = get_attribute(Parent, "max", loc_data, ReqOpt::OPTIONAL).as_string(nullptr);
if (Prop) {
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_MAX;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_MAX, Prop};
i++;
}
Prop = get_attribute(Parent, "min", loc_data, ReqOpt::OPTIONAL).as_string(nullptr);
if (Prop) {
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_MIN;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_MIN, Prop};
i++;
}
Prop = get_attribute(Parent, "in_port", loc_data).value();
@@ -1078,13 +1069,13 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->type = E_ANNOT_PIN_TO_PIN_DELAY;
annotation->format = E_ANNOT_PIN_TO_PIN_MATRIX;
Prop = get_attribute(Parent, "type", loc_data).value();
- annotation->value[i] = vtr::strdup(Parent.child_value());
+ annotation->annotation_entries[i].second = Parent.child_value();
if (0 == strcmp(Prop, "max")) {
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_MAX;
+ annotation->annotation_entries[i].first = E_ANNOT_PIN_TO_PIN_DELAY_MAX;
} else {
VTR_ASSERT(0 == strcmp(Prop, "min"));
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_MIN;
+ annotation->annotation_entries[i].first = E_ANNOT_PIN_TO_PIN_DELAY_MIN;
}
i++;
@@ -1098,8 +1089,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->type = E_ANNOT_PIN_TO_PIN_CAPACITANCE;
annotation->format = E_ANNOT_PIN_TO_PIN_CONSTANT;
Prop = get_attribute(Parent, "C", loc_data).value();
- annotation->value[i] = vtr::strdup(Prop);
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_CAPACITANCE_C;
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_CAPACITANCE_C, Prop};
i++;
Prop = get_attribute(Parent, "in_port", loc_data, ReqOpt::OPTIONAL).as_string(nullptr);
@@ -1112,8 +1102,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
} else if (0 == strcmp(Parent.name(), "C_matrix")) {
annotation->type = E_ANNOT_PIN_TO_PIN_CAPACITANCE;
annotation->format = E_ANNOT_PIN_TO_PIN_MATRIX;
- annotation->value[i] = vtr::strdup(Parent.child_value());
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_CAPACITANCE_C;
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_CAPACITANCE_C, Parent.child_value()};
i++;
Prop = get_attribute(Parent, "in_port", loc_data, ReqOpt::OPTIONAL).as_string(nullptr);
@@ -1127,9 +1116,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->type = E_ANNOT_PIN_TO_PIN_DELAY;
annotation->format = E_ANNOT_PIN_TO_PIN_CONSTANT;
Prop = get_attribute(Parent, "value", loc_data).value();
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_TSETUP;
- annotation->value[i] = vtr::strdup(Prop);
-
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_TSETUP, Prop};
i++;
Prop = get_attribute(Parent, "port", loc_data).value();
annotation->input_pins = vtr::strdup(Prop);
@@ -1146,15 +1133,13 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
bool found_min_max_attrib = false;
if (Prop) {
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MAX, Prop};
i++;
found_min_max_attrib = true;
}
Prop = get_attribute(Parent, "min", loc_data, ReqOpt::OPTIONAL).as_string(nullptr);
if (Prop) {
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_CLOCK_TO_Q_MIN, Prop};
i++;
found_min_max_attrib = true;
}
@@ -1177,8 +1162,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->type = E_ANNOT_PIN_TO_PIN_DELAY;
annotation->format = E_ANNOT_PIN_TO_PIN_CONSTANT;
Prop = get_attribute(Parent, "value", loc_data).value();
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_DELAY_THOLD;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_DELAY_THOLD, Prop};
i++;
Prop = get_attribute(Parent, "port", loc_data).value();
@@ -1193,8 +1177,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
annotation->type = E_ANNOT_PIN_TO_PIN_PACK_PATTERN;
annotation->format = E_ANNOT_PIN_TO_PIN_CONSTANT;
Prop = get_attribute(Parent, "name", loc_data).value();
- annotation->prop[i] = (int)E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME;
- annotation->value[i] = vtr::strdup(Prop);
+ annotation->annotation_entries[i] = {E_ANNOT_PIN_TO_PIN_PACK_PATTERN_NAME, Prop};
i++;
Prop = get_attribute(Parent, "in_port", loc_data).value();
@@ -1208,7 +1191,7 @@ static void ProcessPinToPinAnnotations(pugi::xml_node Parent,
"Unknown port type %s in %s in %s", Parent.name(),
Parent.parent().name(), Parent.parent().parent().name());
}
- VTR_ASSERT(i == annotation->num_value_prop_pairs);
+ VTR_ASSERT(i == static_cast(annotation->annotation_entries.size()));
}
static void ProcessPb_TypePowerPinToggle(pugi::xml_node parent, t_pb_type* pb_type, const pugiutil::loc_data& loc_data) {
@@ -1446,7 +1429,7 @@ static void ProcessPb_Type(pugi::xml_node Parent,
const int num_out_ports = count_children(Parent, "output", loc_data, ReqOpt::OPTIONAL);
const int num_clock_ports = count_children(Parent, "clock", loc_data, ReqOpt::OPTIONAL);
const int num_ports = num_in_ports + num_out_ports + num_clock_ports;
- pb_type->ports = (t_port*)vtr::calloc(num_ports, sizeof(t_port));
+ pb_type->ports = new t_port[num_ports]();
pb_type->num_ports = num_ports;
/* Enforce VPR's definition of LUT/FF by checking number of ports */
@@ -1461,7 +1444,7 @@ static void ProcessPb_Type(pugi::xml_node Parent,
}
/* Initialize Power Structure */
- pb_type->pb_type_power = (t_pb_type_power*)vtr::calloc(1, sizeof(t_pb_type_power));
+ pb_type->pb_type_power = new t_pb_type_power();
ProcessPb_TypePowerEstMethod(Parent, pb_type, loc_data);
/* process ports */
@@ -1528,8 +1511,7 @@ static void ProcessPb_Type(pugi::xml_node Parent,
archfpga_throw(e.filename().c_str(), e.line(), msg.c_str());
}
- pb_type->annotations = nullptr;
- pb_type->num_annotations = 0;
+ pb_type->annotations.clear();
/* Determine if this is a leaf or container pb_type */
if (pb_type->blif_model != nullptr) {
/* Process delay and capacitance annotations */
@@ -1538,8 +1520,7 @@ static void ProcessPb_Type(pugi::xml_node Parent,
num_annotations += count_children(Parent, child_name, loc_data, ReqOpt::OPTIONAL);
}
- pb_type->annotations = (t_pin_to_pin_annotation*)vtr::calloc(num_annotations, sizeof(t_pin_to_pin_annotation));
- pb_type->num_annotations = num_annotations;
+ pb_type->annotations.resize(num_annotations);
int annotation_idx = 0;
for (auto child_name : {"delay_constant", "delay_matrix", "C_constant", "C_matrix", "T_setup", "T_clock_to_Q", "T_hold"}) {
@@ -1622,7 +1603,7 @@ static void ProcessPb_TypePort_Power(pugi::xml_node Parent, t_port* port, e_powe
const char* prop;
bool wire_defined = false;
- port->port_power = (t_port_power*)vtr::calloc(1, sizeof(t_port_power));
+ port->port_power = new t_port_power();
//Defaults
if (power_method == POWER_METHOD_AUTO_SIZES) {
@@ -1908,9 +1889,7 @@ static void ProcessInterconnect(vtr::string_internment& strings,
num_annotations += count_children(Cur, annot_child_name, loc_data, ReqOpt::OPTIONAL);
}
- mode->interconnect[interconnect_idx].annotations = (t_pin_to_pin_annotation*)vtr::calloc(num_annotations,
- sizeof(t_pin_to_pin_annotation));
- mode->interconnect[interconnect_idx].num_annotations = num_annotations;
+ mode->interconnect[interconnect_idx].annotations.resize(num_annotations);
int annotation_idx = 0;
for (auto annot_child_name : {"delay_constant", "delay_matrix", "C_constant", "C_matrix", "pack_pattern"}) {
@@ -1928,8 +1907,7 @@ static void ProcessInterconnect(vtr::string_internment& strings,
VTR_ASSERT(annotation_idx == num_annotations);
/* Power */
- mode->interconnect[interconnect_idx].interconnect_power = (t_interconnect_power*)vtr::calloc(1,
- sizeof(t_interconnect_power));
+ mode->interconnect[interconnect_idx].interconnect_power = new t_interconnect_power();
mode->interconnect[interconnect_idx].interconnect_power->port_info_initialized = false;
/* get next iteration */
@@ -2009,7 +1987,7 @@ static void ProcessMode(pugi::xml_node Parent,
}
/* Allocate power structure */
- mode->mode_power = (t_mode_power*)vtr::calloc(1, sizeof(t_mode_power));
+ mode->mode_power = new t_mode_power();
if (!implied_mode) {
// Implied mode metadata is attached to the pb_type, rather than
@@ -5008,32 +4986,26 @@ static void ProcessPower(pugi::xml_node parent,
}
/* Get the clock architecture */
-static void ProcessClocks(pugi::xml_node Parent, t_clock_arch* clocks, const pugiutil::loc_data& loc_data) {
+static void ProcessClocks(pugi::xml_node Parent, std::vector& clocks, const pugiutil::loc_data& loc_data) {
pugi::xml_node Node;
const char* tmp;
- clocks->num_global_clocks = count_children(Parent, "clock", loc_data, ReqOpt::OPTIONAL);
+ int num_global_clocks = count_children(Parent, "clock", loc_data, ReqOpt::OPTIONAL);
- /* Alloc the clockdetails */
- clocks->clock_inf = nullptr;
- if (clocks->num_global_clocks > 0) {
- clocks->clock_inf = (t_clock_network*)vtr::malloc(clocks->num_global_clocks * sizeof(t_clock_network));
- memset(clocks->clock_inf, 0,
- clocks->num_global_clocks * sizeof(t_clock_network));
- }
+ clocks.resize(num_global_clocks, t_clock_network());
/* Load the clock info. */
Node = get_first_child(Parent, "clock", loc_data);
- for (int i = 0; i < clocks->num_global_clocks; ++i) {
+ for (int i = 0; i < num_global_clocks; ++i) {
tmp = get_attribute(Node, "buffer_size", loc_data).value();
if (strcmp(tmp, "auto") == 0) {
- clocks->clock_inf[i].autosize_buffer = true;
+ clocks[i].autosize_buffer = true;
} else {
- clocks->clock_inf[i].autosize_buffer = false;
- clocks->clock_inf[i].buffer_size = (float)atof(tmp);
+ clocks[i].autosize_buffer = false;
+ clocks[i].buffer_size = (float)atof(tmp);
}
- clocks->clock_inf[i].C_wire = get_attribute(Node, "C_wire", loc_data).as_float(0);
+ clocks[i].C_wire = get_attribute(Node, "C_wire", loc_data).as_float(0);
/* get the next clock item */
Node = Node.next_sibling(Node.name());
diff --git a/libs/libarchfpga/src/read_xml_arch_file.h b/libs/libarchfpga/src/read_xml_arch_file.h
index b6763493a4c..11a327a66b5 100644
--- a/libs/libarchfpga/src/read_xml_arch_file.h
+++ b/libs/libarchfpga/src/read_xml_arch_file.h
@@ -1,7 +1,7 @@
-#ifndef READ_XML_ARCH_FILE_H
-#define READ_XML_ARCH_FILE_H
+#pragma once
-#include "arch_types.h"
+#include
+#include "physical_types.h"
#ifdef __cplusplus
extern "C" {
@@ -21,5 +21,3 @@ void XmlReadArch(const char* ArchFile,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libs/libarchfpga/src/read_xml_arch_file_noc_tag.h b/libs/libarchfpga/src/read_xml_arch_file_noc_tag.h
index ab5015ecc0e..aee99406926 100644
--- a/libs/libarchfpga/src/read_xml_arch_file_noc_tag.h
+++ b/libs/libarchfpga/src/read_xml_arch_file_noc_tag.h
@@ -1,6 +1,4 @@
-
-#ifndef VTR_READ_XML_ARCH_FILE_NOC_TAG_H
-#define VTR_READ_XML_ARCH_FILE_NOC_TAG_H
+#pragma once
#include "pugixml.hpp"
#include "pugixml_loc.hpp"
@@ -37,5 +35,3 @@ struct t_mesh_region {
/// The number of NoC routers in each row or column.
int mesh_size;
};
-
-#endif //VTR_READ_XML_ARCH_FILE_NOC_TAG_H
diff --git a/libs/libarchfpga/src/read_xml_util.h b/libs/libarchfpga/src/read_xml_util.h
index b5fa4fbf704..e9cf49d1e18 100644
--- a/libs/libarchfpga/src/read_xml_util.h
+++ b/libs/libarchfpga/src/read_xml_util.h
@@ -1,5 +1,4 @@
-#ifndef READ_XML_UTIL_H
-#define READ_XML_UTIL_H
+#pragma once
#include "pugixml.hpp"
#include "pugixml_loc.hpp"
@@ -24,5 +23,3 @@ void bad_attribute_value(const pugi::xml_attribute attr,
InstPort make_inst_port(std::string str, pugi::xml_node node, const pugiutil::loc_data& loc_data);
InstPort make_inst_port(pugi::xml_attribute attr, pugi::xml_node node, const pugiutil::loc_data& loc_data);
-
-#endif
diff --git a/libs/libarchfpga/src/write_models_bb.h b/libs/libarchfpga/src/write_models_bb.h
index 251ebf51aad..1bd872e8bba 100644
--- a/libs/libarchfpga/src/write_models_bb.h
+++ b/libs/libarchfpga/src/write_models_bb.h
@@ -1,10 +1,7 @@
-#ifndef WRITE_MODELS_BB_H
-#define WRITE_MODELS_BB_H
+#pragma once
-#include "arch_types.h"
+#include "physical_types.h"
void WriteModels_bb(const char* ArchFile,
const char* VEchoFile,
const t_arch* arch);
-
-#endif
diff --git a/libs/liblog/src/log.h b/libs/liblog/src/log.h
index a350a64c558..8670608f68a 100644
--- a/libs/liblog/src/log.h
+++ b/libs/liblog/src/log.h
@@ -1,3 +1,4 @@
+#pragma once
/**
* Lightweight logging tool. Automatically prepend messages with prefixes and store in log file.
*
@@ -7,9 +8,6 @@
* Date: Sept 5, 2014
*/
-#ifndef LOG_H
-#define LOG_H
-
void log_set_output_file(const char* filename);
void log_print_direct(const char* message, ...);
@@ -18,5 +16,3 @@ void log_print_warning(const char* filename, unsigned int line_num, const char*
void log_print_error(const char* filename, unsigned int line_num, const char* message, ...);
void log_close();
-
-#endif
diff --git a/libs/libpugiutil/src/pugixml_loc.hpp b/libs/libpugiutil/src/pugixml_loc.hpp
index b8e11fded7d..36e6a1aa10a 100644
--- a/libs/libpugiutil/src/pugixml_loc.hpp
+++ b/libs/libpugiutil/src/pugixml_loc.hpp
@@ -1,5 +1,4 @@
-#ifndef PUGIXML_LOC_H
-#define PUGIXML_LOC_H
+#pragma once
/*
* This file contains utilities for the PUGI XML parser,
* hanlding the retrieval of line numbers (useful for error messages)
@@ -52,5 +51,3 @@ class loc_data {
std::vector offsets_;
};
} // namespace pugiutil
-
-#endif
diff --git a/libs/libpugiutil/src/pugixml_util.hpp b/libs/libpugiutil/src/pugixml_util.hpp
index 3bb60779fc0..54b27fa8ade 100644
--- a/libs/libpugiutil/src/pugixml_util.hpp
+++ b/libs/libpugiutil/src/pugixml_util.hpp
@@ -1,5 +1,4 @@
-#ifndef PUGIXML_UTIL_H
-#define PUGIXML_UTIL_H
+#pragma once
/*
* This file contains utilities for the PUGI XML parser.
*
@@ -195,5 +194,3 @@ bool check_node(const pugi::xml_node node,
const ReqOpt req_opt = REQUIRED);
} // namespace pugiutil
-
-#endif
diff --git a/libs/librrgraph/src/base/check_rr_graph.cpp b/libs/librrgraph/src/base/check_rr_graph.cpp
index 06bb22e3566..45a1cdef1f8 100644
--- a/libs/librrgraph/src/base/check_rr_graph.cpp
+++ b/libs/librrgraph/src/base/check_rr_graph.cpp
@@ -1,5 +1,4 @@
#include "vtr_log.h"
-#include "vtr_memory.h"
#include "vtr_util.h"
#include "vpr_error.h"
@@ -9,7 +8,6 @@
#include "physical_types_util.h"
#include "describe_rr_node.h"
-#include "rr_graph_utils.h"
/*********************** Subroutines local to this module *******************/
diff --git a/libs/librrgraph/src/base/check_rr_graph.h b/libs/librrgraph/src/base/check_rr_graph.h
index fc0e37fe62a..0d601149d3f 100644
--- a/libs/librrgraph/src/base/check_rr_graph.h
+++ b/libs/librrgraph/src/base/check_rr_graph.h
@@ -1,5 +1,4 @@
-#ifndef CHECK_RR_GRAPH_H
-#define CHECK_RR_GRAPH_H
+#pragma once
#include "device_grid.h"
#include "rr_graph_view.h"
@@ -22,5 +21,3 @@ void check_rr_node(const RRGraphView& rr_graph,
const enum e_route_type route_type,
const int inode,
bool is_flat);
-
-#endif
diff --git a/libs/librrgraph/src/base/check_rr_graph_obj.h b/libs/librrgraph/src/base/check_rr_graph_obj.h
index 5b5041277b4..fe3bdc23ba1 100644
--- a/libs/librrgraph/src/base/check_rr_graph_obj.h
+++ b/libs/librrgraph/src/base/check_rr_graph_obj.h
@@ -1,11 +1,7 @@
-#ifndef CHECK_RR_GRAPH_OBJ_H
-#define CHECK_RR_GRAPH_OBJ_H
-
+#pragma once
/* Include header files which include data structures used by
* the function declaration
*/
#include "rr_graph_obj.h"
bool check_rr_graph(const RRGraph& rr_graph);
-
-#endif
diff --git a/libs/librrgraph/src/base/get_parallel_segs.h b/libs/librrgraph/src/base/get_parallel_segs.h
index f173b3aa15c..d6c7be02e64 100644
--- a/libs/librrgraph/src/base/get_parallel_segs.h
+++ b/libs/librrgraph/src/base/get_parallel_segs.h
@@ -1,5 +1,4 @@
-#ifndef GET_PARALLEL_SEGS_H
-#define GET_PARALLEL_SEGS_H
+#pragma once
#include "rr_graph_type.h"
#include "physical_types.h"
@@ -20,5 +19,3 @@ std::vector get_parallel_segs(const std::vector& s
t_unified_to_parallel_seg_index& seg_index_map,
enum e_parallel_axis parallel_axis,
bool keep_original_index = false);
-
-#endif
diff --git a/libs/librrgraph/src/base/metadata_storage.h b/libs/librrgraph/src/base/metadata_storage.h
index c261ff28aa8..db703d2de4c 100644
--- a/libs/librrgraph/src/base/metadata_storage.h
+++ b/libs/librrgraph/src/base/metadata_storage.h
@@ -1,6 +1,7 @@
-#ifndef _METADATA_STORAGE_H_
-#define _METADATA_STORAGE_H_
+#pragma once
+#include "physical_types.h"
+#include "vtr_flat_map.h"
#include "vtr_string_interning.h"
/**
@@ -111,5 +112,3 @@ class MetadataStorage {
mutable std::vector> data_;
mutable vtr::flat_map map_;
};
-
-#endif /* _METADATA_STORAGE_H_ */
diff --git a/libs/librrgraph/src/base/rr_edge.h b/libs/librrgraph/src/base/rr_edge.h
index 0fb3ac244ff..0f95a96167f 100644
--- a/libs/librrgraph/src/base/rr_edge.h
+++ b/libs/librrgraph/src/base/rr_edge.h
@@ -1,6 +1,6 @@
-#ifndef RR_EDGE_H
-#define RR_EDGE_H
+#pragma once
+#include "physical_types.h"
#include "rr_graph_fwd.h"
struct t_rr_edge_info {
@@ -27,5 +27,3 @@ struct t_rr_edge_info {
};
typedef std::vector t_rr_edge_info_set;
-
-#endif /* RR_EDGE */
diff --git a/libs/librrgraph/src/base/rr_graph_builder.cpp b/libs/librrgraph/src/base/rr_graph_builder.cpp
index 33ea035f0fe..925110a401c 100644
--- a/libs/librrgraph/src/base/rr_graph_builder.cpp
+++ b/libs/librrgraph/src/base/rr_graph_builder.cpp
@@ -5,9 +5,6 @@
#include "vtr_tokenizer.h"
#include
#include
-//#include
-
-//#include "globals.h"
RRGraphBuilder::RRGraphBuilder() {
is_edge_dirty_ = true;
diff --git a/libs/librrgraph/src/base/rr_graph_builder.h b/libs/librrgraph/src/base/rr_graph_builder.h
index 576d28c2101..8f6c50ea96f 100644
--- a/libs/librrgraph/src/base/rr_graph_builder.h
+++ b/libs/librrgraph/src/base/rr_graph_builder.h
@@ -1,6 +1,4 @@
-#ifndef RR_GRAPH_BUILDER_H
-#define RR_GRAPH_BUILDER_H
-
+#pragma once
/**
* @file
* @brief This file defines the RRGraphBuilder data structure which allows data modification on a routing resource graph
@@ -13,6 +11,7 @@
* - This is the only data structure allowed to modify a routing resource graph
*
*/
+
#include "rr_graph_storage.h"
#include "rr_spatial_lookup.h"
#include "metadata_storage.h"
@@ -525,5 +524,3 @@ class RRGraphBuilder {
bool is_edge_dirty_;
bool is_incoming_edge_dirty_;
};
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_cost.h b/libs/librrgraph/src/base/rr_graph_cost.h
index 6ad8be9e1b8..80b06dcf534 100644
--- a/libs/librrgraph/src/base/rr_graph_cost.h
+++ b/libs/librrgraph/src/base/rr_graph_cost.h
@@ -1,5 +1,4 @@
-#ifndef RR_GRAPH_COST_H
-#define RR_GRAPH_COST_H
+#pragma once
enum e_base_cost_type {
DELAY_NORMALIZED,
@@ -20,5 +19,3 @@ enum e_cost_indices {
IPIN_COST_INDEX,
CHANX_COST_INDEX_START
};
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_fwd.h b/libs/librrgraph/src/base/rr_graph_fwd.h
index 2f685e4c15a..1d3b15f7a02 100644
--- a/libs/librrgraph/src/base/rr_graph_fwd.h
+++ b/libs/librrgraph/src/base/rr_graph_fwd.h
@@ -1,7 +1,7 @@
-#ifndef RR_GRAPH_FWD_H
-#define RR_GRAPH_FWD_H
+#pragma once
#include
+
#include "vtr_strong_id.h"
/***************************************************************
@@ -13,6 +13,8 @@
//Forward declaration
class t_rr_graph_storage;
+class RRGraph;
+
struct rr_node_id_tag;
struct rr_edge_id_tag;
struct rr_indexed_data_id_tag;
@@ -26,5 +28,3 @@ typedef vtr::StrongId RRIndexedDataId;
typedef vtr::StrongId RRSwitchId;
typedef vtr::StrongId RRSegmentId;
typedef vtr::StrongId NodeRCIndex;
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_obj.cpp b/libs/librrgraph/src/base/rr_graph_obj.cpp
index 211c49990bf..59654aa0992 100644
--- a/libs/librrgraph/src/base/rr_graph_obj.cpp
+++ b/libs/librrgraph/src/base/rr_graph_obj.cpp
@@ -4,12 +4,8 @@
***********************************************************************/
#include
#include
-#include
-#include
-#include "vtr_vector_map.h"
#include "vtr_log.h"
-#include "vtr_util.h"
#include "vtr_assert.h"
#include "rr_graph_obj.h"
#include "rr_graph_obj_utils.h"
diff --git a/libs/librrgraph/src/base/rr_graph_obj.h b/libs/librrgraph/src/base/rr_graph_obj.h
index f3a3f8c8477..59aa34edc1f 100644
--- a/libs/librrgraph/src/base/rr_graph_obj.h
+++ b/libs/librrgraph/src/base/rr_graph_obj.h
@@ -1,3 +1,4 @@
+#pragma once
/************************************************************************
* This file introduces a class to model a Routing Resource Graph (RRGraph or RRG)
* which is widely used by placers, routers, analyzers etc.
@@ -186,8 +187,6 @@
* }
*
***********************************************************************/
-#ifndef RR_GRAPH_OBJ_H
-#define RR_GRAPH_OBJ_H
/*
* Notes in include header files in a head file
@@ -196,14 +195,13 @@
*/
/* Header files should be included in a sequence */
/* Standard header files required go first */
-#include
#include
/* EXTERNAL library header files go second*/
+#include "physical_types.h"
#include "vtr_vector.h"
#include "vtr_range.h"
#include "vtr_geometry.h"
-#include "arch_types.h"
/* VPR header files go third */
#include "rr_node_types.h"
@@ -833,5 +831,3 @@ class RRGraph {
typedef std::vector>>>> NodeLookup;
mutable NodeLookup node_lookup_;
};
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_obj_utils.h b/libs/librrgraph/src/base/rr_graph_obj_utils.h
index 910b0ce3acd..708f4f389ec 100644
--- a/libs/librrgraph/src/base/rr_graph_obj_utils.h
+++ b/libs/librrgraph/src/base/rr_graph_obj_utils.h
@@ -1,10 +1,8 @@
-#ifndef RR_GRAPH_OBJ_UTILS_H
-#define RR_GRAPH_OBJ_UTILS_H
-
+#pragma once
/* Include header files which include data structures used by
* the function declaration
*/
-#include
+
#include "vtr_vector_map.h"
/*
@@ -161,5 +159,3 @@ ValueContainer update_valid_refs(const ValueContainer& values, const IdContainer
}
return updated;
}
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_storage.cpp b/libs/librrgraph/src/base/rr_graph_storage.cpp
index 8ff99e1513a..cf251f56fdd 100644
--- a/libs/librrgraph/src/base/rr_graph_storage.cpp
+++ b/libs/librrgraph/src/base/rr_graph_storage.cpp
@@ -1,7 +1,6 @@
#include
#include "arch_types.h"
#include "rr_graph_storage.h"
-#include "vtr_expr_eval.h"
#include "vtr_error.h"
#include
diff --git a/libs/librrgraph/src/base/rr_graph_storage.h b/libs/librrgraph/src/base/rr_graph_storage.h
index 255b9535e35..0b51747f830 100644
--- a/libs/librrgraph/src/base/rr_graph_storage.h
+++ b/libs/librrgraph/src/base/rr_graph_storage.h
@@ -1,7 +1,5 @@
-#ifndef RR_GRAPH_STORAGE
-#define RR_GRAPH_STORAGE
+#pragma once
-#include
#include
#include "vtr_vector.h"
@@ -15,7 +13,6 @@
#include "vtr_memory.h"
#include "vtr_strong_id_range.h"
#include "vtr_array_view.h"
-#include
#include
#include
@@ -1222,5 +1219,3 @@ class t_rr_graph_view {
const std::unordered_map& virtual_clock_network_root_idx_;
};
-
-#endif /* _RR_GRAPH_STORAGE_ */
diff --git a/libs/librrgraph/src/base/rr_graph_storage_utils.h b/libs/librrgraph/src/base/rr_graph_storage_utils.h
index a2c9dfdeb70..1d60707d66d 100644
--- a/libs/librrgraph/src/base/rr_graph_storage_utils.h
+++ b/libs/librrgraph/src/base/rr_graph_storage_utils.h
@@ -1,11 +1,12 @@
-#ifndef RR_GRAPH_STORAGE_UTILS_H
-#define RR_GRAPH_STORAGE_UTILS_H
+#pragma once
+
+#include
+#include
// Make room in a vector, with amortized O(1) time by using a pow2 growth pattern.
//
// This enables potentially random insertion into a vector with amortized O(1)
// time.
-
template
void make_room_in_vector(T* vec, size_t elem_position) {
if (elem_position < vec->size()) {
@@ -23,5 +24,3 @@ void make_room_in_vector(T* vec, size_t elem_position) {
vec->resize(elem_position + 1);
}
-
-#endif
\ No newline at end of file
diff --git a/libs/librrgraph/src/base/rr_graph_type.h b/libs/librrgraph/src/base/rr_graph_type.h
index 05c0cad0818..cb4caff72d8 100644
--- a/libs/librrgraph/src/base/rr_graph_type.h
+++ b/libs/librrgraph/src/base/rr_graph_type.h
@@ -1,5 +1,4 @@
-#ifndef RR_GRAPH_TYPE_H
-#define RR_GRAPH_TYPE_H
+#pragma once
#include
#include "physical_types.h"
@@ -46,5 +45,3 @@ enum class e_graph_type {
* @see get_parallel_segs for more details.
*/
typedef std::unordered_multimap> t_unified_to_parallel_seg_index;
-
-#endif
\ No newline at end of file
diff --git a/libs/librrgraph/src/base/rr_graph_utils.cpp b/libs/librrgraph/src/base/rr_graph_utils.cpp
index 6a76ac6bac2..a728ed04593 100644
--- a/libs/librrgraph/src/base/rr_graph_utils.cpp
+++ b/libs/librrgraph/src/base/rr_graph_utils.cpp
@@ -1,7 +1,5 @@
-#include
-#include
-
#include "rr_graph_utils.h"
+#include
#include "vpr_error.h"
#include "rr_graph_obj.h"
#include "rr_graph_builder.h"
diff --git a/libs/librrgraph/src/base/rr_graph_utils.h b/libs/librrgraph/src/base/rr_graph_utils.h
index 63288b09f3b..53b35fcc5be 100644
--- a/libs/librrgraph/src/base/rr_graph_utils.h
+++ b/libs/librrgraph/src/base/rr_graph_utils.h
@@ -1,16 +1,16 @@
+#pragma once
/**
* @file rr_graph_utils.h
*
* @brief This file includes the most-utilized functions that manipulate the RRGraph object.
*/
-#ifndef RR_GRAPH_UTILS_H
-#define RR_GRAPH_UTILS_H
-
/* Include header files which include data structures used by
* the function declaration
*/
#include
+#include "rr_graph_builder.h"
+#include "rr_graph_fwd.h"
#include "rr_node_types.h"
#include "rr_graph_obj.h"
#include "rr_graph_view.h"
@@ -99,4 +99,3 @@ int seg_index_of_sblock(const RRGraphView& rr_graph, int from_node, int to_node)
* @return limited_to_opin
*/
bool inter_layer_connections_limited_to_opin(const RRGraphView& rr_graph);
-#endif
diff --git a/libs/librrgraph/src/base/rr_graph_view.h b/libs/librrgraph/src/base/rr_graph_view.h
index 2e18db1ce06..5dd66d75719 100644
--- a/libs/librrgraph/src/base/rr_graph_view.h
+++ b/libs/librrgraph/src/base/rr_graph_view.h
@@ -1,6 +1,4 @@
-#ifndef RR_GRAPH_VIEW_H
-#define RR_GRAPH_VIEW_H
-
+#pragma once
/**
* @file
* @brief The RRGraphView encapsulates a read-only routing resource graph as most
@@ -60,9 +58,12 @@
* attributes, particularly geometry information (type, x, y, etc.).
* \endinternal
*/
-#include "rr_graph_builder.h"
+
+#include "metadata_storage.h"
#include "rr_node.h"
#include "physical_types.h"
+#include "rr_spatial_lookup.h"
+#include "vtr_geometry.h"
class RRGraphView {
/* -- Constructors -- */
@@ -695,6 +696,7 @@ class RRGraphView {
* The main (perhaps only) current use of this metadata is the fasm tool of symbiflow,
* which needs extra metadata on which programming bits control which switch in order to produce a bitstream.*/
const MetadataStorage& rr_node_metadata_;
+
/**
* @brief Attributes for each rr_edge
*
@@ -724,5 +726,3 @@ class RRGraphView {
/** A list of extra ptc numbers for each routing resource node. See details in RRGraphBuilder class */
const vtr::vector>& node_ptc_nums_;
};
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_metadata.h b/libs/librrgraph/src/base/rr_metadata.h
index 8bc1577cd08..dd2b9f5b935 100644
--- a/libs/librrgraph/src/base/rr_metadata.h
+++ b/libs/librrgraph/src/base/rr_metadata.h
@@ -1,5 +1,4 @@
-#ifndef RR_METADATA_H_
-#define RR_METADATA_H_
+#pragma once
#include "physical_types.h"
#include "rr_graph_builder.h"
@@ -15,5 +14,3 @@ void add_rr_edge_metadata(MetadataStorage>& rr_edge_
void add_rr_edge_metadata(MetadataStorage>& rr_edge_metadata, int src_node, int sink_node, short switch_id, vtr::string_view key, vtr::string_view value, const t_arch* arch);
} // namespace vpr
-
-#endif // RR_METADATA_H_
diff --git a/libs/librrgraph/src/base/rr_node.h b/libs/librrgraph/src/base/rr_node.h
index f34bb31fa7e..a2cd0aa9b2c 100644
--- a/libs/librrgraph/src/base/rr_node.h
+++ b/libs/librrgraph/src/base/rr_node.h
@@ -1,5 +1,4 @@
-#ifndef RR_NODE_H
-#define RR_NODE_H
+#pragma once
#include
#include "physical_types.h"
@@ -7,12 +6,6 @@
#include "rr_graph_fwd.h"
#include "rr_node_types.h"
-#include "vtr_range.h"
-
-#include
-#include
-#include
-
// t_rr_node is a proxy object for accessing data in t_rr_graph_storage.
//
// In general, new code should not use this object, but instead directly
@@ -150,5 +143,3 @@ struct t_rr_indexed_data {
};
#include "rr_node_impl.h"
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_node_fwd.h b/libs/librrgraph/src/base/rr_node_fwd.h
index 82807fb01a1..a894594d6ca 100644
--- a/libs/librrgraph/src/base/rr_node_fwd.h
+++ b/libs/librrgraph/src/base/rr_node_fwd.h
@@ -1,12 +1,6 @@
-#ifndef RR_NODE_FWD_H
-#define RR_NODE_FWD_H
-
-#include
-#include "rr_node_types.h"
+#pragma once
//Forward declaration
class t_rr_node;
class t_rr_graph_storage;
class node_idx_iterator;
-
-#endif
diff --git a/libs/librrgraph/src/base/rr_node_impl.h b/libs/librrgraph/src/base/rr_node_impl.h
index 83b93e43b46..4b5f41d62d8 100644
--- a/libs/librrgraph/src/base/rr_node_impl.h
+++ b/libs/librrgraph/src/base/rr_node_impl.h
@@ -1,5 +1,4 @@
-#ifndef RR_NODE_IMPL_H
-#define RR_NODE_IMPL_H
+#pragma once
// This file provides the inline proxy implemenation for t_rr_node.
// See the t_rr_node class comment for additional details.
@@ -84,5 +83,3 @@ inline t_edge_size t_rr_node::num_edges() const {
inline edge_idx_range t_rr_node::edges() const {
return storage_->edges(id_);
}
-
-#endif /* _RR_NODE_IMPL_H_ */
diff --git a/libs/librrgraph/src/base/rr_rc_data.h b/libs/librrgraph/src/base/rr_rc_data.h
index 5c2009dc810..60a52a98f5d 100644
--- a/libs/librrgraph/src/base/rr_rc_data.h
+++ b/libs/librrgraph/src/base/rr_rc_data.h
@@ -1,5 +1,4 @@
-#ifndef _RR_RC_DATA_H_
-#define _RR_RC_DATA_H_
+#pragma once
#include "rr_node_types.h"
@@ -12,5 +11,3 @@
* The returned indicies index into DeviceContext.rr_rc_data.
*/
short find_create_rr_rc_data(const float R, const float C, std::vector& rr_rc_data);
-
-#endif /* _RR_RC_DATA_H_ */
diff --git a/libs/librrgraph/src/base/rr_spatial_lookup.cpp b/libs/librrgraph/src/base/rr_spatial_lookup.cpp
index a27f9b6b088..7967454acd0 100644
--- a/libs/librrgraph/src/base/rr_spatial_lookup.cpp
+++ b/libs/librrgraph/src/base/rr_spatial_lookup.cpp
@@ -1,6 +1,8 @@
+#include "rr_graph_fwd.h"
#include "vtr_assert.h"
#include "vtr_log.h"
#include "rr_spatial_lookup.h"
+#include
RRNodeId RRSpatialLookup::find_node(int layer,
int x,
diff --git a/libs/librrgraph/src/base/rr_spatial_lookup.h b/libs/librrgraph/src/base/rr_spatial_lookup.h
index c69f34b791a..733aa413b86 100644
--- a/libs/librrgraph/src/base/rr_spatial_lookup.h
+++ b/libs/librrgraph/src/base/rr_spatial_lookup.h
@@ -1,5 +1,4 @@
#pragma once
-
/**
* @file
* @brief This RRSpatialLookup class encapsulates
@@ -14,6 +13,7 @@
* - Update the look-up with new nodes
* - Find the id of a node with given information, e.g., x, y, type etc.
*/
+
#include "vtr_geometry.h"
#include "vtr_vector.h"
#include "physical_types.h"
diff --git a/libs/librrgraph/src/io/rr_graph_reader.cpp b/libs/librrgraph/src/io/rr_graph_reader.cpp
index 0bcd843ae34..875587695b8 100644
--- a/libs/librrgraph/src/io/rr_graph_reader.cpp
+++ b/libs/librrgraph/src/io/rr_graph_reader.cpp
@@ -19,7 +19,6 @@
#include "rr_graph_uxsdcxx.h"
#include
-#include
#include
#include "vtr_time.h"
@@ -207,4 +206,4 @@ void load_rr_edge_delay_overrides(std::string_view filename,
rr_graph_builder.override_edge_switch(edge_id, new_switch_id);
}
}
-}
\ No newline at end of file
+}
diff --git a/libs/librrgraph/src/io/rr_graph_reader.h b/libs/librrgraph/src/io/rr_graph_reader.h
index 044345ee721..038addb22fc 100644
--- a/libs/librrgraph/src/io/rr_graph_reader.h
+++ b/libs/librrgraph/src/io/rr_graph_reader.h
@@ -1,8 +1,6 @@
+#pragma once
/* Defines the function used to load an rr graph written in xml format into vpr*/
-#ifndef RR_GRAPH_READER_H
-#define RR_GRAPH_READER_H
-
#include "rr_graph_type.h"
#include "rr_graph_cost.h"
#include "rr_graph_builder.h"
@@ -54,5 +52,3 @@ void load_rr_file(RRGraphBuilder* rr_graph_builder,
void load_rr_edge_delay_overrides(std::string_view filename,
RRGraphBuilder& rr_graph_builder,
const RRGraphView& rr_graph);
-
-#endif /* RR_GRAPH_READER_H */
diff --git a/libs/librrgraph/src/io/rr_graph_writer.cpp b/libs/librrgraph/src/io/rr_graph_writer.cpp
index 291d9ffafa4..341bb67c410 100644
--- a/libs/librrgraph/src/io/rr_graph_writer.cpp
+++ b/libs/librrgraph/src/io/rr_graph_writer.cpp
@@ -13,8 +13,6 @@
#include "rr_graph_uxsdcxx_serializer.h"
#include "rr_graph_uxsdcxx.h"
#ifdef VTR_ENABLE_CAPNPROTO
-# include "capnp/serialize.h"
-# include "ndmatrix_serdes.h"
# include "serdes_utils.h"
# include "rr_graph_uxsdcxx_capnp.h"
#endif
diff --git a/libs/librrgraph/src/io/rr_graph_writer.h b/libs/librrgraph/src/io/rr_graph_writer.h
index b84fe3e9f6e..d4abbd1697b 100644
--- a/libs/librrgraph/src/io/rr_graph_writer.h
+++ b/libs/librrgraph/src/io/rr_graph_writer.h
@@ -1,11 +1,9 @@
+#pragma once
/*
* This function writes the RR_graph generated by VPR into a file in XML format
* Information included in the file includes rr nodes, rr switches, the grid, block info, node indices
*/
-#ifndef RR_GRAPH_WRITER_H
-#define RR_GRAPH_WRITER_H
-
#include "rr_node.h"
#include "rr_graph_type.h"
#include "rr_graph_builder.h"
@@ -26,5 +24,3 @@ void write_rr_graph(RRGraphBuilder* rr_graph_builder,
bool echo_enabled,
const char* echo_file_name,
bool is_flat);
-
-#endif
diff --git a/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp b/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp
index c7fb3a254b1..55107e9d223 100644
--- a/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp
+++ b/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp
@@ -1,23 +1,21 @@
#include /* Needed only for sqrt call (remove if sqrt removed) */
#include
#include
+#include
#include
-#include /* Needed for ortho_Cost_index calculation*/
#include "alloc_and_load_rr_indexed_data.h"
+#include "arch_types.h"
#include "vtr_assert.h"
#include "vtr_log.h"
-#include "vtr_memory.h"
#include "vtr_math.h"
#include "vpr_error.h"
#include "rr_graph_utils.h"
-#include "read_xml_arch_file.h"
#include "rr_graph_cost.h"
-#include "rr_graph_type.h"
#include "histogram.h"
diff --git a/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.h b/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.h
index 1a96141163a..a70946dc565 100644
--- a/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.h
+++ b/libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.h
@@ -1,5 +1,4 @@
-#ifndef ALLOC_AND_LOAD_RR_INDEXED_DATA_H
-#define ALLOC_AND_LOAD_RR_INDEXED_DATA_H
+#pragma once
#include "rr_graph_view.h"
#include "rr_node.h"
@@ -21,5 +20,3 @@ std::vector find_ortho_cost_index(const RRGraphView& rr_graph,
const std::vector segment_inf_x,
const std::vector segment_inf_y,
e_parallel_axis parallel_axis);
-
-#endif
\ No newline at end of file
diff --git a/libs/librrgraph/src/utils/describe_rr_node.h b/libs/librrgraph/src/utils/describe_rr_node.h
index 6b3e9355620..3c44031bb1c 100644
--- a/libs/librrgraph/src/utils/describe_rr_node.h
+++ b/libs/librrgraph/src/utils/describe_rr_node.h
@@ -1,5 +1,4 @@
-#ifndef DESCRIBE_RR_NODE_H
-#define DESCRIBE_RR_NODE_H
+#pragma once
#include