--- /srv/rebuilderd/tmp/rebuilderdUYlS0U/inputs/libdune-typetree-doc_2.11.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdUYlS0U/out/libdune-typetree-doc_2.11.0-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2026-02-06 15:11:59.000000 debian-binary │ --rw-r--r-- 0 0 0 9384 2026-02-06 15:11:59.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1295956 2026-02-06 15:11:59.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 9364 2026-02-06 15:11:59.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 1296112 2026-02-06 15:11:59.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -5,68 +5,68 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/ │ │ │ -rw-r--r-- 0 root (0) root (0) 1041 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3222 2025-12-11 14:18:43.000000 ./usr/share/doc/libdune-typetree-doc/changelog.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 3031 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/ │ │ │ -rw-r--r-- 0 root (0) root (0) 3054 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00002.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3052 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00005.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17304 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00008.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73386 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00008_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5479 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00011.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38622 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00011_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4834 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00014.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9073 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00014_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16275 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00017.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54262 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00017_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19607 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00020.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53781 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00020_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3474 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00023.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5463 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00023_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5273 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00026.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14216 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00026_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12222 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00029.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36134 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00029_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3679 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00032.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5716 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00032_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6807 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00035.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89058 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00035_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8681 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00038.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41828 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00038_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10214 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00041.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67418 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00041_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6217 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00044.html │ │ │ --rw-r--r-- 0 root (0) root (0) 67987 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00044_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8097 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00047.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16077 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00047_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7318 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00050.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25613 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00050_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6166 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00053.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9394 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00053_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8214 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00056.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19482 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00056_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5021 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00059.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13774 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00059_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10778 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00062.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57798 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00062_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5168 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00065.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33032 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00065_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11885 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00068.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43022 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00068_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6152 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00071.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49903 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00071_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8097 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00008.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16077 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00008_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6166 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00011.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9394 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00011_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3474 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00014.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5463 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19607 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00017.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53781 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00017_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8214 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00020.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19482 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00020_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5479 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00023.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38622 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00023_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5021 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00026.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13774 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00026_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14977 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00029.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94747 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00029_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6217 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00032.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67987 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00032_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4834 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00035.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9073 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00035_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3679 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00038.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5716 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00038_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6152 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00041.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49903 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00041_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5541 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00044.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39293 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00044_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10778 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00047.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57798 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00047_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10214 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00050.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 67418 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00050_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11885 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00053.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43022 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00053_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7318 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00056.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25613 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00056_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6807 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00059.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89058 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00059_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5168 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00062.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33032 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00062_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5273 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00065.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14216 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00065_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8681 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00068.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41828 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00068_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5948 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00071.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 48016 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00071_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5129 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00074.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7174 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00074_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5541 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00077.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39293 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00077_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5948 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00080.html │ │ │ --rw-r--r-- 0 root (0) root (0) 48016 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00080_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7018 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00083.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30009 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00083_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14977 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00086.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94747 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00086_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7018 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00077.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30009 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00077_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12222 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00080.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36134 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00080_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16275 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00083.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54262 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00083_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17304 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00086.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73386 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00086_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5610 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00089.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5646 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00090.html │ │ │ -rw-r--r-- 0 root (0) root (0) 8803 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00090.png │ │ │ -rw-r--r-- 0 root (0) root (0) 29825 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00091.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4190 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00091.png │ │ │ -rw-r--r-- 0 root (0) root (0) 25940 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00092.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4270 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/a00092.png │ │ │ @@ -377,15 +377,15 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 2615 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dir_04f2ecc425faf0d475a3caf484e551f3_dep.png │ │ │ -rw-r--r-- 0 root (0) root (0) 3668 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dir_5e69be5995c9f5d42bf491ae6f29600e.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13047 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dir_5e74c06688912037f4b476b8dc05fab9.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2286 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dir_5e74c06688912037f4b476b8dc05fab9_dep.png │ │ │ -rw-r--r-- 0 root (0) root (0) 3662 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html │ │ │ -rw-r--r-- 0 root (0) root (0) 54624 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/doxygen.css │ │ │ -rw-r--r-- 0 root (0) root (0) 34576 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/doxygen_crawl.html │ │ │ --rw-r--r-- 0 root (0) root (0) 20327 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dune-typetree.tag.gz │ │ │ +-rw-r--r-- 0 root (0) root (0) 20328 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dune-typetree.tag.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 7707 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/dynsections.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13336 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/files.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3466 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/functions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3871 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/functions_b.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6526 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/functions_c.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6109 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/functions_d.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3250 2026-02-06 15:11:59.000000 ./usr/share/doc/libdune-typetree-doc/doxygen/functions_e.html │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00008.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: visitor.hh File Reference │ │ │ +dune-typetree: powercompositenodetransformationtemplates.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,84 +73,36 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces | │ │ │ -Functions | │ │ │ -Variables
│ │ │ -
visitor.hh File Reference
│ │ │ +Namespaces
│ │ │ +
powercompositenodetransformationtemplates.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/typetree/treepath.hh>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ +
#include <cstddef>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::DefaultVisitor
 Visitor interface and base class for TypeTree visitors. More...
struct  Dune::TypeTree::DefaultPairVisitor
 Visitor interface and base class for visitors of pairs of TypeTrees. More...
struct  Dune::TypeTree::Experimental::DefaultHybridVisitor
 Hybrid visitor interface and base class for TypeTree hybrid visitors. More...
struct  Dune::TypeTree::VisitDirectChildren
 Mixin base class for visitors that only want to visit the direct children of a node. More...
struct  Dune::TypeTree::VisitDirectChildren::VisitChild< Node1, Child1, Node2, Child2, TreePath >
 Template struct for determining whether or not to visit a given child. More...
struct  Dune::TypeTree::VisitTree
 Mixin base class for visitors that want to visit the complete tree. More...
struct  Dune::TypeTree::VisitTree::VisitChild< Node1, Child1, Node2, Child2, TreePath >
 Template struct for determining whether or not to visit a given child. More...
struct  Dune::TypeTree::StaticTraversal
 Mixin base class for visitors that require a static TreePath during traversal. More...
struct  Dune::TypeTree::DynamicTraversal
 Mixin base class for visitors that only need a dynamic TreePath during traversal. More...
struct  Dune::TypeTree::TreeVisitor
 Convenience base class for visiting the entire tree. More...
struct  Dune::TypeTree::DirectChildrenVisitor
 Convenience base class for visiting the direct children of a node. More...
struct  Dune::TypeTree::TreePairVisitor
 Convenience base class for visiting an entire tree pair. More...
struct  Dune::TypeTree::DirectChildrenPairVisitor
 Convenience base class for visiting the direct children of a node pair. More...
struct  Dune::TypeTree::Experimental::Info::LeafCounterVisitor
struct  Dune::TypeTree::Experimental::Info::NodeCounterVisitor
struct  Dune::TypeTree::Experimental::Info::DepthVisitor
struct  Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Experimental
namespace  Dune::TypeTree::Experimental::Info
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Functions

template<typename Tree>
auto Dune::TypeTree::Experimental::Info::depth (const Tree &tree)
 The depth of the TypeTree.
template<typename Tree>
constexpr auto Dune::TypeTree::Experimental::Info::depth ()
 The depth of the Tree.
template<typename Tree>
auto Dune::TypeTree::Experimental::Info::nodeCount (const Tree &tree)
 The total number of nodes in the Tree.
template<typename Tree>
auto Dune::TypeTree::Experimental::Info::leafCount (const Tree &tree)
 The number of leaf nodes in the Tree.
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Variables

template<typename Tree>
constexpr bool Dune::TypeTree::Experimental::Info::isDynamic = std::is_same<std::size_t, decltype(leafCount(std::declval<Tree>()))>{}
 true if any of the nodes in the tree only has dynamic degree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,81 +1,29 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ -visitor.hh File Reference │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +powercompositenodetransformationtemplates.hh File Reference │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ -  Visitor interface and base class for _T_y_p_e_T_r_e_e visitors. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -  Visitor interface and base class for visitors of pairs of TypeTrees. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ -  Hybrid visitor interface and base class for _T_y_p_e_T_r_e_e hybrid visitors. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ -  Mixin base class for visitors that only want to visit the direct │ │ │ │ - children of a node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d_<_ _N_o_d_e_1_,_ _C_h_i_l_d_1_,_ _N_o_d_e_2_, │ │ │ │ - _C_h_i_l_d_2_,_ _T_r_e_e_P_a_t_h_ _> │ │ │ │ -  Template struct for determining whether or not to visit a given child. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e │ │ │ │ -  Mixin base class for visitors that want to visit the complete tree. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d_<_ _N_o_d_e_1_,_ _C_h_i_l_d_1_,_ _N_o_d_e_2_,_ _C_h_i_l_d_2_, │ │ │ │ - _T_r_e_e_P_a_t_h_ _> │ │ │ │ -  Template struct for determining whether or not to visit a given child. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -  Mixin base class for visitors that require a static TreePath during │ │ │ │ - traversal. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -  Mixin base class for visitors that only need a dynamic TreePath during │ │ │ │ - traversal. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_V_i_s_i_t_o_r │ │ │ │ -  Convenience base class for visiting the entire tree. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ -  Convenience base class for visiting the direct children of a node. │ │ │ │ - _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -  Convenience base class for visiting an entire tree pair. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -  Convenience base class for visiting the direct children of a node │ │ │ │ - pair. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h (const Tree &tree) │ │ │ │ -  The depth of the _T_y_p_e_T_r_e_e. │ │ │ │ -template │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h () │ │ │ │ -  The depth of the Tree. │ │ │ │ -template │ │ │ │ - auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t (const Tree │ │ │ │ - &tree) │ │ │ │ -  The total number of nodes in the Tree. │ │ │ │ -template │ │ │ │ - auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t (const Tree │ │ │ │ - &tree) │ │ │ │ -  The number of leaf nodes in the Tree. │ │ │ │ -VVaarriiaabblleess │ │ │ │ -template │ │ │ │ -constexpr bool  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_i_s_D_y_n_a_m_i_c = std:: │ │ │ │ - is_same()))> │ │ │ │ - {} │ │ │ │ -  true if any of the nodes in the tree only has dynamic degree. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00008_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: visitor.hh Source File │ │ │ +dune-typetree: powercompositenodetransformationtemplates.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,388 +71,93 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
visitor.hh
│ │ │ +
powercompositenodetransformationtemplates.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_VISITOR_HH
│ │ │ -
7#define DUNE_TYPETREE_VISITOR_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │ +
7#define DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │
8
│ │ │ - │ │ │ -
10#include <dune/common/hybridutilities.hh>
│ │ │ -
11
│ │ │ -
12namespace Dune {
│ │ │ -
13 namespace TypeTree {
│ │ │ -
14
│ │ │ -
19
│ │ │ -
21
│ │ │ -
│ │ │ - │ │ │ -
49 {
│ │ │ -
50
│ │ │ -
52
│ │ │ -
59 template<typename T, typename TreePath>
│ │ │ -
60 void pre(T&&, TreePath) const {}
│ │ │ -
61
│ │ │ -
63
│ │ │ -
71 template<typename T, typename TreePath>
│ │ │ -
72 void in(T&&, TreePath) const {}
│ │ │ -
73
│ │ │ -
75
│ │ │ -
82 template<typename T, typename TreePath>
│ │ │ -
83 void post(T&&, TreePath) const {}
│ │ │ -
84
│ │ │ -
86
│ │ │ -
92 template<typename T, typename TreePath>
│ │ │ -
93 void leaf(T&&, TreePath) const {}
│ │ │ -
94
│ │ │ -
96
│ │ │ -
106 template<typename T, typename Child, typename TreePath, typename ChildIndex>
│ │ │ -
107 void beforeChild(T&&, Child&&, TreePath, ChildIndex) const {}
│ │ │ -
108
│ │ │ -
110
│ │ │ -
121 template<typename T, typename Child, typename TreePath, typename ChildIndex>
│ │ │ -
122 void afterChild(T&&, Child&&, TreePath, ChildIndex) const {}
│ │ │ -
123
│ │ │ -
124 };
│ │ │ -
│ │ │ -
125
│ │ │ -
126
│ │ │ -
128
│ │ │ -
│ │ │ - │ │ │ -
164 {
│ │ │ -
165
│ │ │ -
167
│ │ │ -
175 template<typename T1, typename T2, typename TreePath>
│ │ │ -
176 void pre(T1&&, T2&&, TreePath) const {}
│ │ │ -
177
│ │ │ -
179
│ │ │ -
188 template<typename T1, typename T2, typename TreePath>
│ │ │ -
189 void in(T1&&, T2&&, TreePath) const {}
│ │ │ -
190
│ │ │ -
192
│ │ │ -
200 template<typename T1, typename T2, typename TreePath>
│ │ │ -
201 void post(T1&&, T2&&, TreePath) const {}
│ │ │ -
202
│ │ │ -
204
│ │ │ -
215 template<typename T1, typename T2, typename TreePath>
│ │ │ -
216 void leaf(T1&&, T2&&, TreePath) const {}
│ │ │ -
217
│ │ │ -
219
│ │ │ -
231 template<typename T1, typename Child1, typename T2, typename Child2, typename TreePath, typename ChildIndex>
│ │ │ -
232 void beforeChild(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const {}
│ │ │ -
233
│ │ │ -
235
│ │ │ -
247 template<typename T1, typename Child1, typename T2, typename Child2, typename TreePath, typename ChildIndex>
│ │ │ -
248 void afterChild(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const {}
│ │ │ -
249
│ │ │ -
250 };
│ │ │ -
│ │ │ -
251
│ │ │ -
252
│ │ │ -
253 namespace Experimental {
│ │ │ -
254
│ │ │ -
│ │ │ - │ │ │ -
286 {
│ │ │ -
287
│ │ │ -
295 template<typename T, typename TreePath, typename U>
│ │ │ -
296 auto pre(T&&, TreePath, const U& u) const { return u;}
│ │ │ -
297
│ │ │ -
305 template<typename T, typename TreePath, typename U>
│ │ │ -
306 auto in(T&&, TreePath, const U& u) const {return u;}
│ │ │ -
307
│ │ │ -
315 template<typename T, typename TreePath, typename U>
│ │ │ -
316 auto post(T&&, TreePath, const U& u) const {return u;}
│ │ │ -
317
│ │ │ -
325 template<typename T, typename TreePath, typename U>
│ │ │ -
326 auto leaf(T&&, TreePath, const U& u) const { return u;}
│ │ │ -
327
│ │ │ -
335 template<typename T, typename Child, typename TreePath, typename ChildIndex, typename U>
│ │ │ -
336 auto beforeChild(T&&, Child&&, TreePath, ChildIndex, const U& u) const {return u;}
│ │ │ -
337
│ │ │ -
345 template<typename T, typename Child, typename TreePath, typename ChildIndex, typename U>
│ │ │ -
346 auto afterChild(T&&, Child&&, TreePath, ChildIndex, const U& u) const {return u;}
│ │ │ -
347
│ │ │ -
348 };
│ │ │ -
│ │ │ -
349 } // namespace Experimental
│ │ │ -
350
│ │ │ -
352
│ │ │ -
│ │ │ - │ │ │ -
358 {
│ │ │ -
359
│ │ │ -
360 // the little trick with the default template arguments
│ │ │ -
361 // makes the class usable for both single-tree visitors
│ │ │ -
362 // and visitors for pairs of trees
│ │ │ -
364 template<typename Node1,
│ │ │ -
365 typename Child1,
│ │ │ -
366 typename Node2,
│ │ │ -
367 typename Child2 = void,
│ │ │ -
368 typename TreePath = void>
│ │ │ -
│ │ │ - │ │ │ -
370 {
│ │ │ -
372 static const bool value = false;
│ │ │ -
373 };
│ │ │ -
│ │ │ -
374
│ │ │ -
375 };
│ │ │ -
│ │ │ -
376
│ │ │ -
377
│ │ │ -
379
│ │ │ -
│ │ │ - │ │ │ -
384 {
│ │ │ -
385
│ │ │ -
386 // the little trick with the default template arguments
│ │ │ -
387 // makes the class usable for both single-tree visitors
│ │ │ -
388 // and visitors for pairs of trees
│ │ │ -
390 template<typename Node1,
│ │ │ -
391 typename Child1,
│ │ │ -
392 typename Node2,
│ │ │ -
393 typename Child2 = void,
│ │ │ -
394 typename TreePath = void>
│ │ │ -
│ │ │ - │ │ │ -
396 {
│ │ │ -
398 static const bool value = true;
│ │ │ -
399 };
│ │ │ -
│ │ │ -
400
│ │ │ -
401 };
│ │ │ -
│ │ │ -
402
│ │ │ -
404
│ │ │ -
│ │ │ - │ │ │ -
412 {
│ │ │ - │ │ │ -
415 };
│ │ │ -
│ │ │ -
416
│ │ │ -
418
│ │ │ -
│ │ │ - │ │ │ -
426 {
│ │ │ - │ │ │ -
429 };
│ │ │ -
│ │ │ -
430
│ │ │ -
│ │ │ - │ │ │ -
433 : public DefaultVisitor
│ │ │ -
434 , public VisitTree
│ │ │ -
435 {};
│ │ │ -
│ │ │ -
436
│ │ │ -
│ │ │ - │ │ │ -
439 : public DefaultVisitor
│ │ │ -
440 , public VisitDirectChildren
│ │ │ -
441 {};
│ │ │ -
│ │ │ -
442
│ │ │ -
│ │ │ - │ │ │ -
445 : public DefaultPairVisitor
│ │ │ -
446 , public VisitTree
│ │ │ -
447 {};
│ │ │ -
│ │ │ -
448
│ │ │ -
│ │ │ - │ │ │ -
451 : public DefaultPairVisitor
│ │ │ -
452 , public VisitDirectChildren
│ │ │ -
453 {};
│ │ │ -
│ │ │ -
454
│ │ │ -
│ │ │ - │ │ │ -
456
│ │ │ -
│ │ │ - │ │ │ -
458 : public DefaultHybridVisitor
│ │ │ -
459 , public StaticTraversal
│ │ │ -
460 , public VisitTree
│ │ │ -
461 {
│ │ │ -
462 template<class Tree, class Child, class TreePath, class ChildIndex, class U>
│ │ │ -
│ │ │ -
463 auto beforeChild(Tree&&, Child&&, TreePath, ChildIndex, U u) const {
│ │ │ -
464 // in this case child index is an integral constant: forward u
│ │ │ -
465 return u;
│ │ │ -
466 }
│ │ │ -
│ │ │ -
467
│ │ │ -
468 template<class Tree, class Child, class TreePath, class U>
│ │ │ -
│ │ │ -
469 std::size_t beforeChild(Tree&&, Child&&, TreePath, std::size_t /*childIndex*/, U u) const {
│ │ │ -
470 // in this case child index is a run-time index: cast accumulated u to std::size_t
│ │ │ -
471 return std::size_t{u};
│ │ │ -
472 }
│ │ │ -
│ │ │ -
473
│ │ │ -
474 template<class Tree, class TreePath, class U>
│ │ │ -
│ │ │ -
475 auto leaf(Tree&&, TreePath, U u) const
│ │ │ -
476 {
│ │ │ -
477 return Hybrid::plus(u,Dune::Indices::_1);
│ │ │ -
478 }
│ │ │ -
│ │ │ -
479
│ │ │ -
480 };
│ │ │ -
│ │ │ -
481
│ │ │ -
│ │ │ - │ │ │ -
483 : public LeafCounterVisitor
│ │ │ -
484 {
│ │ │ -
485 template<typename Tree, typename TreePath, typename U>
│ │ │ -
│ │ │ -
486 auto pre(Tree&&, TreePath, U u) const {
│ │ │ -
487 return Hybrid::plus(u,Indices::_1);
│ │ │ -
488 }
│ │ │ -
│ │ │ -
489 };
│ │ │ -
│ │ │ -
490
│ │ │ -
│ │ │ - │ │ │ -
492 : public DefaultHybridVisitor
│ │ │ -
493 , public StaticTraversal
│ │ │ -
494 , public VisitTree
│ │ │ -
495 {
│ │ │ -
496 template<class Tree, class TreePath, class U>
│ │ │ -
│ │ │ -
497 auto leaf(Tree&&, TreePath, U u) const
│ │ │ -
498 {
│ │ │ -
499 auto path_size = index_constant<treePathSize(TreePath{})>{};
│ │ │ -
500 auto depth = Hybrid::plus(path_size,Indices::_1);
│ │ │ -
501 return Hybrid::max(depth,u);
│ │ │ -
502 }
│ │ │ -
│ │ │ -
503 };
│ │ │ -
│ │ │ -
504
│ │ │ -
506 // result is alwayas an integral constant
│ │ │ -
507 template<typename Tree>
│ │ │ -
│ │ │ -
508 auto depth(const Tree& tree)
│ │ │ -
509 {
│ │ │ -
510 return hybridApplyToTree(tree,DepthVisitor{},Indices::_0);
│ │ │ -
511 }
│ │ │ -
│ │ │ -
512
│ │ │ -
514 // return types is std::integral_constant.
│ │ │ -
515 template<typename Tree>
│ │ │ -
│ │ │ -
516 constexpr auto depth()
│ │ │ -
517 {
│ │ │ -
518 return decltype(hybridApplyToTree(std::declval<Tree>(),DepthVisitor{},Indices::_0)){};
│ │ │ -
519 }
│ │ │ -
│ │ │ -
520
│ │ │ -
522 // if Tree is dynamic, return type is std::size_t, otherwise std::integral_constant.
│ │ │ -
523 template<typename Tree>
│ │ │ -
│ │ │ -
524 auto nodeCount(const Tree& tree)
│ │ │ -
525 {
│ │ │ -
526 return hybridApplyToTree(tree,NodeCounterVisitor{},Indices::_0);
│ │ │ -
527 }
│ │ │ -
│ │ │ -
528
│ │ │ -
530 // if Tree is dynamic, return type is std::size_t, otherwise std::integral_constant.
│ │ │ -
531 template<typename Tree>
│ │ │ -
│ │ │ -
532 auto leafCount(const Tree& tree)
│ │ │ -
533 {
│ │ │ -
534 return hybridApplyToTree(tree,LeafCounterVisitor{},Dune::Indices::_0);
│ │ │ -
535 }
│ │ │ -
│ │ │ -
536
│ │ │ -
538 template<typename Tree>
│ │ │ -
539 constexpr bool isDynamic = std::is_same<std::size_t, decltype(leafCount(std::declval<Tree>()))>{};
│ │ │ -
540
│ │ │ -
541 } // namespace Experimental::Info
│ │ │ -
│ │ │ -
542
│ │ │ -
544
│ │ │ -
545 } // namespace TypeTree
│ │ │ -
546} //namespace Dune
│ │ │ -
547
│ │ │ -
548#endif // DUNE_TYPETREE_VISITOR_HH
│ │ │ - │ │ │ -
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │ +
9#include <cstddef>
│ │ │ +
10
│ │ │ + │ │ │ +
12
│ │ │ +
13namespace Dune {
│ │ │ +
14 namespace TypeTree {
│ │ │ +
15
│ │ │ +
20
│ │ │ +
21 template<typename SourceNode, typename Transformation, template<typename,typename,std::size_t> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
23 {
│ │ │ +
24 template<typename TC>
│ │ │ +
│ │ │ +
25 struct result
│ │ │ +
26 {
│ │ │ +
27 typedef TransformedNode<SourceNode,TC,StaticDegree<SourceNode>::value> type;
│ │ │ +
28 };
│ │ │ +
│ │ │ +
29 };
│ │ │ +
│ │ │ +
30
│ │ │ +
31
│ │ │ +
32 template<typename SourceNode, typename Transformation, template<typename,typename> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
34 {
│ │ │ +
35 template<typename TC>
│ │ │ +
│ │ │ +
36 struct result
│ │ │ +
37 {
│ │ │ +
38 typedef TransformedNode<SourceNode,TC> type;
│ │ │ +
39 };
│ │ │ +
│ │ │ +
40 };
│ │ │ +
│ │ │ +
41
│ │ │ +
42 template<typename SourceNode, typename Transformation, template<typename,typename...> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
44 {
│ │ │ +
45 template<typename... TC>
│ │ │ +
│ │ │ +
46 struct result
│ │ │ +
47 {
│ │ │ +
48 typedef TransformedNode<SourceNode,TC...> type;
│ │ │ +
49 };
│ │ │ +
│ │ │ +
50 };
│ │ │ +
│ │ │ +
51
│ │ │ +
53
│ │ │ +
54 } // namespace TypeTree
│ │ │ +
55} //namespace Dune
│ │ │ +
56
│ │ │ +
57#endif // DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │ + │ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init)
Apply hybrid visitor to TypeTree.
Definition accumulate_static.hh:702
│ │ │ -
Type
Definition treepath.hh:108
│ │ │ -
@ fullyStatic
Definition treepath.hh:108
│ │ │ -
@ dynamic
Definition treepath.hh:108
│ │ │ -
Definition visitor.hh:455
│ │ │ -
constexpr bool isDynamic
true if any of the nodes in the tree only has dynamic degree.
Definition visitor.hh:539
│ │ │ -
auto leafCount(const Tree &tree)
The number of leaf nodes in the Tree.
Definition visitor.hh:532
│ │ │ -
auto nodeCount(const Tree &tree)
The total number of nodes in the Tree.
Definition visitor.hh:524
│ │ │ -
constexpr auto depth()
The depth of the Tree.
Definition visitor.hh:516
│ │ │ -
auto depth(const Tree &tree)
The depth of the TypeTree.
Definition visitor.hh:508
│ │ │ -
Visitor interface and base class for TypeTree visitors.
Definition visitor.hh:49
│ │ │ -
void in(T &&, TreePath) const
Method for infix tree traversal.
Definition visitor.hh:72
│ │ │ -
void afterChild(T &&, Child &&, TreePath, ChildIndex) const
Method for child-parent traversal.
Definition visitor.hh:122
│ │ │ -
void beforeChild(T &&, Child &&, TreePath, ChildIndex) const
Method for parent-child traversal.
Definition visitor.hh:107
│ │ │ -
void post(T &&, TreePath) const
Method for postfix tree traversal.
Definition visitor.hh:83
│ │ │ -
void leaf(T &&, TreePath) const
Method for leaf traversal.
Definition visitor.hh:93
│ │ │ -
void pre(T &&, TreePath) const
Method for prefix tree traversal.
Definition visitor.hh:60
│ │ │ -
Visitor interface and base class for visitors of pairs of TypeTrees.
Definition visitor.hh:164
│ │ │ -
void leaf(T1 &&, T2 &&, TreePath) const
Method for leaf traversal.
Definition visitor.hh:216
│ │ │ -
void beforeChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const
Method for parent-child traversal.
Definition visitor.hh:232
│ │ │ -
void pre(T1 &&, T2 &&, TreePath) const
Method for prefix tree traversal.
Definition visitor.hh:176
│ │ │ -
void post(T1 &&, T2 &&, TreePath) const
Method for postfix traversal.
Definition visitor.hh:201
│ │ │ -
void in(T1 &&, T2 &&, TreePath) const
Method for infix tree traversal.
Definition visitor.hh:189
│ │ │ -
void afterChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const
Method for child-parent traversal.
Definition visitor.hh:248
│ │ │ -
Hybrid visitor interface and base class for TypeTree hybrid visitors.
Definition visitor.hh:286
│ │ │ -
auto post(T &&, TreePath, const U &u) const
Method for postfix tree traversal.
Definition visitor.hh:316
│ │ │ -
auto pre(T &&, TreePath, const U &u) const
Method for prefix tree traversal.
Definition visitor.hh:296
│ │ │ -
auto leaf(T &&, TreePath, const U &u) const
Method for leaf traversal.
Definition visitor.hh:326
│ │ │ -
auto afterChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const
Method for child-parent traversal.
Definition visitor.hh:346
│ │ │ -
auto in(T &&, TreePath, const U &u) const
Method for infix tree traversal.
Definition visitor.hh:306
│ │ │ -
auto beforeChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const
Method for parent-child traversal.
Definition visitor.hh:336
│ │ │ -
Mixin base class for visitors that only want to visit the direct children of a node.
Definition visitor.hh:358
│ │ │ -
Template struct for determining whether or not to visit a given child.
Definition visitor.hh:370
│ │ │ -
static const bool value
Do not visit any child.
Definition visitor.hh:372
│ │ │ -
Mixin base class for visitors that want to visit the complete tree.
Definition visitor.hh:384
│ │ │ -
Template struct for determining whether or not to visit a given child.
Definition visitor.hh:396
│ │ │ -
static const bool value
Visit any child.
Definition visitor.hh:398
│ │ │ -
Mixin base class for visitors that require a static TreePath during traversal.
Definition visitor.hh:412
│ │ │ -
static const TreePathType::Type treePathType
Use the static tree traversal algorithm.
Definition visitor.hh:414
│ │ │ -
Mixin base class for visitors that only need a dynamic TreePath during traversal.
Definition visitor.hh:426
│ │ │ -
static const TreePathType::Type treePathType
Use the dynamic tree traversal algorithm.
Definition visitor.hh:428
│ │ │ -
Convenience base class for visiting the entire tree.
Definition visitor.hh:435
│ │ │ -
Convenience base class for visiting the direct children of a node.
Definition visitor.hh:441
│ │ │ -
Convenience base class for visiting an entire tree pair.
Definition visitor.hh:447
│ │ │ -
Convenience base class for visiting the direct children of a node pair.
Definition visitor.hh:453
│ │ │ - │ │ │ -
auto leaf(Tree &&, TreePath, U u) const
Definition visitor.hh:475
│ │ │ -
auto beforeChild(Tree &&, Child &&, TreePath, ChildIndex, U u) const
Definition visitor.hh:463
│ │ │ -
std::size_t beforeChild(Tree &&, Child &&, TreePath, std::size_t, U u) const
Definition visitor.hh:469
│ │ │ - │ │ │ -
auto pre(Tree &&, TreePath, U u) const
Definition visitor.hh:486
│ │ │ - │ │ │ -
auto leaf(Tree &&, TreePath, U u) const
Definition visitor.hh:497
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:23
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:26
│ │ │ +
TransformedNode< SourceNode, TC, StaticDegree< SourceNode >::value > type
Definition powercompositenodetransformationtemplates.hh:27
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:34
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:37
│ │ │ +
TransformedNode< SourceNode, TC > type
Definition powercompositenodetransformationtemplates.hh:38
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:44
│ │ │ +
Definition powercompositenodetransformationtemplates.hh:47
│ │ │ +
TransformedNode< SourceNode, TC... > type
Definition powercompositenodetransformationtemplates.hh:48
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,486 +1,93 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -visitor.hh │ │ │ │ +powercompositenodetransformationtemplates.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_VISITOR_HH │ │ │ │ -7#define DUNE_TYPETREE_VISITOR_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ +7#define DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ 8 │ │ │ │ -9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ -13 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -14 │ │ │ │ -19 │ │ │ │ -21 │ │ │ │ -_4_8 struct _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ -49 { │ │ │ │ -50 │ │ │ │ -52 │ │ │ │ -59 template │ │ │ │ -_6_0 void _p_r_e(T&&, TreePath) const {} │ │ │ │ -61 │ │ │ │ -63 │ │ │ │ -71 template │ │ │ │ -_7_2 void _i_n(T&&, TreePath) const {} │ │ │ │ -73 │ │ │ │ -75 │ │ │ │ -82 template │ │ │ │ -_8_3 void _p_o_s_t(T&&, TreePath) const {} │ │ │ │ -84 │ │ │ │ -86 │ │ │ │ -92 template │ │ │ │ -_9_3 void _l_e_a_f(T&&, TreePath) const {} │ │ │ │ -94 │ │ │ │ -96 │ │ │ │ -106 template │ │ │ │ -_1_0_7 void _b_e_f_o_r_e_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex) const {} │ │ │ │ -108 │ │ │ │ -110 │ │ │ │ -121 template │ │ │ │ -_1_2_2 void _a_f_t_e_r_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex) const {} │ │ │ │ -123 │ │ │ │ -124 }; │ │ │ │ -125 │ │ │ │ -126 │ │ │ │ -128 │ │ │ │ -_1_6_3 struct _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -164 { │ │ │ │ -165 │ │ │ │ -167 │ │ │ │ -175 template │ │ │ │ -_1_7_6 void _p_r_e(T1&&, T2&&, TreePath) const {} │ │ │ │ -177 │ │ │ │ -179 │ │ │ │ -188 template │ │ │ │ -_1_8_9 void _i_n(T1&&, T2&&, TreePath) const {} │ │ │ │ -190 │ │ │ │ -192 │ │ │ │ -200 template │ │ │ │ -_2_0_1 void _p_o_s_t(T1&&, T2&&, TreePath) const {} │ │ │ │ -202 │ │ │ │ -204 │ │ │ │ -215 template │ │ │ │ -_2_1_6 void _l_e_a_f(T1&&, T2&&, TreePath) const {} │ │ │ │ -217 │ │ │ │ -219 │ │ │ │ -231 template │ │ │ │ -_2_3_2 void _b_e_f_o_r_e_C_h_i_l_d(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) │ │ │ │ -const {} │ │ │ │ -233 │ │ │ │ -235 │ │ │ │ -247 template │ │ │ │ -_2_4_8 void _a_f_t_e_r_C_h_i_l_d(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const │ │ │ │ -{} │ │ │ │ -249 │ │ │ │ -250 }; │ │ │ │ -251 │ │ │ │ -252 │ │ │ │ -253 namespace Experimental { │ │ │ │ -254 │ │ │ │ -_2_8_5 struct _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ -286 { │ │ │ │ -287 │ │ │ │ -295 template │ │ │ │ -_2_9_6 auto _p_r_e(T&&, TreePath, const U& u) const { return u;} │ │ │ │ -297 │ │ │ │ -305 template │ │ │ │ -_3_0_6 auto _i_n(T&&, TreePath, const U& u) const {return u;} │ │ │ │ -307 │ │ │ │ -315 template │ │ │ │ -_3_1_6 auto _p_o_s_t(T&&, TreePath, const U& u) const {return u;} │ │ │ │ -317 │ │ │ │ -325 template │ │ │ │ -_3_2_6 auto _l_e_a_f(T&&, TreePath, const U& u) const { return u;} │ │ │ │ -327 │ │ │ │ -335 template │ │ │ │ -_3_3_6 auto _b_e_f_o_r_e_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex, const U& u) const │ │ │ │ -{return u;} │ │ │ │ -337 │ │ │ │ -345 template │ │ │ │ -_3_4_6 auto _a_f_t_e_r_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex, const U& u) const │ │ │ │ -{return u;} │ │ │ │ -347 │ │ │ │ -348 }; │ │ │ │ -349 } // namespace Experimental │ │ │ │ -350 │ │ │ │ -352 │ │ │ │ -_3_5_7 struct _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ -358 { │ │ │ │ -359 │ │ │ │ -360 // the little trick with the default template arguments │ │ │ │ -361 // makes the class usable for both single-tree visitors │ │ │ │ -362 // and visitors for pairs of trees │ │ │ │ -364 template │ │ │ │ -_3_6_9 struct _V_i_s_i_t_C_h_i_l_d │ │ │ │ -370 { │ │ │ │ -_3_7_2 static const bool _v_a_l_u_e = false; │ │ │ │ -373 }; │ │ │ │ -374 │ │ │ │ -375 }; │ │ │ │ -376 │ │ │ │ -377 │ │ │ │ -379 │ │ │ │ -_3_8_3 struct _V_i_s_i_t_T_r_e_e │ │ │ │ -384 { │ │ │ │ -385 │ │ │ │ -386 // the little trick with the default template arguments │ │ │ │ -387 // makes the class usable for both single-tree visitors │ │ │ │ -388 // and visitors for pairs of trees │ │ │ │ -390 template │ │ │ │ -_3_9_5 struct _V_i_s_i_t_C_h_i_l_d │ │ │ │ -396 { │ │ │ │ -_3_9_8 static const bool _v_a_l_u_e = true; │ │ │ │ -399 }; │ │ │ │ -400 │ │ │ │ -401 }; │ │ │ │ -402 │ │ │ │ -404 │ │ │ │ -_4_1_1 struct _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -412 { │ │ │ │ -_4_1_4 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e _t_r_e_e_P_a_t_h_T_y_p_e = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c; │ │ │ │ -415 }; │ │ │ │ -416 │ │ │ │ -418 │ │ │ │ -_4_2_5 struct _D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -426 { │ │ │ │ -_4_2_8 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e _t_r_e_e_P_a_t_h_T_y_p_e = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c; │ │ │ │ -429 }; │ │ │ │ -430 │ │ │ │ -_4_3_2 struct _T_r_e_e_V_i_s_i_t_o_r │ │ │ │ -433 : public _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ -434 , public _V_i_s_i_t_T_r_e_e │ │ │ │ -435 {}; │ │ │ │ -436 │ │ │ │ -_4_3_8 struct _D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ -439 : public _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ -440 , public _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ -441 {}; │ │ │ │ -442 │ │ │ │ -_4_4_4 struct _T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -445 : public _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -446 , public _V_i_s_i_t_T_r_e_e │ │ │ │ -447 {}; │ │ │ │ -448 │ │ │ │ -_4_5_0 struct _D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -451 : public _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -452 , public _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ -453 {}; │ │ │ │ -454 │ │ │ │ -_4_5_5 namespace _E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o { │ │ │ │ -456 │ │ │ │ -_4_5_7 struct _L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -458 : public _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ -459 , public _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -460 , public _V_i_s_i_t_T_r_e_e │ │ │ │ -461 { │ │ │ │ -462 template │ │ │ │ -_4_6_3 auto _b_e_f_o_r_e_C_h_i_l_d(Tree&&, Child&&, TreePath, ChildIndex, U u) const { │ │ │ │ -464 // in this case child index is an integral constant: forward u │ │ │ │ -465 return u; │ │ │ │ -466 } │ │ │ │ -467 │ │ │ │ -468 template │ │ │ │ -_4_6_9 std::size_t _b_e_f_o_r_e_C_h_i_l_d(Tree&&, Child&&, TreePath, std::size_t / │ │ │ │ -*childIndex*/, U u) const { │ │ │ │ -470 // in this case child index is a run-time index: cast accumulated u to │ │ │ │ -std::size_t │ │ │ │ -471 return std::size_t{u}; │ │ │ │ -472 } │ │ │ │ -473 │ │ │ │ -474 template │ │ │ │ -_4_7_5 auto _l_e_a_f(Tree&&, TreePath, U u) const │ │ │ │ -476 { │ │ │ │ -477 return Hybrid::plus(u,Dune::Indices::_1); │ │ │ │ -478 } │ │ │ │ -479 │ │ │ │ -480 }; │ │ │ │ -481 │ │ │ │ -_4_8_2 struct _N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -483 : public _L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -484 { │ │ │ │ -485 template │ │ │ │ -_4_8_6 auto _p_r_e(Tree&&, TreePath, U u) const { │ │ │ │ -487 return Hybrid::plus(u,Indices::_1); │ │ │ │ -488 } │ │ │ │ -489 }; │ │ │ │ -490 │ │ │ │ -_4_9_1 struct _D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ -492 : public _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ -493 , public _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -494 , public _V_i_s_i_t_T_r_e_e │ │ │ │ -495 { │ │ │ │ -496 template │ │ │ │ -_4_9_7 auto _l_e_a_f(Tree&&, TreePath, U u) const │ │ │ │ -498 { │ │ │ │ -499 auto path_size = index_constant<_t_r_e_e_P_a_t_h_S_i_z_e(TreePath{})>{}; │ │ │ │ -500 auto _d_e_p_t_h = Hybrid::plus(path_size,Indices::_1); │ │ │ │ -501 return Hybrid::max(_d_e_p_t_h,u); │ │ │ │ -502 } │ │ │ │ -503 }; │ │ │ │ -504 │ │ │ │ -506 // result is alwayas an integral constant │ │ │ │ -507 template │ │ │ │ -_5_0_8 auto _d_e_p_t_h(const Tree& tree) │ │ │ │ -509 { │ │ │ │ -510 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_D_e_p_t_h_V_i_s_i_t_o_r{},Indices::_0); │ │ │ │ -511 } │ │ │ │ -512 │ │ │ │ -514 // return types is std::integral_constant. │ │ │ │ -515 template │ │ │ │ -_5_1_6 constexpr auto _d_e_p_t_h() │ │ │ │ -517 { │ │ │ │ -518 return decltype(_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(std::declval(),_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ -{},Indices::_0)){}; │ │ │ │ -519 } │ │ │ │ -520 │ │ │ │ -522 // if Tree is dynamic, return type is std::size_t, otherwise std:: │ │ │ │ -integral_constant. │ │ │ │ -523 template │ │ │ │ -_5_2_4 auto _n_o_d_e_C_o_u_n_t(const Tree& tree) │ │ │ │ -525 { │ │ │ │ -526 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r{},Indices::_0); │ │ │ │ -527 } │ │ │ │ -528 │ │ │ │ -530 // if Tree is dynamic, return type is std::size_t, otherwise std:: │ │ │ │ -integral_constant. │ │ │ │ -531 template │ │ │ │ -_5_3_2 auto _l_e_a_f_C_o_u_n_t(const Tree& tree) │ │ │ │ -533 { │ │ │ │ -534 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r{},Dune::Indices::_0); │ │ │ │ -535 } │ │ │ │ -536 │ │ │ │ -538 template │ │ │ │ -_5_3_9 constexpr bool _i_s_D_y_n_a_m_i_c = std::is_same()))>{}; │ │ │ │ -540 │ │ │ │ -541 } // namespace Experimental::Info │ │ │ │ -542 │ │ │ │ -544 │ │ │ │ -545 } // namespace TypeTree │ │ │ │ -546} //namespace Dune │ │ │ │ -547 │ │ │ │ -548#endif // DUNE_TYPETREE_VISITOR_HH │ │ │ │ -_t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ -constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ -Returns the size (number of components) of the given HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e { │ │ │ │ +14 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +15 │ │ │ │ +20 │ │ │ │ +21 template class TransformedNode> │ │ │ │ +_2_2 struct _G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +23 { │ │ │ │ +24 template │ │ │ │ +_2_5 struct _r_e_s_u_l_t │ │ │ │ +26 { │ │ │ │ +_2_7 typedef TransformedNode::value> _t_y_p_e; │ │ │ │ +28 }; │ │ │ │ +29 }; │ │ │ │ +30 │ │ │ │ +31 │ │ │ │ +32 template class TransformedNode> │ │ │ │ +_3_3 struct _G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +34 { │ │ │ │ +35 template │ │ │ │ +_3_6 struct _r_e_s_u_l_t │ │ │ │ +37 { │ │ │ │ +_3_8 typedef TransformedNode _t_y_p_e; │ │ │ │ +39 }; │ │ │ │ +40 }; │ │ │ │ +41 │ │ │ │ +42 template class TransformedNode> │ │ │ │ +_4_3 struct _G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +44 { │ │ │ │ +45 template │ │ │ │ +_4_6 struct _r_e_s_u_l_t │ │ │ │ +47 { │ │ │ │ +_4_8 typedef TransformedNode _t_y_p_e; │ │ │ │ +49 }; │ │ │ │ +50 }; │ │ │ │ +51 │ │ │ │ +53 │ │ │ │ +54 } // namespace TypeTree │ │ │ │ +55} //namespace Dune │ │ │ │ +56 │ │ │ │ +57#endif // DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e │ │ │ │ -auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init) │ │ │ │ -Apply hybrid visitor to TypeTree. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:702 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ -Type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c │ │ │ │ -@ fullyStatic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ -@ dynamic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o │ │ │ │ -DDeeffiinniittiioonn visitor.hh:455 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_i_s_D_y_n_a_m_i_c │ │ │ │ -constexpr bool isDynamic │ │ │ │ -true if any of the nodes in the tree only has dynamic degree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:539 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ -auto leafCount(const Tree &tree) │ │ │ │ -The number of leaf nodes in the Tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:532 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ -auto nodeCount(const Tree &tree) │ │ │ │ -The total number of nodes in the Tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:524 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ -constexpr auto depth() │ │ │ │ -The depth of the Tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:516 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ -auto depth(const Tree &tree) │ │ │ │ -The depth of the TypeTree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:508 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ -Visitor interface and base class for TypeTree visitors. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:49 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ -void in(T &&, TreePath) const │ │ │ │ -Method for infix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:72 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ -void afterChild(T &&, Child &&, TreePath, ChildIndex) const │ │ │ │ -Method for child-parent traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:122 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ -void beforeChild(T &&, Child &&, TreePath, ChildIndex) const │ │ │ │ -Method for parent-child traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:107 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ -void post(T &&, TreePath) const │ │ │ │ -Method for postfix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ -void leaf(T &&, TreePath) const │ │ │ │ -Method for leaf traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:93 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ -void pre(T &&, TreePath) const │ │ │ │ -Method for prefix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:60 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -Visitor interface and base class for visitors of pairs of TypeTrees. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:164 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ -void leaf(T1 &&, T2 &&, TreePath) const │ │ │ │ -Method for leaf traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:216 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ -void beforeChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) │ │ │ │ -const │ │ │ │ -Method for parent-child traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:232 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ -void pre(T1 &&, T2 &&, TreePath) const │ │ │ │ -Method for prefix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:176 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ -void post(T1 &&, T2 &&, TreePath) const │ │ │ │ -Method for postfix traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:201 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ -void in(T1 &&, T2 &&, TreePath) const │ │ │ │ -Method for infix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:189 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ -void afterChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const │ │ │ │ -Method for child-parent traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:248 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ -Hybrid visitor interface and base class for TypeTree hybrid visitors. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:286 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ -auto post(T &&, TreePath, const U &u) const │ │ │ │ -Method for postfix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:316 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ -auto pre(T &&, TreePath, const U &u) const │ │ │ │ -Method for prefix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:296 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ -auto leaf(T &&, TreePath, const U &u) const │ │ │ │ -Method for leaf traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:326 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ -auto afterChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const │ │ │ │ -Method for child-parent traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:346 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ -auto in(T &&, TreePath, const U &u) const │ │ │ │ -Method for infix tree traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:306 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ -auto beforeChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const │ │ │ │ -Method for parent-child traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:336 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ -Mixin base class for visitors that only want to visit the direct children of a │ │ │ │ -node. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:358 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d │ │ │ │ -Template struct for determining whether or not to visit a given child. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:370 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d_:_:_v_a_l_u_e │ │ │ │ -static const bool value │ │ │ │ -Do not visit any child. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:372 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e │ │ │ │ -Mixin base class for visitors that want to visit the complete tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:384 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d │ │ │ │ -Template struct for determining whether or not to visit a given child. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:396 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d_:_:_v_a_l_u_e │ │ │ │ -static const bool value │ │ │ │ -Visit any child. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:398 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -Mixin base class for visitors that require a static TreePath during traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:412 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_:_:_t_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ -static const TreePathType::Type treePathType │ │ │ │ -Use the static tree traversal algorithm. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:414 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ -Mixin base class for visitors that only need a dynamic TreePath during │ │ │ │ -traversal. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:426 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_:_:_t_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ -static const TreePathType::Type treePathType │ │ │ │ -Use the dynamic tree traversal algorithm. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:428 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_V_i_s_i_t_o_r │ │ │ │ -Convenience base class for visiting the entire tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:435 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ -Convenience base class for visiting the direct children of a node. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:441 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -Convenience base class for visiting an entire tree pair. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:447 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ -Convenience base class for visiting the direct children of a node pair. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:453 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -DDeeffiinniittiioonn visitor.hh:461 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ -auto leaf(Tree &&, TreePath, U u) const │ │ │ │ -DDeeffiinniittiioonn visitor.hh:475 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ -auto beforeChild(Tree &&, Child &&, TreePath, ChildIndex, U u) const │ │ │ │ -DDeeffiinniittiioonn visitor.hh:463 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ -std::size_t beforeChild(Tree &&, Child &&, TreePath, std::size_t, U u) const │ │ │ │ -DDeeffiinniittiioonn visitor.hh:469 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ -DDeeffiinniittiioonn visitor.hh:484 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ -auto pre(Tree &&, TreePath, U u) const │ │ │ │ -DDeeffiinniittiioonn visitor.hh:486 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ -DDeeffiinniittiioonn visitor.hh:495 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ -auto leaf(Tree &&, TreePath, U u) const │ │ │ │ -DDeeffiinniittiioonn visitor.hh:497 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:23 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:26 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< SourceNode, TC, StaticDegree< SourceNode >::value > type │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:34 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:37 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< SourceNode, TC > type │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:38 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:44 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:47 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< SourceNode, TC... > type │ │ │ │ +DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:48 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00011.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: utility.hh File Reference │ │ │ +dune-typetree: nodetags.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,33 +74,30 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
utility.hh File Reference
│ │ │ +
nodetags.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <memory>
│ │ │ -#include <tuple>
│ │ │ -#include <type_traits>
│ │ │ -#include <utility>
│ │ │ -#include <algorithm>
│ │ │ -#include <dune/common/shared_ptr.hh>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -
│ │ │ + │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::TreeInfo< Tree, Tag >
 Struct for obtaining some basic structural information about a TypeTree. More...
struct  Dune::TypeTree::LeafNodeTag
 Tag designating a leaf node. More...
struct  Dune::TypeTree::PowerNodeTag
 Tag designating a power node. More...
struct  Dune::TypeTree::DynamicPowerNodeTag
 Tag designating a power node with runtime degree. More...
struct  Dune::TypeTree::CompositeNodeTag
 Tag designating a composite node. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +1,23 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -utility.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +nodetags.hh File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _T_a_g_ _> │ │ │ │ -  Struct for obtaining some basic structural information about a │ │ │ │ - _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ +  Tag designating a leaf node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +  Tag designating a power node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +  Tag designating a power node with runtime degree. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ +  Tag designating a composite node. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00011_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: utility.hh Source File │ │ │ +dune-typetree: nodetags.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,240 +71,56 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
utility.hh
│ │ │ +
nodetags.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_UTILITY_HH
│ │ │ -
7#define DUNE_TYPETREE_UTILITY_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_NODETAGS_HH
│ │ │ +
7#define DUNE_TYPETREE_NODETAGS_HH
│ │ │
8
│ │ │ -
9#include <memory>
│ │ │ -
10#include <tuple>
│ │ │ -
11#include <type_traits>
│ │ │ -
12#include <utility>
│ │ │ -
13#include <algorithm>
│ │ │ -
14
│ │ │ -
15#include <dune/common/shared_ptr.hh>
│ │ │ -
16#include <dune/common/indices.hh>
│ │ │ - │ │ │ - │ │ │ -
19
│ │ │ -
20namespace Dune {
│ │ │ -
21 namespace TypeTree {
│ │ │ +
9namespace Dune {
│ │ │ +
10 namespace TypeTree {
│ │ │ +
11
│ │ │ +
16
│ │ │ +
18 struct LeafNodeTag {};
│ │ │ +
19
│ │ │ +
21 struct PowerNodeTag {};
│ │ │
22
│ │ │ -
26
│ │ │ -
27#ifndef DOXYGEN
│ │ │ + │ │ │ +
25
│ │ │ + │ │ │
28
│ │ │ -
29 template<typename T>
│ │ │ -
30 std::shared_ptr<T> convert_arg(const T& t)
│ │ │ -
31 {
│ │ │ -
32 return std::make_shared<T>(t);
│ │ │ -
33 }
│ │ │ +
29#ifndef DOXYGEN
│ │ │ +
30
│ │ │ +
32 struct StartTag {};
│ │ │ +
33
│ │ │
34
│ │ │ -
35 template<typename T>
│ │ │ -
36 std::shared_ptr<T> convert_arg(T& t)
│ │ │ -
37 {
│ │ │ -
38 return stackobject_to_shared_ptr(t);
│ │ │ -
39 }
│ │ │ -
40
│ │ │ -
41 template<typename BaseType, typename T>
│ │ │ -
42 T& assertGridViewType(T& t)
│ │ │ -
43 {
│ │ │ -
44 static_assert((std::is_same<typename BaseType::Traits::GridViewType,
│ │ │ -
45 typename T::Traits::GridViewType>::value),
│ │ │ -
46 "GridViewType must be equal in all components of composite type");
│ │ │ -
47 return t;
│ │ │ -
48 }
│ │ │ -
49
│ │ │ -
50 // only bind to real rvalues
│ │ │ -
51 template<typename T>
│ │ │ -
52 typename std::enable_if<!std::is_lvalue_reference<T>::value,std::shared_ptr<T> >::type convert_arg(T&& t)
│ │ │ -
53 {
│ │ │ -
54 return std::make_shared<T>(std::forward<T>(t));
│ │ │ -
55 }
│ │ │ -
56
│ │ │ -
57
│ │ │ -
58 namespace Experimental {
│ │ │ -
59
│ │ │ -
68 template<class BinaryOp, class Arg>
│ │ │ -
69 constexpr decltype(auto)
│ │ │ -
70 left_fold(const BinaryOp& binary_op, Arg&& arg)
│ │ │ -
71 {
│ │ │ -
72 return std::forward<Arg>(arg);
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
96 template<class BinaryOp, class Init, class Arg0, class... Args>
│ │ │ -
97 constexpr decltype(auto)
│ │ │ -
98 left_fold(const BinaryOp& binary_op, Init&& init, Arg0&& arg_0, Args&&... args)
│ │ │ -
99 {
│ │ │ -
100 return left_fold(
│ │ │ -
101 binary_op,
│ │ │ -
102 binary_op(std::forward<Init>(init), std::forward<Arg0>(arg_0)),
│ │ │ -
103 std::forward<Args>(args)...);
│ │ │ -
104 }
│ │ │ -
105
│ │ │ -
106 } // namespace Experimental
│ │ │ -
107
│ │ │ -
108
│ │ │ -
109#endif // DOXYGEN
│ │ │ -
110
│ │ │ -
112
│ │ │ -
119 template<typename Tree, typename Tag = StartTag>
│ │ │ -
│ │ │ -
120 struct TreeInfo
│ │ │ -
121 {
│ │ │ -
122
│ │ │ -
123 private:
│ │ │ -
124 // Start the tree traversal
│ │ │ -
125 typedef TreeInfo<Tree,NodeTag<Tree>> NodeInfo;
│ │ │ -
126
│ │ │ -
127 public:
│ │ │ -
128
│ │ │ -
130 static const std::size_t depth = NodeInfo::depth;
│ │ │ -
131
│ │ │ -
133 static const std::size_t nodeCount = NodeInfo::nodeCount;
│ │ │ -
134
│ │ │ -
136 static const std::size_t leafCount = NodeInfo::leafCount;
│ │ │ -
137
│ │ │ -
138 };
│ │ │ -
│ │ │ -
139
│ │ │ -
140
│ │ │ -
141#ifndef DOXYGEN
│ │ │ -
142
│ │ │ -
143 // ********************************************************************************
│ │ │ -
144 // TreeInfo specializations for the different node types
│ │ │ -
145 // ********************************************************************************
│ │ │ -
146
│ │ │ -
147
│ │ │ -
148 // leaf node
│ │ │ -
149 template<typename Node>
│ │ │ -
150 struct TreeInfo<Node,LeafNodeTag>
│ │ │ -
151 {
│ │ │ -
152
│ │ │ -
153 static const std::size_t depth = 1;
│ │ │ -
154
│ │ │ -
155 static const std::size_t nodeCount = 1;
│ │ │ -
156
│ │ │ -
157 static const std::size_t leafCount = 1;
│ │ │ -
158
│ │ │ -
159 };
│ │ │ -
160
│ │ │ -
161
│ │ │ -
162 // power node - exploit the fact that all children are identical
│ │ │ -
163 template<typename Node>
│ │ │ -
164 struct TreeInfo<Node,PowerNodeTag>
│ │ │ -
165 {
│ │ │ -
166
│ │ │ -
167 typedef TreeInfo<typename Node::ChildType,NodeTag<typename Node::ChildType>> ChildInfo;
│ │ │ -
168
│ │ │ -
169 static const std::size_t depth = 1 + ChildInfo::depth;
│ │ │ -
170
│ │ │ -
171 static const std::size_t nodeCount = 1 + StaticDegree<Node>::value * ChildInfo::nodeCount;
│ │ │ -
172
│ │ │ -
173 static const std::size_t leafCount = StaticDegree<Node>::value * ChildInfo::leafCount;
│ │ │ -
174
│ │ │ -
175 };
│ │ │ -
176
│ │ │ -
177
│ │ │ -
178 namespace {
│ │ │ -
179
│ │ │ -
180 // TMP for iterating over the children of a composite node
│ │ │ -
181 // identical for both composite node implementations
│ │ │ -
182 template<typename Node, std::size_t k, std::size_t n>
│ │ │ -
183 struct generic_compositenode_children_info
│ │ │ -
184 {
│ │ │ -
185
│ │ │ -
186 typedef generic_compositenode_children_info<Node,k+1,n> NextChild;
│ │ │ -
187
│ │ │ -
188 // extract child info
│ │ │ -
189 typedef typename Node::template Child<k>::Type Child;
│ │ │ -
190 typedef NodeTag<Child> ChildTag;
│ │ │ -
191 typedef TreeInfo<Child,ChildTag> ChildInfo;
│ │ │ -
192
│ │ │ -
193 // combine information of current child with info about following children
│ │ │ -
194 static const std::size_t maxDepth = ChildInfo::depth > NextChild::maxDepth ? ChildInfo::depth : NextChild::maxDepth;
│ │ │ -
195
│ │ │ -
196 static const std::size_t nodeCount = ChildInfo::nodeCount + NextChild::nodeCount;
│ │ │ -
197
│ │ │ -
198 static const std::size_t leafCount = ChildInfo::leafCount + NextChild::leafCount;
│ │ │ -
199
│ │ │ -
200 };
│ │ │ -
201
│ │ │ -
202 // End of recursion
│ │ │ -
203 template<typename Node, std::size_t n>
│ │ │ -
204 struct generic_compositenode_children_info<Node,n,n>
│ │ │ -
205 {
│ │ │ -
206 static const std::size_t maxDepth = 0;
│ │ │ -
207
│ │ │ -
208 static const std::size_t nodeCount = 0;
│ │ │ -
209
│ │ │ -
210 static const std::size_t leafCount = 0;
│ │ │ -
211 };
│ │ │ -
212
│ │ │ -
213 } // anonymous namespace
│ │ │ -
214
│ │ │ -
215
│ │ │ -
216 // Struct for building information about composite node
│ │ │ -
217 template<typename Node>
│ │ │ -
218 struct GenericCompositeNodeInfo
│ │ │ -
219 {
│ │ │ -
220
│ │ │ -
221 typedef generic_compositenode_children_info<Node,0,StaticDegree<Node>::value> Children;
│ │ │ -
222
│ │ │ -
223 static const std::size_t depth = 1 + Children::maxDepth;
│ │ │ -
224
│ │ │ -
225 static const std::size_t nodeCount = 1 + Children::nodeCount;
│ │ │ -
226
│ │ │ -
227 static const std::size_t leafCount = Children::leafCount;
│ │ │ -
228
│ │ │ -
229 };
│ │ │ -
230
│ │ │ -
231
│ │ │ -
232 // CompositeNode: delegate to GenericCompositeNodeInfo
│ │ │ -
233 template<typename Node>
│ │ │ -
234 struct TreeInfo<Node,CompositeNodeTag>
│ │ │ -
235 : public GenericCompositeNodeInfo<Node>
│ │ │ -
236 {};
│ │ │ -
237
│ │ │ -
238
│ │ │ -
239#endif // DOXYGEN
│ │ │ -
240
│ │ │ -
241
│ │ │ -
242 using Dune::index_constant;
│ │ │ -
243 namespace Indices = Dune::Indices;
│ │ │ -
244
│ │ │ -
246
│ │ │ -
247 } // namespace TypeTree
│ │ │ -
248} //namespace Dune
│ │ │ -
249
│ │ │ -
250#endif // DUNE_TYPETREE_UTILITY_HH
│ │ │ - │ │ │ - │ │ │ +
35
│ │ │ +
36#endif // DOXYGEN
│ │ │ +
37
│ │ │ +
39
│ │ │ +
40 } // namespace TypeTree
│ │ │ +
41} //namespace Dune
│ │ │ +
42
│ │ │ +
43#endif // DUNE_TYPETREE_NODETAGS_HH
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition accumulate_static.hh:576
│ │ │ -
auto leafCount(const Tree &tree)
The number of leaf nodes in the Tree.
Definition visitor.hh:532
│ │ │ -
auto nodeCount(const Tree &tree)
The total number of nodes in the Tree.
Definition visitor.hh:524
│ │ │ -
auto depth(const Tree &tree)
The depth of the TypeTree.
Definition visitor.hh:508
│ │ │
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ +
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ +
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ -
Struct for obtaining some basic structural information about a TypeTree.
Definition utility.hh:121
│ │ │ -
static const std::size_t leafCount
Definition utility.hh:136
│ │ │ -
static const std::size_t depth
Definition utility.hh:130
│ │ │ -
static const std::size_t nodeCount
Definition utility.hh:133
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,270 +1,61 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -utility.hh │ │ │ │ +nodetags.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_UTILITY_HH │ │ │ │ -7#define DUNE_TYPETREE_UTILITY_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_NODETAGS_HH │ │ │ │ +7#define DUNE_TYPETREE_NODETAGS_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +9namespace _D_u_n_e { │ │ │ │ +10 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +11 │ │ │ │ +16 │ │ │ │ +_1_8 struct _L_e_a_f_N_o_d_e_T_a_g {}; │ │ │ │ 19 │ │ │ │ -20namespace _D_u_n_e { │ │ │ │ -21 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +_2_1 struct _P_o_w_e_r_N_o_d_e_T_a_g {}; │ │ │ │ 22 │ │ │ │ -26 │ │ │ │ -27#ifndef DOXYGEN │ │ │ │ +_2_4 struct _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g {}; │ │ │ │ +25 │ │ │ │ +_2_7 struct _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g {}; │ │ │ │ 28 │ │ │ │ -29 template │ │ │ │ -30 std::shared_ptr convert_arg(const T& t) │ │ │ │ -31 { │ │ │ │ -32 return std::make_shared(t); │ │ │ │ -33 } │ │ │ │ +29#ifndef DOXYGEN │ │ │ │ +30 │ │ │ │ +32 struct StartTag {}; │ │ │ │ +33 │ │ │ │ 34 │ │ │ │ -35 template │ │ │ │ -36 std::shared_ptr convert_arg(T& t) │ │ │ │ -37 { │ │ │ │ -38 return stackobject_to_shared_ptr(t); │ │ │ │ -39 } │ │ │ │ -40 │ │ │ │ -41 template │ │ │ │ -42 T& assertGridViewType(T& t) │ │ │ │ -43 { │ │ │ │ -44 static_assert((std::is_same::value), │ │ │ │ -46 "GridViewType must be equal in all components of composite type"); │ │ │ │ -47 return t; │ │ │ │ -48 } │ │ │ │ -49 │ │ │ │ -50 // only bind to real rvalues │ │ │ │ -51 template │ │ │ │ -52 typename std::enable_if::value,std:: │ │ │ │ -shared_ptr >::type convert_arg(T&& t) │ │ │ │ -53 { │ │ │ │ -54 return std::make_shared(std::forward(t)); │ │ │ │ -55 } │ │ │ │ -56 │ │ │ │ -57 │ │ │ │ -58 namespace _E_x_p_e_r_i_m_e_n_t_a_l { │ │ │ │ -59 │ │ │ │ -68 template │ │ │ │ -69 constexpr decltype(auto) │ │ │ │ -70 left_fold(const BinaryOp& binary_op, Arg&& arg) │ │ │ │ -71 { │ │ │ │ -72 return std::forward(arg); │ │ │ │ -73 } │ │ │ │ -74 │ │ │ │ -96 template │ │ │ │ -97 constexpr decltype(auto) │ │ │ │ -98 left_fold(const BinaryOp& binary_op, Init&& init, Arg0&& arg_0, Args&&... │ │ │ │ -args) │ │ │ │ -99 { │ │ │ │ -100 return left_fold( │ │ │ │ -101 binary_op, │ │ │ │ -102 binary_op(std::forward(init), std::forward(arg_0)), │ │ │ │ -103 std::forward(args)...); │ │ │ │ -104 } │ │ │ │ -105 │ │ │ │ -106 } // namespace Experimental │ │ │ │ -107 │ │ │ │ -108 │ │ │ │ -109#endif // DOXYGEN │ │ │ │ -110 │ │ │ │ -112 │ │ │ │ -119 template │ │ │ │ -_1_2_0 struct _T_r_e_e_I_n_f_o │ │ │ │ -121 { │ │ │ │ -122 │ │ │ │ -123 private: │ │ │ │ -124 // Start the tree traversal │ │ │ │ -125 typedef _T_r_e_e_I_n_f_o_<_T_r_e_e_,_N_o_d_e_T_a_g_<_T_r_e_e_>> NodeInfo; │ │ │ │ -126 │ │ │ │ -127 public: │ │ │ │ -128 │ │ │ │ -_1_3_0 static const std::size_t _d_e_p_t_h = _N_o_d_e_I_n_f_o_:_:_d_e_p_t_h; │ │ │ │ -131 │ │ │ │ -_1_3_3 static const std::size_t _n_o_d_e_C_o_u_n_t = _N_o_d_e_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t; │ │ │ │ -134 │ │ │ │ -_1_3_6 static const std::size_t _l_e_a_f_C_o_u_n_t = _N_o_d_e_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t; │ │ │ │ -137 │ │ │ │ -138 }; │ │ │ │ -139 │ │ │ │ -140 │ │ │ │ -141#ifndef DOXYGEN │ │ │ │ -142 │ │ │ │ -143 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -144 // TreeInfo specializations for the different node types │ │ │ │ -145 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -146 │ │ │ │ -147 │ │ │ │ -148 // leaf node │ │ │ │ -149 template │ │ │ │ -150 struct _T_r_e_e_I_n_f_o │ │ │ │ -151 { │ │ │ │ -152 │ │ │ │ -153 static const std::size_t _d_e_p_t_h = 1; │ │ │ │ -154 │ │ │ │ -155 static const std::size_t _n_o_d_e_C_o_u_n_t = 1; │ │ │ │ -156 │ │ │ │ -157 static const std::size_t _l_e_a_f_C_o_u_n_t = 1; │ │ │ │ -158 │ │ │ │ -159 }; │ │ │ │ -160 │ │ │ │ -161 │ │ │ │ -162 // power node - exploit the fact that all children are identical │ │ │ │ -163 template │ │ │ │ -164 struct TreeInfo │ │ │ │ -165 { │ │ │ │ -166 │ │ │ │ -167 typedef TreeInfo> ChildInfo; │ │ │ │ -168 │ │ │ │ -169 static const std::size_t _d_e_p_t_h = 1 + ChildInfo::depth; │ │ │ │ -170 │ │ │ │ -171 static const std::size_t _n_o_d_e_C_o_u_n_t = 1 + StaticDegree::value * │ │ │ │ -ChildInfo::nodeCount; │ │ │ │ -172 │ │ │ │ -173 static const std::size_t _l_e_a_f_C_o_u_n_t = StaticDegree::value * │ │ │ │ -ChildInfo::leafCount; │ │ │ │ -174 │ │ │ │ -175 }; │ │ │ │ -176 │ │ │ │ -177 │ │ │ │ -178 namespace { │ │ │ │ -179 │ │ │ │ -180 // TMP for iterating over the children of a composite node │ │ │ │ -181 // identical for both composite node implementations │ │ │ │ -182 template │ │ │ │ -183 struct generic_compositenode_children_info │ │ │ │ -184 { │ │ │ │ -185 │ │ │ │ -186 typedef generic_compositenode_children_info NextChild; │ │ │ │ -187 │ │ │ │ -188 // extract child info │ │ │ │ -189 typedef typename Node::template Child::Type Child; │ │ │ │ -190 typedef NodeTag ChildTag; │ │ │ │ -191 typedef TreeInfo ChildInfo; │ │ │ │ -192 │ │ │ │ -193 // combine information of current child with info about following children │ │ │ │ -194 static const std::size_t maxDepth = ChildInfo::depth > NextChild::maxDepth │ │ │ │ -? ChildInfo::depth : NextChild::maxDepth; │ │ │ │ -195 │ │ │ │ -196 static const std::size_t nodeCount = ChildInfo::nodeCount + NextChild:: │ │ │ │ -nodeCount; │ │ │ │ -197 │ │ │ │ -198 static const std::size_t leafCount = ChildInfo::leafCount + NextChild:: │ │ │ │ -leafCount; │ │ │ │ -199 │ │ │ │ -200 }; │ │ │ │ -201 │ │ │ │ -202 // End of recursion │ │ │ │ -203 template │ │ │ │ -204 struct generic_compositenode_children_info │ │ │ │ -205 { │ │ │ │ -206 static const std::size_t maxDepth = 0; │ │ │ │ -207 │ │ │ │ -208 static const std::size_t _n_o_d_e_C_o_u_n_t = 0; │ │ │ │ -209 │ │ │ │ -210 static const std::size_t _l_e_a_f_C_o_u_n_t = 0; │ │ │ │ -211 }; │ │ │ │ -212 │ │ │ │ -213 } // anonymous namespace │ │ │ │ -214 │ │ │ │ -215 │ │ │ │ -216 // Struct for building information about composite node │ │ │ │ -217 template │ │ │ │ -218 struct GenericCompositeNodeInfo │ │ │ │ -219 { │ │ │ │ -220 │ │ │ │ -221 typedef generic_compositenode_children_info:: │ │ │ │ -value> Children; │ │ │ │ -222 │ │ │ │ -223 static const std::size_t _d_e_p_t_h = 1 + Children::maxDepth; │ │ │ │ -224 │ │ │ │ -225 static const std::size_t _n_o_d_e_C_o_u_n_t = 1 + Children::nodeCount; │ │ │ │ -226 │ │ │ │ -227 static const std::size_t _l_e_a_f_C_o_u_n_t = Children::leafCount; │ │ │ │ -228 │ │ │ │ -229 }; │ │ │ │ -230 │ │ │ │ -231 │ │ │ │ -232 // CompositeNode: delegate to GenericCompositeNodeInfo │ │ │ │ -233 template │ │ │ │ -234 struct _T_r_e_e_I_n_f_o │ │ │ │ -235 : public GenericCompositeNodeInfo │ │ │ │ -236 {}; │ │ │ │ -237 │ │ │ │ -238 │ │ │ │ -239#endif // DOXYGEN │ │ │ │ -240 │ │ │ │ -241 │ │ │ │ -242 using Dune::index_constant; │ │ │ │ -243 namespace Indices = Dune::Indices; │ │ │ │ -244 │ │ │ │ -246 │ │ │ │ -247 } // namespace TypeTree │ │ │ │ -248} //namespace Dune │ │ │ │ -249 │ │ │ │ -250#endif // DUNE_TYPETREE_UTILITY_HH │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +35 │ │ │ │ +36#endif // DOXYGEN │ │ │ │ +37 │ │ │ │ +39 │ │ │ │ +40 } // namespace TypeTree │ │ │ │ +41} //namespace Dune │ │ │ │ +42 │ │ │ │ +43#endif // DUNE_TYPETREE_NODETAGS_HH │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:576 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ -auto leafCount(const Tree &tree) │ │ │ │ -The number of leaf nodes in the Tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:532 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ -auto nodeCount(const Tree &tree) │ │ │ │ -The total number of nodes in the Tree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:524 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ -auto depth(const Tree &tree) │ │ │ │ -The depth of the TypeTree. │ │ │ │ -DDeeffiinniittiioonn visitor.hh:508 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ Tag designating a leaf node. │ │ │ │ DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node with runtime degree. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ Tag designating a composite node. │ │ │ │ DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o │ │ │ │ -Struct for obtaining some basic structural information about a TypeTree. │ │ │ │ -DDeeffiinniittiioonn utility.hh:121 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ -static const std::size_t leafCount │ │ │ │ -DDeeffiinniittiioonn utility.hh:136 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_d_e_p_t_h │ │ │ │ -static const std::size_t depth │ │ │ │ -DDeeffiinniittiioonn utility.hh:130 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ -static const std::size_t nodeCount │ │ │ │ -DDeeffiinniittiioonn utility.hh:133 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00014.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: typetree.hh File Reference │ │ │ +dune-typetree: treecontainer.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,30 +71,18 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
typetree.hh File Reference
│ │ │ +
treecontainer.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/utility.hh>
│ │ │ -#include <dune/typetree/leafnode.hh>
│ │ │ -#include <dune/typetree/powernode.hh>
│ │ │ -#include <dune/typetree/dynamicpowernode.hh>
│ │ │ -#include <dune/typetree/compositenode.hh>
│ │ │ -#include <dune/typetree/traversal.hh>
│ │ │ -#include <dune/typetree/pairtraversal.hh>
│ │ │ -#include <dune/typetree/traversalutilities.hh>
│ │ │ -#include <dune/typetree/transformation.hh>
│ │ │ -#include <dune/typetree/transformationutilities.hh>
│ │ │ -#include <dune/typetree/accumulate_static.hh>
│ │ │ -#include <dune/typetree/childextraction.hh>
│ │ │ +
#include <dune/common/typetree/treecontainer.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,11 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -typetree.hh File Reference │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_l_e_a_f_n_o_d_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ +treecontainer.hh File Reference │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00014_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: typetree.hh Source File │ │ │ +dune-typetree: treecontainer.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,53 +71,30 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
typetree.hh
│ │ │ +
treecontainer.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_HH
│ │ │ -
7#define DUNE_TYPETREE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TREECONTAINER_HH
│ │ │ +
7#define DUNE_TYPETREE_TREECONTAINER_HH
│ │ │
8
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
22
│ │ │ -
23#endif // DUNE_TYPETREE_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
9#include <dune/common/typetree/treecontainer.hh>
│ │ │ +
10
│ │ │ +
11#warning This header is deprecated and will be removed after 2.11. Use dune/common/typetree/treecontainer.hh instead.
│ │ │ +
12
│ │ │ +
13#endif // DUNE_TYPETREE_TREECONTAINER_HH
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,48 +1,26 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -typetree.hh │ │ │ │ +treecontainer.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_HH │ │ │ │ -7#define DUNE_TYPETREE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ +7#define DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ 8 │ │ │ │ -9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_l_e_a_f_n_o_d_e_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h> │ │ │ │ -15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -16#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ -18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h> │ │ │ │ -21#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ -22 │ │ │ │ -23#endif // DUNE_TYPETREE_HH │ │ │ │ -_u_t_i_l_i_t_y_._h_h │ │ │ │ -_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h │ │ │ │ -_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ -_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h │ │ │ │ -_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h │ │ │ │ -_p_o_w_e_r_n_o_d_e_._h_h │ │ │ │ -_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_l_e_a_f_n_o_d_e_._h_h │ │ │ │ -_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h │ │ │ │ -_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h │ │ │ │ -_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ -_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#warning This header is deprecated and will be removed after 2.11. Use dune/ │ │ │ │ +common/typetree/treecontainer.hh instead. │ │ │ │ +12 │ │ │ │ +13#endif // DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00017.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: typetraits.hh File Reference │ │ │ +dune-typetree: treepath.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,71 +74,87 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ +Typedefs | │ │ │ +Enumerations | │ │ │ Functions
│ │ │ -
typetraits.hh File Reference
│ │ │ +
treepath.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <type_traits>
│ │ │ +
#include <cstddef>
│ │ │ +#include <cassert>
│ │ │ +#include <iostream>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/common/documentation.hh>
│ │ │ #include <dune/common/typetraits.hh>
│ │ │ -#include <dune/typetree/treepath.hh>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ +#include <dune/common/typetree/treepath.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::first_type< T0, T... >
struct  Dune::TypeTree::has_node_tag< T >
struct  Dune::TypeTree::has_node_tag< T >::yes
struct  Dune::TypeTree::has_node_tag< T >::no
struct  Dune::TypeTree::has_node_tag_value< T, V >
struct  Dune::TypeTree::has_node_tag_value< T, V >::maybe< N >
struct  Dune::TypeTree::has_node_tag_value< T, V >::yes
struct  Dune::TypeTree::has_node_tag_value< T, V >::no
struct  Dune::TypeTree::has_implementation_tag< T >
struct  Dune::TypeTree::has_implementation_tag< T >::yes
struct  Dune::TypeTree::has_implementation_tag< T >::no
struct  Dune::TypeTree::has_implementation_tag_value< T, V >
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::maybe< N >
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::yes
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::no
struct  Dune::TypeTree::AlwaysVoid< typename >
struct  Dune::TypeTree::meta_function
 Marker tag declaring a meta function. More...
struct  Dune::TypeTree::lazy_evaluate< F >
 Helper meta function to delay evaluation of F. More...
struct  Dune::TypeTree::lazy_identity< F >
 Identity function. More...
struct  Dune::TypeTree::evaluate_if_meta_function< F >
 Meta function that evaluates its argument iff it inherits from meta_function. More...
struct  Dune::TypeTree::IsTreePath< T >
 Check if type represents a tree path. More...
struct  Dune::TypeTree::TreePathSize< HybridTreePath< index_constant< i >... > >
struct  Dune::TypeTree::TreePathPushBack< HybridTreePath< index_constant< i >... >, k >
struct  Dune::TypeTree::TreePathPushFront< HybridTreePath< index_constant< i >... >, k >
struct  Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< k > > >
struct  Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... > >
struct  Dune::TypeTree::TreePathFront< HybridTreePath< index_constant< k >, index_constant< i >... > >
struct  Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< k > >, i... >
struct  Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... >, i... >
struct  Dune::TypeTree::TreePathPopFront< HybridTreePath< index_constant< k >, index_constant< i >... > >
struct  Dune::TypeTree::TreePathConcat< HybridTreePath< index_constant< i >... >, HybridTreePath< index_constant< k >... > >
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::impl
namespace  Dune::TypeTree::TreePathType
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

template<typename... T>
using Dune::TypeTree::HybridTreePath = Dune::HybridMultiIndex<T...>
 A type for representing tree paths that supports both compile time and run time indices.
template<std::size_t... i>
using Dune::TypeTree::StaticTreePath = HybridTreePath<Dune::index_constant<i>...>
│ │ │ + │ │ │ + │ │ │

│ │ │ +Enumerations

enum  Dune::TypeTree::TreePathType::Type { Dune::TypeTree::TreePathType::fullyStatic │ │ │ +, Dune::TypeTree::TreePathType::dynamic │ │ │ + }
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename T>
T * Dune::TypeTree::declptr ()
 Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
constexpr auto Dune::TypeTree::impl::isTreePath (void *) -> std::false_type
template<class... I>
constexpr auto Dune::TypeTree::impl::isTreePath (const HybridTreePath< I... > *) -> std::true_type
template<class T>
constexpr auto Dune::TypeTree::isTreePath (const T &) -> IsTreePath< T >
 Check if given object represents a tree path.
template<typename... T>
│ │ │ +requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
constexpr auto Dune::TypeTree::hybridTreePath (const T &... t)
 Constructs a new HybridTreePath from the given indices.
template<std::size_t... i>
void Dune::TypeTree::print_tree_path (std::ostream &os)
template<std::size_t k, std::size_t... i>
void Dune::TypeTree::print_tree_path (std::ostream &os)
template<typename... T>
│ │ │ +requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
constexpr auto Dune::TypeTree::makeTreePath (const T... t)
 helper function to construct a new HybridTreePath from the given indices.
template<typename... T>
constexpr std::size_t Dune::TypeTree::treePathSize (const HybridTreePath< T... > &)
 Returns the size (number of components) of the given HybridTreePath.
template<std::size_t i, typename... T>
constexpr auto Dune::TypeTree::treePathEntry (const HybridTreePath< T... > &tp, index_constant< i >={})
 Returns a copy of the i-th element of the HybridTreePath.
template<std::size_t i, typename... T>
constexpr std::size_t Dune::TypeTree::treePathIndex (const HybridTreePath< T... > &tp, index_constant< i >={})
 Returns the index value of the i-th element of the HybridTreePath.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,59 +1,85 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -typetraits.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +treepath.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_f_i_r_s_t___t_y_p_e_<_ _T_0_,_ _T_._._._ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _>_:_:_y_e_s │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _>_:_:_n_o │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_m_a_y_b_e_<_ _N_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_y_e_s │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_n_o │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _>_:_:_y_e_s │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _>_:_:_n_o │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_m_a_y_b_e_<_ _N_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_y_e_s │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_n_o │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d_<_ _t_y_p_e_n_a_m_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ -  Marker tag declaring a meta function. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e_<_ _F_ _> │ │ │ │ -  Helper meta function to delay evaluation of F. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y_<_ _F_ _> │ │ │ │ -  Identity function. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n_<_ _F_ _> │ │ │ │ -  Meta function that evaluates its argument iff it inherits from │ │ │ │ - _m_e_t_a___f_u_n_c_t_i_o_n. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h_<_ _T_ _> │ │ │ │ -  Check if type represents a tree path. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_S_i_z_e_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _> │ │ │ │ + _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i │ │ │ │ + _>_._._._ _>_,_ _k_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i │ │ │ │ + _>_._._._ _>_,_ _k_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_ _>_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _j_ _>_, │ │ │ │ + _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_,_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _l_ _>_._._._ _>_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ + _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _> │ │ │ │ + _>_,_ _i_._._._ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _j_ _>_, │ │ │ │ + _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_,_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _l_ _>_._._._ _>_,_ _i_._._._ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ + _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._. │ │ │ │ + _>_,_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_._._._ _>_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h = Dune::HybridMultiIndex │ │ │ │ +  A type for representing tree paths that supports both compile time and │ │ │ │ + run time indices. │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_e_e_P_a_t_h = _H_y_b_r_i_d_T_r_e_e_P_a_t_h...> │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ +enum   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e { _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_: │ │ │ │ + _f_u_l_l_y_S_t_a_t_i_c , _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c } │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ - T *  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r () │ │ │ │ -  Helper function for generating a pointer to a value of type T │ │ │ │ - in an unevaluated operand setting. │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h (void *) -> std::false_type │ │ │ │ -template │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< I... > │ │ │ │ - *) -> std::true_type │ │ │ │ -template │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s_T_r_e_e_P_a_t_h (const T &) -> _I_s_T_r_e_e_P_a_t_h< T > │ │ │ │ -  Check if given object represents a tree path. │ │ │ │ +template │ │ │ │ +requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ +...)) │ │ │ │ + constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h (const T &... t) │ │ │ │ +  Constructs a new _H_y_b_r_i_d_T_r_e_e_P_a_t_h from the given indices. │ │ │ │ +template │ │ │ │ + void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h (std::ostream &os) │ │ │ │ +template │ │ │ │ + void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h (std::ostream &os) │ │ │ │ +template │ │ │ │ +requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ +...)) │ │ │ │ + constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_k_e_T_r_e_e_P_a_t_h (const T... t) │ │ │ │ +  helper function to construct a new _H_y_b_r_i_d_T_r_e_e_P_a_t_h from │ │ │ │ + the given indices. │ │ │ │ +template │ │ │ │ +constexpr std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< T... │ │ │ │ + > &) │ │ │ │ +  Returns the size (number of components) of the given │ │ │ │ + _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ +template │ │ │ │ + constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< │ │ │ │ + T... > &tp, index_constant< i >={}) │ │ │ │ +  Returns a copy of the i-th element of the │ │ │ │ + _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ +template │ │ │ │ +constexpr std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_I_n_d_e_x (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< │ │ │ │ + T... > &tp, index_constant< i >={}) │ │ │ │ +  Returns the index value of the i-th element of the │ │ │ │ + _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00017_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: typetraits.hh Source File │ │ │ +dune-typetree: treepath.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,280 +71,317 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
typetraits.hh
│ │ │ +
treepath.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=8 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TYPETRAITS_HH
│ │ │ -
7#define DUNE_TYPETREE_TYPETRAITS_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TREEPATH_HH
│ │ │ +
7#define DUNE_TYPETREE_TREEPATH_HH
│ │ │
8
│ │ │ -
9#include <type_traits>
│ │ │ -
10#include <dune/common/typetraits.hh>
│ │ │ -
11
│ │ │ - │ │ │ - │ │ │ -
14
│ │ │ -
15namespace Dune {
│ │ │ -
16
│ │ │ -
17 // Provide some more C++11 TMP helpers.
│ │ │ -
18 // These should be upstreamed to dune-common ASAP.
│ │ │ +
9#include <cstddef>
│ │ │ +
10#include <cassert>
│ │ │ +
11#include <iostream>
│ │ │ +
12#include <type_traits>
│ │ │ +
13
│ │ │ +
14#include <dune/common/documentation.hh>
│ │ │ +
15#include <dune/common/typetraits.hh>
│ │ │ +
16#include <dune/common/indices.hh>
│ │ │ +
17
│ │ │ +
18#include <dune/common/typetree/treepath.hh>
│ │ │
19
│ │ │ -
20 template<typename... T>
│ │ │ -
21 struct first_type;
│ │ │ -
22
│ │ │ -
23 template<typename T0, typename... T>
│ │ │ -
│ │ │ -
24 struct first_type<T0,T...>
│ │ │ -
25 {
│ │ │ -
26 typedef T0 type;
│ │ │ -
27 };
│ │ │ -
│ │ │ -
28
│ │ │ -
29 namespace TypeTree {
│ │ │ -
30
│ │ │ -
31 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
33 {
│ │ │ -
34 struct yes { char dummy[1]; };
│ │ │ -
35 struct no { char dummy[2]; };
│ │ │ -
36
│ │ │ -
37 template<typename X>
│ │ │ -
38 static yes test(NodeTag<X> *);
│ │ │ -
39 template<typename X>
│ │ │ -
40 static no test(...);
│ │ │ -
41
│ │ │ -
43 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ -
44 };
│ │ │ -
│ │ │ -
45
│ │ │ -
46 template<typename T, typename V>
│ │ │ -
│ │ │ - │ │ │ -
48 {
│ │ │ -
49 template<int N>
│ │ │ -
50 struct maybe { char dummy[N+1]; };
│ │ │ -
51 struct yes { char dummy[2]; };
│ │ │ -
52 struct no { char dummy[1]; };
│ │ │ -
53
│ │ │ -
54 template<typename X>
│ │ │ - │ │ │ - │ │ │ -
57 template<typename X>
│ │ │ -
58 static no test(...);
│ │ │ -
59
│ │ │ -
61 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ -
62 };
│ │ │ -
│ │ │ +
20
│ │ │ +
21namespace Dune {
│ │ │ +
22 namespace TypeTree {
│ │ │ +
23
│ │ │ +
24 // The Impl namespace collects some free standing functions helper functions
│ │ │ +
25 namespace Impl {
│ │ │ +
26
│ │ │ +
27 template<class T>
│ │ │ +
28 constexpr bool isHybridSizeT()
│ │ │ +
29 {
│ │ │ +
30 if constexpr (std::is_same_v<T, std::size_t>)
│ │ │ +
31 return true;
│ │ │ +
32 else
│ │ │ +
33 {
│ │ │ +
34 if constexpr (requires { T::value; })
│ │ │ +
35 return std::is_same_v<T, std::integral_constant<std::size_t, T::value>>;
│ │ │ +
36 else
│ │ │ +
37 return false;
│ │ │ +
38 }
│ │ │ +
39 }
│ │ │ +
40
│ │ │ +
41 template<class T>
│ │ │ +
42 constexpr auto castToHybridSizeT(T t)
│ │ │ +
43 {
│ │ │ +
44 if constexpr (Dune::IsIntegralConstant<T>::value)
│ │ │ +
45 {
│ │ │ +
46 using VT = typename T::value_type;
│ │ │ +
47 static_assert(
│ │ │ +
48 std::is_convertible_v<VT,std::size_t> &&
│ │ │ +
49 std::is_integral_v<VT> &&
│ │ │ +
50 T::value >= 0,
│ │ │ +
51 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ +
52 return std::integral_constant<std::size_t, T::value>{};
│ │ │ +
53 } else {
│ │ │ +
54 static_assert(
│ │ │ +
55 std::is_convertible_v<T,std::size_t> &&
│ │ │ +
56 std::is_integral_v<T>,
│ │ │ +
57 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ +
58 assert(t >= 0 &&
│ │ │ +
59 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ +
60 return std::size_t(t);
│ │ │ +
61 }
│ │ │ +
62 }
│ │ │
63
│ │ │ -
64 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
66 {
│ │ │ -
67 struct yes { char dummy[1]; };
│ │ │ -
68 struct no { char dummy[2]; };
│ │ │ -
69
│ │ │ -
70 template<typename X>
│ │ │ - │ │ │ -
72 template<typename X>
│ │ │ -
73 static no test(...);
│ │ │ -
74
│ │ │ -
76 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ -
77 };
│ │ │ -
│ │ │ -
78
│ │ │ -
79 template<typename T, typename V>
│ │ │ -
│ │ │ - │ │ │ -
81 {
│ │ │ -
82 template<int N>
│ │ │ -
83 struct maybe { char dummy[N+1]; };
│ │ │ -
84 struct yes { char dummy[2]; };
│ │ │ -
85 struct no { char dummy[1]; };
│ │ │ -
86
│ │ │ -
87 template<typename X>
│ │ │ - │ │ │ - │ │ │ -
90 template<typename X>
│ │ │ -
91 static no test(...);
│ │ │ -
92
│ │ │ -
94 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ -
95 };
│ │ │ -
│ │ │ -
96
│ │ │ -
97 template<typename>
│ │ │ -
│ │ │ - │ │ │ -
99 {
│ │ │ -
100 typedef void type;
│ │ │ -
101 };
│ │ │ -
│ │ │ -
102
│ │ │ -
103
│ │ │ -
105 template<typename T>
│ │ │ - │ │ │ -
107
│ │ │ -
108
│ │ │ -
109 // Support for lazy evaluation of meta functions. This is required when doing
│ │ │ -
110 // nested tag dispatch without C++11-style typedefs (based on using syntax).
│ │ │ -
111 // The standard struct-based meta functions cause premature evaluation in a
│ │ │ -
112 // context that is not SFINAE-compatible. We thus have to return the meta function
│ │ │ -
113 // without evaluating it, placing that burden on the caller. On the other hand,
│ │ │ -
114 // the lookup will often directly be the target type, so here is some helper code
│ │ │ -
115 // to automatically do the additional evaluation if necessary.
│ │ │ -
116 // Too bad that the new syntax is GCC 4.6+...
│ │ │ -
117
│ │ │ -
118
│ │ │ -
120
│ │ │ -
123 struct meta_function {};
│ │ │ -
124
│ │ │ -
126 template<typename F>
│ │ │ -
│ │ │ - │ │ │ -
128 {
│ │ │ -
129 typedef typename F::type type;
│ │ │ -
130 };
│ │ │ -
│ │ │ -
131
│ │ │ -
133 template<typename F>
│ │ │ -
│ │ │ - │ │ │ -
135 {
│ │ │ -
136 typedef F type;
│ │ │ -
137 };
│ │ │ -
│ │ │ -
138
│ │ │ -
140 template<typename F>
│ │ │ -
│ │ │ - │ │ │ -
142 {
│ │ │ -
143 typedef typename std::conditional<
│ │ │ -
144 std::is_base_of<meta_function,F>::value,
│ │ │ - │ │ │ - │ │ │ -
147 >::type::type type;
│ │ │ -
148 };
│ │ │ -
│ │ │ -
149
│ │ │ -
│ │ │ -
150 namespace impl {
│ │ │ -
151
│ │ │ -
152 // Check if type is a or is derived from one of the tree path types
│ │ │ -
153
│ │ │ -
154 // Default overload for types not representing a tree path
│ │ │ -
│ │ │ -
155 constexpr auto isTreePath(void*)
│ │ │ -
156 -> std::false_type
│ │ │ -
157 {
│ │ │ -
158 return std::false_type();
│ │ │ -
159 }
│ │ │ -
│ │ │ -
160
│ │ │ -
161 // Overload for instances of HybridTreePath<...>
│ │ │ -
162 template<class... I>
│ │ │ -
│ │ │ -
163 constexpr auto isTreePath(const HybridTreePath<I...>*)
│ │ │ -
164 -> std::true_type
│ │ │ -
165 {
│ │ │ -
166 return std::true_type();
│ │ │ -
167 }
│ │ │ -
│ │ │ -
168
│ │ │ -
169 }
│ │ │ -
│ │ │ -
170
│ │ │ -
181 template<class T>
│ │ │ -
│ │ │ -
182 struct IsTreePath :
│ │ │ -
183 public decltype(impl::isTreePath((typename std::decay<T>::type*)(nullptr)))
│ │ │ -
184 {};
│ │ │ -
│ │ │ -
185
│ │ │ -
192 template<class T>
│ │ │ -
│ │ │ -
193 constexpr auto isTreePath(const T&)
│ │ │ - │ │ │ -
195 {
│ │ │ -
196 return IsTreePath<T>();
│ │ │ -
197 }
│ │ │ -
│ │ │ -
198
│ │ │ -
199
│ │ │ -
200 } // end namespace TypeTree
│ │ │ -
201} // end namespace Dune
│ │ │ -
202
│ │ │ -
203#endif // DUNE_TYPETREE_TYPETRAITS_HH
│ │ │ - │ │ │ - │ │ │ -
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition nodeinterface.hh:74
│ │ │ -
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │ +
64 }
│ │ │ +
65
│ │ │ +
69
│ │ │ +
71
│ │ │ +
84 template<typename... T>
│ │ │ +
85 using HybridTreePath = Dune::HybridMultiIndex<T...>;
│ │ │ +
86
│ │ │ +
88
│ │ │ +
100 template<typename... T>
│ │ │ +
101 requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
│ │ │ +
│ │ │ +
102 [[nodiscard]] constexpr auto hybridTreePath(const T&... t)
│ │ │ +
103 {
│ │ │ +
104 return HybridMultiIndex(t...);
│ │ │ +
105 }
│ │ │ +
│ │ │ +
106
│ │ │ +
│ │ │ +
107 namespace TreePathType {
│ │ │ + │ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
114 template<typename>
│ │ │ + │ │ │ +
116
│ │ │ +
120 template<typename,std::size_t>
│ │ │ + │ │ │ +
122
│ │ │ +
126 template<typename,std::size_t>
│ │ │ + │ │ │ +
128
│ │ │ +
132 template<typename>
│ │ │ + │ │ │ +
134
│ │ │ +
138 template<typename>
│ │ │ + │ │ │ +
140
│ │ │ +
144 template<typename, std::size_t...>
│ │ │ + │ │ │ +
146
│ │ │ +
150 template<typename>
│ │ │ + │ │ │ +
152
│ │ │ +
156 template<typename, typename>
│ │ │ + │ │ │ +
158
│ │ │ +
159 template<std::size_t... i>
│ │ │ +
160 [[deprecated("This function will be removed after Dune 2.11.")]]
│ │ │ +
│ │ │ +
161 void print_tree_path(std::ostream& os)
│ │ │ +
162 {}
│ │ │ +
│ │ │ +
163
│ │ │ +
164 template<std::size_t k, std::size_t... i>
│ │ │ +
165 [[deprecated("This function will be removed after Dune 2.11.")]]
│ │ │ +
│ │ │ +
166 void print_tree_path(std::ostream& os)
│ │ │ +
167 {
│ │ │ +
168 os << k << " ";
│ │ │ +
169 print_tree_path<i...>(os);
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
173
│ │ │ +
182 template<typename... T>
│ │ │ +
183 requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
│ │ │ +
│ │ │ +
184 [[nodiscard]] constexpr auto makeTreePath(const T... t)
│ │ │ +
185 {
│ │ │ +
186 return HybridMultiIndex(t...);
│ │ │ +
187 }
│ │ │ +
│ │ │ +
188
│ │ │ +
190 template<typename... T>
│ │ │ +
│ │ │ +
191 [[nodiscard]] constexpr std::size_t treePathSize(const HybridTreePath<T...>&)
│ │ │ +
192 {
│ │ │ +
193 return sizeof...(T);
│ │ │ +
194 }
│ │ │ +
│ │ │ +
195
│ │ │ +
197
│ │ │ +
213 template<std::size_t i, typename... T>
│ │ │ +
│ │ │ +
214 [[nodiscard]] constexpr auto treePathEntry(const HybridTreePath<T...>& tp, index_constant<i> = {})
│ │ │ +
215 {
│ │ │ +
216 return tp[index_constant<i>{}];
│ │ │ +
217 }
│ │ │ +
│ │ │ +
218
│ │ │ +
220
│ │ │ +
237 template<std::size_t i,typename... T>
│ │ │ +
238 [[deprecated("This function will be removed after Dune 2.11. Use operator[] instead.")]]
│ │ │ +
│ │ │ +
239 [[nodiscard]] constexpr std::size_t treePathIndex(const HybridTreePath<T...>& tp, index_constant<i> = {})
│ │ │ +
240 {
│ │ │ +
241 return tp[index_constant<i>{}];
│ │ │ +
242 }
│ │ │ +
│ │ │ +
243
│ │ │ +
244 template<std::size_t... i>
│ │ │ +
│ │ │ +
245 struct
│ │ │ +
246 [[deprecated("This class will be removed after Dune 2.11. Use the size() member function instead.")]]
│ │ │ + │ │ │ +
248 : public index_constant<sizeof...(i)>
│ │ │ +
249 {};
│ │ │ +
│ │ │ +
250
│ │ │ +
251
│ │ │ +
252 template<std::size_t k, std::size_t... i>
│ │ │ +
│ │ │ +
253 struct
│ │ │ +
254 [[deprecated("This class will be removed after Dune 2.11. Use the free push_back() function instead.")]]
│ │ │ + │ │ │ +
256 {
│ │ │ +
257 typedef HybridTreePath<index_constant<i>...,index_constant<k>> type;
│ │ │ +
258 };
│ │ │ +
│ │ │ +
259
│ │ │ +
260 template<std::size_t k, std::size_t... i>
│ │ │ +
│ │ │ +
261 struct
│ │ │ +
262 [[deprecated("This class will be removed after Dune 2.11. Use the free push_front() function instead.")]]
│ │ │ + │ │ │ +
264 {
│ │ │ +
265 typedef HybridTreePath<index_constant<k>,index_constant<i>...> type;
│ │ │ +
266 };
│ │ │ +
│ │ │ +
267
│ │ │ +
268 template<std::size_t k>
│ │ │ +
│ │ │ +
269 struct
│ │ │ +
270 [[deprecated("This class will be removed after Dune 2.11. Use the back() member function instead.")]]
│ │ │ + │ │ │ +
272 : public index_constant<k>
│ │ │ +
273 {};
│ │ │ +
│ │ │ +
274
│ │ │ +
275 template<std::size_t j, std::size_t k, std::size_t... l>
│ │ │ +
│ │ │ +
276 struct
│ │ │ +
277 [[deprecated("This class will be removed after Dune 2.11. Use the back() member function instead.")]]
│ │ │ +
278 TreePathBack<HybridTreePath<index_constant<j>,index_constant<k>,index_constant<l>...>>
│ │ │ +
279 : public TreePathBack<HybridTreePath<index_constant<k>,index_constant<l>...>>
│ │ │ +
280 {};
│ │ │ +
│ │ │ +
281
│ │ │ +
282 template<std::size_t k, std::size_t... i>
│ │ │ +
│ │ │ +
283 struct
│ │ │ +
284 [[deprecated("This class will be removed after Dune 2.11. Use the front() member function instead.")]]
│ │ │ + │ │ │ +
286 : public index_constant<k>
│ │ │ +
287 {};
│ │ │ +
│ │ │ +
288
│ │ │ +
289 template<std::size_t k, std::size_t... i>
│ │ │ +
│ │ │ +
290 struct
│ │ │ +
291 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_back() function instead.")]]
│ │ │ + │ │ │ +
293 {
│ │ │ + │ │ │ +
295 };
│ │ │ +
│ │ │ +
296
│ │ │ +
297 template<std::size_t j,
│ │ │ +
298 std::size_t k,
│ │ │ +
299 std::size_t... l,
│ │ │ +
300 std::size_t... i>
│ │ │ +
│ │ │ +
301 struct
│ │ │ +
302 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_back() function instead.")]]
│ │ │ +
303 TreePathPopBack<HybridTreePath<index_constant<j>,index_constant<k>,index_constant<l>...>,i...>
│ │ │ +
304 : public TreePathPopBack<HybridTreePath<index_constant<k>,index_constant<l>...>,i...,j>
│ │ │ +
305 {};
│ │ │ +
│ │ │ +
306
│ │ │ +
307 template<std::size_t k, std::size_t... i>
│ │ │ +
│ │ │ +
308 struct
│ │ │ +
309 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_front() function instead.")]]
│ │ │ + │ │ │ +
311 {
│ │ │ + │ │ │ +
313 };
│ │ │ +
│ │ │ +
314
│ │ │ +
315 template<std::size_t... i, std::size_t... k>
│ │ │ +
│ │ │ +
316 struct
│ │ │ +
317 [[deprecated("This class will be removed after Dune 2.11. Use the free join() function instead.")]]
│ │ │ + │ │ │ +
319 {
│ │ │ +
320 typedef HybridTreePath<index_constant<i>...,index_constant<k>...> type;
│ │ │ +
321 };
│ │ │ +
│ │ │ +
322
│ │ │ +
323 template<std::size_t... i>
│ │ │ + │ │ │ +
325
│ │ │ +
327
│ │ │ +
328 } // namespace TypeTree
│ │ │ +
329} //namespace Dune
│ │ │ +
330
│ │ │ +
331
│ │ │ +
332
│ │ │ +
333#endif // DUNE_TYPETREE_TREEPATH_HH
│ │ │ +
constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns a copy of the i-th element of the HybridTreePath.
Definition treepath.hh:214
│ │ │ +
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │ +
constexpr auto makeTreePath(const T... t)
helper function to construct a new HybridTreePath from the given indices.
Definition treepath.hh:184
│ │ │ +
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │ +
constexpr std::size_t treePathIndex(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns the index value of the i-th element of the HybridTreePath.
Definition treepath.hh:239
│ │ │ +
HybridTreePath< Dune::index_constant< i >... > StaticTreePath
Definition treepath.hh:324
│ │ │ +
void print_tree_path(std::ostream &os)
Definition treepath.hh:161
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
constexpr auto isTreePath(const T &) -> IsTreePath< T >
Check if given object represents a tree path.
Definition typetraits.hh:193
│ │ │ -
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
│ │ │ -
Definition typetraits.hh:150
│ │ │ -
constexpr auto isTreePath(void *) -> std::false_type
Definition typetraits.hh:155
│ │ │ -
Definition typetraits.hh:21
│ │ │ -
T0 type
Definition typetraits.hh:26
│ │ │ -
Definition typetraits.hh:33
│ │ │ -
static constexpr bool value
True if class T defines a NodeTag.
Definition typetraits.hh:43
│ │ │ -
static yes test(NodeTag< X > *)
│ │ │ - │ │ │ -
Definition typetraits.hh:34
│ │ │ -
char dummy[1]
Definition typetraits.hh:34
│ │ │ -
Definition typetraits.hh:35
│ │ │ -
char dummy[2]
Definition typetraits.hh:35
│ │ │ -
Definition typetraits.hh:48
│ │ │ -
static maybe< std::is_base_of< V, NodeTag< X > >::value > test(NodeTag< X > *a)
│ │ │ -
static constexpr bool value
True if class T defines a NodeTag of type V.
Definition typetraits.hh:61
│ │ │ - │ │ │ - │ │ │ -
char dummy[N+1]
Definition typetraits.hh:50
│ │ │ -
Definition typetraits.hh:51
│ │ │ -
char dummy[2]
Definition typetraits.hh:51
│ │ │ -
Definition typetraits.hh:52
│ │ │ -
char dummy[1]
Definition typetraits.hh:52
│ │ │ -
Definition typetraits.hh:66
│ │ │ -
static yes test(ImplementationTag< X > *)
│ │ │ - │ │ │ -
static constexpr bool value
True if class T defines an ImplementationTag.
Definition typetraits.hh:76
│ │ │ - │ │ │ -
char dummy[1]
Definition typetraits.hh:67
│ │ │ - │ │ │ -
char dummy[2]
Definition typetraits.hh:68
│ │ │ - │ │ │ -
static maybe< std::is_base_of< V, ImplementationTag< X > >::value > test(ImplementationTag< X > *a)
│ │ │ - │ │ │ -
static constexpr bool value
True if class T defines an ImplementationTag of type V.
Definition typetraits.hh:94
│ │ │ - │ │ │ -
char dummy[N+1]
Definition typetraits.hh:83
│ │ │ - │ │ │ -
char dummy[2]
Definition typetraits.hh:84
│ │ │ - │ │ │ -
char dummy[1]
Definition typetraits.hh:85
│ │ │ -
Definition typetraits.hh:99
│ │ │ -
void type
Definition typetraits.hh:100
│ │ │ -
Marker tag declaring a meta function.
Definition typetraits.hh:123
│ │ │ -
Helper meta function to delay evaluation of F.
Definition typetraits.hh:128
│ │ │ -
F::type type
Definition typetraits.hh:129
│ │ │ -
Identity function.
Definition typetraits.hh:135
│ │ │ -
F type
Definition typetraits.hh:136
│ │ │ -
Meta function that evaluates its argument iff it inherits from meta_function.
Definition typetraits.hh:142
│ │ │ -
std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition typetraits.hh:147
│ │ │ -
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │ +
Definition treepath.hh:107
│ │ │ +
Type
Definition treepath.hh:108
│ │ │ +
@ fullyStatic
Definition treepath.hh:108
│ │ │ +
@ dynamic
Definition treepath.hh:108
│ │ │ +
Definition treepath.hh:115
│ │ │ +
Definition treepath.hh:121
│ │ │ +
Definition treepath.hh:127
│ │ │ +
Definition treepath.hh:133
│ │ │ +
Definition treepath.hh:139
│ │ │ +
Definition treepath.hh:145
│ │ │ +
Definition treepath.hh:151
│ │ │ +
Definition treepath.hh:157
│ │ │ +
HybridTreePath< index_constant< i >..., index_constant< k > > type
Definition treepath.hh:257
│ │ │ +
HybridTreePath< index_constant< k >, index_constant< i >... > type
Definition treepath.hh:265
│ │ │ +
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:294
│ │ │ +
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:312
│ │ │ +
HybridTreePath< index_constant< i >..., index_constant< k >... > type
Definition treepath.hh:320
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,351 +1,358 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -typetraits.hh │ │ │ │ +treepath.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ -7#define DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TREEPATH_HH │ │ │ │ +7#define DUNE_TYPETREE_TREEPATH_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -14 │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ -16 │ │ │ │ -17 // Provide some more C++11 TMP helpers. │ │ │ │ -18 // These should be upstreamed to dune-common ASAP. │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18#include │ │ │ │ 19 │ │ │ │ -20 template │ │ │ │ -_2_1 struct _f_i_r_s_t___t_y_p_e; │ │ │ │ -22 │ │ │ │ -23 template │ │ │ │ -_2_4 struct _f_i_r_s_t___t_y_p_e │ │ │ │ -25 { │ │ │ │ -_2_6 typedef T0 _t_y_p_e; │ │ │ │ -27 }; │ │ │ │ -28 │ │ │ │ -29 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -30 │ │ │ │ -31 template │ │ │ │ -_3_2 struct _h_a_s___n_o_d_e___t_a_g │ │ │ │ +20 │ │ │ │ +21namespace _D_u_n_e { │ │ │ │ +22 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +23 │ │ │ │ +24 // The Impl namespace collects some free standing functions helper functions │ │ │ │ +25 namespace Impl { │ │ │ │ +26 │ │ │ │ +27 template │ │ │ │ +28 constexpr bool isHybridSizeT() │ │ │ │ +29 { │ │ │ │ +30 if constexpr (std::is_same_v) │ │ │ │ +31 return true; │ │ │ │ +32 else │ │ │ │ 33 { │ │ │ │ -_3_4 struct _y_e_s { char _d_u_m_m_y[1]; }; │ │ │ │ -_3_5 struct _n_o { char _d_u_m_m_y[2]; }; │ │ │ │ -36 │ │ │ │ -37 template │ │ │ │ -_3_8 static _y_e_s _t_e_s_t(_N_o_d_e_T_a_g_<_X_> *); │ │ │ │ -39 template │ │ │ │ -_4_0 static _n_o _t_e_s_t(...); │ │ │ │ -41 │ │ │ │ -_4_3 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ -44 }; │ │ │ │ -45 │ │ │ │ -46 template │ │ │ │ -_4_7 struct _h_a_s___n_o_d_e___t_a_g___v_a_l_u_e │ │ │ │ -48 { │ │ │ │ -49 template │ │ │ │ -_5_0 struct _m_a_y_b_e { char _d_u_m_m_y[N+1]; }; │ │ │ │ -_5_1 struct _y_e_s { char _d_u_m_m_y[2]; }; │ │ │ │ -_5_2 struct _n_o { char _d_u_m_m_y[1]; }; │ │ │ │ -53 │ │ │ │ -54 template │ │ │ │ -55 static _m_a_y_b_e_<_s_t_d_:_:_i_s___b_a_s_e___o_f_<_V_,_ _N_o_d_e_T_a_g_<_X_>>_:_:_v_a_l_u_e> │ │ │ │ -_5_6 _t_e_s_t(_N_o_d_e_T_a_g_<_X_> * a); │ │ │ │ -57 template │ │ │ │ -_5_8 static _n_o _t_e_s_t(...); │ │ │ │ -59 │ │ │ │ -_6_1 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ -62 }; │ │ │ │ +34 if constexpr (requires { T::value; }) │ │ │ │ +35 return std::is_same_v>; │ │ │ │ +36 else │ │ │ │ +37 return false; │ │ │ │ +38 } │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +41 template │ │ │ │ +42 constexpr auto castToHybridSizeT(T t) │ │ │ │ +43 { │ │ │ │ +44 if constexpr (Dune::IsIntegralConstant::value) │ │ │ │ +45 { │ │ │ │ +46 using VT = typename T::value_type; │ │ │ │ +47 static_assert( │ │ │ │ +48 std::is_convertible_v && │ │ │ │ +49 std::is_integral_v && │ │ │ │ +50 T::value >= 0, │ │ │ │ +51 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ +integral_constant"); │ │ │ │ +52 return std::integral_constant{}; │ │ │ │ +53 } else { │ │ │ │ +54 static_assert( │ │ │ │ +55 std::is_convertible_v && │ │ │ │ +56 std::is_integral_v, │ │ │ │ +57 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ +integral_constant"); │ │ │ │ +58 assert(t >= 0 && │ │ │ │ +59 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ +integral_constant"); │ │ │ │ +60 return std::size_t(t); │ │ │ │ +61 } │ │ │ │ +62 } │ │ │ │ 63 │ │ │ │ -64 template │ │ │ │ -_6_5 struct _h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g │ │ │ │ -66 { │ │ │ │ -_6_7 struct _y_e_s { char _d_u_m_m_y[1]; }; │ │ │ │ -_6_8 struct _n_o { char _d_u_m_m_y[2]; }; │ │ │ │ +64 } │ │ │ │ +65 │ │ │ │ 69 │ │ │ │ -70 template │ │ │ │ -_7_1 static _y_e_s _t_e_s_t(_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_> *); │ │ │ │ -72 template │ │ │ │ -_7_3 static _n_o _t_e_s_t(...); │ │ │ │ -74 │ │ │ │ -_7_6 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ -77 }; │ │ │ │ -78 │ │ │ │ -79 template │ │ │ │ -_8_0 struct _h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e │ │ │ │ -81 { │ │ │ │ -82 template │ │ │ │ -_8_3 struct _m_a_y_b_e { char _d_u_m_m_y[N+1]; }; │ │ │ │ -_8_4 struct _y_e_s { char _d_u_m_m_y[2]; }; │ │ │ │ -_8_5 struct _n_o { char _d_u_m_m_y[1]; }; │ │ │ │ +71 │ │ │ │ +84 template │ │ │ │ +_8_5 using _H_y_b_r_i_d_T_r_e_e_P_a_t_h = Dune::HybridMultiIndex; │ │ │ │ 86 │ │ │ │ -87 template │ │ │ │ -88 static _m_a_y_b_e_<_s_t_d_:_:_i_s___b_a_s_e___o_f_<_V_,_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_>>_:_:_v_a_l_u_e> │ │ │ │ -_8_9 _t_e_s_t(_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_> * a); │ │ │ │ -90 template │ │ │ │ -_9_1 static _n_o _t_e_s_t(...); │ │ │ │ -92 │ │ │ │ -_9_4 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ -95 }; │ │ │ │ -96 │ │ │ │ -97 template │ │ │ │ -_9_8 struct _A_l_w_a_y_s_V_o_i_d │ │ │ │ -99 { │ │ │ │ -_1_0_0 typedef void _t_y_p_e; │ │ │ │ -101 }; │ │ │ │ -102 │ │ │ │ -103 │ │ │ │ -105 template │ │ │ │ -_1_0_6 T* _d_e_c_l_p_t_r(); │ │ │ │ -107 │ │ │ │ -108 │ │ │ │ -109 // Support for lazy evaluation of meta functions. This is required when │ │ │ │ -doing │ │ │ │ -110 // nested tag dispatch without C++11-style typedefs (based on using │ │ │ │ -syntax). │ │ │ │ -111 // The standard struct-based meta functions cause premature evaluation in a │ │ │ │ -112 // context that is not SFINAE-compatible. We thus have to return the meta │ │ │ │ -function │ │ │ │ -113 // without evaluating it, placing that burden on the caller. On the other │ │ │ │ -hand, │ │ │ │ -114 // the lookup will often directly be the target type, so here is some │ │ │ │ -helper code │ │ │ │ -115 // to automatically do the additional evaluation if necessary. │ │ │ │ -116 // Too bad that the new syntax is GCC 4.6+... │ │ │ │ -117 │ │ │ │ -118 │ │ │ │ -120 │ │ │ │ -_1_2_3 struct _m_e_t_a___f_u_n_c_t_i_o_n {}; │ │ │ │ -124 │ │ │ │ -126 template │ │ │ │ -_1_2_7 struct _l_a_z_y___e_v_a_l_u_a_t_e │ │ │ │ -128 { │ │ │ │ -_1_2_9 typedef typename F::type _t_y_p_e; │ │ │ │ -130 }; │ │ │ │ -131 │ │ │ │ -133 template │ │ │ │ -_1_3_4 struct _l_a_z_y___i_d_e_n_t_i_t_y │ │ │ │ -135 { │ │ │ │ -_1_3_6 typedef F _t_y_p_e; │ │ │ │ -137 }; │ │ │ │ -138 │ │ │ │ -140 template │ │ │ │ -_1_4_1 struct _e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ -142 { │ │ │ │ -143 typedef typename std::conditional< │ │ │ │ -144 std::is_base_of::value, │ │ │ │ -145 _l_a_z_y___e_v_a_l_u_a_t_e_<_F_>, │ │ │ │ -146 _l_a_z_y___i_d_e_n_t_i_t_y_<_F_> │ │ │ │ -_1_4_7 >::type::type _t_y_p_e; │ │ │ │ -148 }; │ │ │ │ -149 │ │ │ │ -_1_5_0 namespace _i_m_p_l { │ │ │ │ -151 │ │ │ │ -152 // Check if type is a or is derived from one of the tree path types │ │ │ │ -153 │ │ │ │ -154 // Default overload for types not representing a tree path │ │ │ │ -_1_5_5 constexpr auto _i_s_T_r_e_e_P_a_t_h(void*) │ │ │ │ -156 -> std::false_type │ │ │ │ -157 { │ │ │ │ -158 return std::false_type(); │ │ │ │ -159 } │ │ │ │ -160 │ │ │ │ -161 // Overload for instances of HybridTreePath<...> │ │ │ │ -162 template │ │ │ │ -_1_6_3 constexpr auto _i_s_T_r_e_e_P_a_t_h(const _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_._._._>*) │ │ │ │ -164 -> std::true_type │ │ │ │ -165 { │ │ │ │ -166 return std::true_type(); │ │ │ │ -167 } │ │ │ │ -168 │ │ │ │ -169 } │ │ │ │ -170 │ │ │ │ -181 template │ │ │ │ -_1_8_2 struct _I_s_T_r_e_e_P_a_t_h : │ │ │ │ -183 public decltype(impl::isTreePath((typename std::decay::type*)(nullptr))) │ │ │ │ -184 {}; │ │ │ │ -185 │ │ │ │ -192 template │ │ │ │ -_1_9_3 constexpr auto _i_s_T_r_e_e_P_a_t_h(const T&) │ │ │ │ -194 -> _I_s_T_r_e_e_P_a_t_h_<_T_> │ │ │ │ -195 { │ │ │ │ -196 return _I_s_T_r_e_e_P_a_t_h_<_T_>(); │ │ │ │ -197 } │ │ │ │ -198 │ │ │ │ -199 │ │ │ │ -200 } // end namespace TypeTree │ │ │ │ -201} // end namespace Dune │ │ │ │ -202 │ │ │ │ -203#endif // DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ -_t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g │ │ │ │ -typename std::decay_t< T >::ImplementationTag ImplementationTag │ │ │ │ -Returns the implementation tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:74 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ -typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ -Returns the node tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ +88 │ │ │ │ +100 template │ │ │ │ +101 requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ +...)) │ │ │ │ +_1_0_2 [[nodiscard]] constexpr auto _h_y_b_r_i_d_T_r_e_e_P_a_t_h(const T&... t) │ │ │ │ +103 { │ │ │ │ +104 return HybridMultiIndex(t...); │ │ │ │ +105 } │ │ │ │ +106 │ │ │ │ +_1_0_7 namespace _T_r_e_e_P_a_t_h_T_y_p_e { │ │ │ │ +_1_0_8 enum _T_y_p_e { _f_u_l_l_y_S_t_a_t_i_c, _d_y_n_a_m_i_c }; │ │ │ │ +109 } │ │ │ │ +110 │ │ │ │ +114 template │ │ │ │ +_1_1_5 struct _T_r_e_e_P_a_t_h_S_i_z_e; │ │ │ │ +116 │ │ │ │ +120 template │ │ │ │ +_1_2_1 struct _T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k; │ │ │ │ +122 │ │ │ │ +126 template │ │ │ │ +_1_2_7 struct _T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t; │ │ │ │ +128 │ │ │ │ +132 template │ │ │ │ +_1_3_3 struct _T_r_e_e_P_a_t_h_B_a_c_k; │ │ │ │ +134 │ │ │ │ +138 template │ │ │ │ +_1_3_9 struct _T_r_e_e_P_a_t_h_F_r_o_n_t; │ │ │ │ +140 │ │ │ │ +144 template │ │ │ │ +_1_4_5 struct _T_r_e_e_P_a_t_h_P_o_p_B_a_c_k; │ │ │ │ +146 │ │ │ │ +150 template │ │ │ │ +_1_5_1 struct _T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t; │ │ │ │ +152 │ │ │ │ +156 template │ │ │ │ +_1_5_7 struct _T_r_e_e_P_a_t_h_C_o_n_c_a_t; │ │ │ │ +158 │ │ │ │ +159 template │ │ │ │ +160 [[deprecated("This function will be removed after Dune 2.11.")]] │ │ │ │ +_1_6_1 void _p_r_i_n_t___t_r_e_e___p_a_t_h(std::ostream& os) │ │ │ │ +162 {} │ │ │ │ +163 │ │ │ │ +164 template │ │ │ │ +165 [[deprecated("This function will be removed after Dune 2.11.")]] │ │ │ │ +_1_6_6 void _p_r_i_n_t___t_r_e_e___p_a_t_h(std::ostream& os) │ │ │ │ +167 { │ │ │ │ +168 os << k << " "; │ │ │ │ +169 _p_r_i_n_t___t_r_e_e___p_a_t_h(os); │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +173 │ │ │ │ +182 template │ │ │ │ +183 requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ +...)) │ │ │ │ +_1_8_4 [[nodiscard]] constexpr auto _m_a_k_e_T_r_e_e_P_a_t_h(const T... t) │ │ │ │ +185 { │ │ │ │ +186 return HybridMultiIndex(t...); │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +190 template │ │ │ │ +_1_9_1 [[nodiscard]] constexpr std::size_t _t_r_e_e_P_a_t_h_S_i_z_e(const │ │ │ │ +_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>&) │ │ │ │ +192 { │ │ │ │ +193 return sizeof...(T); │ │ │ │ +194 } │ │ │ │ +195 │ │ │ │ +197 │ │ │ │ +213 template │ │ │ │ +_2_1_4 [[nodiscard]] constexpr auto _t_r_e_e_P_a_t_h_E_n_t_r_y(const _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>& tp, │ │ │ │ +index_constant = {}) │ │ │ │ +215 { │ │ │ │ +216 return tp[index_constant{}]; │ │ │ │ +217 } │ │ │ │ +218 │ │ │ │ +220 │ │ │ │ +237 template │ │ │ │ +238 [[deprecated("This function will be removed after Dune 2.11. Use operator[] │ │ │ │ +instead.")]] │ │ │ │ +_2_3_9 [[nodiscard]] constexpr std::size_t _t_r_e_e_P_a_t_h_I_n_d_e_x(const │ │ │ │ +_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>& tp, index_constant = {}) │ │ │ │ +240 { │ │ │ │ +241 return tp[index_constant{}]; │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +244 template │ │ │ │ +_2_4_5 struct │ │ │ │ +246 [[deprecated("This class will be removed after Dune 2.11. Use the size() │ │ │ │ +member function instead.")]] │ │ │ │ +247 _T_r_e_e_P_a_t_h_S_i_z_e_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> > │ │ │ │ +248 : public index_constant │ │ │ │ +249 {}; │ │ │ │ +250 │ │ │ │ +251 │ │ │ │ +252 template │ │ │ │ +_2_5_3 struct │ │ │ │ +254 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ +push_back() function instead.")]] │ │ │ │ +255 _T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,k> │ │ │ │ +256 { │ │ │ │ +_2_5_7 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...,index_constant> _t_y_p_e; │ │ │ │ +258 }; │ │ │ │ +259 │ │ │ │ +260 template │ │ │ │ +_2_6_1 struct │ │ │ │ +262 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ +push_front() function instead.")]] │ │ │ │ +263 _T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,k> │ │ │ │ +264 { │ │ │ │ +_2_6_5 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...> _t_y_p_e; │ │ │ │ +266 }; │ │ │ │ +267 │ │ │ │ +268 template │ │ │ │ +_2_6_9 struct │ │ │ │ +270 [[deprecated("This class will be removed after Dune 2.11. Use the back() │ │ │ │ +member function instead.")]] │ │ │ │ +271 _T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>>> │ │ │ │ +272 : public index_constant │ │ │ │ +273 {}; │ │ │ │ +274 │ │ │ │ +275 template │ │ │ │ +_2_7_6 struct │ │ │ │ +277 [[deprecated("This class will be removed after Dune 2.11. Use the back() │ │ │ │ +member function instead.")]] │ │ │ │ +278 │ │ │ │ +_T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_j_>,index_constant,index_constant...>> │ │ │ │ +279 : public │ │ │ │ +_T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>> │ │ │ │ +280 {}; │ │ │ │ +281 │ │ │ │ +282 template │ │ │ │ +_2_8_3 struct │ │ │ │ +284 [[deprecated("This class will be removed after Dune 2.11. Use the front() │ │ │ │ +member function instead.")]] │ │ │ │ +285 _T_r_e_e_P_a_t_h_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>> │ │ │ │ +286 : public index_constant │ │ │ │ +287 {}; │ │ │ │ +288 │ │ │ │ +289 template │ │ │ │ +_2_9_0 struct │ │ │ │ +291 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ +pop_back() function instead.")]] │ │ │ │ +292 _T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>>,i...> │ │ │ │ +293 { │ │ │ │ +_2_9_4 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> _t_y_p_e; │ │ │ │ +295 }; │ │ │ │ +296 │ │ │ │ +297 template │ │ │ │ +_3_0_1 struct │ │ │ │ +302 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ +pop_back() function instead.")]] │ │ │ │ +303 │ │ │ │ +_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_j_>,index_constant,index_constant...>,i...> │ │ │ │ +304 : public │ │ │ │ +_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>,i...,j> │ │ │ │ +305 {}; │ │ │ │ +306 │ │ │ │ +307 template │ │ │ │ +_3_0_8 struct │ │ │ │ +309 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ +pop_front() function instead.")]] │ │ │ │ +310 _T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...> > │ │ │ │ +311 { │ │ │ │ +_3_1_2 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> _t_y_p_e; │ │ │ │ +313 }; │ │ │ │ +314 │ │ │ │ +315 template │ │ │ │ +_3_1_6 struct │ │ │ │ +317 [[deprecated("This class will be removed after Dune 2.11. Use the free join │ │ │ │ +() function instead.")]] │ │ │ │ +318 │ │ │ │ +_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>...> │ │ │ │ +> │ │ │ │ +319 { │ │ │ │ +_3_2_0 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...,index_constant...> _t_y_p_e; │ │ │ │ +321 }; │ │ │ │ +322 │ │ │ │ +323 template │ │ │ │ +_3_2_4 using _S_t_a_t_i_c_T_r_e_e_P_a_t_h = _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_D_u_n_e_:_:_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>; │ │ │ │ +325 │ │ │ │ +327 │ │ │ │ +328 } // namespace TypeTree │ │ │ │ +329} //namespace Dune │ │ │ │ +330 │ │ │ │ +331 │ │ │ │ +332 │ │ │ │ +333#endif // DUNE_TYPETREE_TREEPATH_HH │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y │ │ │ │ +constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< │ │ │ │ +i >={}) │ │ │ │ +Returns a copy of the i-th element of the HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:214 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ +constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ +Returns the size (number of components) of the given HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_k_e_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto makeTreePath(const T... t) │ │ │ │ +helper function to construct a new HybridTreePath from the given indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:184 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto hybridTreePath(const T &... t) │ │ │ │ +Constructs a new HybridTreePath from the given indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ A type for representing tree paths that supports both compile time and run time │ │ │ │ indices. │ │ │ │ DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_I_n_d_e_x │ │ │ │ +constexpr std::size_t treePathIndex(const HybridTreePath< T... > &tp, │ │ │ │ +index_constant< i >={}) │ │ │ │ +Returns the index value of the i-th element of the HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:239 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_e_e_P_a_t_h │ │ │ │ +HybridTreePath< Dune::index_constant< i >... > StaticTreePath │ │ │ │ +DDeeffiinniittiioonn treepath.hh:324 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h │ │ │ │ +void print_tree_path(std::ostream &os) │ │ │ │ +DDeeffiinniittiioonn treepath.hh:161 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto isTreePath(const T &) -> IsTreePath< T > │ │ │ │ -Check if given object represents a tree path. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:193 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r │ │ │ │ -T * declptr() │ │ │ │ -Helper function for generating a pointer to a value of type T in an unevaluated │ │ │ │ -operand setting. │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:150 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto isTreePath(void *) -> std::false_type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:155 │ │ │ │ -_D_u_n_e_:_:_f_i_r_s_t___t_y_p_e │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:21 │ │ │ │ -_D_u_n_e_:_:_f_i_r_s_t___t_y_p_e_<_ _T_0_,_ _T_._._._ _>_:_:_t_y_p_e │ │ │ │ -T0 type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:26 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:33 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_v_a_l_u_e │ │ │ │ -static constexpr bool value │ │ │ │ -True if class T defines a NodeTag. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:43 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_t_e_s_t │ │ │ │ -static yes test(NodeTag< X > *) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_t_e_s_t │ │ │ │ -static no test(...) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_y_e_s │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:34 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ -char dummy[1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:34 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_n_o │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:35 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ -char dummy[2] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:35 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:48 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ -static maybe< std::is_base_of< V, NodeTag< X > >::value > test(NodeTag< X > *a) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ -static constexpr bool value │ │ │ │ -True if class T defines a NodeTag of type V. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:61 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ -static no test(...) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e_:_:_d_u_m_m_y │ │ │ │ -char dummy[N+1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_y_e_s │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:51 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ -char dummy[2] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:51 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_n_o │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:52 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ -char dummy[1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:52 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:66 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_t_e_s_t │ │ │ │ -static yes test(ImplementationTag< X > *) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_t_e_s_t │ │ │ │ -static no test(...) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_v_a_l_u_e │ │ │ │ -static constexpr bool value │ │ │ │ -True if class T defines an ImplementationTag. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:76 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_y_e_s │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:67 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ -char dummy[1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:67 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_n_o │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:68 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ -char dummy[2] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:68 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:81 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ -static maybe< std::is_base_of< V, ImplementationTag< X > >::value > test │ │ │ │ -(ImplementationTag< X > *a) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ -static no test(...) │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ -static constexpr bool value │ │ │ │ -True if class T defines an ImplementationTag of type V. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:94 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e_:_:_d_u_m_m_y │ │ │ │ -char dummy[N+1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_y_e_s │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:84 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ -char dummy[2] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:84 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_n_o │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:85 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ -char dummy[1] │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:85 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:99 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d_:_:_t_y_p_e │ │ │ │ -void type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:100 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ -Marker tag declaring a meta function. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:123 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e │ │ │ │ -Helper meta function to delay evaluation of F. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:128 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e_:_:_t_y_p_e │ │ │ │ -F::type type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:129 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y │ │ │ │ -Identity function. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:135 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ -F type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:136 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ -Meta function that evaluates its argument iff it inherits from meta_function. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:142 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ -std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F │ │ │ │ ->, lazy_identity< F > >::type::type type │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:147 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ -Check if type represents a tree path. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ +DDeeffiinniittiioonn treepath.hh:107 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ +Type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c │ │ │ │ +@ fullyStatic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ +@ dynamic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ +DDeeffiinniittiioonn treepath.hh:115 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k │ │ │ │ +DDeeffiinniittiioonn treepath.hh:121 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t │ │ │ │ +DDeeffiinniittiioonn treepath.hh:127 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k │ │ │ │ +DDeeffiinniittiioonn treepath.hh:133 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_F_r_o_n_t │ │ │ │ +DDeeffiinniittiioonn treepath.hh:139 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k │ │ │ │ +DDeeffiinniittiioonn treepath.hh:145 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t │ │ │ │ +DDeeffiinniittiioonn treepath.hh:151 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t │ │ │ │ +DDeeffiinniittiioonn treepath.hh:157 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_,_ _k │ │ │ │ +_>_:_:_t_y_p_e │ │ │ │ +HybridTreePath< index_constant< i >..., index_constant< k > > type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:257 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_,_ _k │ │ │ │ +_>_:_:_t_y_p_e │ │ │ │ +HybridTreePath< index_constant< k >, index_constant< i >... > type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:265 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_ _>_,_ _i_._._. │ │ │ │ +_>_:_:_t_y_p_e │ │ │ │ +HybridTreePath< index_constant< i >... > type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:294 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ +_i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _>_:_:_t_y_p_e │ │ │ │ +HybridTreePath< index_constant< i >... > type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:312 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_, │ │ │ │ +_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_._._._ _>_ _>_:_:_t_y_p_e │ │ │ │ +HybridTreePath< index_constant< i >..., index_constant< k >... > type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:320 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00020.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: treepath.hh File Reference │ │ │ +dune-typetree: nodeinterface.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -75,86 +75,51 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Typedefs | │ │ │ -Enumerations | │ │ │ Functions
│ │ │ -
treepath.hh File Reference
│ │ │ +
nodeinterface.hh File Reference
│ │ │
│ │ │
│ │ │
#include <cstddef>
│ │ │ -#include <cassert>
│ │ │ -#include <iostream>
│ │ │ #include <type_traits>
│ │ │ #include <dune/common/documentation.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ -#include <dune/common/typetree/treepath.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::TreePathSize< HybridTreePath< index_constant< i >... > >
struct  Dune::TypeTree::TreePathPushBack< HybridTreePath< index_constant< i >... >, k >
struct  Dune::TypeTree::TreePathPushFront< HybridTreePath< index_constant< i >... >, k >
struct  Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< k > > >
struct  Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... > >
struct  Dune::TypeTree::TreePathFront< HybridTreePath< index_constant< k >, index_constant< i >... > >
struct  Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< k > >, i... >
struct  Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... >, i... >
struct  Dune::TypeTree::TreePathPopFront< HybridTreePath< index_constant< k >, index_constant< i >... > >
struct  Dune::TypeTree::TreePathConcat< HybridTreePath< index_constant< i >... >, HybridTreePath< index_constant< k >... > >
struct  Dune::TypeTree::NodeInterface
 Interface for nodes in a dune-typetree. More...
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::TreePathType
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ Typedefs

template<typename... T>
using Dune::TypeTree::HybridTreePath = Dune::HybridMultiIndex<T...>
 A type for representing tree paths that supports both compile time and run time indices.
template<std::size_t... i>
using Dune::TypeTree::StaticTreePath = HybridTreePath<Dune::index_constant<i>...>
│ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -Enumerations

enum  Dune::TypeTree::TreePathType::Type { Dune::TypeTree::TreePathType::fullyStatic │ │ │ -, Dune::TypeTree::TreePathType::dynamic │ │ │ - }
template<typename Node>
using Dune::TypeTree::NodeTag = typename std::decay_t<Node>::NodeTag
 Returns the node tag of the given Node.
template<typename T>
using Dune::TypeTree::ImplementationTag = typename std::decay_t<T>::ImplementationTag
 Returns the implementation tag of the given Node.
template<typename Node>
using Dune::TypeTree::StaticDegree = decltype(Node::degree())
 Returns the statically known degree of the given Node type as a std::integral_constant.
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename... T>
│ │ │ -requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
constexpr auto Dune::TypeTree::hybridTreePath (const T &... t)
 Constructs a new HybridTreePath from the given indices.
template<std::size_t... i>
void Dune::TypeTree::print_tree_path (std::ostream &os)
template<std::size_t k, std::size_t... i>
void Dune::TypeTree::print_tree_path (std::ostream &os)
template<typename... T>
│ │ │ -requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
constexpr auto Dune::TypeTree::makeTreePath (const T... t)
 helper function to construct a new HybridTreePath from the given indices.
template<typename... T>
constexpr std::size_t Dune::TypeTree::treePathSize (const HybridTreePath< T... > &)
 Returns the size (number of components) of the given HybridTreePath.
template<std::size_t i, typename... T>
constexpr auto Dune::TypeTree::treePathEntry (const HybridTreePath< T... > &tp, index_constant< i >={})
 Returns a copy of the i-th element of the HybridTreePath.
template<std::size_t i, typename... T>
constexpr std::size_t Dune::TypeTree::treePathIndex (const HybridTreePath< T... > &tp, index_constant< i >={})
 Returns the index value of the i-th element of the HybridTreePath.
template<typename Node>
std::size_t Dune::TypeTree::degree (const Node &node)
 Returns the degree of node as run time information.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,85 +1,36 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -treepath.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +nodeinterface.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ #include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_S_i_z_e_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _> │ │ │ │ - _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i │ │ │ │ - _>_._._._ _>_,_ _k_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i │ │ │ │ - _>_._._._ _>_,_ _k_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_ _>_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _j_ _>_, │ │ │ │ - _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_,_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _l_ _>_._._._ _>_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ - _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _> │ │ │ │ - _>_,_ _i_._._._ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _j_ _>_, │ │ │ │ - _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_,_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _l_ _>_._._._ _>_,_ _i_._._._ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ - _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._. │ │ │ │ - _>_,_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_._._._ _>_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ +  Interface for nodes in a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h = Dune::HybridMultiIndex │ │ │ │ -  A type for representing tree paths that supports both compile time and │ │ │ │ - run time indices. │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_e_e_P_a_t_h = _H_y_b_r_i_d_T_r_e_e_P_a_t_h...> │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ -enum   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e { _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_: │ │ │ │ - _f_u_l_l_y_S_t_a_t_i_c , _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c } │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g = typename std::decay_t::NodeTag │ │ │ │ +  Returns the node tag of the given Node. │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g = typename std::decay_t:: │ │ │ │ + ImplementationTag │ │ │ │ +  Returns the implementation tag of the given Node. │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e = decltype(Node::degree()) │ │ │ │ +  Returns the statically known degree of the given Node type as a std:: │ │ │ │ + integral_constant. │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ -...)) │ │ │ │ - constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h (const T &... t) │ │ │ │ -  Constructs a new _H_y_b_r_i_d_T_r_e_e_P_a_t_h from the given indices. │ │ │ │ -template │ │ │ │ - void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h (std::ostream &os) │ │ │ │ -template │ │ │ │ - void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h (std::ostream &os) │ │ │ │ -template │ │ │ │ -requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ -...)) │ │ │ │ - constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_k_e_T_r_e_e_P_a_t_h (const T... t) │ │ │ │ -  helper function to construct a new _H_y_b_r_i_d_T_r_e_e_P_a_t_h from │ │ │ │ - the given indices. │ │ │ │ -template │ │ │ │ -constexpr std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< T... │ │ │ │ - > &) │ │ │ │ -  Returns the size (number of components) of the given │ │ │ │ - _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ -template │ │ │ │ - constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< │ │ │ │ - T... > &tp, index_constant< i >={}) │ │ │ │ -  Returns a copy of the i-th element of the │ │ │ │ - _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ -template │ │ │ │ -constexpr std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_I_n_d_e_x (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< │ │ │ │ - T... > &tp, index_constant< i >={}) │ │ │ │ -  Returns the index value of the i-th element of the │ │ │ │ - _H_y_b_r_i_d_T_r_e_e_P_a_t_h. │ │ │ │ +template │ │ │ │ +std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_g_r_e_e (const Node &node) │ │ │ │ +  Returns the degree of node as run time information. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00020_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: treepath.hh Source File │ │ │ +dune-typetree: nodeinterface.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,317 +71,102 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
treepath.hh
│ │ │ +
nodeinterface.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=8 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TREEPATH_HH
│ │ │ -
7#define DUNE_TYPETREE_TREEPATH_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │ +
7#define DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │
8
│ │ │
9#include <cstddef>
│ │ │ -
10#include <cassert>
│ │ │ -
11#include <iostream>
│ │ │ -
12#include <type_traits>
│ │ │ +
10#include <type_traits>
│ │ │ +
11
│ │ │ +
12#include <dune/common/documentation.hh>
│ │ │
13
│ │ │ -
14#include <dune/common/documentation.hh>
│ │ │ -
15#include <dune/common/typetraits.hh>
│ │ │ -
16#include <dune/common/indices.hh>
│ │ │ -
17
│ │ │ -
18#include <dune/common/typetree/treepath.hh>
│ │ │ -
19
│ │ │ -
20
│ │ │ -
21namespace Dune {
│ │ │ -
22 namespace TypeTree {
│ │ │ -
23
│ │ │ -
24 // The Impl namespace collects some free standing functions helper functions
│ │ │ -
25 namespace Impl {
│ │ │ -
26
│ │ │ -
27 template<class T>
│ │ │ -
28 constexpr bool isHybridSizeT()
│ │ │ -
29 {
│ │ │ -
30 if constexpr (std::is_same_v<T, std::size_t>)
│ │ │ -
31 return true;
│ │ │ -
32 else
│ │ │ -
33 {
│ │ │ -
34 if constexpr (requires { T::value; })
│ │ │ -
35 return std::is_same_v<T, std::integral_constant<std::size_t, T::value>>;
│ │ │ -
36 else
│ │ │ -
37 return false;
│ │ │ -
38 }
│ │ │ -
39 }
│ │ │ -
40
│ │ │ -
41 template<class T>
│ │ │ -
42 constexpr auto castToHybridSizeT(T t)
│ │ │ -
43 {
│ │ │ -
44 if constexpr (Dune::IsIntegralConstant<T>::value)
│ │ │ -
45 {
│ │ │ -
46 using VT = typename T::value_type;
│ │ │ -
47 static_assert(
│ │ │ -
48 std::is_convertible_v<VT,std::size_t> &&
│ │ │ -
49 std::is_integral_v<VT> &&
│ │ │ -
50 T::value >= 0,
│ │ │ -
51 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ -
52 return std::integral_constant<std::size_t, T::value>{};
│ │ │ -
53 } else {
│ │ │ -
54 static_assert(
│ │ │ -
55 std::is_convertible_v<T,std::size_t> &&
│ │ │ -
56 std::is_integral_v<T>,
│ │ │ -
57 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ -
58 assert(t >= 0 &&
│ │ │ -
59 "HybridTreePath indices must be convertible to std::size_t or std::integral_constant<std::size_t,v>");
│ │ │ -
60 return std::size_t(t);
│ │ │ -
61 }
│ │ │ -
62 }
│ │ │ -
63
│ │ │ -
64 }
│ │ │ -
65
│ │ │ -
69
│ │ │ +
14namespace Dune {
│ │ │ +
15 namespace TypeTree {
│ │ │ +
16
│ │ │ +
21
│ │ │ +
│ │ │ + │ │ │ +
35 {
│ │ │ +
37 static const bool isLeaf = implementationDefined;
│ │ │ +
38
│ │ │ +
40 static const bool isPower = implementationDefined;
│ │ │ +
41
│ │ │ +
43 static const bool isComposite = implementationDefined;
│ │ │ +
44
│ │ │ +
46
│ │ │ +
51 static auto degree();
│ │ │ +
52
│ │ │ +
54
│ │ │ +
59 typedef ImplementationDefined NodeTag;
│ │ │ +
60
│ │ │ +
62
│ │ │ +
65 typedef ImplementationDefined NodeStorage;
│ │ │ +
66 };
│ │ │ +
│ │ │ +
67
│ │ │ +
69 template<typename Node>
│ │ │ +
70 using NodeTag = typename std::decay_t<Node>::NodeTag;
│ │ │
71
│ │ │ -
84 template<typename... T>
│ │ │ -
85 using HybridTreePath = Dune::HybridMultiIndex<T...>;
│ │ │ -
86
│ │ │ -
88
│ │ │ -
100 template<typename... T>
│ │ │ -
101 requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
│ │ │ -
│ │ │ -
102 [[nodiscard]] constexpr auto hybridTreePath(const T&... t)
│ │ │ -
103 {
│ │ │ -
104 return HybridMultiIndex(t...);
│ │ │ -
105 }
│ │ │ -
│ │ │ -
106
│ │ │ -
│ │ │ -
107 namespace TreePathType {
│ │ │ - │ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
114 template<typename>
│ │ │ - │ │ │ -
116
│ │ │ -
120 template<typename,std::size_t>
│ │ │ - │ │ │ -
122
│ │ │ -
126 template<typename,std::size_t>
│ │ │ - │ │ │ -
128
│ │ │ -
132 template<typename>
│ │ │ - │ │ │ -
134
│ │ │ -
138 template<typename>
│ │ │ - │ │ │ -
140
│ │ │ -
144 template<typename, std::size_t...>
│ │ │ - │ │ │ -
146
│ │ │ -
150 template<typename>
│ │ │ - │ │ │ -
152
│ │ │ -
156 template<typename, typename>
│ │ │ - │ │ │ -
158
│ │ │ -
159 template<std::size_t... i>
│ │ │ -
160 [[deprecated("This function will be removed after Dune 2.11.")]]
│ │ │ -
│ │ │ -
161 void print_tree_path(std::ostream& os)
│ │ │ -
162 {}
│ │ │ -
│ │ │ -
163
│ │ │ -
164 template<std::size_t k, std::size_t... i>
│ │ │ -
165 [[deprecated("This function will be removed after Dune 2.11.")]]
│ │ │ -
│ │ │ -
166 void print_tree_path(std::ostream& os)
│ │ │ -
167 {
│ │ │ -
168 os << k << " ";
│ │ │ -
169 print_tree_path<i...>(os);
│ │ │ -
170 }
│ │ │ -
│ │ │ -
171
│ │ │ -
173
│ │ │ -
182 template<typename... T>
│ │ │ -
183 requires (((std::is_integral_v<T> or Dune::IsIntegralConstant<T>::value) && ...))
│ │ │ -
│ │ │ -
184 [[nodiscard]] constexpr auto makeTreePath(const T... t)
│ │ │ -
185 {
│ │ │ -
186 return HybridMultiIndex(t...);
│ │ │ -
187 }
│ │ │ -
│ │ │ -
188
│ │ │ -
190 template<typename... T>
│ │ │ -
│ │ │ -
191 [[nodiscard]] constexpr std::size_t treePathSize(const HybridTreePath<T...>&)
│ │ │ -
192 {
│ │ │ -
193 return sizeof...(T);
│ │ │ -
194 }
│ │ │ -
│ │ │ -
195
│ │ │ -
197
│ │ │ -
213 template<std::size_t i, typename... T>
│ │ │ -
│ │ │ -
214 [[nodiscard]] constexpr auto treePathEntry(const HybridTreePath<T...>& tp, index_constant<i> = {})
│ │ │ -
215 {
│ │ │ -
216 return tp[index_constant<i>{}];
│ │ │ -
217 }
│ │ │ -
│ │ │ -
218
│ │ │ -
220
│ │ │ -
237 template<std::size_t i,typename... T>
│ │ │ -
238 [[deprecated("This function will be removed after Dune 2.11. Use operator[] instead.")]]
│ │ │ -
│ │ │ -
239 [[nodiscard]] constexpr std::size_t treePathIndex(const HybridTreePath<T...>& tp, index_constant<i> = {})
│ │ │ -
240 {
│ │ │ -
241 return tp[index_constant<i>{}];
│ │ │ -
242 }
│ │ │ -
│ │ │ -
243
│ │ │ -
244 template<std::size_t... i>
│ │ │ -
│ │ │ -
245 struct
│ │ │ -
246 [[deprecated("This class will be removed after Dune 2.11. Use the size() member function instead.")]]
│ │ │ - │ │ │ -
248 : public index_constant<sizeof...(i)>
│ │ │ -
249 {};
│ │ │ -
│ │ │ -
250
│ │ │ -
251
│ │ │ -
252 template<std::size_t k, std::size_t... i>
│ │ │ -
│ │ │ -
253 struct
│ │ │ -
254 [[deprecated("This class will be removed after Dune 2.11. Use the free push_back() function instead.")]]
│ │ │ - │ │ │ -
256 {
│ │ │ -
257 typedef HybridTreePath<index_constant<i>...,index_constant<k>> type;
│ │ │ -
258 };
│ │ │ -
│ │ │ -
259
│ │ │ -
260 template<std::size_t k, std::size_t... i>
│ │ │ -
│ │ │ -
261 struct
│ │ │ -
262 [[deprecated("This class will be removed after Dune 2.11. Use the free push_front() function instead.")]]
│ │ │ - │ │ │ -
264 {
│ │ │ -
265 typedef HybridTreePath<index_constant<k>,index_constant<i>...> type;
│ │ │ -
266 };
│ │ │ -
│ │ │ -
267
│ │ │ -
268 template<std::size_t k>
│ │ │ -
│ │ │ -
269 struct
│ │ │ -
270 [[deprecated("This class will be removed after Dune 2.11. Use the back() member function instead.")]]
│ │ │ - │ │ │ -
272 : public index_constant<k>
│ │ │ -
273 {};
│ │ │ -
│ │ │ -
274
│ │ │ -
275 template<std::size_t j, std::size_t k, std::size_t... l>
│ │ │ -
│ │ │ -
276 struct
│ │ │ -
277 [[deprecated("This class will be removed after Dune 2.11. Use the back() member function instead.")]]
│ │ │ -
278 TreePathBack<HybridTreePath<index_constant<j>,index_constant<k>,index_constant<l>...>>
│ │ │ -
279 : public TreePathBack<HybridTreePath<index_constant<k>,index_constant<l>...>>
│ │ │ -
280 {};
│ │ │ -
│ │ │ -
281
│ │ │ -
282 template<std::size_t k, std::size_t... i>
│ │ │ -
│ │ │ -
283 struct
│ │ │ -
284 [[deprecated("This class will be removed after Dune 2.11. Use the front() member function instead.")]]
│ │ │ - │ │ │ -
286 : public index_constant<k>
│ │ │ -
287 {};
│ │ │ -
│ │ │ -
288
│ │ │ -
289 template<std::size_t k, std::size_t... i>
│ │ │ -
│ │ │ -
290 struct
│ │ │ -
291 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_back() function instead.")]]
│ │ │ - │ │ │ -
293 {
│ │ │ - │ │ │ -
295 };
│ │ │ -
│ │ │ -
296
│ │ │ -
297 template<std::size_t j,
│ │ │ -
298 std::size_t k,
│ │ │ -
299 std::size_t... l,
│ │ │ -
300 std::size_t... i>
│ │ │ -
│ │ │ -
301 struct
│ │ │ -
302 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_back() function instead.")]]
│ │ │ -
303 TreePathPopBack<HybridTreePath<index_constant<j>,index_constant<k>,index_constant<l>...>,i...>
│ │ │ -
304 : public TreePathPopBack<HybridTreePath<index_constant<k>,index_constant<l>...>,i...,j>
│ │ │ -
305 {};
│ │ │ -
│ │ │ -
306
│ │ │ -
307 template<std::size_t k, std::size_t... i>
│ │ │ -
│ │ │ -
308 struct
│ │ │ -
309 [[deprecated("This class will be removed after Dune 2.11. Use the free pop_front() function instead.")]]
│ │ │ - │ │ │ -
311 {
│ │ │ - │ │ │ -
313 };
│ │ │ -
│ │ │ -
314
│ │ │ -
315 template<std::size_t... i, std::size_t... k>
│ │ │ -
│ │ │ -
316 struct
│ │ │ -
317 [[deprecated("This class will be removed after Dune 2.11. Use the free join() function instead.")]]
│ │ │ - │ │ │ -
319 {
│ │ │ -
320 typedef HybridTreePath<index_constant<i>...,index_constant<k>...> type;
│ │ │ -
321 };
│ │ │ -
│ │ │ -
322
│ │ │ -
323 template<std::size_t... i>
│ │ │ - │ │ │ -
325
│ │ │ -
327
│ │ │ -
328 } // namespace TypeTree
│ │ │ -
329} //namespace Dune
│ │ │ -
330
│ │ │ -
331
│ │ │ -
332
│ │ │ -
333#endif // DUNE_TYPETREE_TREEPATH_HH
│ │ │ -
constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns a copy of the i-th element of the HybridTreePath.
Definition treepath.hh:214
│ │ │ -
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │ -
constexpr auto makeTreePath(const T... t)
helper function to construct a new HybridTreePath from the given indices.
Definition treepath.hh:184
│ │ │ -
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │ -
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │ -
constexpr std::size_t treePathIndex(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns the index value of the i-th element of the HybridTreePath.
Definition treepath.hh:239
│ │ │ -
HybridTreePath< Dune::index_constant< i >... > StaticTreePath
Definition treepath.hh:324
│ │ │ -
void print_tree_path(std::ostream &os)
Definition treepath.hh:161
│ │ │ +
73 template<typename T>
│ │ │ +
74 using ImplementationTag = typename std::decay_t<T>::ImplementationTag;
│ │ │ +
75
│ │ │ +
76
│ │ │ +
78 template<typename Node>
│ │ │ +
│ │ │ +
79 std::size_t degree(const Node& node)
│ │ │ +
80 {
│ │ │ +
81 return degree(&node,NodeTag<Node>());
│ │ │ +
82 }
│ │ │ +
│ │ │ +
83
│ │ │ +
84#ifndef DOXYGEN
│ │ │ +
85
│ │ │ +
87
│ │ │ +
93 template<typename Node, typename NodeTag>
│ │ │ +
94 std::size_t degree(const Node* node, NodeTag)
│ │ │ +
95 {
│ │ │ +
96 return node->degree();
│ │ │ +
97 }
│ │ │ +
98
│ │ │ +
99#endif // DOXYGEN
│ │ │ +
100
│ │ │ +
102
│ │ │ +
106 template<typename Node>
│ │ │ +
107 using StaticDegree = decltype(Node::degree());
│ │ │ +
108
│ │ │ +
110
│ │ │ +
111 } // namespace TypeTree
│ │ │ +
112} //namespace Dune
│ │ │ +
113
│ │ │ +
114#endif // DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │ +
std::size_t degree(const Node &node)
Returns the degree of node as run time information.
Definition nodeinterface.hh:79
│ │ │ +
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition nodeinterface.hh:74
│ │ │ +
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │ +
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition treepath.hh:107
│ │ │ -
Type
Definition treepath.hh:108
│ │ │ -
@ fullyStatic
Definition treepath.hh:108
│ │ │ -
@ dynamic
Definition treepath.hh:108
│ │ │ -
Definition treepath.hh:115
│ │ │ -
Definition treepath.hh:121
│ │ │ -
Definition treepath.hh:127
│ │ │ -
Definition treepath.hh:133
│ │ │ -
Definition treepath.hh:139
│ │ │ -
Definition treepath.hh:145
│ │ │ -
Definition treepath.hh:151
│ │ │ -
Definition treepath.hh:157
│ │ │ -
HybridTreePath< index_constant< i >..., index_constant< k > > type
Definition treepath.hh:257
│ │ │ -
HybridTreePath< index_constant< k >, index_constant< i >... > type
Definition treepath.hh:265
│ │ │ -
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:294
│ │ │ -
HybridTreePath< index_constant< i >... > type
Definition treepath.hh:312
│ │ │ -
HybridTreePath< index_constant< i >..., index_constant< k >... > type
Definition treepath.hh:320
│ │ │ +
Interface for nodes in a dune-typetree.
Definition nodeinterface.hh:35
│ │ │ +
static auto degree()
Number of children of this node in the dune-typetree.
│ │ │ +
static const bool isPower
Whether this is a power node in the dune-typetree.
Definition nodeinterface.hh:40
│ │ │ +
static const bool isLeaf
Whether this is a leaf node in a dune-typetree.
Definition nodeinterface.hh:37
│ │ │ +
ImplementationDefined NodeStorage
container type to pass around a collection of children
Definition nodeinterface.hh:65
│ │ │ +
static const bool isComposite
Whether this is a composite node in the dune-typetree.
Definition nodeinterface.hh:43
│ │ │ +
ImplementationDefined NodeTag
The type tag that describes what kind of node this is.
Definition nodeinterface.hh:59
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,358 +1,127 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -treepath.hh │ │ │ │ +nodeinterface.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TREEPATH_HH │ │ │ │ -7#define DUNE_TYPETREE_TREEPATH_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ +7#define DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ 8 │ │ │ │ 9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12#include │ │ │ │ 13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18#include │ │ │ │ -19 │ │ │ │ -20 │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ -22 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -23 │ │ │ │ -24 // The Impl namespace collects some free standing functions helper functions │ │ │ │ -25 namespace Impl { │ │ │ │ -26 │ │ │ │ -27 template │ │ │ │ -28 constexpr bool isHybridSizeT() │ │ │ │ -29 { │ │ │ │ -30 if constexpr (std::is_same_v) │ │ │ │ -31 return true; │ │ │ │ -32 else │ │ │ │ -33 { │ │ │ │ -34 if constexpr (requires { T::value; }) │ │ │ │ -35 return std::is_same_v>; │ │ │ │ -36 else │ │ │ │ -37 return false; │ │ │ │ -38 } │ │ │ │ -39 } │ │ │ │ -40 │ │ │ │ -41 template │ │ │ │ -42 constexpr auto castToHybridSizeT(T t) │ │ │ │ -43 { │ │ │ │ -44 if constexpr (Dune::IsIntegralConstant::value) │ │ │ │ -45 { │ │ │ │ -46 using VT = typename T::value_type; │ │ │ │ -47 static_assert( │ │ │ │ -48 std::is_convertible_v && │ │ │ │ -49 std::is_integral_v && │ │ │ │ -50 T::value >= 0, │ │ │ │ -51 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ -integral_constant"); │ │ │ │ -52 return std::integral_constant{}; │ │ │ │ -53 } else { │ │ │ │ -54 static_assert( │ │ │ │ -55 std::is_convertible_v && │ │ │ │ -56 std::is_integral_v, │ │ │ │ -57 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ -integral_constant"); │ │ │ │ -58 assert(t >= 0 && │ │ │ │ -59 "HybridTreePath indices must be convertible to std::size_t or std:: │ │ │ │ -integral_constant"); │ │ │ │ -60 return std::size_t(t); │ │ │ │ -61 } │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -64 } │ │ │ │ -65 │ │ │ │ -69 │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ +15 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +16 │ │ │ │ +21 │ │ │ │ +_3_4 struct _N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ +35 { │ │ │ │ +_3_7 static const bool _i_s_L_e_a_f = implementationDefined; │ │ │ │ +38 │ │ │ │ +_4_0 static const bool _i_s_P_o_w_e_r = implementationDefined; │ │ │ │ +41 │ │ │ │ +_4_3 static const bool _i_s_C_o_m_p_o_s_i_t_e = implementationDefined; │ │ │ │ +44 │ │ │ │ +46 │ │ │ │ +_5_1 static auto _d_e_g_r_e_e(); │ │ │ │ +52 │ │ │ │ +54 │ │ │ │ +_5_9 typedef ImplementationDefined _N_o_d_e_T_a_g; │ │ │ │ +60 │ │ │ │ +62 │ │ │ │ +_6_5 typedef ImplementationDefined _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +66 }; │ │ │ │ +67 │ │ │ │ +69 template │ │ │ │ +_7_0 using _N_o_d_e_T_a_g = typename std::decay_t::NodeTag; │ │ │ │ 71 │ │ │ │ -84 template │ │ │ │ -_8_5 using _H_y_b_r_i_d_T_r_e_e_P_a_t_h = Dune::HybridMultiIndex; │ │ │ │ -86 │ │ │ │ -88 │ │ │ │ -100 template │ │ │ │ -101 requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ -...)) │ │ │ │ -_1_0_2 [[nodiscard]] constexpr auto _h_y_b_r_i_d_T_r_e_e_P_a_t_h(const T&... t) │ │ │ │ -103 { │ │ │ │ -104 return HybridMultiIndex(t...); │ │ │ │ -105 } │ │ │ │ -106 │ │ │ │ -_1_0_7 namespace _T_r_e_e_P_a_t_h_T_y_p_e { │ │ │ │ -_1_0_8 enum _T_y_p_e { _f_u_l_l_y_S_t_a_t_i_c, _d_y_n_a_m_i_c }; │ │ │ │ -109 } │ │ │ │ +73 template │ │ │ │ +_7_4 using _I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g = typename std::decay_t::ImplementationTag; │ │ │ │ +75 │ │ │ │ +76 │ │ │ │ +78 template │ │ │ │ +_7_9 std::size_t _d_e_g_r_e_e(const Node& node) │ │ │ │ +80 { │ │ │ │ +81 return _d_e_g_r_e_e(&node,_N_o_d_e_T_a_g_<_N_o_d_e_>()); │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +84#ifndef DOXYGEN │ │ │ │ +85 │ │ │ │ +87 │ │ │ │ +93 template │ │ │ │ +94 std::size_t _d_e_g_r_e_e(const Node* node, _N_o_d_e_T_a_g) │ │ │ │ +95 { │ │ │ │ +96 return node->degree(); │ │ │ │ +97 } │ │ │ │ +98 │ │ │ │ +99#endif // DOXYGEN │ │ │ │ +100 │ │ │ │ +102 │ │ │ │ +106 template │ │ │ │ +_1_0_7 using _S_t_a_t_i_c_D_e_g_r_e_e = decltype(Node::degree()); │ │ │ │ +108 │ │ │ │ 110 │ │ │ │ -114 template │ │ │ │ -_1_1_5 struct _T_r_e_e_P_a_t_h_S_i_z_e; │ │ │ │ -116 │ │ │ │ -120 template │ │ │ │ -_1_2_1 struct _T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k; │ │ │ │ -122 │ │ │ │ -126 template │ │ │ │ -_1_2_7 struct _T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t; │ │ │ │ -128 │ │ │ │ -132 template │ │ │ │ -_1_3_3 struct _T_r_e_e_P_a_t_h_B_a_c_k; │ │ │ │ -134 │ │ │ │ -138 template │ │ │ │ -_1_3_9 struct _T_r_e_e_P_a_t_h_F_r_o_n_t; │ │ │ │ -140 │ │ │ │ -144 template │ │ │ │ -_1_4_5 struct _T_r_e_e_P_a_t_h_P_o_p_B_a_c_k; │ │ │ │ -146 │ │ │ │ -150 template │ │ │ │ -_1_5_1 struct _T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t; │ │ │ │ -152 │ │ │ │ -156 template │ │ │ │ -_1_5_7 struct _T_r_e_e_P_a_t_h_C_o_n_c_a_t; │ │ │ │ -158 │ │ │ │ -159 template │ │ │ │ -160 [[deprecated("This function will be removed after Dune 2.11.")]] │ │ │ │ -_1_6_1 void _p_r_i_n_t___t_r_e_e___p_a_t_h(std::ostream& os) │ │ │ │ -162 {} │ │ │ │ -163 │ │ │ │ -164 template │ │ │ │ -165 [[deprecated("This function will be removed after Dune 2.11.")]] │ │ │ │ -_1_6_6 void _p_r_i_n_t___t_r_e_e___p_a_t_h(std::ostream& os) │ │ │ │ -167 { │ │ │ │ -168 os << k << " "; │ │ │ │ -169 _p_r_i_n_t___t_r_e_e___p_a_t_h(os); │ │ │ │ -170 } │ │ │ │ -171 │ │ │ │ -173 │ │ │ │ -182 template │ │ │ │ -183 requires (((std::is_integral_v or Dune::IsIntegralConstant::value) && │ │ │ │ -...)) │ │ │ │ -_1_8_4 [[nodiscard]] constexpr auto _m_a_k_e_T_r_e_e_P_a_t_h(const T... t) │ │ │ │ -185 { │ │ │ │ -186 return HybridMultiIndex(t...); │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ -190 template │ │ │ │ -_1_9_1 [[nodiscard]] constexpr std::size_t _t_r_e_e_P_a_t_h_S_i_z_e(const │ │ │ │ -_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>&) │ │ │ │ -192 { │ │ │ │ -193 return sizeof...(T); │ │ │ │ -194 } │ │ │ │ -195 │ │ │ │ -197 │ │ │ │ -213 template │ │ │ │ -_2_1_4 [[nodiscard]] constexpr auto _t_r_e_e_P_a_t_h_E_n_t_r_y(const _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>& tp, │ │ │ │ -index_constant = {}) │ │ │ │ -215 { │ │ │ │ -216 return tp[index_constant{}]; │ │ │ │ -217 } │ │ │ │ -218 │ │ │ │ -220 │ │ │ │ -237 template │ │ │ │ -238 [[deprecated("This function will be removed after Dune 2.11. Use operator[] │ │ │ │ -instead.")]] │ │ │ │ -_2_3_9 [[nodiscard]] constexpr std::size_t _t_r_e_e_P_a_t_h_I_n_d_e_x(const │ │ │ │ -_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_T_._._._>& tp, index_constant = {}) │ │ │ │ -240 { │ │ │ │ -241 return tp[index_constant{}]; │ │ │ │ -242 } │ │ │ │ -243 │ │ │ │ -244 template │ │ │ │ -_2_4_5 struct │ │ │ │ -246 [[deprecated("This class will be removed after Dune 2.11. Use the size() │ │ │ │ -member function instead.")]] │ │ │ │ -247 _T_r_e_e_P_a_t_h_S_i_z_e_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> > │ │ │ │ -248 : public index_constant │ │ │ │ -249 {}; │ │ │ │ -250 │ │ │ │ -251 │ │ │ │ -252 template │ │ │ │ -_2_5_3 struct │ │ │ │ -254 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ -push_back() function instead.")]] │ │ │ │ -255 _T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,k> │ │ │ │ -256 { │ │ │ │ -_2_5_7 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...,index_constant> _t_y_p_e; │ │ │ │ -258 }; │ │ │ │ -259 │ │ │ │ -260 template │ │ │ │ -_2_6_1 struct │ │ │ │ -262 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ -push_front() function instead.")]] │ │ │ │ -263 _T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,k> │ │ │ │ -264 { │ │ │ │ -_2_6_5 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...> _t_y_p_e; │ │ │ │ -266 }; │ │ │ │ -267 │ │ │ │ -268 template │ │ │ │ -_2_6_9 struct │ │ │ │ -270 [[deprecated("This class will be removed after Dune 2.11. Use the back() │ │ │ │ -member function instead.")]] │ │ │ │ -271 _T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>>> │ │ │ │ -272 : public index_constant │ │ │ │ -273 {}; │ │ │ │ -274 │ │ │ │ -275 template │ │ │ │ -_2_7_6 struct │ │ │ │ -277 [[deprecated("This class will be removed after Dune 2.11. Use the back() │ │ │ │ -member function instead.")]] │ │ │ │ -278 │ │ │ │ -_T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_j_>,index_constant,index_constant...>> │ │ │ │ -279 : public │ │ │ │ -_T_r_e_e_P_a_t_h_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>> │ │ │ │ -280 {}; │ │ │ │ -281 │ │ │ │ -282 template │ │ │ │ -_2_8_3 struct │ │ │ │ -284 [[deprecated("This class will be removed after Dune 2.11. Use the front() │ │ │ │ -member function instead.")]] │ │ │ │ -285 _T_r_e_e_P_a_t_h_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>> │ │ │ │ -286 : public index_constant │ │ │ │ -287 {}; │ │ │ │ -288 │ │ │ │ -289 template │ │ │ │ -_2_9_0 struct │ │ │ │ -291 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ -pop_back() function instead.")]] │ │ │ │ -292 _T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>>,i...> │ │ │ │ -293 { │ │ │ │ -_2_9_4 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> _t_y_p_e; │ │ │ │ -295 }; │ │ │ │ -296 │ │ │ │ -297 template │ │ │ │ -_3_0_1 struct │ │ │ │ -302 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ -pop_back() function instead.")]] │ │ │ │ -303 │ │ │ │ -_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_j_>,index_constant,index_constant...>,i...> │ │ │ │ -304 : public │ │ │ │ -_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...>,i...,j> │ │ │ │ -305 {}; │ │ │ │ -306 │ │ │ │ -307 template │ │ │ │ -_3_0_8 struct │ │ │ │ -309 [[deprecated("This class will be removed after Dune 2.11. Use the free │ │ │ │ -pop_front() function instead.")]] │ │ │ │ -310 _T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>,index_constant...> > │ │ │ │ -311 { │ │ │ │ -_3_1_2 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...> _t_y_p_e; │ │ │ │ -313 }; │ │ │ │ -314 │ │ │ │ -315 template │ │ │ │ -_3_1_6 struct │ │ │ │ -317 [[deprecated("This class will be removed after Dune 2.11. Use the free join │ │ │ │ -() function instead.")]] │ │ │ │ -318 │ │ │ │ -_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>,_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_k_>...> │ │ │ │ -> │ │ │ │ -319 { │ │ │ │ -_3_2_0 typedef _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...,index_constant...> _t_y_p_e; │ │ │ │ -321 }; │ │ │ │ -322 │ │ │ │ -323 template │ │ │ │ -_3_2_4 using _S_t_a_t_i_c_T_r_e_e_P_a_t_h = _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_D_u_n_e_:_:_i_n_d_e_x___c_o_n_s_t_a_n_t_<_i_>...>; │ │ │ │ -325 │ │ │ │ -327 │ │ │ │ -328 } // namespace TypeTree │ │ │ │ -329} //namespace Dune │ │ │ │ -330 │ │ │ │ -331 │ │ │ │ -332 │ │ │ │ -333#endif // DUNE_TYPETREE_TREEPATH_HH │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y │ │ │ │ -constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< │ │ │ │ -i >={}) │ │ │ │ -Returns a copy of the i-th element of the HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:214 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ -constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ -Returns the size (number of components) of the given HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_k_e_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto makeTreePath(const T... t) │ │ │ │ -helper function to construct a new HybridTreePath from the given indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:184 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto hybridTreePath(const T &... t) │ │ │ │ -Constructs a new HybridTreePath from the given indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ -Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ -A type for representing tree paths that supports both compile time and run time │ │ │ │ -indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_I_n_d_e_x │ │ │ │ -constexpr std::size_t treePathIndex(const HybridTreePath< T... > &tp, │ │ │ │ -index_constant< i >={}) │ │ │ │ -Returns the index value of the i-th element of the HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:239 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_e_e_P_a_t_h │ │ │ │ -HybridTreePath< Dune::index_constant< i >... > StaticTreePath │ │ │ │ -DDeeffiinniittiioonn treepath.hh:324 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_r_i_n_t___t_r_e_e___p_a_t_h │ │ │ │ -void print_tree_path(std::ostream &os) │ │ │ │ -DDeeffiinniittiioonn treepath.hh:161 │ │ │ │ +111 } // namespace TypeTree │ │ │ │ +112} //namespace Dune │ │ │ │ +113 │ │ │ │ +114#endif // DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_g_r_e_e │ │ │ │ +std::size_t degree(const Node &node) │ │ │ │ +Returns the degree of node as run time information. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:79 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g │ │ │ │ +typename std::decay_t< T >::ImplementationTag ImplementationTag │ │ │ │ +Returns the implementation tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:74 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ +decltype(Node::degree()) StaticDegree │ │ │ │ +Returns the statically known degree of the given Node type as a std:: │ │ │ │ +integral_constant. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ +typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ +Returns the node tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ -DDeeffiinniittiioonn treepath.hh:107 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ -Type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c │ │ │ │ -@ fullyStatic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ -@ dynamic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ -DDeeffiinniittiioonn treepath.hh:115 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k │ │ │ │ -DDeeffiinniittiioonn treepath.hh:121 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t │ │ │ │ -DDeeffiinniittiioonn treepath.hh:127 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_B_a_c_k │ │ │ │ -DDeeffiinniittiioonn treepath.hh:133 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_F_r_o_n_t │ │ │ │ -DDeeffiinniittiioonn treepath.hh:139 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k │ │ │ │ -DDeeffiinniittiioonn treepath.hh:145 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t │ │ │ │ -DDeeffiinniittiioonn treepath.hh:151 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t │ │ │ │ -DDeeffiinniittiioonn treepath.hh:157 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_,_ _k │ │ │ │ -_>_:_:_t_y_p_e │ │ │ │ -HybridTreePath< index_constant< i >..., index_constant< k > > type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:257 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_u_s_h_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_,_ _k │ │ │ │ -_>_:_:_t_y_p_e │ │ │ │ -HybridTreePath< index_constant< k >, index_constant< i >... > type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:265 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_B_a_c_k_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_ _>_,_ _i_._._. │ │ │ │ -_>_:_:_t_y_p_e │ │ │ │ -HybridTreePath< index_constant< i >... > type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:294 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_P_o_p_F_r_o_n_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_, │ │ │ │ -_i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_ _>_:_:_t_y_p_e │ │ │ │ -HybridTreePath< index_constant< i >... > type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:312 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_C_o_n_c_a_t_<_ _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _i_ _>_._._._ _>_, │ │ │ │ -_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_ _i_n_d_e_x___c_o_n_s_t_a_n_t_<_ _k_ _>_._._._ _>_ _>_:_:_t_y_p_e │ │ │ │ -HybridTreePath< index_constant< i >..., index_constant< k >... > type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:320 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ +Interface for nodes in a dune-typetree. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:35 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_d_e_g_r_e_e │ │ │ │ +static auto degree() │ │ │ │ +Number of children of this node in the dune-typetree. │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +Whether this is a power node in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:40 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +Whether this is a leaf node in a dune-typetree. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:37 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +ImplementationDefined NodeStorage │ │ │ │ +container type to pass around a collection of children │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:65 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +static const bool isComposite │ │ │ │ +Whether this is a composite node in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:43 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_N_o_d_e_T_a_g │ │ │ │ +ImplementationDefined NodeTag │ │ │ │ +The type tag that describes what kind of node this is. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:59 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00023.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: treecontainer.hh File Reference │ │ │ +dune-typetree: utility.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,20 +71,42 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
treecontainer.hh File Reference
│ │ │ +
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
utility.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/typetree/treecontainer.hh>
│ │ │ +
#include <memory>
│ │ │ +#include <tuple>
│ │ │ +#include <type_traits>
│ │ │ +#include <utility>
│ │ │ +#include <algorithm>
│ │ │ +#include <dune/common/shared_ptr.hh>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  Dune::TypeTree::TreeInfo< Tree, Tag >
 Struct for obtaining some basic structural information about a TypeTree. More...
│ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,27 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -treecontainer.hh File Reference │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +utility.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _T_a_g_ _> │ │ │ │ +  Struct for obtaining some basic structural information about a │ │ │ │ + _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00023_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: treecontainer.hh Source File │ │ │ +dune-typetree: utility.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,30 +71,240 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
treecontainer.hh
│ │ │ +
utility.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TREECONTAINER_HH
│ │ │ -
7#define DUNE_TYPETREE_TREECONTAINER_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_UTILITY_HH
│ │ │ +
7#define DUNE_TYPETREE_UTILITY_HH
│ │ │
8
│ │ │ -
9#include <dune/common/typetree/treecontainer.hh>
│ │ │ -
10
│ │ │ -
11#warning This header is deprecated and will be removed after 2.11. Use dune/common/typetree/treecontainer.hh instead.
│ │ │ -
12
│ │ │ -
13#endif // DUNE_TYPETREE_TREECONTAINER_HH
│ │ │ +
9#include <memory>
│ │ │ +
10#include <tuple>
│ │ │ +
11#include <type_traits>
│ │ │ +
12#include <utility>
│ │ │ +
13#include <algorithm>
│ │ │ +
14
│ │ │ +
15#include <dune/common/shared_ptr.hh>
│ │ │ +
16#include <dune/common/indices.hh>
│ │ │ + │ │ │ + │ │ │ +
19
│ │ │ +
20namespace Dune {
│ │ │ +
21 namespace TypeTree {
│ │ │ +
22
│ │ │ +
26
│ │ │ +
27#ifndef DOXYGEN
│ │ │ +
28
│ │ │ +
29 template<typename T>
│ │ │ +
30 std::shared_ptr<T> convert_arg(const T& t)
│ │ │ +
31 {
│ │ │ +
32 return std::make_shared<T>(t);
│ │ │ +
33 }
│ │ │ +
34
│ │ │ +
35 template<typename T>
│ │ │ +
36 std::shared_ptr<T> convert_arg(T& t)
│ │ │ +
37 {
│ │ │ +
38 return stackobject_to_shared_ptr(t);
│ │ │ +
39 }
│ │ │ +
40
│ │ │ +
41 template<typename BaseType, typename T>
│ │ │ +
42 T& assertGridViewType(T& t)
│ │ │ +
43 {
│ │ │ +
44 static_assert((std::is_same<typename BaseType::Traits::GridViewType,
│ │ │ +
45 typename T::Traits::GridViewType>::value),
│ │ │ +
46 "GridViewType must be equal in all components of composite type");
│ │ │ +
47 return t;
│ │ │ +
48 }
│ │ │ +
49
│ │ │ +
50 // only bind to real rvalues
│ │ │ +
51 template<typename T>
│ │ │ +
52 typename std::enable_if<!std::is_lvalue_reference<T>::value,std::shared_ptr<T> >::type convert_arg(T&& t)
│ │ │ +
53 {
│ │ │ +
54 return std::make_shared<T>(std::forward<T>(t));
│ │ │ +
55 }
│ │ │ +
56
│ │ │ +
57
│ │ │ +
58 namespace Experimental {
│ │ │ +
59
│ │ │ +
68 template<class BinaryOp, class Arg>
│ │ │ +
69 constexpr decltype(auto)
│ │ │ +
70 left_fold(const BinaryOp& binary_op, Arg&& arg)
│ │ │ +
71 {
│ │ │ +
72 return std::forward<Arg>(arg);
│ │ │ +
73 }
│ │ │ +
74
│ │ │ +
96 template<class BinaryOp, class Init, class Arg0, class... Args>
│ │ │ +
97 constexpr decltype(auto)
│ │ │ +
98 left_fold(const BinaryOp& binary_op, Init&& init, Arg0&& arg_0, Args&&... args)
│ │ │ +
99 {
│ │ │ +
100 return left_fold(
│ │ │ +
101 binary_op,
│ │ │ +
102 binary_op(std::forward<Init>(init), std::forward<Arg0>(arg_0)),
│ │ │ +
103 std::forward<Args>(args)...);
│ │ │ +
104 }
│ │ │ +
105
│ │ │ +
106 } // namespace Experimental
│ │ │ +
107
│ │ │ +
108
│ │ │ +
109#endif // DOXYGEN
│ │ │ +
110
│ │ │ +
112
│ │ │ +
119 template<typename Tree, typename Tag = StartTag>
│ │ │ +
│ │ │ +
120 struct TreeInfo
│ │ │ +
121 {
│ │ │ +
122
│ │ │ +
123 private:
│ │ │ +
124 // Start the tree traversal
│ │ │ +
125 typedef TreeInfo<Tree,NodeTag<Tree>> NodeInfo;
│ │ │ +
126
│ │ │ +
127 public:
│ │ │ +
128
│ │ │ +
130 static const std::size_t depth = NodeInfo::depth;
│ │ │ +
131
│ │ │ +
133 static const std::size_t nodeCount = NodeInfo::nodeCount;
│ │ │ +
134
│ │ │ +
136 static const std::size_t leafCount = NodeInfo::leafCount;
│ │ │ +
137
│ │ │ +
138 };
│ │ │ +
│ │ │ +
139
│ │ │ +
140
│ │ │ +
141#ifndef DOXYGEN
│ │ │ +
142
│ │ │ +
143 // ********************************************************************************
│ │ │ +
144 // TreeInfo specializations for the different node types
│ │ │ +
145 // ********************************************************************************
│ │ │ +
146
│ │ │ +
147
│ │ │ +
148 // leaf node
│ │ │ +
149 template<typename Node>
│ │ │ +
150 struct TreeInfo<Node,LeafNodeTag>
│ │ │ +
151 {
│ │ │ +
152
│ │ │ +
153 static const std::size_t depth = 1;
│ │ │ +
154
│ │ │ +
155 static const std::size_t nodeCount = 1;
│ │ │ +
156
│ │ │ +
157 static const std::size_t leafCount = 1;
│ │ │ +
158
│ │ │ +
159 };
│ │ │ +
160
│ │ │ +
161
│ │ │ +
162 // power node - exploit the fact that all children are identical
│ │ │ +
163 template<typename Node>
│ │ │ +
164 struct TreeInfo<Node,PowerNodeTag>
│ │ │ +
165 {
│ │ │ +
166
│ │ │ +
167 typedef TreeInfo<typename Node::ChildType,NodeTag<typename Node::ChildType>> ChildInfo;
│ │ │ +
168
│ │ │ +
169 static const std::size_t depth = 1 + ChildInfo::depth;
│ │ │ +
170
│ │ │ +
171 static const std::size_t nodeCount = 1 + StaticDegree<Node>::value * ChildInfo::nodeCount;
│ │ │ +
172
│ │ │ +
173 static const std::size_t leafCount = StaticDegree<Node>::value * ChildInfo::leafCount;
│ │ │ +
174
│ │ │ +
175 };
│ │ │ +
176
│ │ │ +
177
│ │ │ +
178 namespace {
│ │ │ +
179
│ │ │ +
180 // TMP for iterating over the children of a composite node
│ │ │ +
181 // identical for both composite node implementations
│ │ │ +
182 template<typename Node, std::size_t k, std::size_t n>
│ │ │ +
183 struct generic_compositenode_children_info
│ │ │ +
184 {
│ │ │ +
185
│ │ │ +
186 typedef generic_compositenode_children_info<Node,k+1,n> NextChild;
│ │ │ +
187
│ │ │ +
188 // extract child info
│ │ │ +
189 typedef typename Node::template Child<k>::Type Child;
│ │ │ +
190 typedef NodeTag<Child> ChildTag;
│ │ │ +
191 typedef TreeInfo<Child,ChildTag> ChildInfo;
│ │ │ +
192
│ │ │ +
193 // combine information of current child with info about following children
│ │ │ +
194 static const std::size_t maxDepth = ChildInfo::depth > NextChild::maxDepth ? ChildInfo::depth : NextChild::maxDepth;
│ │ │ +
195
│ │ │ +
196 static const std::size_t nodeCount = ChildInfo::nodeCount + NextChild::nodeCount;
│ │ │ +
197
│ │ │ +
198 static const std::size_t leafCount = ChildInfo::leafCount + NextChild::leafCount;
│ │ │ +
199
│ │ │ +
200 };
│ │ │ +
201
│ │ │ +
202 // End of recursion
│ │ │ +
203 template<typename Node, std::size_t n>
│ │ │ +
204 struct generic_compositenode_children_info<Node,n,n>
│ │ │ +
205 {
│ │ │ +
206 static const std::size_t maxDepth = 0;
│ │ │ +
207
│ │ │ +
208 static const std::size_t nodeCount = 0;
│ │ │ +
209
│ │ │ +
210 static const std::size_t leafCount = 0;
│ │ │ +
211 };
│ │ │ +
212
│ │ │ +
213 } // anonymous namespace
│ │ │ +
214
│ │ │ +
215
│ │ │ +
216 // Struct for building information about composite node
│ │ │ +
217 template<typename Node>
│ │ │ +
218 struct GenericCompositeNodeInfo
│ │ │ +
219 {
│ │ │ +
220
│ │ │ +
221 typedef generic_compositenode_children_info<Node,0,StaticDegree<Node>::value> Children;
│ │ │ +
222
│ │ │ +
223 static const std::size_t depth = 1 + Children::maxDepth;
│ │ │ +
224
│ │ │ +
225 static const std::size_t nodeCount = 1 + Children::nodeCount;
│ │ │ +
226
│ │ │ +
227 static const std::size_t leafCount = Children::leafCount;
│ │ │ +
228
│ │ │ +
229 };
│ │ │ +
230
│ │ │ +
231
│ │ │ +
232 // CompositeNode: delegate to GenericCompositeNodeInfo
│ │ │ +
233 template<typename Node>
│ │ │ +
234 struct TreeInfo<Node,CompositeNodeTag>
│ │ │ +
235 : public GenericCompositeNodeInfo<Node>
│ │ │ +
236 {};
│ │ │ +
237
│ │ │ +
238
│ │ │ +
239#endif // DOXYGEN
│ │ │ +
240
│ │ │ +
241
│ │ │ +
242 using Dune::index_constant;
│ │ │ +
243 namespace Indices = Dune::Indices;
│ │ │ +
244
│ │ │ +
246
│ │ │ +
247 } // namespace TypeTree
│ │ │ +
248} //namespace Dune
│ │ │ +
249
│ │ │ +
250#endif // DUNE_TYPETREE_UTILITY_HH
│ │ │ + │ │ │ + │ │ │ +
Definition accumulate_static.hh:17
│ │ │ +
Definition accumulate_static.hh:18
│ │ │ +
Definition accumulate_static.hh:576
│ │ │ +
auto leafCount(const Tree &tree)
The number of leaf nodes in the Tree.
Definition visitor.hh:532
│ │ │ +
auto nodeCount(const Tree &tree)
The total number of nodes in the Tree.
Definition visitor.hh:524
│ │ │ +
auto depth(const Tree &tree)
The depth of the TypeTree.
Definition visitor.hh:508
│ │ │ +
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ +
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ +
Struct for obtaining some basic structural information about a TypeTree.
Definition utility.hh:121
│ │ │ +
static const std::size_t leafCount
Definition utility.hh:136
│ │ │ +
static const std::size_t depth
Definition utility.hh:130
│ │ │ +
static const std::size_t nodeCount
Definition utility.hh:133
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,270 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -treecontainer.hh │ │ │ │ +utility.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ -7#define DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_UTILITY_HH │ │ │ │ +7#define DUNE_TYPETREE_UTILITY_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#warning This header is deprecated and will be removed after 2.11. Use dune/ │ │ │ │ -common/typetree/treecontainer.hh instead. │ │ │ │ -12 │ │ │ │ -13#endif // DUNE_TYPETREE_TREECONTAINER_HH │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +19 │ │ │ │ +20namespace _D_u_n_e { │ │ │ │ +21 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +22 │ │ │ │ +26 │ │ │ │ +27#ifndef DOXYGEN │ │ │ │ +28 │ │ │ │ +29 template │ │ │ │ +30 std::shared_ptr convert_arg(const T& t) │ │ │ │ +31 { │ │ │ │ +32 return std::make_shared(t); │ │ │ │ +33 } │ │ │ │ +34 │ │ │ │ +35 template │ │ │ │ +36 std::shared_ptr convert_arg(T& t) │ │ │ │ +37 { │ │ │ │ +38 return stackobject_to_shared_ptr(t); │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +41 template │ │ │ │ +42 T& assertGridViewType(T& t) │ │ │ │ +43 { │ │ │ │ +44 static_assert((std::is_same::value), │ │ │ │ +46 "GridViewType must be equal in all components of composite type"); │ │ │ │ +47 return t; │ │ │ │ +48 } │ │ │ │ +49 │ │ │ │ +50 // only bind to real rvalues │ │ │ │ +51 template │ │ │ │ +52 typename std::enable_if::value,std:: │ │ │ │ +shared_ptr >::type convert_arg(T&& t) │ │ │ │ +53 { │ │ │ │ +54 return std::make_shared(std::forward(t)); │ │ │ │ +55 } │ │ │ │ +56 │ │ │ │ +57 │ │ │ │ +58 namespace _E_x_p_e_r_i_m_e_n_t_a_l { │ │ │ │ +59 │ │ │ │ +68 template │ │ │ │ +69 constexpr decltype(auto) │ │ │ │ +70 left_fold(const BinaryOp& binary_op, Arg&& arg) │ │ │ │ +71 { │ │ │ │ +72 return std::forward(arg); │ │ │ │ +73 } │ │ │ │ +74 │ │ │ │ +96 template │ │ │ │ +97 constexpr decltype(auto) │ │ │ │ +98 left_fold(const BinaryOp& binary_op, Init&& init, Arg0&& arg_0, Args&&... │ │ │ │ +args) │ │ │ │ +99 { │ │ │ │ +100 return left_fold( │ │ │ │ +101 binary_op, │ │ │ │ +102 binary_op(std::forward(init), std::forward(arg_0)), │ │ │ │ +103 std::forward(args)...); │ │ │ │ +104 } │ │ │ │ +105 │ │ │ │ +106 } // namespace Experimental │ │ │ │ +107 │ │ │ │ +108 │ │ │ │ +109#endif // DOXYGEN │ │ │ │ +110 │ │ │ │ +112 │ │ │ │ +119 template │ │ │ │ +_1_2_0 struct _T_r_e_e_I_n_f_o │ │ │ │ +121 { │ │ │ │ +122 │ │ │ │ +123 private: │ │ │ │ +124 // Start the tree traversal │ │ │ │ +125 typedef _T_r_e_e_I_n_f_o_<_T_r_e_e_,_N_o_d_e_T_a_g_<_T_r_e_e_>> NodeInfo; │ │ │ │ +126 │ │ │ │ +127 public: │ │ │ │ +128 │ │ │ │ +_1_3_0 static const std::size_t _d_e_p_t_h = _N_o_d_e_I_n_f_o_:_:_d_e_p_t_h; │ │ │ │ +131 │ │ │ │ +_1_3_3 static const std::size_t _n_o_d_e_C_o_u_n_t = _N_o_d_e_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t; │ │ │ │ +134 │ │ │ │ +_1_3_6 static const std::size_t _l_e_a_f_C_o_u_n_t = _N_o_d_e_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t; │ │ │ │ +137 │ │ │ │ +138 }; │ │ │ │ +139 │ │ │ │ +140 │ │ │ │ +141#ifndef DOXYGEN │ │ │ │ +142 │ │ │ │ +143 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +144 // TreeInfo specializations for the different node types │ │ │ │ +145 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +146 │ │ │ │ +147 │ │ │ │ +148 // leaf node │ │ │ │ +149 template │ │ │ │ +150 struct _T_r_e_e_I_n_f_o │ │ │ │ +151 { │ │ │ │ +152 │ │ │ │ +153 static const std::size_t _d_e_p_t_h = 1; │ │ │ │ +154 │ │ │ │ +155 static const std::size_t _n_o_d_e_C_o_u_n_t = 1; │ │ │ │ +156 │ │ │ │ +157 static const std::size_t _l_e_a_f_C_o_u_n_t = 1; │ │ │ │ +158 │ │ │ │ +159 }; │ │ │ │ +160 │ │ │ │ +161 │ │ │ │ +162 // power node - exploit the fact that all children are identical │ │ │ │ +163 template │ │ │ │ +164 struct TreeInfo │ │ │ │ +165 { │ │ │ │ +166 │ │ │ │ +167 typedef TreeInfo> ChildInfo; │ │ │ │ +168 │ │ │ │ +169 static const std::size_t _d_e_p_t_h = 1 + ChildInfo::depth; │ │ │ │ +170 │ │ │ │ +171 static const std::size_t _n_o_d_e_C_o_u_n_t = 1 + StaticDegree::value * │ │ │ │ +ChildInfo::nodeCount; │ │ │ │ +172 │ │ │ │ +173 static const std::size_t _l_e_a_f_C_o_u_n_t = StaticDegree::value * │ │ │ │ +ChildInfo::leafCount; │ │ │ │ +174 │ │ │ │ +175 }; │ │ │ │ +176 │ │ │ │ +177 │ │ │ │ +178 namespace { │ │ │ │ +179 │ │ │ │ +180 // TMP for iterating over the children of a composite node │ │ │ │ +181 // identical for both composite node implementations │ │ │ │ +182 template │ │ │ │ +183 struct generic_compositenode_children_info │ │ │ │ +184 { │ │ │ │ +185 │ │ │ │ +186 typedef generic_compositenode_children_info NextChild; │ │ │ │ +187 │ │ │ │ +188 // extract child info │ │ │ │ +189 typedef typename Node::template Child::Type Child; │ │ │ │ +190 typedef NodeTag ChildTag; │ │ │ │ +191 typedef TreeInfo ChildInfo; │ │ │ │ +192 │ │ │ │ +193 // combine information of current child with info about following children │ │ │ │ +194 static const std::size_t maxDepth = ChildInfo::depth > NextChild::maxDepth │ │ │ │ +? ChildInfo::depth : NextChild::maxDepth; │ │ │ │ +195 │ │ │ │ +196 static const std::size_t nodeCount = ChildInfo::nodeCount + NextChild:: │ │ │ │ +nodeCount; │ │ │ │ +197 │ │ │ │ +198 static const std::size_t leafCount = ChildInfo::leafCount + NextChild:: │ │ │ │ +leafCount; │ │ │ │ +199 │ │ │ │ +200 }; │ │ │ │ +201 │ │ │ │ +202 // End of recursion │ │ │ │ +203 template │ │ │ │ +204 struct generic_compositenode_children_info │ │ │ │ +205 { │ │ │ │ +206 static const std::size_t maxDepth = 0; │ │ │ │ +207 │ │ │ │ +208 static const std::size_t _n_o_d_e_C_o_u_n_t = 0; │ │ │ │ +209 │ │ │ │ +210 static const std::size_t _l_e_a_f_C_o_u_n_t = 0; │ │ │ │ +211 }; │ │ │ │ +212 │ │ │ │ +213 } // anonymous namespace │ │ │ │ +214 │ │ │ │ +215 │ │ │ │ +216 // Struct for building information about composite node │ │ │ │ +217 template │ │ │ │ +218 struct GenericCompositeNodeInfo │ │ │ │ +219 { │ │ │ │ +220 │ │ │ │ +221 typedef generic_compositenode_children_info:: │ │ │ │ +value> Children; │ │ │ │ +222 │ │ │ │ +223 static const std::size_t _d_e_p_t_h = 1 + Children::maxDepth; │ │ │ │ +224 │ │ │ │ +225 static const std::size_t _n_o_d_e_C_o_u_n_t = 1 + Children::nodeCount; │ │ │ │ +226 │ │ │ │ +227 static const std::size_t _l_e_a_f_C_o_u_n_t = Children::leafCount; │ │ │ │ +228 │ │ │ │ +229 }; │ │ │ │ +230 │ │ │ │ +231 │ │ │ │ +232 // CompositeNode: delegate to GenericCompositeNodeInfo │ │ │ │ +233 template │ │ │ │ +234 struct _T_r_e_e_I_n_f_o │ │ │ │ +235 : public GenericCompositeNodeInfo │ │ │ │ +236 {}; │ │ │ │ +237 │ │ │ │ +238 │ │ │ │ +239#endif // DOXYGEN │ │ │ │ +240 │ │ │ │ +241 │ │ │ │ +242 using Dune::index_constant; │ │ │ │ +243 namespace Indices = Dune::Indices; │ │ │ │ +244 │ │ │ │ +246 │ │ │ │ +247 } // namespace TypeTree │ │ │ │ +248} //namespace Dune │ │ │ │ +249 │ │ │ │ +250#endif // DUNE_TYPETREE_UTILITY_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_D_u_n_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:576 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ +auto leafCount(const Tree &tree) │ │ │ │ +The number of leaf nodes in the Tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:532 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ +auto nodeCount(const Tree &tree) │ │ │ │ +The total number of nodes in the Tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:524 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ +auto depth(const Tree &tree) │ │ │ │ +The depth of the TypeTree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:508 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ +Tag designating a leaf node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ +Tag designating a composite node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o │ │ │ │ +Struct for obtaining some basic structural information about a TypeTree. │ │ │ │ +DDeeffiinniittiioonn utility.hh:121 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ +static const std::size_t leafCount │ │ │ │ +DDeeffiinniittiioonn utility.hh:136 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_d_e_p_t_h │ │ │ │ +static const std::size_t depth │ │ │ │ +DDeeffiinniittiioonn utility.hh:130 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_I_n_f_o_<_ _T_r_e_e_,_ _N_o_d_e_T_a_g_<_ _T_r_e_e_ _>_ _>_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ +static const std::size_t nodeCount │ │ │ │ +DDeeffiinniittiioonn utility.hh:133 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00026.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: traversalutilities.hh File Reference │ │ │ +dune-typetree: leafnode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,34 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
traversalutilities.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
leafnode.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/typetree/traversal.hh>
│ │ │ +
#include <dune/typetree/nodetags.hh>
│ │ │ +#include <cstddef>
│ │ │ +#include <type_traits>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  Dune::TypeTree::LeafNode
 Base class for leaf nodes in a dune-typetree. More...
│ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<typename ResultType, typename Tree, typename F, typename R>
ResultType Dune::TypeTree::reduceOverLeafs (const Tree &tree, F functor, R reduction, ResultType startValue)
 Calculate a quantity as a reduction over the leaf nodes of a TypeTree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,21 +1,20 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -traversalutilities.hh File Reference │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +leafnode.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e │ │ │ │ +  Base class for leaf nodes in a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -ResultType  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_d_u_c_e_O_v_e_r_L_e_a_f_s (const Tree &tree, F functor, R │ │ │ │ - reduction, ResultType startValue) │ │ │ │ -  Calculate a quantity as a reduction over the leaf nodes of a │ │ │ │ - _T_y_p_e_T_r_e_e. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00026_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: traversalutilities.hh Source File │ │ │ +dune-typetree: leafnode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,86 +71,77 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
traversalutilities.hh
│ │ │ +
leafnode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │ -
7#define DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_LEAFNODE_HH
│ │ │ +
7#define DUNE_TYPETREE_LEAFNODE_HH
│ │ │
8
│ │ │ - │ │ │ -
10
│ │ │ -
11namespace Dune {
│ │ │ -
12 namespace TypeTree {
│ │ │ -
13
│ │ │ -
18
│ │ │ -
19 namespace {
│ │ │ + │ │ │ +
10#include <cstddef>
│ │ │ +
11#include <type_traits>
│ │ │ +
12
│ │ │ +
13namespace Dune {
│ │ │ +
14 namespace TypeTree {
│ │ │ +
15
│ │ │
20
│ │ │ -
22
│ │ │ -
27 template<typename F, typename R, typename ResultType>
│ │ │ -
28 struct LeafReductionVisitor
│ │ │ -
29 : public TypeTree::TreeVisitor
│ │ │ -
30 {
│ │ │ -
31
│ │ │ -
32 static const TreePathType::Type treePathType = TreePathType::dynamic;
│ │ │ -
33
│ │ │ -
34 template<typename Node, typename TreePath>
│ │ │ -
35 void leaf(const Node& node, TreePath treePath)
│ │ │ -
36 {
│ │ │ -
37 _value = _reduction(_value,_functor(node,treePath));
│ │ │ -
38 }
│ │ │ -
39
│ │ │ -
40 LeafReductionVisitor(F functor, R reduction, ResultType startValue)
│ │ │ -
41 : _functor(functor)
│ │ │ -
42 , _reduction(reduction)
│ │ │ -
43 , _value(startValue)
│ │ │ -
44 {}
│ │ │ -
45
│ │ │ -
46 ResultType result() { return _value; }
│ │ │ -
47
│ │ │ -
48 F _functor;
│ │ │ -
49 R _reduction;
│ │ │ -
50 ResultType _value;
│ │ │ -
51
│ │ │ -
52 };
│ │ │ -
53
│ │ │ -
54 } // anonymous namespace
│ │ │ -
55
│ │ │ -
57
│ │ │ -
82 template<typename ResultType, typename Tree, typename F, typename R>
│ │ │ -
│ │ │ -
83 ResultType reduceOverLeafs(const Tree& tree, F functor, R reduction, ResultType startValue)
│ │ │ -
84 {
│ │ │ -
85 LeafReductionVisitor<F,R,ResultType> visitor(functor,reduction,startValue);
│ │ │ -
86 TypeTree::applyToTree(tree,visitor);
│ │ │ -
87 return visitor.result();
│ │ │ -
88 }
│ │ │ -
│ │ │ -
89
│ │ │ -
91
│ │ │ -
92 } // namespace TypeTree
│ │ │ -
93} //namespace Dune
│ │ │ -
94
│ │ │ -
95#endif // DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │ - │ │ │ -
ResultType reduceOverLeafs(const Tree &tree, F functor, R reduction, ResultType startValue)
Calculate a quantity as a reduction over the leaf nodes of a TypeTree.
Definition traversalutilities.hh:83
│ │ │ -
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:184
│ │ │ +
26
│ │ │ +
│ │ │ + │ │ │ +
28 {
│ │ │ +
29
│ │ │ +
30 public:
│ │ │ +
31
│ │ │ +
33 static const bool isLeaf = true;
│ │ │ +
34
│ │ │ +
36 static const bool isPower = false;
│ │ │ +
37
│ │ │ +
39 static const bool isComposite = false;
│ │ │ +
40
│ │ │ + │ │ │ +
43
│ │ │ +
│ │ │ +
44 static constexpr auto degree()
│ │ │ +
45 {
│ │ │ +
46 return std::integral_constant<std::size_t,0>{};
│ │ │ +
47 }
│ │ │ +
│ │ │ +
48
│ │ │ +
49 protected:
│ │ │ +
50
│ │ │ +
52
│ │ │ + │ │ │ +
58 };
│ │ │ +
│ │ │ +
59
│ │ │ +
61
│ │ │ +
62 } // namespace TypeTree
│ │ │ +
63} //namespace Dune
│ │ │ +
64
│ │ │ +
65#endif // DUNE_TYPETREE_POWERNODE_HH
│ │ │ + │ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Type
Definition treepath.hh:108
│ │ │ -
@ dynamic
Definition treepath.hh:108
│ │ │ +
LeafNodeTag NodeTag
The type tag that describes a LeafNode.
Definition leafnode.hh:42
│ │ │ +
static const bool isLeaf
Mark this class as a leaf in a dune-typetree.
Definition leafnode.hh:33
│ │ │ +
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition leafnode.hh:36
│ │ │ +
LeafNode()
Default constructor.
Definition leafnode.hh:57
│ │ │ +
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition leafnode.hh:39
│ │ │ +
static constexpr auto degree()
Definition leafnode.hh:44
│ │ │ +
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,93 +1,89 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -traversalutilities.hh │ │ │ │ +leafnode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ -7#define DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_LEAFNODE_HH │ │ │ │ +7#define DUNE_TYPETREE_LEAFNODE_HH │ │ │ │ 8 │ │ │ │ -9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -10 │ │ │ │ -11namespace _D_u_n_e { │ │ │ │ -12 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -13 │ │ │ │ -18 │ │ │ │ -19 namespace { │ │ │ │ +9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12 │ │ │ │ +13namespace _D_u_n_e { │ │ │ │ +14 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +15 │ │ │ │ 20 │ │ │ │ -22 │ │ │ │ -27 template │ │ │ │ -28 struct LeafReductionVisitor │ │ │ │ -29 : public TypeTree::TreeVisitor │ │ │ │ -30 { │ │ │ │ +26 │ │ │ │ +_2_7 class _L_e_a_f_N_o_d_e │ │ │ │ +28 { │ │ │ │ +29 │ │ │ │ +30 public: │ │ │ │ 31 │ │ │ │ -32 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e treePathType = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c; │ │ │ │ -33 │ │ │ │ -34 template │ │ │ │ -35 void leaf(const Node& node, TreePath treePath) │ │ │ │ -36 { │ │ │ │ -37 _value = _reduction(_value,_functor(node,treePath)); │ │ │ │ -38 } │ │ │ │ -39 │ │ │ │ -40 LeafReductionVisitor(F functor, R reduction, ResultType startValue) │ │ │ │ -41 : _functor(functor) │ │ │ │ -42 , _reduction(reduction) │ │ │ │ -43 , _value(startValue) │ │ │ │ -44 {} │ │ │ │ -45 │ │ │ │ -46 ResultType result() { return _value; } │ │ │ │ -47 │ │ │ │ -48 F _functor; │ │ │ │ -49 R _reduction; │ │ │ │ -50 ResultType _value; │ │ │ │ -51 │ │ │ │ -52 }; │ │ │ │ -53 │ │ │ │ -54 } // anonymous namespace │ │ │ │ -55 │ │ │ │ -57 │ │ │ │ -82 template │ │ │ │ -_8_3 ResultType _r_e_d_u_c_e_O_v_e_r_L_e_a_f_s(const Tree& tree, F functor, R reduction, │ │ │ │ -ResultType startValue) │ │ │ │ -84 { │ │ │ │ -85 LeafReductionVisitor visitor(functor,reduction,startValue); │ │ │ │ -86 _T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e(tree,visitor); │ │ │ │ -87 return visitor.result(); │ │ │ │ -88 } │ │ │ │ -89 │ │ │ │ -91 │ │ │ │ -92 } // namespace TypeTree │ │ │ │ -93} //namespace Dune │ │ │ │ -94 │ │ │ │ -95#endif // DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ -_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_d_u_c_e_O_v_e_r_L_e_a_f_s │ │ │ │ -ResultType reduceOverLeafs(const Tree &tree, F functor, R reduction, ResultType │ │ │ │ -startValue) │ │ │ │ -Calculate a quantity as a reduction over the leaf nodes of a TypeTree. │ │ │ │ -DDeeffiinniittiioonn traversalutilities.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ -void applyToTree(Tree &&tree, Visitor &&visitor) │ │ │ │ -Apply visitor to TypeTree. │ │ │ │ -DDeeffiinniittiioonn traversal.hh:184 │ │ │ │ +_3_3 static const bool _i_s_L_e_a_f = true; │ │ │ │ +34 │ │ │ │ +_3_6 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ +37 │ │ │ │ +_3_9 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ +40 │ │ │ │ +_4_2 typedef _L_e_a_f_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ +43 │ │ │ │ +_4_4 static constexpr auto _d_e_g_r_e_e() │ │ │ │ +45 { │ │ │ │ +46 return std::integral_constant{}; │ │ │ │ +47 } │ │ │ │ +48 │ │ │ │ +49 protected: │ │ │ │ +50 │ │ │ │ +52 │ │ │ │ +_5_7 _L_e_a_f_N_o_d_e() {} │ │ │ │ +58 }; │ │ │ │ +59 │ │ │ │ +61 │ │ │ │ +62 } // namespace TypeTree │ │ │ │ +63} //namespace Dune │ │ │ │ +64 │ │ │ │ +65#endif // DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ -Type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ -@ dynamic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ +LeafNodeTag NodeTag │ │ │ │ +The type tag that describes a LeafNode. │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:42 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +Mark this class as a leaf in a dune-typetree. │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:33 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +Mark this class as a non power in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:36 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_L_e_a_f_N_o_d_e │ │ │ │ +LeafNode() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:57 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +static const bool isComposite │ │ │ │ +Mark this class as a non composite in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:39 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +static constexpr auto degree() │ │ │ │ +DDeeffiinniittiioonn leafnode.hh:44 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ +Tag designating a leaf node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00029.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: traversal.hh File Reference │ │ │ +dune-typetree: accumulate_static.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,65 +72,69 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
traversal.hh File Reference
│ │ │ +
accumulate_static.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <utility>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/common/typetree/childaccess.hh>
│ │ │ -#include <dune/common/typetree/nodeconcepts.hh>
│ │ │ -#include <dune/common/typetree/traversal.hh>
│ │ │ -#include <dune/typetree/treepath.hh>
│ │ │ -#include <dune/typetree/visitor.hh>
│ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/traversal.hh>
│ │ │ +#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/typetree/utility.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  Dune::TypeTree::or_< result_type >
 Statically combine two values of type result_type using ||. More...
struct  Dune::TypeTree::or_< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::and_< result_type >
 Statically combine two values of type result_type using &&. More...
struct  Dune::TypeTree::and_< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::plus< result_type >
 Statically combine two values of type result_type using +. More...
struct  Dune::TypeTree::plus< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::minus< result_type >
 Statically combine two values of type result_type using -. More...
struct  Dune::TypeTree::minus< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::multiply< result_type >
 Statically combine two values of type result_type using *. More...
struct  Dune::TypeTree::multiply< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::min< result_type >
 Statically combine two values of type result_type by returning their minimum. More...
struct  Dune::TypeTree::min< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::max< result_type >
 Statically combine two values of type result_type by returning their maximum. More...
struct  Dune::TypeTree::max< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::AccumulateValue< Tree, Functor, Reduction, startValue, ParentChildReduction >
 Statically accumulate a value over the nodes of a TypeTree. More...
struct  Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >
struct  Dune::TypeTree::AccumulateType< Tree, Policy >
 Statically accumulate a type over the nodes of a TypeTree. More...
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Detail
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -Typedefs

template<class Tree>
using Dune::TypeTree::Detail::DynamicTraversalConcept
template<class Tree>
using Dune::TypeTree::Detail::StaticTraversalConcept
namespace  Dune::TypeTree::Experimental
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< not Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isComposite or(Tree::isPower and(pathType!=TreePathType::dynamic))), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isPower and(pathType==TreePathType::dynamic)), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class T, class TreePath, class V, std::enable_if_t< std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class T, class TreePath, class V, std::enable_if_t< not std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class Tree, TreePathType::Type pathType = TreePathType::dynamic>
constexpr auto Dune::TypeTree::leafTreePathTuple ()
 Create tuple of tree paths to leafs.
template<Concept::TreeNode Tree, typename Visitor>
void Dune::TypeTree::applyToTree (Tree &&tree, Visitor &&visitor)
 Apply visitor to TypeTree.
template<typename Tree, typename Visitor, typename Init>
auto Dune::TypeTree::Experimental::hybridApplyToTree (Tree &&tree, Visitor &&visitor, Init &&init)
 Apply hybrid visitor to TypeTree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,60 +1,57 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -traversal.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +accumulate_static.hh File Reference │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type using ||. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type using &&. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type using +. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type using -. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type using *. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type by returning their │ │ │ │ + minimum. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ +  Statically combine two values of type result_type by returning their │ │ │ │ + maximum. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_<_ _T_r_e_e_,_ _F_u_n_c_t_o_r_,_ _R_e_d_u_c_t_i_o_n_,_ _s_t_a_r_t_V_a_l_u_e_, │ │ │ │ + _P_a_r_e_n_t_C_h_i_l_d_R_e_d_u_c_t_i_o_n_ _> │ │ │ │ +  Statically accumulate a value over the nodes of a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_<_ _F_u_n_c_t_o_r_,_ _R_e_d_u_c_t_i_o_n_,_ _S_t_a_r_t_T_y_p_e_, │ │ │ │ + _P_a_r_e_n_t_C_h_i_l_d_R_e_d_u_c_t_i_o_n_,_ _R_e_d_u_c_t_i_o_n_A_l_g_o_r_i_t_h_m_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e_<_ _T_r_e_e_,_ _P_o_l_i_c_y_ _> │ │ │ │ +  Statically accumulate a type over the nodes of a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template = 0> │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix) │ │ │ │ -template = 0> │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix) │ │ │ │ -template = 0> │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix, std:: │ │ │ │ - index_sequence< indices... >) │ │ │ │ -template = 0> │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix, std:: │ │ │ │ - index_sequence< indices... >) │ │ │ │ -template::isLeaf, int > = 0> │ │ │ │ - void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e (T &&tree, TreePath │ │ │ │ - treePath, V &&visitor) │ │ │ │ -template::isLeaf, int > = 0> │ │ │ │ - void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e (T &&tree, TreePath │ │ │ │ - treePath, V &&visitor) │ │ │ │ -template │ │ │ │ -constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e () │ │ │ │ -  Create tuple of tree paths to leafs. │ │ │ │ -template │ │ │ │ - void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e (Tree &&tree, Visitor &&visitor) │ │ │ │ -  Apply visitor to _T_y_p_e_T_r_e_e. │ │ │ │ +template │ │ │ │ +auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e (Tree &&tree, Visitor │ │ │ │ + &&visitor, Init &&init) │ │ │ │ +  Apply hybrid visitor to _T_y_p_e_T_r_e_e. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00029_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: traversal.hh Source File │ │ │ +dune-typetree: accumulate_static.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,209 +71,595 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
traversal.hh
│ │ │ +
accumulate_static.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TRAVERSAL_HH
│ │ │ -
7#define DUNE_TYPETREE_TRAVERSAL_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │ +
7#define DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │
8
│ │ │ -
9#include <utility>
│ │ │ -
10
│ │ │ -
11#include <dune/common/hybridutilities.hh>
│ │ │ -
12#include <dune/common/indices.hh>
│ │ │ -
13#include <dune/common/std/type_traits.hh>
│ │ │ -
14
│ │ │ -
15#include <dune/common/typetree/childaccess.hh>
│ │ │ -
16#include <dune/common/typetree/nodeconcepts.hh>
│ │ │ -
17#include <dune/common/typetree/traversal.hh>
│ │ │ -
18
│ │ │ - │ │ │ - │ │ │ -
21
│ │ │ -
22namespace Dune {
│ │ │ -
23 namespace TypeTree {
│ │ │ +
9#include <dune/common/typetraits.hh>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
15
│ │ │ +
16
│ │ │ +
│ │ │ +
17namespace Dune {
│ │ │ +
│ │ │ +
18 namespace TypeTree {
│ │ │ +
19
│ │ │
24
│ │ │ -
29
│ │ │ -
30 namespace Detail {
│ │ │ -
31
│ │ │ -
32 // SFINAE template check that Tree has a degree() function and a child() function accepting integer indices
│ │ │ -
33 template<class Tree>
│ │ │ -
34 using DynamicTraversalConcept = decltype((
│ │ │ -
35 std::declval<Tree>().degree(),
│ │ │ -
36 std::declval<Tree>().child(0u)
│ │ │ -
37 ));
│ │ │ -
38
│ │ │ -
39 // SFINAE template check that Tree has static (constexpr) function Tree::degree()
│ │ │ -
40 template<class Tree>
│ │ │ -
41 using StaticTraversalConcept = decltype((
│ │ │ -
42 std::integral_constant<std::size_t, Tree::degree()>{}
│ │ │ -
43 ));
│ │ │ -
44
│ │ │ -
45
│ │ │ -
46 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ -
47 std::enable_if_t<Tree::isLeaf, int> = 0>
│ │ │ -
│ │ │ -
48 constexpr auto leafTreePathTuple(Prefix prefix)
│ │ │ -
49 {
│ │ │ -
50 return std::make_tuple(prefix);
│ │ │ -
51 }
│ │ │ -
│ │ │ -
52
│ │ │ -
53 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ -
54 std::enable_if_t<not Tree::isLeaf, int> = 0>
│ │ │ -
55 constexpr auto leafTreePathTuple(Prefix prefix);
│ │ │ -
56
│ │ │ -
57 template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices,
│ │ │ -
58 std::enable_if_t<(Tree::isComposite or (Tree::isPower and (pathType!=TreePathType::dynamic))), int> = 0>
│ │ │ -
│ │ │ -
59 constexpr auto leafTreePathTuple(Prefix prefix, std::index_sequence<indices...>)
│ │ │ -
60 {
│ │ │ -
61 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, Dune::index_constant<indices>{}))...);
│ │ │ -
62 }
│ │ │ -
│ │ │ -
63
│ │ │ -
64 template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices,
│ │ │ -
65 std::enable_if_t<(Tree::isPower and (pathType==TreePathType::dynamic)), int> = 0>
│ │ │ -
│ │ │ -
66 constexpr auto leafTreePathTuple(Prefix prefix, std::index_sequence<indices...>)
│ │ │ -
67 {
│ │ │ -
68 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, indices))...);
│ │ │ -
69 }
│ │ │ -
│ │ │ -
70
│ │ │ -
71 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ -
72 std::enable_if_t<not Tree::isLeaf, int>>
│ │ │ -
│ │ │ -
73 constexpr auto leafTreePathTuple(Prefix prefix)
│ │ │ -
74 {
│ │ │ -
75 return Detail::leafTreePathTuple<Tree, pathType>(prefix, std::make_index_sequence<Tree::degree()>{});
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
78 /* The signature is the same as for the public applyToTree
│ │ │ -
79 * function in Dune::Typetree, despite the additionally passed
│ │ │ -
80 * treePath argument. The path passed here is associated to
│ │ │ -
81 * the tree and the relative paths of the children (wrt. to tree)
│ │ │ -
82 * are appended to this. Hence the behavior of the public function
│ │ │ -
83 * is resembled by passing an empty treePath.
│ │ │ -
84 */
│ │ │ -
85
│ │ │ -
86 /*
│ │ │ -
87 * This is the overload for leaf traversal
│ │ │ -
88 */
│ │ │ -
89 template<class T, class TreePath, class V,
│ │ │ -
90 std::enable_if_t<std::decay_t<T>::isLeaf, int> = 0>
│ │ │ -
│ │ │ -
91 void applyToTree(T&& tree, TreePath treePath, V&& visitor)
│ │ │ -
92 {
│ │ │ -
93 visitor.leaf(tree, treePath);
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
96 /*
│ │ │ -
97 * This is the general overload doing child traversal.
│ │ │ -
98 */
│ │ │ -
99 template<class T, class TreePath, class V,
│ │ │ -
100 std::enable_if_t<not std::decay_t<T>::isLeaf, int> = 0>
│ │ │ -
│ │ │ -
101 void applyToTree(T&& tree, TreePath treePath, V&& visitor)
│ │ │ -
102 {
│ │ │ -
103 using Tree = std::remove_reference_t<T>;
│ │ │ -
104 using Visitor = std::remove_reference_t<V>;
│ │ │ -
105 visitor.pre(tree, treePath);
│ │ │ -
106
│ │ │ -
107 // the visitor may specify preferred dynamic traversal
│ │ │ -
108 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │ -
109
│ │ │ -
110 // create a dynamic or static index range
│ │ │ -
111 auto indices = [&]{
│ │ │ -
112 if constexpr(preferDynamicTraversal::value && Concept::UniformInnerTreeNode<Tree>)
│ │ │ -
113 return Dune::range(std::size_t(tree.degree()));
│ │ │ -
114 else
│ │ │ -
115 return Dune::range(tree.degree());
│ │ │ -
116 }();
│ │ │ -
117
│ │ │ -
118 if constexpr(Concept::InnerTreeNode<Tree>) {
│ │ │ -
119 Hybrid::forEach(indices, [&](auto i) {
│ │ │ -
120 auto&& child = tree.child(i);
│ │ │ -
121 using Child = std::decay_t<decltype(child)>;
│ │ │ +
26 template<typename result_type>
│ │ │ +
│ │ │ +
27 struct or_
│ │ │ +
28 {
│ │ │ +
29 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
30 struct reduce
│ │ │ +
31 {
│ │ │ +
32 static const result_type result = r1 || r2;
│ │ │ +
33 };
│ │ │ +
│ │ │ +
34 };
│ │ │ +
│ │ │ +
35
│ │ │ +
37 template<typename result_type>
│ │ │ +
│ │ │ +
38 struct and_
│ │ │ +
39 {
│ │ │ +
40 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
41 struct reduce
│ │ │ +
42 {
│ │ │ +
43 static const result_type result = r1 && r2;
│ │ │ +
44 };
│ │ │ +
│ │ │ +
45 };
│ │ │ +
│ │ │ +
46
│ │ │ +
48 template<typename result_type>
│ │ │ +
│ │ │ +
49 struct plus
│ │ │ +
50 {
│ │ │ +
51 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
52 struct reduce
│ │ │ +
53 {
│ │ │ +
54 static const result_type result = r1 + r2;
│ │ │ +
55 };
│ │ │ +
│ │ │ +
56 };
│ │ │ +
│ │ │ +
57
│ │ │ +
59 template<typename result_type>
│ │ │ +
│ │ │ +
60 struct minus
│ │ │ +
61 {
│ │ │ +
62 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
63 struct reduce
│ │ │ +
64 {
│ │ │ +
65 static const result_type result = r1 - r2;
│ │ │ +
66 };
│ │ │ +
│ │ │ +
67 };
│ │ │ +
│ │ │ +
68
│ │ │ +
70 template<typename result_type>
│ │ │ +
│ │ │ +
71 struct multiply
│ │ │ +
72 {
│ │ │ +
73 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
74 struct reduce
│ │ │ +
75 {
│ │ │ +
76 static const result_type result = r1 * r2;
│ │ │ +
77 };
│ │ │ +
│ │ │ +
78 };
│ │ │ +
│ │ │ +
79
│ │ │ +
81 template<typename result_type>
│ │ │ +
│ │ │ +
82 struct min
│ │ │ +
83 {
│ │ │ +
84 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
85 struct reduce
│ │ │ +
86 {
│ │ │ +
87 static const result_type result = r1 < r2 ? r1 : r2;
│ │ │ +
88 };
│ │ │ +
│ │ │ +
89 };
│ │ │ +
│ │ │ +
90
│ │ │ +
92 template<typename result_type>
│ │ │ +
│ │ │ +
93 struct max
│ │ │ +
94 {
│ │ │ +
95 template<result_type r1, result_type r2>
│ │ │ +
│ │ │ +
96 struct reduce
│ │ │ +
97 {
│ │ │ +
98 static const result_type result = r1 > r2 ? r1 : r2;
│ │ │ +
99 };
│ │ │ +
│ │ │ +
100 };
│ │ │ +
│ │ │ +
101
│ │ │ +
102
│ │ │ +
103 namespace {
│ │ │ +
104
│ │ │ +
105 // implementation of the traversal algorithm
│ │ │ +
106
│ │ │ +
108 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath, bool doVisit>
│ │ │ +
109 struct accumulate_node_helper
│ │ │ +
110 {
│ │ │ +
111
│ │ │ +
112 typedef typename Functor::result_type result_type;
│ │ │ +
113
│ │ │ +
114 static const result_type result = current_value;
│ │ │ +
115
│ │ │ +
116 };
│ │ │ +
117
│ │ │ +
119 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ +
120 struct accumulate_node_helper<Node,Functor,Reduction,current_value,TreePath,true>
│ │ │ +
121 {
│ │ │
122
│ │ │ -
123 visitor.beforeChild(tree, child, treePath, i);
│ │ │ +
123 typedef typename Functor::result_type result_type;
│ │ │
124
│ │ │ -
125 // This requires that visitor.in(...) can always be instantiated,
│ │ │ -
126 // even if there's a single child only.
│ │ │ -
127 if (i>0)
│ │ │ -
128 visitor.in(tree, treePath);
│ │ │ -
129
│ │ │ -
130 constexpr bool visitChild = Visitor::template VisitChild<Tree,Child,TreePath>::value;
│ │ │ -
131 if constexpr(visitChild) {
│ │ │ -
132 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ -
133 applyToTree(child, childTreePath, visitor);
│ │ │ -
134 }
│ │ │ -
135
│ │ │ -
136 visitor.afterChild(tree, child, treePath, i);
│ │ │ -
137 });
│ │ │ -
138 }
│ │ │ -
139 visitor.post(tree, treePath);
│ │ │ -
140 }
│ │ │ -
│ │ │ +
125 static const result_type result = Reduction::template reduce<current_value,Functor::template visit<Node,TreePath>::result>::result;
│ │ │ +
126
│ │ │ +
127 };
│ │ │ +
128
│ │ │ +
130 template<typename Tree, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, typename Tag>
│ │ │ +
131 struct accumulate_value;
│ │ │ +
132
│ │ │ +
134 template<typename LeafNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ +
135 struct accumulate_value<LeafNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,LeafNodeTag>
│ │ │ +
136 {
│ │ │ +
137
│ │ │ +
138 typedef typename Functor::result_type result_type;
│ │ │ +
139
│ │ │ +
140 static const result_type result =
│ │ │
141
│ │ │ -
142 } // namespace Detail
│ │ │ +
142 accumulate_node_helper<LeafNode,Functor,Reduction,current_value,TreePath,Functor::template doVisit<LeafNode,TreePath>::value>::result;
│ │ │
143
│ │ │ -
144
│ │ │ -
145 // ********************************************************************************
│ │ │ -
146 // Public Interface
│ │ │ -
147 // ********************************************************************************
│ │ │ -
148
│ │ │ -
162 template<class Tree, TreePathType::Type pathType=TreePathType::dynamic>
│ │ │ -
│ │ │ -
163 constexpr auto leafTreePathTuple()
│ │ │ -
164 {
│ │ │ - │ │ │ -
166 }
│ │ │ -
│ │ │ -
167
│ │ │ -
169
│ │ │ -
183 template<Concept::TreeNode Tree, typename Visitor>
│ │ │ -
│ │ │ -
184 void applyToTree(Tree&& tree, Visitor&& visitor)
│ │ │ -
185 {
│ │ │ -
186 Detail::applyToTree(tree, hybridTreePath(), visitor);
│ │ │ -
187 }
│ │ │ -
│ │ │ -
188
│ │ │ -
190
│ │ │ -
191 } // namespace TypeTree
│ │ │ -
192} //namespace Dune
│ │ │ -
193
│ │ │ -
194#endif // DUNE_TYPETREE_TRAVERSAL_HH
│ │ │ - │ │ │ - │ │ │ -
constexpr auto leafTreePathTuple()
Create tuple of tree paths to leafs.
Definition traversal.hh:163
│ │ │ -
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:184
│ │ │ +
144 };
│ │ │ +
145
│ │ │ +
147 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t i, std::size_t n>
│ │ │ +
148 struct accumulate_over_children
│ │ │ +
149 {
│ │ │ +
150
│ │ │ +
151 typedef typename Functor::result_type result_type;
│ │ │ +
152
│ │ │ +
153 typedef decltype(push_back(TreePath{},index_constant<i>{})) child_tree_path;
│ │ │ +
154
│ │ │ +
155 typedef typename Node::template Child<i>::Type child;
│ │ │ +
156
│ │ │ +
157 static const result_type child_result = accumulate_value<child,Functor,Reduction,ParentChildReduction,current_value,child_tree_path,NodeTag<child>>::result;
│ │ │ +
158
│ │ │ +
159 static const result_type result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,child_result,TreePath,i+1,n>::result;
│ │ │ +
160
│ │ │ +
161 };
│ │ │ +
162
│ │ │ +
164 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t n>
│ │ │ +
165 struct accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,n,n>
│ │ │ +
166 {
│ │ │ +
167
│ │ │ +
168 typedef typename Functor::result_type result_type;
│ │ │ +
169
│ │ │ +
170 static const result_type result = current_value;
│ │ │ +
171
│ │ │ +
172 };
│ │ │ +
173
│ │ │ +
176 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ +
177 struct accumulate_value_generic_composite_node
│ │ │ +
178 {
│ │ │ +
179
│ │ │ +
180 typedef typename Functor::result_type result_type;
│ │ │ +
181
│ │ │ +
182 static const result_type child_result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,0,StaticDegree<Node>::value>::result;
│ │ │ +
183
│ │ │ +
184 static const result_type result =
│ │ │ +
185 accumulate_node_helper<Node,Functor,ParentChildReduction,child_result,TreePath,Functor::template doVisit<Node,TreePath>::value>::result;
│ │ │ +
186
│ │ │ +
187
│ │ │ +
188 };
│ │ │ +
189
│ │ │ +
191 template<typename PowerNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ +
192 struct accumulate_value<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,PowerNodeTag>
│ │ │ +
193 : public accumulate_value_generic_composite_node<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
│ │ │ +
194 {};
│ │ │ +
195
│ │ │ +
197 template<typename CompositeNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ +
198 struct accumulate_value<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,CompositeNodeTag>
│ │ │ +
199 : public accumulate_value_generic_composite_node<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
│ │ │ +
200 {};
│ │ │ +
201
│ │ │ +
202 } // anonymous namespace
│ │ │ +
203
│ │ │ +
205
│ │ │ +
261 template<typename Tree, typename Functor, typename Reduction, typename Functor::result_type startValue, typename ParentChildReduction = Reduction>
│ │ │ +
│ │ │ + │ │ │ +
263 {
│ │ │ +
264
│ │ │ +
266 typedef typename Functor::result_type result_type;
│ │ │ +
267
│ │ │ +
269 static const result_type result = accumulate_value<Tree,Functor,Reduction,ParentChildReduction,startValue,HybridTreePath<>,NodeTag<Tree>>::result;
│ │ │ +
270
│ │ │ +
271 };
│ │ │ +
│ │ │ +
272
│ │ │ +
275 struct flattened_reduction;
│ │ │ +
276
│ │ │ +
279 struct bottom_up_reduction;
│ │ │ +
280
│ │ │ +
281 namespace {
│ │ │ +
282
│ │ │ +
283 // implementation of the traversal algorithm
│ │ │ +
284
│ │ │ +
287 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath, bool doVisit>
│ │ │ +
288 struct accumulate_type_node_helper
│ │ │ +
289 {
│ │ │ +
290
│ │ │ +
291 typedef current_type type;
│ │ │ +
292
│ │ │ +
293 };
│ │ │ +
294
│ │ │ +
296 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath>
│ │ │ +
297 struct accumulate_type_node_helper<Node,Functor,Reduction,current_type,TreePath,true>
│ │ │ +
298 {
│ │ │ +
299
│ │ │ +
300 typedef typename Reduction::template reduce<
│ │ │ +
301 current_type,
│ │ │ +
302 typename Functor::template visit<
│ │ │ +
303 Node,
│ │ │ +
304 TreePath
│ │ │ +
305 >::type
│ │ │ +
306 >::type type;
│ │ │ +
307
│ │ │ +
308 };
│ │ │ +
309
│ │ │ +
311 template<typename Tree, typename Policy, typename current_type, typename TreePath, typename Tag>
│ │ │ +
312 struct accumulate_type;
│ │ │ +
313
│ │ │ +
315 template<typename LeafNode, typename Policy, typename current_type, typename TreePath>
│ │ │ +
316 struct accumulate_type<LeafNode,Policy,current_type,TreePath,LeafNodeTag>
│ │ │ +
317 {
│ │ │ +
318
│ │ │ +
319 typedef typename accumulate_type_node_helper<
│ │ │ +
320 LeafNode,
│ │ │ +
321 typename Policy::functor,
│ │ │ +
322 typename Policy::sibling_reduction,
│ │ │ +
323 current_type,
│ │ │ +
324 TreePath,
│ │ │ +
325 Policy::functor::template doVisit<
│ │ │ +
326 LeafNode,
│ │ │ +
327 TreePath>::value
│ │ │ +
328 >::type type;
│ │ │ +
329
│ │ │ +
330 };
│ │ │ +
331
│ │ │ +
332
│ │ │ +
335 template<typename current_type, typename tree_path, typename start_type, typename reduction_strategy>
│ │ │ +
336 struct propagate_type_down_tree;
│ │ │ +
337
│ │ │ +
339 template<typename current_type, typename tree_path, typename start_type>
│ │ │ +
340 struct propagate_type_down_tree<
│ │ │ +
341 current_type,
│ │ │ +
342 tree_path,
│ │ │ +
343 start_type,
│ │ │ +
344 bottom_up_reduction
│ │ │ +
345 >
│ │ │ +
346 {
│ │ │ +
347 typedef current_type type;
│ │ │ +
348 };
│ │ │ +
349
│ │ │ +
351 template<typename current_type, typename tree_path, typename start_type>
│ │ │ +
352 struct propagate_type_down_tree<
│ │ │ +
353 current_type,
│ │ │ +
354 tree_path,
│ │ │ +
355 start_type,
│ │ │ +
356 flattened_reduction
│ │ │ +
357 >
│ │ │ +
358 {
│ │ │ +
359 typedef typename std::conditional<
│ │ │ +
360 tree_path().back() == 0,
│ │ │ +
361 start_type,
│ │ │ +
362 current_type
│ │ │ +
363 >::type type;
│ │ │ +
364 };
│ │ │ +
365
│ │ │ +
366
│ │ │ +
368 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t i, std::size_t n>
│ │ │ +
369 struct accumulate_type_over_children
│ │ │ +
370 {
│ │ │ +
371
│ │ │ +
372 typedef decltype(push_back(TreePath{},index_constant<i>{})) child_tree_path;
│ │ │ +
373
│ │ │ +
374 typedef typename Node::template Child<i>::Type child;
│ │ │ +
375
│ │ │ +
376 typedef typename accumulate_type<
│ │ │ +
377 child,
│ │ │ +
378 Policy,
│ │ │ +
379 // apply reduction choice (flat / hierarchic)
│ │ │ +
380 typename propagate_type_down_tree<
│ │ │ +
381 current_type,
│ │ │ +
382 child_tree_path,
│ │ │ +
383 typename Policy::start_type,
│ │ │ +
384 typename Policy::reduction_strategy
│ │ │ +
385 >::type,
│ │ │ +
386 child_tree_path,
│ │ │ +
387 NodeTag<child>
│ │ │ +
388 >::type child_result_type;
│ │ │ +
389
│ │ │ +
390 typedef typename accumulate_type_over_children<
│ │ │ +
391 Node,
│ │ │ +
392 Policy,
│ │ │ +
393 child_result_type,
│ │ │ +
394 TreePath,
│ │ │ +
395 i+1,
│ │ │ +
396 n
│ │ │ +
397 >::type type;
│ │ │ +
398
│ │ │ +
399 };
│ │ │ +
400
│ │ │ +
402 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t n>
│ │ │ +
403 struct accumulate_type_over_children<Node,Policy,current_type,TreePath,n,n>
│ │ │ +
404 {
│ │ │ +
405
│ │ │ +
406 typedef current_type type;
│ │ │ +
407
│ │ │ +
408 };
│ │ │ +
409
│ │ │ +
410
│ │ │ +
413 template<typename Node, typename Policy, typename current_type, typename TreePath>
│ │ │ +
414 struct accumulate_type_generic_composite_node
│ │ │ +
415 {
│ │ │ +
416
│ │ │ +
417 typedef typename accumulate_type_over_children<
│ │ │ +
418 Node,
│ │ │ +
419 Policy,
│ │ │ +
420 current_type,
│ │ │ +
421 TreePath,
│ │ │ +
422 0,
│ │ │ +
423 StaticDegree<Node>::value
│ │ │ +
424 >::type children_result_type;
│ │ │ +
425
│ │ │ +
426 typedef typename accumulate_type_node_helper<
│ │ │ +
427 Node,
│ │ │ +
428 typename Policy::functor,
│ │ │ +
429 typename Policy::parent_child_reduction,
│ │ │ +
430 children_result_type,
│ │ │ +
431 TreePath,
│ │ │ +
432 Policy::functor::template doVisit<
│ │ │ +
433 Node,
│ │ │ +
434 TreePath
│ │ │ +
435 >::value
│ │ │ +
436 >::type type;
│ │ │ +
437
│ │ │ +
438 };
│ │ │ +
439
│ │ │ +
441 template<typename PowerNode, typename Policy, typename current_type, typename TreePath>
│ │ │ +
442 struct accumulate_type<PowerNode,Policy,current_type,TreePath,PowerNodeTag>
│ │ │ +
443 : public accumulate_type_generic_composite_node<PowerNode,Policy,current_type,TreePath>
│ │ │ +
444 {};
│ │ │ +
445
│ │ │ +
447 template<typename CompositeNode, typename Policy, typename current_type, typename TreePath>
│ │ │ +
448 struct accumulate_type<CompositeNode,Policy,current_type,TreePath,CompositeNodeTag>
│ │ │ +
449 : public accumulate_type_generic_composite_node<CompositeNode,Policy,current_type,TreePath>
│ │ │ +
450 {};
│ │ │ +
451
│ │ │ +
452 } // anonymous namespace
│ │ │ +
453
│ │ │ +
454
│ │ │ +
462 template<
│ │ │ +
463 typename Functor,
│ │ │ +
464 typename Reduction,
│ │ │ +
465 typename StartType,
│ │ │ +
466 typename ParentChildReduction = Reduction,
│ │ │ +
467 typename ReductionAlgorithm = flattened_reduction
│ │ │ +
468 >
│ │ │ +
│ │ │ + │ │ │ +
470 {
│ │ │ +
471
│ │ │ +
499 typedef Functor functor;
│ │ │ +
500
│ │ │ +
520 typedef Reduction sibling_reduction;
│ │ │ +
521
│ │ │ +
528 typedef ParentChildReduction parent_child_reduction;
│ │ │ +
529
│ │ │ +
536 typedef StartType start_type;
│ │ │ +
537
│ │ │ +
542 typedef ReductionAlgorithm reduction_strategy;
│ │ │ +
543 };
│ │ │ +
│ │ │ +
544
│ │ │ +
545
│ │ │ +
547
│ │ │ +
555 template<typename Tree, typename Policy>
│ │ │ +
│ │ │ + │ │ │ +
557 {
│ │ │ +
558
│ │ │ +
560 typedef typename accumulate_type<
│ │ │ +
561 Tree,
│ │ │ +
562 Policy,
│ │ │ +
563 typename Policy::start_type,
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
567
│ │ │ +
568 };
│ │ │ +
│ │ │ +
569
│ │ │ +
570
│ │ │ +
571
│ │ │ +
572
│ │ │ +
573
│ │ │ +
574 /***************************************************/
│ │ │ +
575
│ │ │ +
│ │ │ +
576 namespace Experimental {
│ │ │ +
577 namespace Impl {
│ │ │ +
578
│ │ │ +
580 template<class T, class TreePath, class V, class U,
│ │ │ +
581 std::enable_if_t<std::decay_t<T>::isLeaf, int> = 0>
│ │ │ +
582 auto hybridApplyToTree(T&& tree, TreePath treePath, V&& visitor, U&& current_val)
│ │ │ +
583 {
│ │ │ +
584 return visitor.leaf(tree, treePath, std::forward<U>(current_val));
│ │ │ +
585 }
│ │ │ +
586
│ │ │ +
588 template<class T, class TreePath, class V, class U,
│ │ │ +
589 std::enable_if_t<not std::decay_t<T>::isLeaf, int> = 0>
│ │ │ +
590 auto hybridApplyToTree(T&& tree, TreePath treePath, V&& visitor, U&& current_val)
│ │ │ +
591 {
│ │ │ +
592 using Tree = std::remove_reference_t<T>;
│ │ │ +
593 using Visitor = std::remove_reference_t<V>;
│ │ │ +
594 auto pre_val = visitor.pre(tree, treePath, std::forward<U>(current_val));
│ │ │ +
595
│ │ │ +
596 // check which type of traversal is supported by the tree
│ │ │ +
597 using allowDynamicTraversal = Dune::Std::is_detected<Detail::DynamicTraversalConcept,Tree>;
│ │ │ +
598 using allowStaticTraversal = Dune::Std::is_detected<Detail::StaticTraversalConcept,Tree>;
│ │ │ +
599
│ │ │ +
600 // the tree must support either dynamic or static traversal
│ │ │ +
601 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value);
│ │ │ +
602
│ │ │ +
603 // the visitor may specify preferred dynamic traversal
│ │ │ +
604 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │ +
605
│ │ │ +
606 // declare rule that applies visitor and current value to a child i. Returns next value
│ │ │ +
607 auto apply_i = [&](auto&& value, const auto& i){
│ │ │ +
608 auto&& child = tree.child(i);
│ │ │ +
609 using Child = std::decay_t<decltype(child)>;
│ │ │ +
610
│ │ │ +
611 auto val_before = visitor.beforeChild(tree, child, treePath, i, std::move(value));
│ │ │ +
612
│ │ │ +
613 // visits between children
│ │ │ +
614 auto val_in = Hybrid::ifElse(
│ │ │ +
615 Hybrid::equal_to(i,Indices::_0),
│ │ │ +
616 [&](auto id){return std::move(val_before);},
│ │ │ +
617 [&](auto id){return visitor.in(tree, treePath, std::move(val_before));}
│ │ │ +
618 );
│ │ │ +
619
│ │ │ +
620 constexpr bool visitChild = Visitor::template VisitChild<Tree,Child,TreePath>::value;
│ │ │ +
621 auto val_visit = [&](){
│ │ │ +
622 if constexpr (visitChild) {
│ │ │ +
623 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ +
624 return hybridApplyToTree(child, childTreePath, visitor, std::move(val_in));
│ │ │ +
625 }
│ │ │ +
626 else
│ │ │ +
627 return std::move(val_in);
│ │ │ +
628 }();
│ │ │ +
629
│ │ │ +
630 return visitor.afterChild(tree, child, treePath, i, std::move(val_visit));
│ │ │ +
631 };
│ │ │ +
632
│ │ │ +
633 // apply visitor to children
│ │ │ +
634 auto in_val = [&](){
│ │ │ +
635 if constexpr (allowStaticTraversal::value && not preferDynamicTraversal::value) {
│ │ │ +
636 // get list of static indices
│ │ │ +
637 auto indices = std::make_index_sequence<Tree::degree()>{};
│ │ │ +
638
│ │ │ +
639 // unfold apply_i left to right
│ │ │ +
640 return unpackIntegerSequence([&](auto... i) {
│ │ │ +
660 return left_fold(std::move(apply_i),std::move(pre_val), i...);
│ │ │ +
661 }, indices);
│ │ │ +
662
│ │ │ +
663 } else {
│ │ │ +
664 // unfold first child to get type
│ │ │ +
665 auto i_val = apply_i(std::move(pre_val),std::size_t{0});
│ │ │ +
666 // dynamically loop rest of the children to accumulate remindng values
│ │ │ +
667 for(std::size_t i = 1; i < tree.degree(); i++)
│ │ │ +
668 i_val = apply_i(i_val,i);
│ │ │ +
669 return i_val;
│ │ │ +
670 }
│ │ │ +
671 }();
│ │ │ +
672
│ │ │ +
673 return visitor.post(tree, treePath, in_val);
│ │ │ +
674 }
│ │ │ +
675
│ │ │ +
676 }
│ │ │ +
677
│ │ │ +
701 template<typename Tree, typename Visitor, typename Init>
│ │ │ +
│ │ │ +
702 auto hybridApplyToTree(Tree&& tree, Visitor&& visitor, Init&& init)
│ │ │ +
703 {
│ │ │ +
704 return Impl::hybridApplyToTree(tree, hybridTreePath(), visitor, init);
│ │ │ +
705 }
│ │ │ +
│ │ │ +
706
│ │ │ +
707 } // namespace Experimental
│ │ │ +
│ │ │ +
708
│ │ │ +
710 } // namespace TypeTree
│ │ │ +
│ │ │ +
711} //namespace Dune
│ │ │ +
│ │ │ +
712
│ │ │ +
713#endif // DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │ +
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition pairtraversal.hh:25
│ │ │ -
void applyToTree(T &&tree, TreePath treePath, V &&visitor)
Definition traversal.hh:91
│ │ │ -
decltype(( std::integral_constant< std::size_t, Tree::degree()>{})) StaticTraversalConcept
Definition traversal.hh:41
│ │ │ -
constexpr auto leafTreePathTuple(Prefix prefix)
Definition traversal.hh:48
│ │ │ -
decltype(( std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) DynamicTraversalConcept
Definition traversal.hh:34
│ │ │ -
Type
Definition treepath.hh:108
│ │ │ -
@ dynamic
Definition treepath.hh:108
│ │ │ +
Definition accumulate_static.hh:576
│ │ │ +
auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init)
Apply hybrid visitor to TypeTree.
Definition accumulate_static.hh:702
│ │ │ +
Statically combine two values of type result_type using ||.
Definition accumulate_static.hh:28
│ │ │ +
Definition accumulate_static.hh:31
│ │ │ +
static const result_type result
Definition accumulate_static.hh:32
│ │ │ +
Statically combine two values of type result_type using &&.
Definition accumulate_static.hh:39
│ │ │ +
Definition accumulate_static.hh:42
│ │ │ +
static const result_type result
Definition accumulate_static.hh:43
│ │ │ +
Statically combine two values of type result_type using +.
Definition accumulate_static.hh:50
│ │ │ +
Definition accumulate_static.hh:53
│ │ │ +
static const result_type result
Definition accumulate_static.hh:54
│ │ │ +
Statically combine two values of type result_type using -.
Definition accumulate_static.hh:61
│ │ │ +
Definition accumulate_static.hh:64
│ │ │ +
static const result_type result
Definition accumulate_static.hh:65
│ │ │ +
Statically combine two values of type result_type using *.
Definition accumulate_static.hh:72
│ │ │ +
Definition accumulate_static.hh:75
│ │ │ +
static const result_type result
Definition accumulate_static.hh:76
│ │ │ +
Statically combine two values of type result_type by returning their minimum.
Definition accumulate_static.hh:83
│ │ │ +
Definition accumulate_static.hh:86
│ │ │ +
static const result_type result
Definition accumulate_static.hh:87
│ │ │ +
Statically combine two values of type result_type by returning their maximum.
Definition accumulate_static.hh:94
│ │ │ +
Definition accumulate_static.hh:97
│ │ │ +
static const result_type result
Definition accumulate_static.hh:98
│ │ │ +
Statically accumulate a value over the nodes of a TypeTree.
Definition accumulate_static.hh:263
│ │ │ +
Functor::result_type result_type
The result type of the computation.
Definition accumulate_static.hh:266
│ │ │ +
static const result_type result
The accumulated result of the computation.
Definition accumulate_static.hh:269
│ │ │ +
Definition accumulate_static.hh:470
│ │ │ +
ParentChildReduction parent_child_reduction
Definition accumulate_static.hh:528
│ │ │ +
Functor functor
Definition accumulate_static.hh:499
│ │ │ +
StartType start_type
Definition accumulate_static.hh:536
│ │ │ +
ReductionAlgorithm reduction_strategy
Definition accumulate_static.hh:542
│ │ │ +
Reduction sibling_reduction
Definition accumulate_static.hh:520
│ │ │ +
Statically accumulate a type over the nodes of a TypeTree.
Definition accumulate_static.hh:557
│ │ │ +
accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, NodeTag< Tree > >::type type
The accumulated result of the computation.
Definition accumulate_static.hh:566
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,234 +1,686 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -traversal.hh │ │ │ │ +accumulate_static.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ -7#define DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ +7#define DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14 │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18 │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ -21 │ │ │ │ -22namespace _D_u_n_e { │ │ │ │ -23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +9#include │ │ │ │ +10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +15 │ │ │ │ +16 │ │ │ │ +_1_7namespace _D_u_n_e { │ │ │ │ +_1_8 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +19 │ │ │ │ 24 │ │ │ │ -29 │ │ │ │ -30 namespace _D_e_t_a_i_l { │ │ │ │ -31 │ │ │ │ -32 // SFINAE template check that Tree has a degree() function and a child() │ │ │ │ -function accepting integer indices │ │ │ │ -33 template │ │ │ │ -_3_4 using _D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t = decltype(( │ │ │ │ -35 std::declval().degree(), │ │ │ │ -36 std::declval().child(0u) │ │ │ │ -37 )); │ │ │ │ -38 │ │ │ │ -39 // SFINAE template check that Tree has static (constexpr) function Tree:: │ │ │ │ -degree() │ │ │ │ -40 template │ │ │ │ -_4_1 using _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t = decltype(( │ │ │ │ -42 std::integral_constant{} │ │ │ │ -43 )); │ │ │ │ -44 │ │ │ │ -45 │ │ │ │ -46 template = 0> │ │ │ │ -_4_8 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix) │ │ │ │ -49 { │ │ │ │ -50 return std::make_tuple(prefix); │ │ │ │ -51 } │ │ │ │ -52 │ │ │ │ -53 template = 0> │ │ │ │ -55 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix); │ │ │ │ -56 │ │ │ │ -57 template = 0> │ │ │ │ -_5_9 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix, std:: │ │ │ │ -index_sequence) │ │ │ │ -60 { │ │ │ │ -61 return std::tuple_cat(_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e, pathType>(Dune::TypeTree::push_back(prefix, Dune:: │ │ │ │ -index_constant{}))...); │ │ │ │ -62 } │ │ │ │ -63 │ │ │ │ -64 template │ │ │ │ -= 0> │ │ │ │ -_6_6 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix, std:: │ │ │ │ -index_sequence) │ │ │ │ -67 { │ │ │ │ -68 return std::tuple_cat(_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e, pathType>(Dune::TypeTree::push_back(prefix, indices))...); │ │ │ │ -69 } │ │ │ │ -70 │ │ │ │ -71 template> │ │ │ │ -_7_3 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix) │ │ │ │ -74 { │ │ │ │ -75 return _D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e_<_T_r_e_e_,_ _p_a_t_h_T_y_p_e_>(prefix, std:: │ │ │ │ -make_index_sequence{}); │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -78 /* The signature is the same as for the public applyToTree │ │ │ │ -79 * function in Dune::Typetree, despite the additionally passed │ │ │ │ -80 * treePath argument. The path passed here is associated to │ │ │ │ -81 * the tree and the relative paths of the children (wrt. to tree) │ │ │ │ -82 * are appended to this. Hence the behavior of the public function │ │ │ │ -83 * is resembled by passing an empty treePath. │ │ │ │ -84 */ │ │ │ │ -85 │ │ │ │ -86 /* │ │ │ │ -87 * This is the overload for leaf traversal │ │ │ │ -88 */ │ │ │ │ -89 template::isLeaf, int> = 0> │ │ │ │ -_9_1 void _a_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor) │ │ │ │ -92 { │ │ │ │ -93 visitor.leaf(tree, treePath); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 /* │ │ │ │ -97 * This is the general overload doing child traversal. │ │ │ │ -98 */ │ │ │ │ -99 template::isLeaf, int> = 0> │ │ │ │ -_1_0_1 void _a_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor) │ │ │ │ -102 { │ │ │ │ -103 using Tree = std::remove_reference_t; │ │ │ │ -104 using Visitor = std::remove_reference_t; │ │ │ │ -105 visitor.pre(tree, treePath); │ │ │ │ +26 template │ │ │ │ +_2_7 struct _o_r__ │ │ │ │ +28 { │ │ │ │ +29 template │ │ │ │ +_3_0 struct _r_e_d_u_c_e │ │ │ │ +31 { │ │ │ │ +_3_2 static const result_type _r_e_s_u_l_t = r1 || r2; │ │ │ │ +33 }; │ │ │ │ +34 }; │ │ │ │ +35 │ │ │ │ +37 template │ │ │ │ +_3_8 struct _a_n_d__ │ │ │ │ +39 { │ │ │ │ +40 template │ │ │ │ +_4_1 struct _r_e_d_u_c_e │ │ │ │ +42 { │ │ │ │ +_4_3 static const result_type _r_e_s_u_l_t = r1 && r2; │ │ │ │ +44 }; │ │ │ │ +45 }; │ │ │ │ +46 │ │ │ │ +48 template │ │ │ │ +_4_9 struct _p_l_u_s │ │ │ │ +50 { │ │ │ │ +51 template │ │ │ │ +_5_2 struct _r_e_d_u_c_e │ │ │ │ +53 { │ │ │ │ +_5_4 static const result_type _r_e_s_u_l_t = r1 + r2; │ │ │ │ +55 }; │ │ │ │ +56 }; │ │ │ │ +57 │ │ │ │ +59 template │ │ │ │ +_6_0 struct _m_i_n_u_s │ │ │ │ +61 { │ │ │ │ +62 template │ │ │ │ +_6_3 struct _r_e_d_u_c_e │ │ │ │ +64 { │ │ │ │ +_6_5 static const result_type _r_e_s_u_l_t = r1 - r2; │ │ │ │ +66 }; │ │ │ │ +67 }; │ │ │ │ +68 │ │ │ │ +70 template │ │ │ │ +_7_1 struct _m_u_l_t_i_p_l_y │ │ │ │ +72 { │ │ │ │ +73 template │ │ │ │ +_7_4 struct _r_e_d_u_c_e │ │ │ │ +75 { │ │ │ │ +_7_6 static const result_type _r_e_s_u_l_t = r1 * r2; │ │ │ │ +77 }; │ │ │ │ +78 }; │ │ │ │ +79 │ │ │ │ +81 template │ │ │ │ +_8_2 struct _m_i_n │ │ │ │ +83 { │ │ │ │ +84 template │ │ │ │ +_8_5 struct _r_e_d_u_c_e │ │ │ │ +86 { │ │ │ │ +_8_7 static const result_type _r_e_s_u_l_t = r1 < r2 ? r1 : r2; │ │ │ │ +88 }; │ │ │ │ +89 }; │ │ │ │ +90 │ │ │ │ +92 template │ │ │ │ +_9_3 struct _m_a_x │ │ │ │ +94 { │ │ │ │ +95 template │ │ │ │ +_9_6 struct _r_e_d_u_c_e │ │ │ │ +97 { │ │ │ │ +_9_8 static const result_type _r_e_s_u_l_t = r1 > r2 ? r1 : r2; │ │ │ │ +99 }; │ │ │ │ +100 }; │ │ │ │ +101 │ │ │ │ +102 │ │ │ │ +103 namespace { │ │ │ │ +104 │ │ │ │ +105 // implementation of the traversal algorithm │ │ │ │ 106 │ │ │ │ -107 // the visitor may specify preferred dynamic traversal │ │ │ │ -108 using preferDynamicTraversal = std::bool_constant; │ │ │ │ -109 │ │ │ │ -110 // create a dynamic or static index range │ │ │ │ -111 auto indices = [&]{ │ │ │ │ -112 if constexpr(preferDynamicTraversal::value && Concept:: │ │ │ │ -UniformInnerTreeNode) │ │ │ │ -113 return Dune::range(std::size_t(tree.degree())); │ │ │ │ -114 else │ │ │ │ -115 return Dune::range(tree.degree()); │ │ │ │ -116 }(); │ │ │ │ +108 template │ │ │ │ +109 struct accumulate_node_helper │ │ │ │ +110 { │ │ │ │ +111 │ │ │ │ +112 typedef typename Functor::result_type result_type; │ │ │ │ +113 │ │ │ │ +114 static const result_type result = current_value; │ │ │ │ +115 │ │ │ │ +116 }; │ │ │ │ 117 │ │ │ │ -118 if constexpr(Concept::InnerTreeNode) { │ │ │ │ -119 Hybrid::forEach(indices, [&](auto i) { │ │ │ │ -120 auto&& child = tree.child(i); │ │ │ │ -121 using Child = std::decay_t; │ │ │ │ +119 template │ │ │ │ +120 struct │ │ │ │ +accumulate_node_helper │ │ │ │ +121 { │ │ │ │ 122 │ │ │ │ -123 visitor.beforeChild(tree, child, treePath, i); │ │ │ │ +123 typedef typename Functor::result_type result_type; │ │ │ │ 124 │ │ │ │ -125 // This requires that visitor.in(...) can always be instantiated, │ │ │ │ -126 // even if there's a single child only. │ │ │ │ -127 if (i>0) │ │ │ │ -128 visitor.in(tree, treePath); │ │ │ │ -129 │ │ │ │ -130 constexpr bool visitChild = Visitor::template │ │ │ │ -VisitChild::value; │ │ │ │ -131 if constexpr(visitChild) { │ │ │ │ -132 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ -133 _a_p_p_l_y_T_o_T_r_e_e(child, childTreePath, visitor); │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -136 visitor.afterChild(tree, child, treePath, i); │ │ │ │ -137 }); │ │ │ │ -138 } │ │ │ │ -139 visitor.post(tree, treePath); │ │ │ │ -140 } │ │ │ │ +125 static const result_type result = Reduction::template │ │ │ │ +reduce::result>::result; │ │ │ │ +126 │ │ │ │ +127 }; │ │ │ │ +128 │ │ │ │ +130 template │ │ │ │ +131 struct accumulate_value; │ │ │ │ +132 │ │ │ │ +134 template │ │ │ │ +135 struct │ │ │ │ +accumulate_value │ │ │ │ +136 { │ │ │ │ +137 │ │ │ │ +138 typedef typename Functor::result_type result_type; │ │ │ │ +139 │ │ │ │ +140 static const result_type result = │ │ │ │ 141 │ │ │ │ -142 } // namespace Detail │ │ │ │ +142 │ │ │ │ +accumulate_node_helper::value>::result; │ │ │ │ 143 │ │ │ │ -144 │ │ │ │ -145 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -146 // Public Interface │ │ │ │ -147 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -148 │ │ │ │ -162 template │ │ │ │ -_1_6_3 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e() │ │ │ │ -164 { │ │ │ │ -165 return _D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e_<_s_t_d_:_:_d_e_c_a_y___t_<_T_r_e_e_>, pathType> │ │ │ │ -(_h_y_b_r_i_d_T_r_e_e_P_a_t_h()); │ │ │ │ -166 } │ │ │ │ +144 }; │ │ │ │ +145 │ │ │ │ +147 template │ │ │ │ +148 struct accumulate_over_children │ │ │ │ +149 { │ │ │ │ +150 │ │ │ │ +151 typedef typename Functor::result_type result_type; │ │ │ │ +152 │ │ │ │ +153 typedef decltype(push_back(TreePath{},index_constant{})) │ │ │ │ +child_tree_path; │ │ │ │ +154 │ │ │ │ +155 typedef typename Node::template Child::Type child; │ │ │ │ +156 │ │ │ │ +157 static const result_type child_result = │ │ │ │ +accumulate_value>:: │ │ │ │ +result; │ │ │ │ +158 │ │ │ │ +159 static const result_type result = │ │ │ │ +accumulate_over_children:: │ │ │ │ +result; │ │ │ │ +160 │ │ │ │ +161 }; │ │ │ │ +162 │ │ │ │ +164 template │ │ │ │ +165 struct │ │ │ │ +accumulate_over_children │ │ │ │ +166 { │ │ │ │ 167 │ │ │ │ +168 typedef typename Functor::result_type result_type; │ │ │ │ 169 │ │ │ │ -183 template │ │ │ │ -_1_8_4 void _a_p_p_l_y_T_o_T_r_e_e(Tree&& tree, Visitor&& visitor) │ │ │ │ -185 { │ │ │ │ -186 _D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e(tree, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor); │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ -190 │ │ │ │ -191 } // namespace TypeTree │ │ │ │ -192} //namespace Dune │ │ │ │ -193 │ │ │ │ -194#endif // DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ -_v_i_s_i_t_o_r_._h_h │ │ │ │ +170 static const result_type result = current_value; │ │ │ │ +171 │ │ │ │ +172 }; │ │ │ │ +173 │ │ │ │ +176 template │ │ │ │ +177 struct accumulate_value_generic_composite_node │ │ │ │ +178 { │ │ │ │ +179 │ │ │ │ +180 typedef typename Functor::result_type result_type; │ │ │ │ +181 │ │ │ │ +182 static const result_type child_result = │ │ │ │ +accumulate_over_children:: │ │ │ │ +value>::result; │ │ │ │ +183 │ │ │ │ +184 static const result_type result = │ │ │ │ +185 │ │ │ │ +accumulate_node_helper::value>::result; │ │ │ │ +186 │ │ │ │ +187 │ │ │ │ +188 }; │ │ │ │ +189 │ │ │ │ +191 template │ │ │ │ +192 struct │ │ │ │ +accumulate_value │ │ │ │ +193 : public │ │ │ │ +accumulate_value_generic_composite_node │ │ │ │ +194 {}; │ │ │ │ +195 │ │ │ │ +197 template │ │ │ │ +198 struct │ │ │ │ +accumulate_value │ │ │ │ +199 : public │ │ │ │ +accumulate_value_generic_composite_node │ │ │ │ +200 {}; │ │ │ │ +201 │ │ │ │ +202 } // anonymous namespace │ │ │ │ +203 │ │ │ │ +205 │ │ │ │ +261 template │ │ │ │ +_2_6_2 struct _A_c_c_u_m_u_l_a_t_e_V_a_l_u_e │ │ │ │ +263 { │ │ │ │ +264 │ │ │ │ +_2_6_6 typedef typename Functor::result_type _r_e_s_u_l_t___t_y_p_e; │ │ │ │ +267 │ │ │ │ +_2_6_9 static const _r_e_s_u_l_t___t_y_p_e _r_e_s_u_l_t = │ │ │ │ +accumulate_value,_N_o_d_e_T_a_g_<_T_r_e_e_>>_:_: │ │ │ │ +_r_e_s_u_l_t; │ │ │ │ +270 │ │ │ │ +271 }; │ │ │ │ +272 │ │ │ │ +275 struct flattened_reduction; │ │ │ │ +276 │ │ │ │ +279 struct bottom_up_reduction; │ │ │ │ +280 │ │ │ │ +281 namespace { │ │ │ │ +282 │ │ │ │ +283 // implementation of the traversal algorithm │ │ │ │ +284 │ │ │ │ +287 template │ │ │ │ +288 struct accumulate_type_node_helper │ │ │ │ +289 { │ │ │ │ +290 │ │ │ │ +291 typedef current_type type; │ │ │ │ +292 │ │ │ │ +293 }; │ │ │ │ +294 │ │ │ │ +296 template │ │ │ │ +297 struct │ │ │ │ +accumulate_type_node_helper │ │ │ │ +298 { │ │ │ │ +299 │ │ │ │ +300 typedef typename Reduction::template reduce< │ │ │ │ +301 current_type, │ │ │ │ +302 typename Functor::template visit< │ │ │ │ +303 Node, │ │ │ │ +304 TreePath │ │ │ │ +305 >::type │ │ │ │ +306 >::type type; │ │ │ │ +307 │ │ │ │ +308 }; │ │ │ │ +309 │ │ │ │ +311 template │ │ │ │ +312 struct accumulate_type; │ │ │ │ +313 │ │ │ │ +315 template │ │ │ │ +316 struct accumulate_type │ │ │ │ +317 { │ │ │ │ +318 │ │ │ │ +319 typedef typename accumulate_type_node_helper< │ │ │ │ +320 LeafNode, │ │ │ │ +321 typename Policy::functor, │ │ │ │ +322 typename Policy::sibling_reduction, │ │ │ │ +323 current_type, │ │ │ │ +324 TreePath, │ │ │ │ +325 Policy::functor::template doVisit< │ │ │ │ +326 LeafNode, │ │ │ │ +327 TreePath>::value │ │ │ │ +328 >::type type; │ │ │ │ +329 │ │ │ │ +330 }; │ │ │ │ +331 │ │ │ │ +332 │ │ │ │ +335 template │ │ │ │ +336 struct propagate_type_down_tree; │ │ │ │ +337 │ │ │ │ +339 template │ │ │ │ +340 struct propagate_type_down_tree< │ │ │ │ +341 current_type, │ │ │ │ +342 tree_path, │ │ │ │ +343 start_type, │ │ │ │ +344 bottom_up_reduction │ │ │ │ +345 > │ │ │ │ +346 { │ │ │ │ +347 typedef current_type type; │ │ │ │ +348 }; │ │ │ │ +349 │ │ │ │ +351 template │ │ │ │ +352 struct propagate_type_down_tree< │ │ │ │ +353 current_type, │ │ │ │ +354 tree_path, │ │ │ │ +355 start_type, │ │ │ │ +356 flattened_reduction │ │ │ │ +357 > │ │ │ │ +358 { │ │ │ │ +359 typedef typename std::conditional< │ │ │ │ +360 tree_path().back() == 0, │ │ │ │ +361 start_type, │ │ │ │ +362 current_type │ │ │ │ +363 >::type type; │ │ │ │ +364 }; │ │ │ │ +365 │ │ │ │ +366 │ │ │ │ +368 template │ │ │ │ +369 struct accumulate_type_over_children │ │ │ │ +370 { │ │ │ │ +371 │ │ │ │ +372 typedef decltype(push_back(TreePath{},index_constant{})) │ │ │ │ +child_tree_path; │ │ │ │ +373 │ │ │ │ +374 typedef typename Node::template Child::Type child; │ │ │ │ +375 │ │ │ │ +376 typedef typename accumulate_type< │ │ │ │ +377 child, │ │ │ │ +378 Policy, │ │ │ │ +379 // apply reduction choice (flat / hierarchic) │ │ │ │ +380 typename propagate_type_down_tree< │ │ │ │ +381 current_type, │ │ │ │ +382 child_tree_path, │ │ │ │ +383 typename Policy::start_type, │ │ │ │ +384 typename Policy::reduction_strategy │ │ │ │ +385 >::type, │ │ │ │ +386 child_tree_path, │ │ │ │ +387 NodeTag │ │ │ │ +388 >::type child_result_type; │ │ │ │ +389 │ │ │ │ +390 typedef typename accumulate_type_over_children< │ │ │ │ +391 Node, │ │ │ │ +392 Policy, │ │ │ │ +393 child_result_type, │ │ │ │ +394 TreePath, │ │ │ │ +395 i+1, │ │ │ │ +396 n │ │ │ │ +397 >::type type; │ │ │ │ +398 │ │ │ │ +399 }; │ │ │ │ +400 │ │ │ │ +402 template │ │ │ │ +403 struct accumulate_type_over_children │ │ │ │ +404 { │ │ │ │ +405 │ │ │ │ +406 typedef current_type type; │ │ │ │ +407 │ │ │ │ +408 }; │ │ │ │ +409 │ │ │ │ +410 │ │ │ │ +413 template │ │ │ │ +414 struct accumulate_type_generic_composite_node │ │ │ │ +415 { │ │ │ │ +416 │ │ │ │ +417 typedef typename accumulate_type_over_children< │ │ │ │ +418 Node, │ │ │ │ +419 Policy, │ │ │ │ +420 current_type, │ │ │ │ +421 TreePath, │ │ │ │ +422 0, │ │ │ │ +423 StaticDegree::value │ │ │ │ +424 >::type children_result_type; │ │ │ │ +425 │ │ │ │ +426 typedef typename accumulate_type_node_helper< │ │ │ │ +427 Node, │ │ │ │ +428 typename Policy::functor, │ │ │ │ +429 typename Policy::parent_child_reduction, │ │ │ │ +430 children_result_type, │ │ │ │ +431 TreePath, │ │ │ │ +432 Policy::functor::template doVisit< │ │ │ │ +433 Node, │ │ │ │ +434 TreePath │ │ │ │ +435 >::value │ │ │ │ +436 >::type type; │ │ │ │ +437 │ │ │ │ +438 }; │ │ │ │ +439 │ │ │ │ +441 template │ │ │ │ +442 struct accumulate_type │ │ │ │ +443 : public │ │ │ │ +accumulate_type_generic_composite_node │ │ │ │ +444 {}; │ │ │ │ +445 │ │ │ │ +447 template │ │ │ │ +448 struct │ │ │ │ +accumulate_type │ │ │ │ +449 : public │ │ │ │ +accumulate_type_generic_composite_node │ │ │ │ +450 {}; │ │ │ │ +451 │ │ │ │ +452 } // anonymous namespace │ │ │ │ +453 │ │ │ │ +454 │ │ │ │ +462 template< │ │ │ │ +463 typename Functor, │ │ │ │ +464 typename Reduction, │ │ │ │ +465 typename StartType, │ │ │ │ +466 typename ParentChildReduction = Reduction, │ │ │ │ +467 typename ReductionAlgorithm = flattened_reduction │ │ │ │ +468 > │ │ │ │ +_4_6_9 struct _T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y │ │ │ │ +470 { │ │ │ │ +471 │ │ │ │ +_4_9_9 typedef Functor _f_u_n_c_t_o_r; │ │ │ │ +500 │ │ │ │ +_5_2_0 typedef Reduction _s_i_b_l_i_n_g___r_e_d_u_c_t_i_o_n; │ │ │ │ +521 │ │ │ │ +_5_2_8 typedef ParentChildReduction _p_a_r_e_n_t___c_h_i_l_d___r_e_d_u_c_t_i_o_n; │ │ │ │ +529 │ │ │ │ +_5_3_6 typedef StartType _s_t_a_r_t___t_y_p_e; │ │ │ │ +537 │ │ │ │ +_5_4_2 typedef ReductionAlgorithm _r_e_d_u_c_t_i_o_n___s_t_r_a_t_e_g_y; │ │ │ │ +543 }; │ │ │ │ +544 │ │ │ │ +545 │ │ │ │ +547 │ │ │ │ +555 template │ │ │ │ +_5_5_6 struct _A_c_c_u_m_u_l_a_t_e_T_y_p_e │ │ │ │ +557 { │ │ │ │ +558 │ │ │ │ +560 typedef typename accumulate_type< │ │ │ │ +561 Tree, │ │ │ │ +562 Policy, │ │ │ │ +563 typename Policy::start_type, │ │ │ │ +564 _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_>, │ │ │ │ +565 _N_o_d_e_T_a_g_<_T_r_e_e_> │ │ │ │ +_5_6_6 >_:_:_t_y_p_e _t_y_p_e; │ │ │ │ +567 │ │ │ │ +568 }; │ │ │ │ +569 │ │ │ │ +570 │ │ │ │ +571 │ │ │ │ +572 │ │ │ │ +573 │ │ │ │ +574 /***************************************************/ │ │ │ │ +575 │ │ │ │ +_5_7_6 namespace _E_x_p_e_r_i_m_e_n_t_a_l { │ │ │ │ +577 namespace Impl { │ │ │ │ +578 │ │ │ │ +580 template::isLeaf, int> = 0> │ │ │ │ +582 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor, U&& │ │ │ │ +current_val) │ │ │ │ +583 { │ │ │ │ +584 return visitor.leaf(tree, treePath, std::forward(current_val)); │ │ │ │ +585 } │ │ │ │ +586 │ │ │ │ +588 template::isLeaf, int> = 0> │ │ │ │ +590 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor, U&& │ │ │ │ +current_val) │ │ │ │ +591 { │ │ │ │ +592 using Tree = std::remove_reference_t; │ │ │ │ +593 using Visitor = std::remove_reference_t; │ │ │ │ +594 auto pre_val = visitor.pre(tree, treePath, std::forward(current_val)); │ │ │ │ +595 │ │ │ │ +596 // check which type of traversal is supported by the tree │ │ │ │ +597 using allowDynamicTraversal = Dune::Std::is_detected; │ │ │ │ +598 using allowStaticTraversal = Dune::Std::is_detected; │ │ │ │ +599 │ │ │ │ +600 // the tree must support either dynamic or static traversal │ │ │ │ +601 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value); │ │ │ │ +602 │ │ │ │ +603 // the visitor may specify preferred dynamic traversal │ │ │ │ +604 using preferDynamicTraversal = std::bool_constant; │ │ │ │ +605 │ │ │ │ +606 // declare rule that applies visitor and current value to a child i. │ │ │ │ +Returns next value │ │ │ │ +607 auto apply_i = [&](auto&& value, const auto& i){ │ │ │ │ +608 auto&& child = tree.child(i); │ │ │ │ +609 using Child = std::decay_t; │ │ │ │ +610 │ │ │ │ +611 auto val_before = visitor.beforeChild(tree, child, treePath, i, std::move │ │ │ │ +(value)); │ │ │ │ +612 │ │ │ │ +613 // visits between children │ │ │ │ +614 auto val_in = Hybrid::ifElse( │ │ │ │ +615 Hybrid::equal_to(i,Indices::_0), │ │ │ │ +616 [&](auto id){return std::move(val_before);}, │ │ │ │ +617 [&](auto id){return visitor.in(tree, treePath, std::move(val_before));} │ │ │ │ +618 ); │ │ │ │ +619 │ │ │ │ +620 constexpr bool visitChild = Visitor::template │ │ │ │ +VisitChild::value; │ │ │ │ +621 auto val_visit = [&](){ │ │ │ │ +622 if constexpr (visitChild) { │ │ │ │ +623 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ +624 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(child, childTreePath, visitor, std::move(val_in)); │ │ │ │ +625 } │ │ │ │ +626 else │ │ │ │ +627 return std::move(val_in); │ │ │ │ +628 }(); │ │ │ │ +629 │ │ │ │ +630 return visitor.afterChild(tree, child, treePath, i, std::move(val_visit)); │ │ │ │ +631 }; │ │ │ │ +632 │ │ │ │ +633 // apply visitor to children │ │ │ │ +634 auto in_val = [&](){ │ │ │ │ +635 if constexpr (allowStaticTraversal::value && not preferDynamicTraversal:: │ │ │ │ +value) { │ │ │ │ +636 // get list of static indices │ │ │ │ +637 auto indices = std::make_index_sequence{}; │ │ │ │ +638 │ │ │ │ +639 // unfold apply_i left to right │ │ │ │ +640 return unpackIntegerSequence([&](auto... i) { │ │ │ │ +660 return left_fold(std::move(apply_i),std::move(pre_val), i...); │ │ │ │ +661 }, indices); │ │ │ │ +662 │ │ │ │ +663 } else { │ │ │ │ +664 // unfold first child to get type │ │ │ │ +665 auto i_val = apply_i(std::move(pre_val),std::size_t{0}); │ │ │ │ +666 // dynamically loop rest of the children to accumulate remindng values │ │ │ │ +667 for(std::size_t i = 1; i < tree.degree(); i++) │ │ │ │ +668 i_val = apply_i(i_val,i); │ │ │ │ +669 return i_val; │ │ │ │ +670 } │ │ │ │ +671 }(); │ │ │ │ +672 │ │ │ │ +673 return visitor.post(tree, treePath, in_val); │ │ │ │ +674 } │ │ │ │ +675 │ │ │ │ +676 } │ │ │ │ +677 │ │ │ │ +701 template │ │ │ │ +_7_0_2 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(Tree&& tree, Visitor&& visitor, Init&& init) │ │ │ │ +703 { │ │ │ │ +704 return Impl::hybridApplyToTree(tree, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor, init); │ │ │ │ +705 } │ │ │ │ +706 │ │ │ │ +707 } // namespace Experimental │ │ │ │ +708 │ │ │ │ +710 } // namespace TypeTree │ │ │ │ +711} //namespace Dune │ │ │ │ +712 │ │ │ │ +713#endif // DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ _t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e │ │ │ │ -constexpr auto leafTreePathTuple() │ │ │ │ -Create tuple of tree paths to leafs. │ │ │ │ -DDeeffiinniittiioonn traversal.hh:163 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ -void applyToTree(Tree &&tree, Visitor &&visitor) │ │ │ │ -Apply visitor to TypeTree. │ │ │ │ -DDeeffiinniittiioonn traversal.hh:184 │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_u_t_i_l_i_t_y_._h_h │ │ │ │ +_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ +typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ +Returns the node tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ constexpr auto hybridTreePath(const T &... t) │ │ │ │ Constructs a new HybridTreePath from the given indices. │ │ │ │ DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ +Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ +A type for representing tree paths that supports both compile time and run time │ │ │ │ +indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ -DDeeffiinniittiioonn pairtraversal.hh:25 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ -void applyToTree(T &&tree, TreePath treePath, V &&visitor) │ │ │ │ -DDeeffiinniittiioonn traversal.hh:91 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ -decltype(( std::integral_constant< std::size_t, Tree::degree()>{})) │ │ │ │ -StaticTraversalConcept │ │ │ │ -DDeeffiinniittiioonn traversal.hh:41 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e │ │ │ │ -constexpr auto leafTreePathTuple(Prefix prefix) │ │ │ │ -DDeeffiinniittiioonn traversal.hh:48 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ -decltype(( std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) │ │ │ │ -DynamicTraversalConcept │ │ │ │ -DDeeffiinniittiioonn traversal.hh:34 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ -Type │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ -@ dynamic │ │ │ │ -DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:576 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e │ │ │ │ +auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init) │ │ │ │ +Apply hybrid visitor to TypeTree. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:702 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r__ │ │ │ │ +Statically combine two values of type result_type using ||. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:28 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:31 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:32 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d__ │ │ │ │ +Statically combine two values of type result_type using &&. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:39 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:42 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:43 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s │ │ │ │ +Statically combine two values of type result_type using +. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:53 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:54 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s │ │ │ │ +Statically combine two values of type result_type using -. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:64 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:65 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y │ │ │ │ +Statically combine two values of type result_type using *. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:72 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:75 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:76 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n │ │ │ │ +Statically combine two values of type result_type by returning their minimum. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:86 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:87 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x │ │ │ │ +Statically combine two values of type result_type by returning their maximum. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:94 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_:_:_r_e_d_u_c_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:97 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:98 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e │ │ │ │ +Statically accumulate a value over the nodes of a TypeTree. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:263 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_:_:_r_e_s_u_l_t___t_y_p_e │ │ │ │ +Functor::result_type result_type │ │ │ │ +The result type of the computation. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:266 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_:_:_r_e_s_u_l_t │ │ │ │ +static const result_type result │ │ │ │ +The accumulated result of the computation. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:269 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:470 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_p_a_r_e_n_t___c_h_i_l_d___r_e_d_u_c_t_i_o_n │ │ │ │ +ParentChildReduction parent_child_reduction │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:528 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_f_u_n_c_t_o_r │ │ │ │ +Functor functor │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:499 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_s_t_a_r_t___t_y_p_e │ │ │ │ +StartType start_type │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:536 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_r_e_d_u_c_t_i_o_n___s_t_r_a_t_e_g_y │ │ │ │ +ReductionAlgorithm reduction_strategy │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:542 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_s_i_b_l_i_n_g___r_e_d_u_c_t_i_o_n │ │ │ │ +Reduction sibling_reduction │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:520 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e │ │ │ │ +Statically accumulate a type over the nodes of a TypeTree. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:557 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e_:_:_t_y_p_e │ │ │ │ +accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, │ │ │ │ +NodeTag< Tree > >::type type │ │ │ │ +The accumulated result of the computation. │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:566 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00032.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: transformationutilities.hh File Reference │ │ │ +dune-typetree: powernode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,21 +71,45 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
transformationutilities.hh File Reference
│ │ │ +
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
powernode.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/typetree/simpletransformationdescriptors.hh>
│ │ │ -#include <dune/typetree/generictransformationdescriptors.hh>
│ │ │ +
#include <cassert>
│ │ │ +#include <array>
│ │ │ +#include <memory>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/utility.hh>
│ │ │ +#include <dune/typetree/childextraction.hh>
│ │ │ +#include <dune/typetree/typetraits.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  Dune::TypeTree::PowerNode< T, k >
 Collect k instances of type T within a dune-typetree. More...
struct  Dune::TypeTree::PowerNode< T, k >::Child< i >
 Access to the type and storage type of the i-th child. More...
│ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,12 +1,29 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -transformationutilities.hh File Reference │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +powernode.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_<_ _T_,_ _k_ _> │ │ │ │ +  Collect k instances of type T within a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_<_ _T_,_ _k_ _>_:_:_C_h_i_l_d_<_ _i_ _> │ │ │ │ +  Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _D_u_n_e │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00032_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: transformationutilities.hh Source File │ │ │ +dune-typetree: powernode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,31 +71,402 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
transformationutilities.hh
│ │ │ +
powernode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │ -
7#define DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_POWERNODE_HH
│ │ │ +
7#define DUNE_TYPETREE_POWERNODE_HH
│ │ │
8
│ │ │ - │ │ │ - │ │ │ -
11
│ │ │ -
12#endif // DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │ - │ │ │ - │ │ │ +
9#include <cassert>
│ │ │ +
10#include <array>
│ │ │ +
11#include <memory>
│ │ │ +
12#include <type_traits>
│ │ │ +
13
│ │ │ +
14#include <dune/common/typetraits.hh>
│ │ │ +
15#include <dune/common/std/type_traits.hh>
│ │ │ +
16
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
21
│ │ │ +
22namespace Dune {
│ │ │ +
23 namespace TypeTree {
│ │ │ +
24
│ │ │ +
29
│ │ │ +
30
│ │ │ +
31#ifndef DOXYGEN
│ │ │ +
32
│ │ │ +
34 template<typename PowerNode, typename T, std::size_t k>
│ │ │ +
35 struct AssertPowerNodeChildCount
│ │ │ +
36 : public std::enable_if<std::is_same<
│ │ │ +
37 typename PowerNode::ChildType,
│ │ │ +
38 T>::value &&
│ │ │ +
39 PowerNode::degree() == k,
│ │ │ +
40 T>
│ │ │ +
41 {};
│ │ │ +
42
│ │ │ +
43#endif
│ │ │ +
44
│ │ │ +
50 template<typename T, std::size_t k>
│ │ │ +
│ │ │ + │ │ │ +
52 {
│ │ │ +
53
│ │ │ +
54 public:
│ │ │ +
55
│ │ │ +
57 static const bool isLeaf = false;
│ │ │ +
58
│ │ │ +
60 static const bool isPower = true;
│ │ │ +
61
│ │ │ +
63 static const bool isComposite = false;
│ │ │ +
64
│ │ │ +
│ │ │ +
65 static constexpr auto degree ()
│ │ │ +
66 {
│ │ │ +
67 return std::integral_constant<std::size_t,k>{};
│ │ │ +
68 }
│ │ │ +
│ │ │ +
69
│ │ │ + │ │ │ +
72
│ │ │ +
74 typedef T ChildType;
│ │ │ +
75
│ │ │ +
77 typedef std::array<std::shared_ptr<T>,k> NodeStorage;
│ │ │ +
78
│ │ │ +
79
│ │ │ +
81 template<std::size_t i>
│ │ │ +
│ │ │ +
82 struct Child
│ │ │ +
83 {
│ │ │ +
84
│ │ │ +
85 static_assert((i < degree()), "child index out of range");
│ │ │ +
86
│ │ │ +
88 typedef T Type;
│ │ │ +
89
│ │ │ +
91 typedef T type;
│ │ │ +
92 };
│ │ │ +
│ │ │ +
93
│ │ │ +
96
│ │ │ +
98
│ │ │ +
101 template<std::size_t i>
│ │ │ +
│ │ │ +
102 T& child (index_constant<i> = {})
│ │ │ +
103 {
│ │ │ +
104 static_assert((i < degree()), "child index out of range");
│ │ │ +
105 return *_children[i];
│ │ │ +
106 }
│ │ │ +
│ │ │ +
107
│ │ │ +
109
│ │ │ +
112 template<std::size_t i>
│ │ │ +
│ │ │ +
113 const T& child (index_constant<i> = {}) const
│ │ │ +
114 {
│ │ │ +
115 static_assert((i < degree()), "child index out of range");
│ │ │ +
116 return *_children[i];
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │ +
120
│ │ │ +
123 template<std::size_t i>
│ │ │ +
│ │ │ +
124 std::shared_ptr<T> childStorage (index_constant<i> = {})
│ │ │ +
125 {
│ │ │ +
126 static_assert((i < degree()), "child index out of range");
│ │ │ +
127 return _children[i];
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
131
│ │ │ +
134 template<std::size_t i>
│ │ │ +
│ │ │ +
135 std::shared_ptr<const T> childStorage (index_constant<i> = {}) const
│ │ │ +
136 {
│ │ │ +
137 static_assert((i < degree()), "child index out of range");
│ │ │ +
138 return _children[i];
│ │ │ +
139 }
│ │ │ +
│ │ │ +
140
│ │ │ +
142 template<std::size_t i>
│ │ │ +
│ │ │ +
143 void setChild (T& t, index_constant<i> = {})
│ │ │ +
144 {
│ │ │ +
145 static_assert((i < degree()), "child index out of range");
│ │ │ +
146 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ +
147 }
│ │ │ +
│ │ │ +
148
│ │ │ +
150 template<std::size_t i>
│ │ │ +
│ │ │ +
151 void setChild (T&& t, index_constant<i> = {})
│ │ │ +
152 {
│ │ │ +
153 static_assert((i < degree()), "child index out of range");
│ │ │ +
154 _children[i] = convert_arg(std::move(t));
│ │ │ +
155 }
│ │ │ +
│ │ │ +
156
│ │ │ +
158 template<std::size_t i>
│ │ │ +
│ │ │ +
159 void setChild (std::shared_ptr<T> st, index_constant<i> = {})
│ │ │ +
160 {
│ │ │ +
161 static_assert((i < degree()), "child index out of range");
│ │ │ +
162 _children[i] = std::move(st);
│ │ │ +
163 }
│ │ │ +
│ │ │ +
164
│ │ │ +
166
│ │ │ +
167
│ │ │ +
170
│ │ │ +
172
│ │ │ +
│ │ │ +
175 T& child (std::size_t i)
│ │ │ +
176 {
│ │ │ +
177 assert(i < degree() && "child index out of range");
│ │ │ +
178 return *_children[i];
│ │ │ +
179 }
│ │ │ +
│ │ │ +
180
│ │ │ +
182
│ │ │ +
│ │ │ +
185 const T& child (std::size_t i) const
│ │ │ +
186 {
│ │ │ +
187 assert(i < degree() && "child index out of range");
│ │ │ +
188 return *_children[i];
│ │ │ +
189 }
│ │ │ +
│ │ │ +
190
│ │ │ +
192
│ │ │ +
│ │ │ +
195 std::shared_ptr<T> childStorage (std::size_t i)
│ │ │ +
196 {
│ │ │ +
197 assert(i < degree() && "child index out of range");
│ │ │ +
198 return _children[i];
│ │ │ +
199 }
│ │ │ +
│ │ │ +
200
│ │ │ +
202
│ │ │ +
│ │ │ +
205 std::shared_ptr<const T> childStorage (std::size_t i) const
│ │ │ +
206 {
│ │ │ +
207 assert(i < degree() && "child index out of range");
│ │ │ +
208 return _children[i];
│ │ │ +
209 }
│ │ │ +
│ │ │ +
210
│ │ │ +
│ │ │ +
212 void setChild (std::size_t i, T& t)
│ │ │ +
213 {
│ │ │ +
214 assert(i < degree() && "child index out of range");
│ │ │ +
215 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ +
216 }
│ │ │ +
│ │ │ +
217
│ │ │ +
│ │ │ +
219 void setChild (std::size_t i, T&& t)
│ │ │ +
220 {
│ │ │ +
221 assert(i < degree() && "child index out of range");
│ │ │ +
222 _children[i] = convert_arg(std::move(t));
│ │ │ +
223 }
│ │ │ +
│ │ │ +
224
│ │ │ +
│ │ │ +
226 void setChild (std::size_t i, std::shared_ptr<T> st)
│ │ │ +
227 {
│ │ │ +
228 assert(i < degree() && "child index out of range");
│ │ │ +
229 _children[i] = std::move(st);
│ │ │ +
230 }
│ │ │ +
│ │ │ +
231
│ │ │ +
│ │ │ +
232 const NodeStorage& nodeStorage () const
│ │ │ +
233 {
│ │ │ +
234 return _children;
│ │ │ +
235 }
│ │ │ +
│ │ │ +
236
│ │ │ +
238
│ │ │ +
241
│ │ │ +
242 // The following two methods require a little bit of SFINAE trickery to work correctly:
│ │ │ +
243 // We have to make sure that they don't shadow the methods for direct child access because
│ │ │ +
244 // those get called by the generic child() machinery. If that machinery picks up the methods
│ │ │ +
245 // defined below, we have an infinite recursion.
│ │ │ +
246 // So the methods make sure that either
│ │ │ +
247 //
│ │ │ +
248 // * there are more than one argument. In that case, we got multiple indices and can forward
│ │ │ +
249 // to the general machine.
│ │ │ +
250 //
│ │ │ +
251 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
│ │ │ +
252 // The argument thus has to be some kind of TreePath instance that we can also pass to the
│ │ │ +
253 // generic machine.
│ │ │ +
254 //
│ │ │ +
255 // The above SFINAE logic works, but there is still a problem with the return type deduction.
│ │ │ +
256 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
│ │ │ +
257 // type deduction will trigger the infinite recursion.
│ │ │ +
258
│ │ │ +
260
│ │ │ +
264#ifdef DOXYGEN
│ │ │ +
265 template<typename... Indices>
│ │ │ +
│ │ │ +
266 ImplementationDefined& child (Indices... indices)
│ │ │ +
267#else
│ │ │ +
268 template<typename I0, typename... I,
│ │ │ +
269 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ +
270 decltype(auto) child (I0 i0, I... i)
│ │ │ +
271#endif
│ │ │ +
272 {
│ │ │ +
273 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ +
274 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ +
275 );
│ │ │ +
276 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ +
277 }
│ │ │ +
│ │ │ +
278
│ │ │ +
280
│ │ │ +
284#ifdef DOXYGEN
│ │ │ +
285 template<typename... Indices>
│ │ │ +
│ │ │ +
286 const ImplementationDefined& child (Indices... indices)
│ │ │ +
287#else
│ │ │ +
288 template<typename I0, typename... I,
│ │ │ +
289 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ +
290 decltype(auto) child (I0 i0, I... i) const
│ │ │ +
291#endif
│ │ │ +
292 {
│ │ │ +
293 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ +
294 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ +
295 );
│ │ │ +
296 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ +
297 }
│ │ │ +
│ │ │ +
298
│ │ │ +
300
│ │ │ +
303
│ │ │ +
304 protected:
│ │ │ +
305
│ │ │ +
307
│ │ │ +
│ │ │ + │ │ │ +
316 {}
│ │ │ +
│ │ │ +
317
│ │ │ +
│ │ │ +
319 explicit PowerNode (const NodeStorage& children)
│ │ │ +
320 : _children(children)
│ │ │ +
321 {}
│ │ │ +
│ │ │ +
322
│ │ │ +
│ │ │ +
324 explicit PowerNode (T& t, bool distinct_objects = true)
│ │ │ +
325 {
│ │ │ +
326 if (distinct_objects)
│ │ │ +
327 {
│ │ │ +
328 for (typename NodeStorage::iterator it = _children.begin(); it != _children.end(); ++it)
│ │ │ +
329 *it = std::make_shared<T>(t);
│ │ │ +
330 }
│ │ │ +
331 else
│ │ │ +
332 {
│ │ │ +
333 std::shared_ptr<T> sp = stackobject_to_shared_ptr(t);
│ │ │ +
334 std::fill(_children.begin(),_children.end(),sp);
│ │ │ +
335 }
│ │ │ +
336 }
│ │ │ +
│ │ │ +
337
│ │ │ +
338#ifdef DOXYGEN
│ │ │ +
339
│ │ │ +
│ │ │ +
341 PowerNode(T& t1, T& t2, ...)
│ │ │ +
342 {}
│ │ │ +
│ │ │ +
343
│ │ │ +
344#else
│ │ │ +
345
│ │ │ +
346 template<typename... Children,
│ │ │ +
347 std::enable_if_t<
│ │ │ +
348 std::conjunction<std::is_same<ChildType, std::decay_t<Children>>...>::value
│ │ │ +
349 ,int> = 0>
│ │ │ +
350 PowerNode (Children&&... children)
│ │ │ +
351 {
│ │ │ +
352 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
│ │ │ +
353 _children = NodeStorage{convert_arg(std::forward<Children>(children))...};
│ │ │ +
354 }
│ │ │ +
355
│ │ │ +
356 template<typename... Children,
│ │ │ +
357 std::enable_if_t<
│ │ │ +
358 std::conjunction<std::is_same<ChildType, Children>...>::value
│ │ │ +
359 ,int> = 0>
│ │ │ +
360 PowerNode (std::shared_ptr<Children>... children)
│ │ │ +
361 {
│ │ │ +
362 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
│ │ │ +
363 _children = NodeStorage{children...};
│ │ │ +
364 }
│ │ │ +
365
│ │ │ +
366#endif // DOXYGEN
│ │ │ +
367
│ │ │ +
369
│ │ │ +
370 private:
│ │ │ +
371 NodeStorage _children;
│ │ │ +
372 };
│ │ │ +
│ │ │ +
373
│ │ │ +
375
│ │ │ +
376 } // namespace TypeTree
│ │ │ +
377} //namespace Dune
│ │ │ +
378
│ │ │ +
379#endif // DUNE_TYPETREE_POWERNODE_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
Definition accumulate_static.hh:17
│ │ │ +
Definition accumulate_static.hh:18
│ │ │ +
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ +
void setChild(T &t, index_constant< i >={})
Sets the i-th child to the passed-in value.
Definition powernode.hh:143
│ │ │ +
T & child(std::size_t i)
Returns the i-th child.
Definition powernode.hh:175
│ │ │ +
const T & child(index_constant< i >={}) const
Returns the i-th child (const version).
Definition powernode.hh:113
│ │ │ +
void setChild(std::shared_ptr< T > st, index_constant< i >={})
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:159
│ │ │ +
std::shared_ptr< T > childStorage(index_constant< i >={})
Returns the storage of the i-th child.
Definition powernode.hh:124
│ │ │ +
PowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition powernode.hh:341
│ │ │ +
const NodeStorage & nodeStorage() const
Definition powernode.hh:232
│ │ │ +
std::array< std::shared_ptr< T >, k > NodeStorage
The type used for storing the children.
Definition powernode.hh:77
│ │ │ +
std::shared_ptr< const T > childStorage(index_constant< i >={}) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:135
│ │ │ +
PowerNode(T &t, bool distinct_objects=true)
Initialize all children with copies of a storage object constructed from the parameter t.
Definition powernode.hh:324
│ │ │ +
PowerNodeTag NodeTag
The type tag that describes a PowerNode.
Definition powernode.hh:71
│ │ │ +
const T & child(std::size_t i) const
Returns the i-th child (const version).
Definition powernode.hh:185
│ │ │ +
static constexpr auto degree()
Definition powernode.hh:65
│ │ │ +
std::shared_ptr< const T > childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:205
│ │ │ +
void setChild(std::size_t i, std::shared_ptr< T > st)
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:226
│ │ │ +
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition powernode.hh:63
│ │ │ +
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition powernode.hh:57
│ │ │ +
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition powernode.hh:60
│ │ │ +
PowerNode(const NodeStorage &children)
Initialize the PowerNode with a copy of the passed-in storage type.
Definition powernode.hh:319
│ │ │ +
T ChildType
The type of each child.
Definition powernode.hh:74
│ │ │ +
T & child(index_constant< i >={})
Returns the i-th child.
Definition powernode.hh:102
│ │ │ +
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:266
│ │ │ +
void setChild(std::size_t i, T &&t)
Store the passed value in i-th child.
Definition powernode.hh:219
│ │ │ +
void setChild(T &&t, index_constant< i >={})
Store the passed value in i-th child.
Definition powernode.hh:151
│ │ │ +
PowerNode()
Default constructor.
Definition powernode.hh:315
│ │ │ +
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:286
│ │ │ +
void setChild(std::size_t i, T &t)
Sets the i-th child to the passed-in value.
Definition powernode.hh:212
│ │ │ +
std::shared_ptr< T > childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition powernode.hh:195
│ │ │ +
Access to the type and storage type of the i-th child.
Definition powernode.hh:83
│ │ │ +
T type
The type of the child.
Definition powernode.hh:91
│ │ │ +
T Type
The type of the child.
Definition powernode.hh:88
│ │ │ +
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,459 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -transformationutilities.hh │ │ │ │ +powernode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ -7#define DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +7#define DUNE_TYPETREE_POWERNODE_HH │ │ │ │ 8 │ │ │ │ -9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ -10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ -11 │ │ │ │ -12#endif // DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ -_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h │ │ │ │ -_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16 │ │ │ │ +17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e { │ │ │ │ +23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +24 │ │ │ │ +29 │ │ │ │ +30 │ │ │ │ +31#ifndef DOXYGEN │ │ │ │ +32 │ │ │ │ +34 template │ │ │ │ +35 struct AssertPowerNodeChildCount │ │ │ │ +36 : public std::enable_if::value && │ │ │ │ +39 PowerNode::degree() == k, │ │ │ │ +40 T> │ │ │ │ +41 {}; │ │ │ │ +42 │ │ │ │ +43#endif │ │ │ │ +44 │ │ │ │ +50 template │ │ │ │ +_5_1 class _P_o_w_e_r_N_o_d_e │ │ │ │ +52 { │ │ │ │ +53 │ │ │ │ +54 public: │ │ │ │ +55 │ │ │ │ +_5_7 static const bool _i_s_L_e_a_f = false; │ │ │ │ +58 │ │ │ │ +_6_0 static const bool _i_s_P_o_w_e_r = true; │ │ │ │ +61 │ │ │ │ +_6_3 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ +64 │ │ │ │ +_6_5 static constexpr auto _d_e_g_r_e_e () │ │ │ │ +66 { │ │ │ │ +67 return std::integral_constant{}; │ │ │ │ +68 } │ │ │ │ +69 │ │ │ │ +_7_1 typedef _P_o_w_e_r_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ +72 │ │ │ │ +_7_4 typedef T _C_h_i_l_d_T_y_p_e; │ │ │ │ +75 │ │ │ │ +_7_7 typedef std::array,k> _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +78 │ │ │ │ +79 │ │ │ │ +81 template │ │ │ │ +_8_2 struct _C_h_i_l_d │ │ │ │ +83 { │ │ │ │ +84 │ │ │ │ +85 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +86 │ │ │ │ +_8_8 typedef T _T_y_p_e; │ │ │ │ +89 │ │ │ │ +_9_1 typedef T _t_y_p_e; │ │ │ │ +92 }; │ │ │ │ +93 │ │ │ │ +96 │ │ │ │ +98 │ │ │ │ +101 template │ │ │ │ +_1_0_2 T& _c_h_i_l_d (index_constant = {}) │ │ │ │ +103 { │ │ │ │ +104 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +105 return *_children[i]; │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +109 │ │ │ │ +112 template │ │ │ │ +_1_1_3 const T& _c_h_i_l_d (index_constant = {}) const │ │ │ │ +114 { │ │ │ │ +115 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +116 return *_children[i]; │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +120 │ │ │ │ +123 template │ │ │ │ +_1_2_4 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ +125 { │ │ │ │ +126 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +127 return _children[i]; │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +131 │ │ │ │ +134 template │ │ │ │ +_1_3_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ +136 { │ │ │ │ +137 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +138 return _children[i]; │ │ │ │ +139 } │ │ │ │ +140 │ │ │ │ +142 template │ │ │ │ +_1_4_3 void _s_e_t_C_h_i_l_d (T& t, index_constant = {}) │ │ │ │ +144 { │ │ │ │ +145 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +146 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ +147 } │ │ │ │ +148 │ │ │ │ +150 template │ │ │ │ +_1_5_1 void _s_e_t_C_h_i_l_d (T&& t, index_constant = {}) │ │ │ │ +152 { │ │ │ │ +153 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +154 _children[i] = convert_arg(std::move(t)); │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +158 template │ │ │ │ +_1_5_9 void _s_e_t_C_h_i_l_d (std::shared_ptr st, index_constant = {}) │ │ │ │ +160 { │ │ │ │ +161 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +162 _children[i] = std::move(st); │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ +166 │ │ │ │ +167 │ │ │ │ +170 │ │ │ │ +172 │ │ │ │ +_1_7_5 T& _c_h_i_l_d (std::size_t i) │ │ │ │ +176 { │ │ │ │ +177 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +178 return *_children[i]; │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +182 │ │ │ │ +_1_8_5 const T& _c_h_i_l_d (std::size_t i) const │ │ │ │ +186 { │ │ │ │ +187 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +188 return *_children[i]; │ │ │ │ +189 } │ │ │ │ +190 │ │ │ │ +192 │ │ │ │ +_1_9_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ +196 { │ │ │ │ +197 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +198 return _children[i]; │ │ │ │ +199 } │ │ │ │ +200 │ │ │ │ +202 │ │ │ │ +_2_0_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ +206 { │ │ │ │ +207 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +208 return _children[i]; │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +_2_1_2 void _s_e_t_C_h_i_l_d (std::size_t i, T& t) │ │ │ │ +213 { │ │ │ │ +214 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +215 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ +216 } │ │ │ │ +217 │ │ │ │ +_2_1_9 void _s_e_t_C_h_i_l_d (std::size_t i, T&& t) │ │ │ │ +220 { │ │ │ │ +221 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +222 _children[i] = convert_arg(std::move(t)); │ │ │ │ +223 } │ │ │ │ +224 │ │ │ │ +_2_2_6 void _s_e_t_C_h_i_l_d (std::size_t i, std::shared_ptr st) │ │ │ │ +227 { │ │ │ │ +228 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +229 _children[i] = std::move(st); │ │ │ │ +230 } │ │ │ │ +231 │ │ │ │ +_2_3_2 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +233 { │ │ │ │ +234 return _children; │ │ │ │ +235 } │ │ │ │ +236 │ │ │ │ +238 │ │ │ │ +241 │ │ │ │ +242 // The following two methods require a little bit of SFINAE trickery to │ │ │ │ +work correctly: │ │ │ │ +243 // We have to make sure that they don't shadow the methods for direct child │ │ │ │ +access because │ │ │ │ +244 // those get called by the generic child() machinery. If that machinery │ │ │ │ +picks up the methods │ │ │ │ +245 // defined below, we have an infinite recursion. │ │ │ │ +246 // So the methods make sure that either │ │ │ │ +247 // │ │ │ │ +248 // * there are more than one argument. In that case, we got multiple │ │ │ │ +indices and can forward │ │ │ │ +249 // to the general machine. │ │ │ │ +250 // │ │ │ │ +251 // * the first argument is not a valid flat index, i.e. either a std:: │ │ │ │ +size_t or an index_constant. │ │ │ │ +252 // The argument thus has to be some kind of TreePath instance that we can │ │ │ │ +also pass to the │ │ │ │ +253 // generic machine. │ │ │ │ +254 // │ │ │ │ +255 // The above SFINAE logic works, but there is still a problem with the │ │ │ │ +return type deduction. │ │ │ │ +256 // We have to do a lazy lookup of the return type after SFINAE has │ │ │ │ +succeeded, otherwise the return │ │ │ │ +257 // type deduction will trigger the infinite recursion. │ │ │ │ +258 │ │ │ │ +260 │ │ │ │ +264#ifdef DOXYGEN │ │ │ │ +265 template │ │ │ │ +_2_6_6 ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ +267#else │ │ │ │ +268 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ +270 decltype(auto) _c_h_i_l_d (I0 i0, I... i) │ │ │ │ +271#endif │ │ │ │ +272 { │ │ │ │ +273 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ +274 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ +freestanding version child(node,treePath) instead." │ │ │ │ +275 ); │ │ │ │ +276 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ +277 } │ │ │ │ +278 │ │ │ │ +280 │ │ │ │ +284#ifdef DOXYGEN │ │ │ │ +285 template │ │ │ │ +_2_8_6 const ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ +287#else │ │ │ │ +288 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ +290 decltype(auto) _c_h_i_l_d (I0 i0, I... i) const │ │ │ │ +291#endif │ │ │ │ +292 { │ │ │ │ +293 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ +294 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ +freestanding version child(node,treePath) instead." │ │ │ │ +295 ); │ │ │ │ +296 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ +297 } │ │ │ │ +298 │ │ │ │ +300 │ │ │ │ +303 │ │ │ │ +304 protected: │ │ │ │ +305 │ │ │ │ +307 │ │ │ │ +_3_1_5 _P_o_w_e_r_N_o_d_e () │ │ │ │ +316 {} │ │ │ │ +317 │ │ │ │ +_3_1_9 explicit _P_o_w_e_r_N_o_d_e (const _N_o_d_e_S_t_o_r_a_g_e& children) │ │ │ │ +320 : _children(children) │ │ │ │ +321 {} │ │ │ │ +322 │ │ │ │ +_3_2_4 explicit _P_o_w_e_r_N_o_d_e (T& t, bool distinct_objects = true) │ │ │ │ +325 { │ │ │ │ +326 if (distinct_objects) │ │ │ │ +327 { │ │ │ │ +328 for (typename NodeStorage::iterator it = _children.begin(); it != │ │ │ │ +_children.end(); ++it) │ │ │ │ +329 *it = std::make_shared(t); │ │ │ │ +330 } │ │ │ │ +331 else │ │ │ │ +332 { │ │ │ │ +333 std::shared_ptr sp = stackobject_to_shared_ptr(t); │ │ │ │ +334 std::fill(_children.begin(),_children.end(),sp); │ │ │ │ +335 } │ │ │ │ +336 } │ │ │ │ +337 │ │ │ │ +338#ifdef DOXYGEN │ │ │ │ +339 │ │ │ │ +_3_4_1 _P_o_w_e_r_N_o_d_e(T& t1, T& t2, ...) │ │ │ │ +342 {} │ │ │ │ +343 │ │ │ │ +344#else │ │ │ │ +345 │ │ │ │ +346 template>...>::value │ │ │ │ +349 ,int> = 0> │ │ │ │ +350 _P_o_w_e_r_N_o_d_e (Children&&... children) │ │ │ │ +351 { │ │ │ │ +352 static_assert(_d_e_g_r_e_e() == sizeof...(Children), "PowerNode constructor is │ │ │ │ +called with incorrect number of children"); │ │ │ │ +353 _children = _N_o_d_e_S_t_o_r_a_g_e{convert_arg(std::forward(children))...}; │ │ │ │ +354 } │ │ │ │ +355 │ │ │ │ +356 template...>::value │ │ │ │ +359 ,int> = 0> │ │ │ │ +360 _P_o_w_e_r_N_o_d_e (std::shared_ptr... children) │ │ │ │ +361 { │ │ │ │ +362 static_assert(_d_e_g_r_e_e() == sizeof...(Children), "PowerNode constructor is │ │ │ │ +called with incorrect number of children"); │ │ │ │ +363 _children = _N_o_d_e_S_t_o_r_a_g_e{children...}; │ │ │ │ +364 } │ │ │ │ +365 │ │ │ │ +366#endif // DOXYGEN │ │ │ │ +367 │ │ │ │ +369 │ │ │ │ +370 private: │ │ │ │ +371 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ +372 }; │ │ │ │ +373 │ │ │ │ +375 │ │ │ │ +376 } // namespace TypeTree │ │ │ │ +377} //namespace Dune │ │ │ │ +378 │ │ │ │ +379#endif // DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ +_u_t_i_l_i_t_y_._h_h │ │ │ │ +_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ +_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ +_D_u_n_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(T &t, index_constant< i >={}) │ │ │ │ +Sets the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:143 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +T & child(std::size_t i) │ │ │ │ +Returns the i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:175 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const T & child(index_constant< i >={}) const │ │ │ │ +Returns the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn powernode.hh:113 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::shared_ptr< T > st, index_constant< i >={}) │ │ │ │ +Sets the stored value representing the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:159 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< T > childStorage(index_constant< i >={}) │ │ │ │ +Returns the storage of the i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:124 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ +PowerNode(T &t1, T &t2,...) │ │ │ │ +Initialize all children with the passed-in objects. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:341 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ +const NodeStorage & nodeStorage() const │ │ │ │ +DDeeffiinniittiioonn powernode.hh:232 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::array< std::shared_ptr< T >, k > NodeStorage │ │ │ │ +The type used for storing the children. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:77 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< const T > childStorage(index_constant< i >={}) const │ │ │ │ +Returns the storage of the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn powernode.hh:135 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ +PowerNode(T &t, bool distinct_objects=true) │ │ │ │ +Initialize all children with copies of a storage object constructed from the │ │ │ │ +parameter t. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:324 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ +PowerNodeTag NodeTag │ │ │ │ +The type tag that describes a PowerNode. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:71 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const T & child(std::size_t i) const │ │ │ │ +Returns the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn powernode.hh:185 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +static constexpr auto degree() │ │ │ │ +DDeeffiinniittiioonn powernode.hh:65 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< const T > childStorage(std::size_t i) const │ │ │ │ +Returns the storage of the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn powernode.hh:205 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, std::shared_ptr< T > st) │ │ │ │ +Sets the stored value representing the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:226 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +static const bool isComposite │ │ │ │ +Mark this class as a non composite in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:63 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +Mark this class as non leaf in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:57 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +Mark this class as a power in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:60 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ +PowerNode(const NodeStorage &children) │ │ │ │ +Initialize the PowerNode with a copy of the passed-in storage type. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:319 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ +T ChildType │ │ │ │ +The type of each child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:74 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +T & child(index_constant< i >={}) │ │ │ │ +Returns the i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:102 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +ImplementationDefined & child(Indices... indices) │ │ │ │ +Returns the child given by the list of indices. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:266 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, T &&t) │ │ │ │ +Store the passed value in i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:219 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(T &&t, index_constant< i >={}) │ │ │ │ +Store the passed value in i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:151 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ +PowerNode() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:315 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const ImplementationDefined & child(Indices... indices) │ │ │ │ +Returns the child given by the list of indices. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:286 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, T &t) │ │ │ │ +Sets the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:212 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< T > childStorage(std::size_t i) │ │ │ │ +Returns the storage of the i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:195 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ +Access to the type and storage type of the i-th child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ +T type │ │ │ │ +The type of the child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:91 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ +T Type │ │ │ │ +The type of the child. │ │ │ │ +DDeeffiinniittiioonn powernode.hh:88 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ +Check if type represents a tree path. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00035.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: transformation.hh File Reference │ │ │ +dune-typetree: typetree.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,51 +71,32 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
transformation.hh File Reference
│ │ │ +
typetree.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <array>
│ │ │ -#include <tuple>
│ │ │ -#include <memory>
│ │ │ -#include <utility>
│ │ │ -#include <dune/common/hybridutilities.hh>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/typetree/typetraits.hh>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/utility.hh>
│ │ │ +
#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/utility.hh>
│ │ │ +#include <dune/typetree/leafnode.hh>
│ │ │ +#include <dune/typetree/powernode.hh>
│ │ │ +#include <dune/typetree/dynamicpowernode.hh>
│ │ │ +#include <dune/typetree/compositenode.hh>
│ │ │ +#include <dune/typetree/traversal.hh>
│ │ │ +#include <dune/typetree/pairtraversal.hh>
│ │ │ +#include <dune/typetree/traversalutilities.hh>
│ │ │ +#include <dune/typetree/transformation.hh>
│ │ │ +#include <dune/typetree/transformationutilities.hh>
│ │ │ +#include <dune/typetree/accumulate_static.hh>
│ │ │ +#include <dune/typetree/childextraction.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  Dune::TypeTree::TransformTree< SourceTree, Transformation, Tag, recursive >
 Transform a TypeTree. More...
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Functions

template<typename SourceNode, typename Transformation, typename Tag>
void Dune::TypeTree::registerNodeTransformation (SourceNode *, Transformation *, Tag *)
 Register transformation descriptor to transform SourceNode with Transformation.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,23 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -transformation.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +typetree.hh File Reference │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_l_e_a_f_n_o_d_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_<_ _S_o_u_r_c_e_T_r_e_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_a_g_, │ │ │ │ - _r_e_c_u_r_s_i_v_e_ _> │ │ │ │ -  Transform a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n (SourceNode *, Transformation │ │ │ │ - *, Tag *) │ │ │ │ -  Register transformation descriptor to transform SourceNode with │ │ │ │ - Transformation. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00035_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: transformation.hh Source File │ │ │ +dune-typetree: typetree.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,517 +71,53 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
transformation.hh
│ │ │ +
typetree.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │ -
7#define DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_HH
│ │ │ +
7#define DUNE_TYPETREE_HH
│ │ │
8
│ │ │ -
9#include <array>
│ │ │ -
10#include <tuple>
│ │ │ -
11#include <memory>
│ │ │ -
12#include <utility>
│ │ │ -
13
│ │ │ -
14#include <dune/common/hybridutilities.hh>
│ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
21
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
22
│ │ │ -
23namespace Dune {
│ │ │ -
24 namespace TypeTree {
│ │ │ -
25
│ │ │ -
30
│ │ │ -
31#ifdef DOXYGEN
│ │ │ -
32
│ │ │ -
34
│ │ │ -
53 template<typename SourceNode, typename Transformation, typename Tag>
│ │ │ -
54 void registerNodeTransformation(SourceNode*, Transformation*, Tag*);
│ │ │ -
55
│ │ │ -
56#else // DOXYGEN
│ │ │ -
57
│ │ │ -
68 template<typename S, typename T, typename Tag>
│ │ │ -
69 struct LookupNodeTransformation
│ │ │ -
70 {
│ │ │ -
71
│ │ │ -
72 typedef decltype(registerNodeTransformation(declptr<S>(),declptr<T>(),declptr<Tag>())) lookup_type;
│ │ │ -
73
│ │ │ -
74 typedef typename evaluate_if_meta_function<
│ │ │ -
75 lookup_type
│ │ │ -
76 >::type type;
│ │ │ -
77
│ │ │ -
78 static_assert((!std::is_same<type,void>::value), "Unable to find valid transformation descriptor");
│ │ │ -
79 };
│ │ │ -
80
│ │ │ -
81#endif // DOXYGEN
│ │ │ -
82
│ │ │ -
83
│ │ │ -
85
│ │ │ -
94 template<typename SourceTree, typename Transformation, typename Tag = StartTag, bool recursive = true>
│ │ │ -
│ │ │ - │ │ │ -
96 {
│ │ │ -
97
│ │ │ -
98#ifndef DOXYGEN
│ │ │ -
99
│ │ │ -
100 typedef typename LookupNodeTransformation<SourceTree,Transformation,typename SourceTree::ImplementationTag>::type NodeTransformation;
│ │ │ -
101
│ │ │ -
102 // the type of the new tree that will result from this transformation
│ │ │ -
103 typedef typename TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transformed_type transformed_type;
│ │ │ -
104
│ │ │ -
105 // the storage type of the new tree that will result from this transformation
│ │ │ -
106 typedef typename TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transformed_storage_type transformed_storage_type;
│ │ │ -
107
│ │ │ -
108#endif // DOXYGEN
│ │ │ -
109
│ │ │ -
111 typedef transformed_type type;
│ │ │ -
112
│ │ │ -
113 typedef type Type;
│ │ │ -
114
│ │ │ -
│ │ │ -
116 static transformed_type transform(const SourceTree& s, const Transformation& t = Transformation())
│ │ │ -
117 {
│ │ │ -
118 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(s,t);
│ │ │ -
119 }
│ │ │ -
│ │ │ -
120
│ │ │ -
│ │ │ -
122 static transformed_type transform(const SourceTree& s, Transformation& t)
│ │ │ -
123 {
│ │ │ -
124 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(s,t);
│ │ │ -
125 }
│ │ │ -
│ │ │ -
126
│ │ │ -
│ │ │ -
128 static transformed_type transform(std::shared_ptr<const SourceTree> sp, const Transformation& t = Transformation())
│ │ │ -
129 {
│ │ │ -
130 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(sp,t);
│ │ │ -
131 }
│ │ │ -
│ │ │ -
132
│ │ │ -
│ │ │ -
134 static transformed_type transform(std::shared_ptr<const SourceTree> sp, Transformation& t)
│ │ │ -
135 {
│ │ │ -
136 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(sp,t);
│ │ │ -
137 }
│ │ │ -
│ │ │ -
138
│ │ │ -
│ │ │ -
141 static transformed_storage_type transform_storage(std::shared_ptr<const SourceTree> sp, const Transformation& t = Transformation())
│ │ │ -
142 {
│ │ │ - │ │ │ -
144 }
│ │ │ -
│ │ │ -
145
│ │ │ -
│ │ │ -
148 static transformed_storage_type transform_storage(std::shared_ptr<const SourceTree> sp, Transformation& t)
│ │ │ -
149 {
│ │ │ - │ │ │ -
151 }
│ │ │ -
│ │ │ -
152
│ │ │ -
153
│ │ │ -
154 };
│ │ │ -
│ │ │ -
155
│ │ │ -
156#ifndef DOXYGEN // internal per-node implementations of the transformation algorithm
│ │ │ -
157
│ │ │ -
158 // handle a leaf node - this is easy
│ │ │ -
159 template<typename S, typename T, bool recursive>
│ │ │ -
160 struct TransformTree<S,T,LeafNodeTag,recursive>
│ │ │ -
161 {
│ │ │ -
162 // get transformed type from specification
│ │ │ -
163 typedef typename LookupNodeTransformation<S,T,ImplementationTag<S>>::type NodeTransformation;
│ │ │ -
164
│ │ │ -
165 typedef typename NodeTransformation::transformed_type transformed_type;
│ │ │ -
166 typedef typename NodeTransformation::transformed_storage_type transformed_storage_type;
│ │ │ -
167
│ │ │ -
168 // delegate instance transformation to per-node specification
│ │ │ -
169 static transformed_type transform(const S& s, T& t)
│ │ │ -
170 {
│ │ │ -
171 return NodeTransformation::transform(s,t);
│ │ │ -
172 }
│ │ │ -
173
│ │ │ -
174 // delegate instance transformation to per-node specification
│ │ │ -
175 static transformed_type transform(const S& s, const T& t)
│ │ │ -
176 {
│ │ │ -
177 return NodeTransformation::transform(s,t);
│ │ │ -
178 }
│ │ │ -
179
│ │ │ -
180 // delegate instance transformation to per-node specification
│ │ │ -
181 static transformed_type transform(std::shared_ptr<const S> sp, T& t)
│ │ │ -
182 {
│ │ │ -
183 return NodeTransformation::transform(sp,t);
│ │ │ -
184 }
│ │ │ -
185
│ │ │ -
186 // delegate instance transformation to per-node specification
│ │ │ -
187 static transformed_type transform(std::shared_ptr<const S> sp, const T& t)
│ │ │ -
188 {
│ │ │ -
189 return NodeTransformation::transform(sp,t);
│ │ │ -
190 }
│ │ │ -
191
│ │ │ -
192 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ -
193 {
│ │ │ -
194 return NodeTransformation::transform_storage(sp,t);
│ │ │ -
195 }
│ │ │ -
196
│ │ │ -
197 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ -
198 {
│ │ │ -
199 return NodeTransformation::transform_storage(sp,t);
│ │ │ -
200 }
│ │ │ -
201
│ │ │ -
202 };
│ │ │ -
203
│ │ │ -
204
│ │ │ -
205 // common implementation for non-recursive transformation of non-leaf nodes
│ │ │ -
206 template<typename S, typename T>
│ │ │ -
207 struct TransformTreeNonRecursive
│ │ │ -
208 {
│ │ │ -
209 // get transformed type from specification
│ │ │ -
210 typedef typename LookupNodeTransformation<S,T,ImplementationTag<S>>::type NodeTransformation;
│ │ │ -
211
│ │ │ -
212 typedef typename NodeTransformation::transformed_type transformed_type;
│ │ │ -
213 typedef typename NodeTransformation::transformed_storage_type transformed_storage_type;
│ │ │ -
214
│ │ │ -
215 // delegate instance transformation to per-node specification
│ │ │ -
216 static transformed_type transform(const S& s, T& t)
│ │ │ -
217 {
│ │ │ -
218 return NodeTransformation::transform(s,t);
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 // delegate instance transformation to per-node specification
│ │ │ -
222 static transformed_type transform(const S& s, const T& t)
│ │ │ -
223 {
│ │ │ -
224 return NodeTransformation::transform(s,t);
│ │ │ -
225 }
│ │ │ -
226
│ │ │ -
227 // delegate instance transformation to per-node specification
│ │ │ -
228 static transformed_type transform(std::shared_ptr<const S> sp, T& t)
│ │ │ -
229 {
│ │ │ -
230 return NodeTransformation::transform(sp,t);
│ │ │ -
231 }
│ │ │ -
232
│ │ │ -
233 // delegate instance transformation to per-node specification
│ │ │ -
234 static transformed_type transform(std::shared_ptr<const S> sp, const T& t)
│ │ │ -
235 {
│ │ │ -
236 return NodeTransformation::transform(sp,t);
│ │ │ -
237 }
│ │ │ -
238
│ │ │ -
239 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ -
240 {
│ │ │ -
241 return NodeTransformation::transform_storage(sp,t);
│ │ │ -
242 }
│ │ │ -
243
│ │ │ -
244 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ -
245 {
│ │ │ -
246 return NodeTransformation::transform_storage(sp,t);
│ │ │ -
247 }
│ │ │ -
248
│ │ │ -
249 };
│ │ │ -
250
│ │ │ -
251
│ │ │ -
252 namespace Impl {
│ │ │ -
253
│ │ │ -
254 // Helper class to handle recursive power nodes
│ │ │ -
255 template<class Source, class Transformation, class Tag>
│ │ │ -
256 class RecursivePowerTransformTree
│ │ │ -
257 {
│ │ │ -
258 // We only know two types of tags!
│ │ │ -
259 static_assert(std::is_same_v<Tag,PowerNodeTag> or std::is_same_v<Tag,DynamicPowerNodeTag>);
│ │ │ -
260
│ │ │ -
261 using ChildType = typename Source::ChildType;
│ │ │ -
262
│ │ │ -
263 // in case degree is dynamic, provid a vector correctly initialized
│ │ │ -
264 template<class NodeStorage>
│ │ │ -
265 static auto node_storage_provider(const std::size_t& degree)
│ │ │ -
266 {
│ │ │ -
267 return std::vector<NodeStorage>(degree);
│ │ │ -
268 }
│ │ │ -
269
│ │ │ -
270 // in case degree is static, provid an array
│ │ │ -
271 template<class NodeStorage, class StaticIndex>
│ │ │ -
272 static auto node_storage_provider(StaticIndex)
│ │ │ -
273 {
│ │ │ -
274 return std::array<NodeStorage,std::size_t(StaticIndex{})>();
│ │ │ -
275 }
│ │ │ -
276
│ │ │ -
277 public:
│ │ │ -
278 // get transformed type from specification
│ │ │ -
279 // Handling this transformation in a way that makes the per-node specification easy to write
│ │ │ -
280 // is a little involved:
│ │ │ -
281 // The problem is that the transformed power node must be parameterized on the transformed child
│ │ │ -
282 // type. So we need to transform the child type and pass the transformed child type to an inner
│ │ │ -
283 // template of the node transformation struct called result (see example of such a specification
│ │ │ -
284 // further down).
│ │ │ -
285 using NodeTransformation = typename LookupNodeTransformation<Source,Transformation,ImplementationTag<Source>>::type;
│ │ │ -
286 using ChildNodeTransformation = typename LookupNodeTransformation<ChildType,Transformation,ImplementationTag<ChildType>>::type;
│ │ │ -
287
│ │ │ -
288 private:
│ │ │ -
289 // Since every child is same type, is enough to get transformation once
│ │ │ -
290 using ChildTreeTransformation = TransformTree<ChildType,
│ │ │ -
291 Transformation,
│ │ │ -
292 NodeTag<ChildType>,
│ │ │ -
293 ChildNodeTransformation::recursive>;
│ │ │ -
294
│ │ │ -
295 // Get transformed type of children
│ │ │ -
296 using transformed_child_type = typename ChildTreeTransformation::transformed_type;
│ │ │ -
297 using transformed_child_storage_type = typename ChildTreeTransformation::transformed_storage_type;
│ │ │ -
298 public:
│ │ │ -
299 // Apply transformation from children to current node
│ │ │ -
300 using transformed_type = typename NodeTransformation::template result<transformed_child_type>::type;
│ │ │ -
301 using transformed_storage_type = typename NodeTransformation::template result<transformed_child_type>::storage_type;
│ │ │ -
302
│ │ │ -
303 // Transform an instance of source tree.
│ │ │ -
304 static transformed_type transform(const Source& source, Transformation& transformation)
│ │ │ -
305 {
│ │ │ -
306 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source.degree());
│ │ │ -
307 for (std::size_t k = 0; k < source.degree(); ++k) {
│ │ │ -
308 children_storage[k] = ChildTreeTransformation::transform_storage(source.childStorage(k),transformation);
│ │ │ -
309 }
│ │ │ -
310 return NodeTransformation::transform(source,transformation,children_storage);
│ │ │ -
311 }
│ │ │ -
312
│ │ │ -
313 // Transform an instance of source tree.
│ │ │ -
314 static transformed_type transform(const Source& source, const Transformation& transformation)
│ │ │ -
315 {
│ │ │ -
316 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source.degree());
│ │ │ -
317 for (std::size_t k = 0; k < source.degree(); ++k) {
│ │ │ -
318 children_storage[k] = ChildTreeTransformation::transform_storage(source.childStorage(k),transformation);
│ │ │ -
319 }
│ │ │ -
320 return NodeTransformation::transform(source,transformation,children_storage);
│ │ │ -
321 }
│ │ │ -
322
│ │ │ -
323 // Transform an instance of source tree.
│ │ │ -
324 static transformed_type transform(std::shared_ptr<const Source> source_ptr, Transformation& transformation)
│ │ │ -
325 {
│ │ │ -
326 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source_ptr->degree());
│ │ │ -
327 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ -
328 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ -
329 }
│ │ │ -
330 return NodeTransformation::transform(source_ptr,transformation,children_storage);
│ │ │ -
331 }
│ │ │ -
332
│ │ │ -
333 // Transform an instance of source tree.
│ │ │ -
334 static transformed_type transform(std::shared_ptr<const Source> source_ptr, const Transformation& transformation)
│ │ │ -
335 {
│ │ │ -
336 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source_ptr->degree());
│ │ │ -
337 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ -
338 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ -
339 }
│ │ │ -
340 return NodeTransformation::transform(source_ptr,transformation,children_storage);
│ │ │ -
341 }
│ │ │ -
342
│ │ │ -
343 // Transform an instance of source tree ptr.
│ │ │ -
344 static transformed_storage_type transform_storage(std::shared_ptr<const Source> source_ptr, Transformation& transformation)
│ │ │ -
345 {
│ │ │ -
346 auto children_storage = node_storage_provider<transformed_child_storage_type>(source_ptr->degree());
│ │ │ -
347 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ -
348 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ -
349 }
│ │ │ -
350 return NodeTransformation::transform_storage(source_ptr,transformation,children_storage);
│ │ │ -
351 }
│ │ │ -
352
│ │ │ -
353 // Transform an instance of source tree ptr.
│ │ │ -
354 static transformed_storage_type transform_storage(std::shared_ptr<const Source> source_ptr, const Transformation& transformation)
│ │ │ -
355 {
│ │ │ -
356 auto children_storage = node_storage_provider<transformed_child_storage_type>(source_ptr->degree());
│ │ │ -
357 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ -
358 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ -
359 }
│ │ │ -
360 return NodeTransformation::transform_storage(source_ptr,transformation,children_storage);
│ │ │ -
361 }
│ │ │ -
362
│ │ │ -
363 };
│ │ │ -
364 } // namespace Impl
│ │ │ -
365
│ │ │ -
366 // Recursive version of the PowerNode transformation for static nodes.
│ │ │ -
367 template<typename Source, typename Transformation>
│ │ │ -
368 struct TransformTree<Source,Transformation,PowerNodeTag,true>
│ │ │ -
369 : public Impl::RecursivePowerTransformTree<Source,Transformation,PowerNodeTag>
│ │ │ -
370 {};
│ │ │ -
371
│ │ │ -
372 // Recursive version of the DynamicPowerNode transformation for static nodes.
│ │ │ -
373 template<typename Source, typename Transformation>
│ │ │ -
374 struct TransformTree<Source,Transformation,DynamicPowerNodeTag,true>
│ │ │ -
375 : public Impl::RecursivePowerTransformTree<Source,Transformation,DynamicPowerNodeTag>
│ │ │ -
376 {};
│ │ │ -
377
│ │ │ -
378 // non-recursive version of the PowerNode transformation.
│ │ │ -
379 template<typename S, typename T>
│ │ │ -
380 struct TransformTree<S,T,PowerNodeTag,false>
│ │ │ -
381 : public TransformTreeNonRecursive<S,T>
│ │ │ -
382 {};
│ │ │ -
383
│ │ │ -
384 // non-recursive version of the DynamicPowerNodeTag transformation.
│ │ │ -
385 template<typename S, typename T>
│ │ │ -
386 struct TransformTree<S,T,DynamicPowerNodeTag,false>
│ │ │ -
387 : public TransformTreeNonRecursive<S,T>
│ │ │ -
388 {};
│ │ │ -
389
│ │ │ -
390 // helper struct that does the actual transformation for a composite node. We need this additional struct
│ │ │ -
391 // to extract the template argument list with the types of all children from the node, which we cannot do
│ │ │ -
392 // directly in the transformation<> template, as the type passed to transformation<> will usually be a
│ │ │ -
393 // derived type and will normally have more template arguments than just the children. This declaration
│ │ │ -
394 // just introduces the type of the helper struct, we always instantiate the specialization defined below;
│ │ │ -
395 template<typename S, typename Children, typename T>
│ │ │ -
396 struct transform_composite_node;
│ │ │ -
397
│ │ │ -
398 // specialized version of the helper struct which extracts the template argument list with the children from
│ │ │ -
399 // its second template parameter, which has to be CompositeNode::ChildTypes. Apart from that, the struct is
│ │ │ -
400 // similar to the one for a PowerNode, but it obviously delegates transformation of the children to the TMP.
│ │ │ -
401 template<typename S, typename T, typename... C>
│ │ │ -
402 struct transform_composite_node<S,std::tuple<C...>,T>
│ │ │ -
403 {
│ │ │ -
404
│ │ │ -
405 // transformed type, using the same nested struct trick as the PowerNode
│ │ │ -
406 typedef ImplementationTag<S> Tag;
│ │ │ -
407 typedef typename LookupNodeTransformation<S,T,Tag>::type NodeTransformation;
│ │ │ -
408 typedef typename NodeTransformation::template result<typename TransformTree<C,
│ │ │ -
409 T,
│ │ │ -
410 NodeTag<C>,
│ │ │ -
411 LookupNodeTransformation<C,T,ImplementationTag<C>>::type::recursive
│ │ │ -
412 >::transformed_type...
│ │ │ -
413 >::type transformed_type;
│ │ │ -
414
│ │ │ -
415 typedef typename NodeTransformation::template result<typename TransformTree<C,
│ │ │ -
416 T,
│ │ │ -
417 NodeTag<C>,
│ │ │ -
418 LookupNodeTransformation<C,T,ImplementationTag<C>>::type::recursive
│ │ │ -
419 >::transformed_type...
│ │ │ -
420 >::storage_type transformed_storage_type;
│ │ │ -
421
│ │ │ -
422 // Retrieve the transformation descriptor for the child with index i.
│ │ │ -
423 // This little helper improves really improves the readability of the
│ │ │ -
424 // transformation functions.
│ │ │ -
425 template<std::size_t i>
│ │ │ -
426 struct ChildTransformation
│ │ │ -
427 : public TransformTree<typename S::template Child<i>::Type,
│ │ │ -
428 T,
│ │ │ -
429 NodeTag<typename S::template Child<i>::Type>,
│ │ │ -
430 LookupNodeTransformation<
│ │ │ -
431 typename S::template Child<i>::Type,
│ │ │ -
432 T,
│ │ │ -
433 ImplementationTag<typename S::template Child<i>::Type>
│ │ │ -
434 >::type::recursive
│ │ │ -
435 >
│ │ │ -
436 {};
│ │ │ -
437
│ │ │ -
438 template<std::size_t i, typename Tuple, typename Value>
│ │ │ -
439 static void setElement(Tuple& tuple, Value&& value)
│ │ │ -
440 {
│ │ │ -
441 std::get<i>(tuple) = std::forward<Value>(value);
│ │ │ -
442 }
│ │ │ -
443
│ │ │ -
444 template<typename Trafo, std::size_t... i>
│ │ │ -
445 static transformed_type transform(const S& s, Trafo&& t, std::index_sequence<i...> indices)
│ │ │ -
446 {
│ │ │ -
447 std::tuple<typename ChildTransformation<i>::transformed_storage_type...> storage;
│ │ │ -
448 Dune::Hybrid::Impl::evaluateFoldExpression<int>({(setElement<i>(storage, ChildTransformation<i>::transform_storage(s.template childStorage<i>(), std::forward<Trafo>(t))),0)...});
│ │ │ -
449 return NodeTransformation::transform(s, std::forward<Trafo>(t), std::get<i>(storage)...);
│ │ │ -
450 }
│ │ │ -
451
│ │ │ -
452 template<typename Trafo, std::size_t... i>
│ │ │ -
453 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, Trafo&& t, std::index_sequence<i...> indices)
│ │ │ -
454 {
│ │ │ -
455 std::tuple<typename ChildTransformation<i>::transformed_storage_type...> storage;
│ │ │ -
456 Dune::Hybrid::Impl::evaluateFoldExpression<int>({(setElement<i>(storage, ChildTransformation<i>::transform_storage(sp->template childStorage<i>(), std::forward<Trafo>(t))),0)...});
│ │ │ -
457 return NodeTransformation::transform_storage(sp, std::forward<Trafo>(t), std::get<i>(storage)...);
│ │ │ -
458 }
│ │ │ -
459 };
│ │ │ -
460
│ │ │ -
461
│ │ │ -
462 // the specialization of transformation<> for the CompositeNode. This just extracts the
│ │ │ -
463 // CompositeNode::ChildTypes member and forwards to the helper struct
│ │ │ -
464 template<typename S, typename T>
│ │ │ -
465 struct TransformTree<S,T,CompositeNodeTag,true>
│ │ │ -
466 {
│ │ │ -
467
│ │ │ -
468 private:
│ │ │ -
469
│ │ │ -
470 typedef typename S::ChildTypes ChildTypes;
│ │ │ -
471
│ │ │ -
472 static auto child_indices()
│ │ │ -
473 {
│ │ │ -
474 return std::make_index_sequence<S::degree()>();
│ │ │ -
475 }
│ │ │ -
476
│ │ │ -
477 public:
│ │ │ -
478
│ │ │ -
479 typedef typename transform_composite_node<S,ChildTypes,T>::transformed_type transformed_type;
│ │ │ -
480 typedef typename transform_composite_node<S,ChildTypes,T>::transformed_storage_type transformed_storage_type;
│ │ │ -
481
│ │ │ -
482 static transformed_type transform(const S& s, T& t)
│ │ │ -
483 {
│ │ │ -
484 return transform_composite_node<S,ChildTypes,T>::transform(s,t,child_indices());
│ │ │ -
485 }
│ │ │ -
486
│ │ │ -
487 static transformed_type transform(const S& s, const T& t)
│ │ │ -
488 {
│ │ │ -
489 return transform_composite_node<S,ChildTypes,T>::transform(s,t,child_indices());
│ │ │ -
490 }
│ │ │ -
491
│ │ │ -
492 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ -
493 {
│ │ │ -
494 return transform_composite_node<S,ChildTypes,T>::transform_storage(sp,t,child_indices());
│ │ │ -
495 }
│ │ │ -
496
│ │ │ -
497 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ -
498 {
│ │ │ -
499 return transform_composite_node<S,ChildTypes,T>::transform_storage(sp,t,child_indices());
│ │ │ -
500 }
│ │ │ -
501
│ │ │ -
502 };
│ │ │ -
503
│ │ │ -
504 // non-recursive version of the CompositeNode transformation.
│ │ │ -
505 template<typename S, typename T>
│ │ │ -
506 struct TransformTree<S,T,CompositeNodeTag,false>
│ │ │ -
507 : public TransformTreeNonRecursive<S,T>
│ │ │ -
508 {};
│ │ │ -
509
│ │ │ -
510#endif // DOXYGEN
│ │ │ -
511
│ │ │ -
513
│ │ │ -
514 } // namespace TypeTree
│ │ │ -
515} //namespace Dune
│ │ │ -
516
│ │ │ -
517#endif // DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
void registerNodeTransformation(SourceNode *, Transformation *, Tag *)
Register transformation descriptor to transform SourceNode with Transformation.
│ │ │ -
Definition accumulate_static.hh:17
│ │ │ -
Definition accumulate_static.hh:18
│ │ │ -
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
│ │ │ -
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ -
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ -
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ -
Transform a TypeTree.
Definition transformation.hh:96
│ │ │ -
type Type
Definition transformation.hh:113
│ │ │ -
static transformed_type transform(std::shared_ptr< const SourceTree > sp, Transformation &t)
Apply transformation to an existing tree s.
Definition transformation.hh:134
│ │ │ -
static transformed_type transform(std::shared_ptr< const SourceTree > sp, const Transformation &t=Transformation())
Apply transformation to an existing tree s.
Definition transformation.hh:128
│ │ │ -
static transformed_type transform(const SourceTree &s, Transformation &t)
Apply transformation to an existing tree s.
Definition transformation.hh:122
│ │ │ -
transformed_type type
The type of the transformed tree.
Definition transformation.hh:111
│ │ │ -
static transformed_type transform(const SourceTree &s, const Transformation &t=Transformation())
Apply transformation to an existing tree s.
Definition transformation.hh:116
│ │ │ -
static transformed_storage_type transform_storage(std::shared_ptr< const SourceTree > sp, const Transformation &t=Transformation())
Definition transformation.hh:141
│ │ │ -
static transformed_storage_type transform_storage(std::shared_ptr< const SourceTree > sp, Transformation &t)
Definition transformation.hh:148
│ │ │ -
Meta function that evaluates its argument iff it inherits from meta_function.
Definition typetraits.hh:142
│ │ │ +
23#endif // DUNE_TYPETREE_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,647 +1,48 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -transformation.hh │ │ │ │ +typetree.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ -7#define DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_HH │ │ │ │ +7#define DUNE_TYPETREE_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ -18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -21 │ │ │ │ +9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_l_e_a_f_n_o_d_e_._h_h> │ │ │ │ +12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h> │ │ │ │ +15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +16#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ +18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h> │ │ │ │ +21#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ 22 │ │ │ │ -23namespace _D_u_n_e { │ │ │ │ -24 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -25 │ │ │ │ -30 │ │ │ │ -31#ifdef DOXYGEN │ │ │ │ -32 │ │ │ │ -34 │ │ │ │ -53 template │ │ │ │ -_5_4 void _r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n(SourceNode*, Transformation*, Tag*); │ │ │ │ -55 │ │ │ │ -56#else // DOXYGEN │ │ │ │ -57 │ │ │ │ -68 template │ │ │ │ -69 struct LookupNodeTransformation │ │ │ │ -70 { │ │ │ │ -71 │ │ │ │ -72 typedef decltype(_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n(_d_e_c_l_p_t_r_<_S_>(),_d_e_c_l_p_t_r_<_T_> │ │ │ │ -(),_d_e_c_l_p_t_r_<_T_a_g_>())) lookup_type; │ │ │ │ -73 │ │ │ │ -74 typedef typename _e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n< │ │ │ │ -75 lookup_type │ │ │ │ -76 >::type type; │ │ │ │ -77 │ │ │ │ -78 static_assert((!std::is_same::value), "Unable to find valid │ │ │ │ -transformation descriptor"); │ │ │ │ -79 }; │ │ │ │ -80 │ │ │ │ -81#endif // DOXYGEN │ │ │ │ -82 │ │ │ │ -83 │ │ │ │ -85 │ │ │ │ -94 template │ │ │ │ -_9_5 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -96 { │ │ │ │ -97 │ │ │ │ -98#ifndef DOXYGEN │ │ │ │ -99 │ │ │ │ -100 typedef typename │ │ │ │ -LookupNodeTransformation::type NodeTransformation; │ │ │ │ -101 │ │ │ │ -102 // the type of the new tree that will result from this transformation │ │ │ │ -103 typedef typename │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>::transformed_type transformed_type; │ │ │ │ -104 │ │ │ │ -105 // the storage type of the new tree that will result from this │ │ │ │ -transformation │ │ │ │ -106 typedef typename │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>::transformed_storage_type transformed_storage_type; │ │ │ │ -107 │ │ │ │ -108#endif // DOXYGEN │ │ │ │ -109 │ │ │ │ -_1_1_1 typedef transformed_type _t_y_p_e; │ │ │ │ -112 │ │ │ │ -_1_1_3 typedef _t_y_p_e _T_y_p_e; │ │ │ │ -114 │ │ │ │ -_1_1_6 static transformed_type _t_r_a_n_s_f_o_r_m(const SourceTree& s, const │ │ │ │ -Transformation& t = Transformation()) │ │ │ │ -117 { │ │ │ │ -118 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m(s,t); │ │ │ │ -119 } │ │ │ │ -120 │ │ │ │ -_1_2_2 static transformed_type _t_r_a_n_s_f_o_r_m(const SourceTree& s, Transformation& t) │ │ │ │ -123 { │ │ │ │ -124 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m(s,t); │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -_1_2_8 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, │ │ │ │ -const Transformation& t = Transformation()) │ │ │ │ -129 { │ │ │ │ -130 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m(sp,t); │ │ │ │ -131 } │ │ │ │ -132 │ │ │ │ -_1_3_4 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, │ │ │ │ -Transformation& t) │ │ │ │ -135 { │ │ │ │ -136 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m(sp,t); │ │ │ │ -137 } │ │ │ │ -138 │ │ │ │ -_1_4_1 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr sp, const Transformation& t = Transformation()) │ │ │ │ -142 { │ │ │ │ -143 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(sp,t); │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -_1_4_8 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr sp, Transformation& t) │ │ │ │ -149 { │ │ │ │ -150 return │ │ │ │ -_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ -recursive>_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(sp,t); │ │ │ │ -151 } │ │ │ │ -152 │ │ │ │ -153 │ │ │ │ -154 }; │ │ │ │ -155 │ │ │ │ -156#ifndef DOXYGEN // internal per-node implementations of the transformation │ │ │ │ -algorithm │ │ │ │ -157 │ │ │ │ -158 // handle a leaf node - this is easy │ │ │ │ -159 template │ │ │ │ -160 struct TransformTree │ │ │ │ -161 { │ │ │ │ -162 // get transformed type from specification │ │ │ │ -163 typedef typename LookupNodeTransformation>_:_:_t_y_p_e │ │ │ │ -NodeTransformation; │ │ │ │ -164 │ │ │ │ -165 typedef typename NodeTransformation::transformed_type transformed_type; │ │ │ │ -166 typedef typename NodeTransformation::transformed_storage_type │ │ │ │ -transformed_storage_type; │ │ │ │ -167 │ │ │ │ -168 // delegate instance transformation to per-node specification │ │ │ │ -169 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, T& t) │ │ │ │ -170 { │ │ │ │ -171 return NodeTransformation::transform(s,t); │ │ │ │ -172 } │ │ │ │ -173 │ │ │ │ -174 // delegate instance transformation to per-node specification │ │ │ │ -175 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, const T& t) │ │ │ │ -176 { │ │ │ │ -177 return NodeTransformation::transform(s,t); │ │ │ │ -178 } │ │ │ │ -179 │ │ │ │ -180 // delegate instance transformation to per-node specification │ │ │ │ -181 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, T& t) │ │ │ │ -182 { │ │ │ │ -183 return NodeTransformation::transform(sp,t); │ │ │ │ -184 } │ │ │ │ -185 │ │ │ │ -186 // delegate instance transformation to per-node specification │ │ │ │ -187 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, const T& t) │ │ │ │ -188 { │ │ │ │ -189 return NodeTransformation::transform(sp,t); │ │ │ │ -190 } │ │ │ │ -191 │ │ │ │ -192 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ -sp, T& t) │ │ │ │ -193 { │ │ │ │ -194 return NodeTransformation::transform_storage(sp,t); │ │ │ │ -195 } │ │ │ │ -196 │ │ │ │ -197 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ -sp, const T& t) │ │ │ │ -198 { │ │ │ │ -199 return NodeTransformation::transform_storage(sp,t); │ │ │ │ -200 } │ │ │ │ -201 │ │ │ │ -202 }; │ │ │ │ -203 │ │ │ │ -204 │ │ │ │ -205 // common implementation for non-recursive transformation of non-leaf nodes │ │ │ │ -206 template │ │ │ │ -207 struct TransformTreeNonRecursive │ │ │ │ -208 { │ │ │ │ -209 // get transformed type from specification │ │ │ │ -210 typedef typename LookupNodeTransformation>::type │ │ │ │ -NodeTransformation; │ │ │ │ -211 │ │ │ │ -212 typedef typename NodeTransformation::transformed_type transformed_type; │ │ │ │ -213 typedef typename NodeTransformation::transformed_storage_type │ │ │ │ -transformed_storage_type; │ │ │ │ -214 │ │ │ │ -215 // delegate instance transformation to per-node specification │ │ │ │ -216 static transformed_type transform(const S& s, T& t) │ │ │ │ -217 { │ │ │ │ -218 return NodeTransformation::transform(s,t); │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 // delegate instance transformation to per-node specification │ │ │ │ -222 static transformed_type transform(const S& s, const T& t) │ │ │ │ -223 { │ │ │ │ -224 return NodeTransformation::transform(s,t); │ │ │ │ -225 } │ │ │ │ -226 │ │ │ │ -227 // delegate instance transformation to per-node specification │ │ │ │ -228 static transformed_type transform(std::shared_ptr sp, T& t) │ │ │ │ -229 { │ │ │ │ -230 return NodeTransformation::transform(sp,t); │ │ │ │ -231 } │ │ │ │ -232 │ │ │ │ -233 // delegate instance transformation to per-node specification │ │ │ │ -234 static transformed_type transform(std::shared_ptr sp, const T& t) │ │ │ │ -235 { │ │ │ │ -236 return NodeTransformation::transform(sp,t); │ │ │ │ -237 } │ │ │ │ -238 │ │ │ │ -239 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ -sp, T& t) │ │ │ │ -240 { │ │ │ │ -241 return NodeTransformation::transform_storage(sp,t); │ │ │ │ -242 } │ │ │ │ -243 │ │ │ │ -244 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ -sp, const T& t) │ │ │ │ -245 { │ │ │ │ -246 return NodeTransformation::transform_storage(sp,t); │ │ │ │ -247 } │ │ │ │ -248 │ │ │ │ -249 }; │ │ │ │ -250 │ │ │ │ -251 │ │ │ │ -252 namespace Impl { │ │ │ │ -253 │ │ │ │ -254 // Helper class to handle recursive power nodes │ │ │ │ -255 template │ │ │ │ -256 class RecursivePowerTransformTree │ │ │ │ -257 { │ │ │ │ -258 // We only know two types of tags! │ │ │ │ -259 static_assert(std::is_same_v or std:: │ │ │ │ -is_same_v); │ │ │ │ -260 │ │ │ │ -261 using ChildType = typename Source::ChildType; │ │ │ │ -262 │ │ │ │ -263 // in case degree is dynamic, provid a vector correctly initialized │ │ │ │ -264 template │ │ │ │ -265 static auto node_storage_provider(const std::size_t& degree) │ │ │ │ -266 { │ │ │ │ -267 return std::vector(degree); │ │ │ │ -268 } │ │ │ │ -269 │ │ │ │ -270 // in case degree is static, provid an array │ │ │ │ -271 template │ │ │ │ -272 static auto node_storage_provider(StaticIndex) │ │ │ │ -273 { │ │ │ │ -274 return std::array(); │ │ │ │ -275 } │ │ │ │ -276 │ │ │ │ -277 public: │ │ │ │ -278 // get transformed type from specification │ │ │ │ -279 // Handling this transformation in a way that makes the per-node │ │ │ │ -specification easy to write │ │ │ │ -280 // is a little involved: │ │ │ │ -281 // The problem is that the transformed power node must be parameterized on │ │ │ │ -the transformed child │ │ │ │ -282 // type. So we need to transform the child type and pass the transformed │ │ │ │ -child type to an inner │ │ │ │ -283 // template of the node transformation struct called result (see example of │ │ │ │ -such a specification │ │ │ │ -284 // further down). │ │ │ │ -285 using NodeTransformation = typename │ │ │ │ -LookupNodeTransformation>:: │ │ │ │ -type; │ │ │ │ -286 using ChildNodeTransformation = typename │ │ │ │ -LookupNodeTransformation>:: │ │ │ │ -type; │ │ │ │ -287 │ │ │ │ -288 private: │ │ │ │ -289 // Since every child is same type, is enough to get transformation once │ │ │ │ -290 using ChildTreeTransformation = TransformTree, │ │ │ │ -293 ChildNodeTransformation::recursive>; │ │ │ │ -294 │ │ │ │ -295 // Get transformed type of children │ │ │ │ -296 using transformed_child_type = typename ChildTreeTransformation:: │ │ │ │ -transformed_type; │ │ │ │ -297 using transformed_child_storage_type = typename ChildTreeTransformation:: │ │ │ │ -transformed_storage_type; │ │ │ │ -298 public: │ │ │ │ -299 // Apply transformation from children to current node │ │ │ │ -300 using transformed_type = typename NodeTransformation::template │ │ │ │ -result::type; │ │ │ │ -301 using transformed_storage_type = typename NodeTransformation::template │ │ │ │ -result::storage_type; │ │ │ │ -302 │ │ │ │ -303 // Transform an instance of source tree. │ │ │ │ -304 static transformed_type transform(const Source& source, Transformation& │ │ │ │ -transformation) │ │ │ │ -305 { │ │ │ │ -306 auto children_storage = node_storage_provider>(source.degree()); │ │ │ │ -307 for (std::size_t k = 0; k < source.degree(); ++k) { │ │ │ │ -308 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source.childStorage(k),transformation); │ │ │ │ -309 } │ │ │ │ -310 return NodeTransformation::transform │ │ │ │ -(source,transformation,children_storage); │ │ │ │ -311 } │ │ │ │ -312 │ │ │ │ -313 // Transform an instance of source tree. │ │ │ │ -314 static transformed_type transform(const Source& source, const │ │ │ │ -Transformation& transformation) │ │ │ │ -315 { │ │ │ │ -316 auto children_storage = node_storage_provider>(source.degree()); │ │ │ │ -317 for (std::size_t k = 0; k < source.degree(); ++k) { │ │ │ │ -318 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source.childStorage(k),transformation); │ │ │ │ -319 } │ │ │ │ -320 return NodeTransformation::transform │ │ │ │ -(source,transformation,children_storage); │ │ │ │ -321 } │ │ │ │ -322 │ │ │ │ -323 // Transform an instance of source tree. │ │ │ │ -324 static transformed_type transform(std::shared_ptr source_ptr, │ │ │ │ -Transformation& transformation) │ │ │ │ -325 { │ │ │ │ -326 auto children_storage = node_storage_provider>(source_ptr->degree()); │ │ │ │ -327 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ -328 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source_ptr->childStorage(k),transformation); │ │ │ │ -329 } │ │ │ │ -330 return NodeTransformation::transform │ │ │ │ -(source_ptr,transformation,children_storage); │ │ │ │ -331 } │ │ │ │ -332 │ │ │ │ -333 // Transform an instance of source tree. │ │ │ │ -334 static transformed_type transform(std::shared_ptr source_ptr, │ │ │ │ -const Transformation& transformation) │ │ │ │ -335 { │ │ │ │ -336 auto children_storage = node_storage_provider>(source_ptr->degree()); │ │ │ │ -337 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ -338 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source_ptr->childStorage(k),transformation); │ │ │ │ -339 } │ │ │ │ -340 return NodeTransformation::transform │ │ │ │ -(source_ptr,transformation,children_storage); │ │ │ │ -341 } │ │ │ │ -342 │ │ │ │ -343 // Transform an instance of source tree ptr. │ │ │ │ -344 static transformed_storage_type transform_storage(std::shared_ptr source_ptr, Transformation& transformation) │ │ │ │ -345 { │ │ │ │ -346 auto children_storage = │ │ │ │ -node_storage_provider(source_ptr->degree()); │ │ │ │ -347 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ -348 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source_ptr->childStorage(k),transformation); │ │ │ │ -349 } │ │ │ │ -350 return NodeTransformation::transform_storage │ │ │ │ -(source_ptr,transformation,children_storage); │ │ │ │ -351 } │ │ │ │ -352 │ │ │ │ -353 // Transform an instance of source tree ptr. │ │ │ │ -354 static transformed_storage_type transform_storage(std::shared_ptr source_ptr, const Transformation& transformation) │ │ │ │ -355 { │ │ │ │ -356 auto children_storage = │ │ │ │ -node_storage_provider(source_ptr->degree()); │ │ │ │ -357 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ -358 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ -(source_ptr->childStorage(k),transformation); │ │ │ │ -359 } │ │ │ │ -360 return NodeTransformation::transform_storage │ │ │ │ -(source_ptr,transformation,children_storage); │ │ │ │ -361 } │ │ │ │ -362 │ │ │ │ -363 }; │ │ │ │ -364 } // namespace Impl │ │ │ │ -365 │ │ │ │ -366 // Recursive version of the PowerNode transformation for static nodes. │ │ │ │ -367 template │ │ │ │ -368 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -369 : public Impl:: │ │ │ │ -RecursivePowerTransformTree │ │ │ │ -370 {}; │ │ │ │ -371 │ │ │ │ -372 // Recursive version of the DynamicPowerNode transformation for static │ │ │ │ -nodes. │ │ │ │ -373 template │ │ │ │ -374 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -375 : public Impl:: │ │ │ │ -RecursivePowerTransformTree │ │ │ │ -376 {}; │ │ │ │ -377 │ │ │ │ -378 // non-recursive version of the PowerNode transformation. │ │ │ │ -379 template │ │ │ │ -380 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -381 : public TransformTreeNonRecursive │ │ │ │ -382 {}; │ │ │ │ -383 │ │ │ │ -384 // non-recursive version of the DynamicPowerNodeTag transformation. │ │ │ │ -385 template │ │ │ │ -386 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -387 : public TransformTreeNonRecursive │ │ │ │ -388 {}; │ │ │ │ -389 │ │ │ │ -390 // helper struct that does the actual transformation for a composite node. │ │ │ │ -We need this additional struct │ │ │ │ -391 // to extract the template argument list with the types of all children │ │ │ │ -from the node, which we cannot do │ │ │ │ -392 // directly in the transformation<> template, as the type passed to │ │ │ │ -transformation<> will usually be a │ │ │ │ -393 // derived type and will normally have more template arguments than just │ │ │ │ -the children. This declaration │ │ │ │ -394 // just introduces the type of the helper struct, we always instantiate the │ │ │ │ -specialization defined below; │ │ │ │ -395 template │ │ │ │ -396 struct transform_composite_node; │ │ │ │ -397 │ │ │ │ -398 // specialized version of the helper struct which extracts the template │ │ │ │ -argument list with the children from │ │ │ │ -399 // its second template parameter, which has to be CompositeNode:: │ │ │ │ -ChildTypes. Apart from that, the struct is │ │ │ │ -400 // similar to the one for a PowerNode, but it obviously delegates │ │ │ │ -transformation of the children to the TMP. │ │ │ │ -401 template │ │ │ │ -402 struct transform_composite_node,T> │ │ │ │ -403 { │ │ │ │ -404 │ │ │ │ -405 // transformed type, using the same nested struct trick as the PowerNode │ │ │ │ -406 typedef ImplementationTag Tag; │ │ │ │ -407 typedef typename LookupNodeTransformation::type │ │ │ │ -NodeTransformation; │ │ │ │ -408 typedef typename NodeTransformation::template result, │ │ │ │ -411 LookupNodeTransformation>::type::recursive │ │ │ │ -412 >::transformed_type... │ │ │ │ -413 >::type transformed_type; │ │ │ │ -414 │ │ │ │ -415 typedef typename NodeTransformation::template result, │ │ │ │ -418 LookupNodeTransformation>::type::recursive │ │ │ │ -419 >::transformed_type... │ │ │ │ -420 >::storage_type transformed_storage_type; │ │ │ │ -421 │ │ │ │ -422 // Retrieve the transformation descriptor for the child with index i. │ │ │ │ -423 // This little helper improves really improves the readability of the │ │ │ │ -424 // transformation functions. │ │ │ │ -425 template │ │ │ │ -426 struct ChildTransformation │ │ │ │ -427 : public TransformTree::Type, │ │ │ │ -428 T, │ │ │ │ -429 NodeTag::Type>, │ │ │ │ -430 LookupNodeTransformation< │ │ │ │ -431 typename S::template Child::Type, │ │ │ │ -432 T, │ │ │ │ -433 ImplementationTag::Type> │ │ │ │ -434 >::type::recursive │ │ │ │ -435 > │ │ │ │ -436 {}; │ │ │ │ -437 │ │ │ │ -438 template │ │ │ │ -439 static void setElement(Tuple& tuple, Value&& value) │ │ │ │ -440 { │ │ │ │ -441 std::get(tuple) = std::forward(value); │ │ │ │ -442 } │ │ │ │ -443 │ │ │ │ -444 template │ │ │ │ -445 static transformed_type transform(const S& s, Trafo&& t, std:: │ │ │ │ -index_sequence indices) │ │ │ │ -446 { │ │ │ │ -447 std::tuple::transformed_storage_type...> │ │ │ │ -storage; │ │ │ │ -448 Dune::Hybrid::Impl::evaluateFoldExpression({(setElement(storage, │ │ │ │ -ChildTransformation::transform_storage(s.template childStorage(), std:: │ │ │ │ -forward(t))),0)...}); │ │ │ │ -449 return NodeTransformation::transform(s, std::forward(t), std::get │ │ │ │ -(storage)...); │ │ │ │ -450 } │ │ │ │ -451 │ │ │ │ -452 template │ │ │ │ -453 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ -sp, Trafo&& t, std::index_sequence indices) │ │ │ │ -454 { │ │ │ │ -455 std::tuple::transformed_storage_type...> │ │ │ │ -storage; │ │ │ │ -456 Dune::Hybrid::Impl::evaluateFoldExpression({(setElement(storage, │ │ │ │ -ChildTransformation::transform_storage(sp->template childStorage(), std:: │ │ │ │ -forward(t))),0)...}); │ │ │ │ -457 return NodeTransformation::transform_storage(sp, std::forward(t), │ │ │ │ -std::get(storage)...); │ │ │ │ -458 } │ │ │ │ -459 }; │ │ │ │ -460 │ │ │ │ -461 │ │ │ │ -462 // the specialization of transformation<> for the CompositeNode. This just │ │ │ │ -extracts the │ │ │ │ -463 // CompositeNode::ChildTypes member and forwards to the helper struct │ │ │ │ -464 template │ │ │ │ -465 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -466 { │ │ │ │ -467 │ │ │ │ -468 private: │ │ │ │ -469 │ │ │ │ -470 typedef typename S::ChildTypes ChildTypes; │ │ │ │ -471 │ │ │ │ -472 static auto child_indices() │ │ │ │ -473 { │ │ │ │ -474 return std::make_index_sequence(); │ │ │ │ -475 } │ │ │ │ -476 │ │ │ │ -477 public: │ │ │ │ -478 │ │ │ │ -479 typedef typename transform_composite_node::transformed_type │ │ │ │ -transformed_type; │ │ │ │ -480 typedef typename transform_composite_node:: │ │ │ │ -transformed_storage_type transformed_storage_type; │ │ │ │ -481 │ │ │ │ -482 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, T& t) │ │ │ │ -483 { │ │ │ │ -484 return transform_composite_node::transform │ │ │ │ -(s,t,child_indices()); │ │ │ │ -485 } │ │ │ │ -486 │ │ │ │ -487 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, const T& t) │ │ │ │ -488 { │ │ │ │ -489 return transform_composite_node::transform │ │ │ │ -(s,t,child_indices()); │ │ │ │ -490 } │ │ │ │ -491 │ │ │ │ -492 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ -sp, T& t) │ │ │ │ -493 { │ │ │ │ -494 return transform_composite_node::transform_storage │ │ │ │ -(sp,t,child_indices()); │ │ │ │ -495 } │ │ │ │ -496 │ │ │ │ -497 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ -sp, const T& t) │ │ │ │ -498 { │ │ │ │ -499 return transform_composite_node::transform_storage │ │ │ │ -(sp,t,child_indices()); │ │ │ │ -500 } │ │ │ │ -501 │ │ │ │ -502 }; │ │ │ │ -503 │ │ │ │ -504 // non-recursive version of the CompositeNode transformation. │ │ │ │ -505 template │ │ │ │ -506 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -507 : public TransformTreeNonRecursive │ │ │ │ -508 {}; │ │ │ │ -509 │ │ │ │ -510#endif // DOXYGEN │ │ │ │ -511 │ │ │ │ -513 │ │ │ │ -514 } // namespace TypeTree │ │ │ │ -515} //namespace Dune │ │ │ │ -516 │ │ │ │ -517#endif // DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ -_u_t_i_l_i_t_y_._h_h │ │ │ │ -_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ +23#endif // DUNE_TYPETREE_HH │ │ │ │ _n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -void registerNodeTransformation(SourceNode *, Transformation *, Tag *) │ │ │ │ -Register transformation descriptor to transform SourceNode with Transformation. │ │ │ │ -_D_u_n_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r │ │ │ │ -T * declptr() │ │ │ │ -Helper function for generating a pointer to a value of type T in an unevaluated │ │ │ │ -operand setting. │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node with runtime degree. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ -Tag designating a composite node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ -Transform a TypeTree. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:96 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_T_y_p_e │ │ │ │ -type Type │ │ │ │ -DDeeffiinniittiioonn transformation.hh:113 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(std::shared_ptr< const SourceTree > sp, │ │ │ │ -Transformation &t) │ │ │ │ -Apply transformation to an existing tree s. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:134 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(std::shared_ptr< const SourceTree > sp, const │ │ │ │ -Transformation &t=Transformation()) │ │ │ │ -Apply transformation to an existing tree s. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:128 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(const SourceTree &s, Transformation &t) │ │ │ │ -Apply transformation to an existing tree s. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:122 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_y_p_e │ │ │ │ -transformed_type type │ │ │ │ -The type of the transformed tree. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:111 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(const SourceTree &s, const Transformation │ │ │ │ -&t=Transformation()) │ │ │ │ -Apply transformation to an existing tree s. │ │ │ │ -DDeeffiinniittiioonn transformation.hh:116 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceTree > sp, const Transformation &t=Transformation()) │ │ │ │ -DDeeffiinniittiioonn transformation.hh:141 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceTree > sp, Transformation &t) │ │ │ │ -DDeeffiinniittiioonn transformation.hh:148 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ -Meta function that evaluates its argument iff it inherits from meta_function. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:142 │ │ │ │ +_u_t_i_l_i_t_y_._h_h │ │ │ │ +_l_e_a_f_n_o_d_e_._h_h │ │ │ │ +_a_c_c_u_m_u_l_a_t_e___s_t_a_t_i_c_._h_h │ │ │ │ +_p_o_w_e_r_n_o_d_e_._h_h │ │ │ │ +_t_r_a_n_s_f_o_r_m_a_t_i_o_n_u_t_i_l_i_t_i_e_s_._h_h │ │ │ │ +_d_y_n_a_m_i_c_p_o_w_e_r_n_o_d_e_._h_h │ │ │ │ +_p_a_i_r_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ +_t_r_a_n_s_f_o_r_m_a_t_i_o_n_._h_h │ │ │ │ +_t_r_a_v_e_r_s_a_l_u_t_i_l_i_t_i_e_s_._h_h │ │ │ │ +_c_o_m_p_o_s_i_t_e_n_o_d_e_._h_h │ │ │ │ +_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ +_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00038.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: simpletransformationdescriptors.hh File Reference │ │ │ +dune-typetree: transformationutilities.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,44 +71,21 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
simpletransformationdescriptors.hh File Reference
│ │ │ +
transformationutilities.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <array>
│ │ │ -#include <memory>
│ │ │ -#include <vector>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ + │ │ │

Go to the source code of this file.

│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  Dune::TypeTree::SimpleLeafNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,12 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -simpletransformationdescriptors.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include │ │ │ │ +transformationutilities.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _D_u_n_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00038_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: simpletransformationdescriptors.hh Source File │ │ │ +dune-typetree: transformationutilities.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,212 +71,31 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
simpletransformationdescriptors.hh
│ │ │ +
transformationutilities.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │ -
7#define DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │ +
7#define DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │
8
│ │ │ -
9#include <array>
│ │ │ -
10#include <memory>
│ │ │ -
11#include <vector>
│ │ │ -
12
│ │ │ - │ │ │ - │ │ │ -
15#include <dune/common/exceptions.hh>
│ │ │ -
16
│ │ │ -
17
│ │ │ -
18namespace Dune {
│ │ │ -
19 namespace TypeTree {
│ │ │ -
20
│ │ │ -
25
│ │ │ -
26 template<typename SourceNode, typename Transformation, typename TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
28 {
│ │ │ -
29
│ │ │ -
30 static const bool recursive = false;
│ │ │ -
31
│ │ │ -
32 typedef TransformedNode transformed_type;
│ │ │ -
33 typedef std::shared_ptr<transformed_type> transformed_storage_type;
│ │ │ -
34
│ │ │ -
│ │ │ -
35 static transformed_type transform(const SourceNode& s, const Transformation& t)
│ │ │ -
36 {
│ │ │ -
37 return transformed_type();
│ │ │ -
38 }
│ │ │ -
│ │ │ -
39
│ │ │ -
│ │ │ -
40 static transformed_storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │ -
41 {
│ │ │ -
42 return std::make_shared<transformed_type>();
│ │ │ -
43 }
│ │ │ -
│ │ │ -
44
│ │ │ -
45 };
│ │ │ -
│ │ │ -
46
│ │ │ -
47
│ │ │ -
48 template<typename SourceNode, typename Transformation, template<typename Child, std::size_t> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
50 {
│ │ │ -
51
│ │ │ -
52 static const bool recursive = true;
│ │ │ -
53
│ │ │ -
54 template<typename TC>
│ │ │ -
│ │ │ -
55 struct result
│ │ │ -
56 {
│ │ │ -
57 typedef TransformedNode<TC, StaticDegree<SourceNode>::value> type;
│ │ │ -
58 typedef std::shared_ptr<type> storage_type;
│ │ │ -
59 static const std::size_t degree = StaticDegree<type>::value;
│ │ │ -
60 };
│ │ │ -
│ │ │ -
61
│ │ │ -
62 template<typename TC>
│ │ │ -
│ │ │ -
63 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ -
64 {
│ │ │ -
65 return typename result<TC>::type(children);
│ │ │ -
66 }
│ │ │ -
│ │ │ -
67
│ │ │ -
68 template<typename TC>
│ │ │ -
│ │ │ -
69 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ -
70 {
│ │ │ -
71 return std::make_shared<typename result<TC>::type>(children);
│ │ │ -
72 }
│ │ │ -
│ │ │ -
73
│ │ │ -
74 };
│ │ │ -
│ │ │ -
75
│ │ │ -
76
│ │ │ -
77 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
79 {
│ │ │ -
80
│ │ │ -
81 static const bool recursive = true;
│ │ │ -
82
│ │ │ -
83 template<typename TC>
│ │ │ -
│ │ │ -
84 struct result
│ │ │ -
85 {
│ │ │ -
86 typedef TransformedNode<TC> type;
│ │ │ -
87 typedef std::shared_ptr<type> storage_type;
│ │ │ -
88 };
│ │ │ -
│ │ │ -
89
│ │ │ -
90 template<typename TC>
│ │ │ -
│ │ │ -
91 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ -
92 {
│ │ │ -
93 return typename result<TC>::type(children);
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
96 template<typename TC>
│ │ │ -
│ │ │ -
97 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ -
98 {
│ │ │ -
99 return std::make_shared<typename result<TC>::type>(children);
│ │ │ -
100 }
│ │ │ -
│ │ │ -
101
│ │ │ -
102 };
│ │ │ -
│ │ │ -
103
│ │ │ -
104
│ │ │ -
105 template<typename SourceNode, typename Transformation, template<typename...> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
107 {
│ │ │ -
108
│ │ │ -
109 static const bool recursive = true;
│ │ │ -
110
│ │ │ -
111 template<typename... TC>
│ │ │ -
│ │ │ -
112 struct result
│ │ │ -
113 {
│ │ │ -
114 typedef TransformedNode<TC...> type;
│ │ │ -
115 typedef std::shared_ptr<type> storage_type;
│ │ │ -
116 };
│ │ │ -
│ │ │ -
117
│ │ │ -
118 template<typename... TC>
│ │ │ -
│ │ │ -
119 static typename result<TC...>::type transform(const SourceNode& s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ -
120 {
│ │ │ -
121 return typename result<TC...>::type(children...);
│ │ │ -
122 }
│ │ │ -
│ │ │ -
123
│ │ │ -
124 template<typename... TC>
│ │ │ -
│ │ │ -
125 static typename result<TC...>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ -
126 {
│ │ │ -
127 return std::make_shared<typename result<TC...>::type>(children...);
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
130 };
│ │ │ -
│ │ │ -
131
│ │ │ -
133
│ │ │ -
134 } // namespace TypeTree
│ │ │ -
135} //namespace Dune
│ │ │ -
136
│ │ │ -
137#endif // DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │ - │ │ │ - │ │ │ -
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │ -
Definition accumulate_static.hh:17
│ │ │ -
Definition accumulate_static.hh:18
│ │ │ -
Definition simpletransformationdescriptors.hh:28
│ │ │ -
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition simpletransformationdescriptors.hh:35
│ │ │ -
static const bool recursive
Definition simpletransformationdescriptors.hh:30
│ │ │ -
std::shared_ptr< transformed_type > transformed_storage_type
Definition simpletransformationdescriptors.hh:33
│ │ │ -
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition simpletransformationdescriptors.hh:40
│ │ │ -
TransformedNode transformed_type
Definition simpletransformationdescriptors.hh:32
│ │ │ -
Definition simpletransformationdescriptors.hh:50
│ │ │ -
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition simpletransformationdescriptors.hh:69
│ │ │ -
static const bool recursive
Definition simpletransformationdescriptors.hh:52
│ │ │ -
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition simpletransformationdescriptors.hh:63
│ │ │ -
Definition simpletransformationdescriptors.hh:56
│ │ │ -
TransformedNode< TC, StaticDegree< SourceNode >::value > type
Definition simpletransformationdescriptors.hh:57
│ │ │ -
static const std::size_t degree
Definition simpletransformationdescriptors.hh:59
│ │ │ -
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:58
│ │ │ -
Definition simpletransformationdescriptors.hh:79
│ │ │ -
static const bool recursive
Definition simpletransformationdescriptors.hh:81
│ │ │ -
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition simpletransformationdescriptors.hh:91
│ │ │ -
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition simpletransformationdescriptors.hh:97
│ │ │ -
Definition simpletransformationdescriptors.hh:85
│ │ │ -
TransformedNode< TC > type
Definition simpletransformationdescriptors.hh:86
│ │ │ -
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:87
│ │ │ -
Definition simpletransformationdescriptors.hh:107
│ │ │ -
static const bool recursive
Definition simpletransformationdescriptors.hh:109
│ │ │ -
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition simpletransformationdescriptors.hh:125
│ │ │ -
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >... children)
Definition simpletransformationdescriptors.hh:119
│ │ │ -
Definition simpletransformationdescriptors.hh:113
│ │ │ -
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:115
│ │ │ -
TransformedNode< TC... > type
Definition simpletransformationdescriptors.hh:114
│ │ │ + │ │ │ + │ │ │ +
11
│ │ │ +
12#endif // DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH
│ │ │ + │ │ │ + │ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,257 +1,26 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -simpletransformationdescriptors.hh │ │ │ │ +transformationutilities.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ -7#define DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ +7#define DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12 │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -15#include │ │ │ │ -16 │ │ │ │ -17 │ │ │ │ -18namespace _D_u_n_e { │ │ │ │ -19 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -20 │ │ │ │ -25 │ │ │ │ -26 template │ │ │ │ -_2_7 struct _S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -28 { │ │ │ │ -29 │ │ │ │ -_3_0 static const bool _r_e_c_u_r_s_i_v_e = false; │ │ │ │ -31 │ │ │ │ -_3_2 typedef TransformedNode _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e; │ │ │ │ -_3_3 typedef std::shared_ptr _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -34 │ │ │ │ -_3_5 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const Transformation& │ │ │ │ -t) │ │ │ │ -36 { │ │ │ │ -37 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(); │ │ │ │ -38 } │ │ │ │ -39 │ │ │ │ -_4_0 static _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr s, const Transformation& t) │ │ │ │ -41 { │ │ │ │ -42 return std::make_shared(); │ │ │ │ -43 } │ │ │ │ -44 │ │ │ │ -45 }; │ │ │ │ -46 │ │ │ │ -47 │ │ │ │ -48 template class TransformedNode> │ │ │ │ -_4_9 struct _S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -50 { │ │ │ │ -51 │ │ │ │ -_5_2 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -53 │ │ │ │ -54 template │ │ │ │ -_5_5 struct _r_e_s_u_l_t │ │ │ │ -56 { │ │ │ │ -_5_7 typedef TransformedNode::value> _t_y_p_e; │ │ │ │ -_5_8 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -_5_9 static const std::size_t _d_e_g_r_e_e = _S_t_a_t_i_c_D_e_g_r_e_e_<_t_y_p_e_>_:_:_v_a_l_u_e; │ │ │ │ -60 }; │ │ │ │ -61 │ │ │ │ -62 template │ │ │ │ -_6_3 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& │ │ │ │ -children) │ │ │ │ -64 { │ │ │ │ -65 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(children); │ │ │ │ -66 } │ │ │ │ -67 │ │ │ │ -68 template │ │ │ │ -_6_9 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& children) │ │ │ │ -70 { │ │ │ │ -71 return std::make_shared::type>(children); │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -74 }; │ │ │ │ -75 │ │ │ │ -76 │ │ │ │ -77 template class TransformedNode> │ │ │ │ -_7_8 struct _S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -79 { │ │ │ │ -80 │ │ │ │ -_8_1 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -82 │ │ │ │ -83 template │ │ │ │ -_8_4 struct _r_e_s_u_l_t │ │ │ │ -85 { │ │ │ │ -_8_6 typedef TransformedNode _t_y_p_e; │ │ │ │ -_8_7 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -88 }; │ │ │ │ -89 │ │ │ │ -90 template │ │ │ │ -_9_1 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, const std::vector>& children) │ │ │ │ -92 { │ │ │ │ -93 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(children); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 template │ │ │ │ -_9_7 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, const std:: │ │ │ │ -vector>& children) │ │ │ │ -98 { │ │ │ │ -99 return std::make_shared::type>(children); │ │ │ │ -100 } │ │ │ │ -101 │ │ │ │ -102 }; │ │ │ │ -103 │ │ │ │ -104 │ │ │ │ -105 template class TransformedNode> │ │ │ │ -_1_0_6 struct _S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -107 { │ │ │ │ -108 │ │ │ │ -_1_0_9 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -110 │ │ │ │ -111 template │ │ │ │ -_1_1_2 struct _r_e_s_u_l_t │ │ │ │ -113 { │ │ │ │ -_1_1_4 typedef TransformedNode _t_y_p_e; │ │ │ │ -_1_1_5 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -116 }; │ │ │ │ -117 │ │ │ │ -118 template │ │ │ │ -_1_1_9 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, std::shared_ptr... children) │ │ │ │ -120 { │ │ │ │ -121 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(children...); │ │ │ │ -122 } │ │ │ │ -123 │ │ │ │ -124 template │ │ │ │ -_1_2_5 static typename _r_e_s_u_l_t::storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, std::shared_ptr... │ │ │ │ -children) │ │ │ │ -126 { │ │ │ │ -127 return std::make_shared::type>(children...); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -130 }; │ │ │ │ -131 │ │ │ │ -133 │ │ │ │ -134 } // namespace TypeTree │ │ │ │ -135} //namespace Dune │ │ │ │ -136 │ │ │ │ -137#endif // DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ -decltype(Node::degree()) StaticDegree │ │ │ │ -Returns the statically known degree of the given Node type as a std:: │ │ │ │ -integral_constant. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ -_D_u_n_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:28 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(const SourceNode &s, const Transformation &t) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:35 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:30 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< transformed_type > transformed_storage_type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:33 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:40 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___t_y_p_e │ │ │ │ -TransformedNode transformed_type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:32 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC │ │ │ │ ->, result< TC >::degree > &children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:69 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:52 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ -&t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:63 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:56 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< TC, StaticDegree< SourceNode >::value > type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:57 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_d_e_g_r_e_e │ │ │ │ -static const std::size_t degree │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:59 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:79 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:81 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ -&t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:91 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC │ │ │ │ -> > &children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:97 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:85 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< TC > type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:86 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:87 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:107 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:109 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC... >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:125 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC... >::type transform(const SourceNode &s, const │ │ │ │ -Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:119 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:113 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:115 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< TC... > type │ │ │ │ -DDeeffiinniittiioonn simpletransformationdescriptors.hh:114 │ │ │ │ +9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ +10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h> │ │ │ │ +11 │ │ │ │ +12#endif // DUNE_TYPETREE_TRANSFORMATIONUTILITIES_HH │ │ │ │ +_g_e_n_e_r_i_c_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h │ │ │ │ +_s_i_m_p_l_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_d_e_s_c_r_i_p_t_o_r_s_._h_h │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00041.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: proxynode.hh File Reference │ │ │ +dune-typetree: filteredcompositenode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,44 +74,34 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
proxynode.hh File Reference
│ │ │ +
filteredcompositenode.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <type_traits>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ +
#include <memory>
│ │ │ +#include <tuple>
│ │ │ +#include <type_traits>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/filters.hh>
│ │ │ #include <dune/common/shared_ptr.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ #include <dune/common/indices.hh>
│ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

class  Dune::TypeTree::StaticChildAccessors< ProxiedNode >
 Mixin class providing methods for child access with compile-time parameter. More...
struct  Dune::TypeTree::StaticChildAccessors< ProxiedNode >::Child< k >
 Access to the type and storage type of the i-th child. More...
class  Dune::TypeTree::DynamicChildAccessors< ProxiedNode >
 Mixin class providing methods for child access with run-time parameter. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag >
 ProxyNode base class for LeafNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, CompositeNodeTag >
 ProxyNode base class for CompositeNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, PowerNodeTag >
 ProxyNode base class for PowerNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, DynamicPowerNodeTag >
 ProxyNode base class for DynamicPowerNode. More...
class  Dune::TypeTree::ProxyNode< Node >
 Base class for nodes acting as a proxy for an existing node. More...
class  Dune::TypeTree::FilteredCompositeNode< Node, Filter >
 Base class for composite nodes representing a filtered view on an underlying composite node. More...
struct  Dune::TypeTree::FilteredCompositeNode< Node, Filter >::Child< k >
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,39 +1,28 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -proxynode.hh File Reference │ │ │ │ +filteredcompositenode.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ #include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _> │ │ │ │ -  Mixin class providing methods for child access with compile-time │ │ │ │ - parameter. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _N_o_d_e_,_ _F_i_l_t_e_r_ _> │ │ │ │ +  Base class for composite nodes representing a filtered view on an │ │ │ │ + underlying composite node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _N_o_d_e_,_ _F_i_l_t_e_r_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │   Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _> │ │ │ │ -  Mixin class providing methods for child access with run-time │ │ │ │ - parameter. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _L_e_a_f_N_o_d_e_T_a_g_ _> │ │ │ │ -  _P_r_o_x_y_N_o_d_e base class for _L_e_a_f_N_o_d_e. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _> │ │ │ │ -  _P_r_o_x_y_N_o_d_e base class for _C_o_m_p_o_s_i_t_e_N_o_d_e. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _> │ │ │ │ -  _P_r_o_x_y_N_o_d_e base class for _P_o_w_e_r_N_o_d_e. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _> │ │ │ │ -  _P_r_o_x_y_N_o_d_e base class for _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e. _M_o_r_e_._._. │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _N_o_d_e_ _> │ │ │ │ -  Base class for nodes acting as a proxy for an existing node. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00041_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: proxynode.hh Source File │ │ │ +dune-typetree: filteredcompositenode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,399 +71,291 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
proxynode.hh
│ │ │ +
filteredcompositenode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_PROXYNODE_HH
│ │ │ -
7#define DUNE_TYPETREE_PROXYNODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │ +
7#define DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │
8
│ │ │ -
9#include <type_traits>
│ │ │ - │ │ │ - │ │ │ -
12#include <dune/common/shared_ptr.hh>
│ │ │ -
13#include <dune/common/indices.hh>
│ │ │ -
14#include <dune/common/std/type_traits.hh>
│ │ │ -
15
│ │ │ -
16namespace Dune {
│ │ │ -
17 namespace TypeTree {
│ │ │ -
18
│ │ │ -
23
│ │ │ -
24 template<typename Node>
│ │ │ -
25 class ProxyNode;
│ │ │ -
26
│ │ │ -
28 template<typename ProxiedNode>
│ │ │ -
│ │ │ - │ │ │ -
30 {
│ │ │ -
31
│ │ │ -
32 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<ProxiedNode>::type>::value;
│ │ │ -
33
│ │ │ -
34 template<std::size_t k>
│ │ │ -
35 struct lazy_enabled
│ │ │ -
36 {
│ │ │ -
37 static const bool value = !proxiedNodeIsConst;
│ │ │ -
38 };
│ │ │ -
39
│ │ │ -
40 typedef ProxyNode<ProxiedNode> Node;
│ │ │ -
41
│ │ │ -
42 template<bool enabled = !proxiedNodeIsConst>
│ │ │ -
43 typename std::enable_if<enabled,Node&>::type
│ │ │ -
44 node ()
│ │ │ -
45 {
│ │ │ -
46 return static_cast<Node&>(*this);
│ │ │ -
47 }
│ │ │ -
48
│ │ │ -
49 const Node& node () const
│ │ │ -
50 {
│ │ │ -
51 return static_cast<const Node&>(*this);
│ │ │ -
52 }
│ │ │ -
53
│ │ │ -
54 public:
│ │ │ -
55
│ │ │ -
57 template<std::size_t k>
│ │ │ -
│ │ │ -
58 struct Child
│ │ │ -
59 : public ProxiedNode::template Child<k>
│ │ │ -
60 {};
│ │ │ -
│ │ │ -
61
│ │ │ -
64
│ │ │ -
66
│ │ │ -
69 template<std::size_t k,
│ │ │ -
70 typename std::enable_if<lazy_enabled<k>::value, int>::type = 0>
│ │ │ -
│ │ │ -
71 auto& child (index_constant<k> = {})
│ │ │ -
72 {
│ │ │ -
73 return node().proxiedNode().template child<k>();
│ │ │ -
74 }
│ │ │ -
│ │ │ -
75
│ │ │ -
77
│ │ │ -
80 template<std::size_t k>
│ │ │ -
│ │ │ -
81 const auto& child (index_constant<k> = {}) const
│ │ │ -
82 {
│ │ │ -
83 return node().proxiedNode().template child<k>();
│ │ │ -
84 }
│ │ │ -
│ │ │ -
85
│ │ │ -
87
│ │ │ -
90 template<std::size_t k,
│ │ │ -
91 typename std::enable_if<lazy_enabled<k>::value, int>::type = 0>
│ │ │ -
│ │ │ -
92 auto childStorage (index_constant<k> = {})
│ │ │ +
9#include <memory>
│ │ │ +
10#include <tuple>
│ │ │ +
11#include <type_traits>
│ │ │ +
12
│ │ │ + │ │ │ + │ │ │ +
15#include <dune/common/shared_ptr.hh>
│ │ │ +
16#include <dune/common/typetraits.hh>
│ │ │ +
17#include <dune/common/indices.hh>
│ │ │ +
18
│ │ │ + │ │ │ + │ │ │ +
21
│ │ │ +
22namespace Dune {
│ │ │ +
23 namespace TypeTree {
│ │ │ +
24
│ │ │ +
29
│ │ │ +
30#ifndef DOXYGEN
│ │ │ +
31 namespace {
│ │ │ +
32
│ │ │ +
33 // ********************************************************************************
│ │ │ +
34 // Utility structs for filter construction and application
│ │ │ +
35 // ********************************************************************************
│ │ │ +
36
│ │ │ +
37 // Gets the filter and wraps it in case of a SimpleFilter.
│ │ │ +
38 template<typename Filter, typename Tag>
│ │ │ +
39 struct get_filter;
│ │ │ +
40
│ │ │ +
41 // Helper struct to extract the child template parameter pack from the ChildTypes tuple.
│ │ │ +
42 template<typename Filter, typename Node, typename ChildTypes>
│ │ │ +
43 struct apply_filter_wrapper;
│ │ │ +
44
│ │ │ +
45 template<typename Filter, typename Node, typename... Children>
│ │ │ +
46 struct apply_filter_wrapper<Filter,Node,std::tuple<Children...> >
│ │ │ +
47 : public Filter::template apply<Node,Children...>
│ │ │ +
48 {};
│ │ │ +
49
│ │ │ +
50 // specialization for SimpleFilter
│ │ │ +
51 template<typename Filter>
│ │ │ +
52 struct get_filter<Filter,SimpleFilterTag>
│ │ │ +
53 {
│ │ │ +
54 struct type
│ │ │ +
55 {
│ │ │ +
56 template<typename Node, typename ChildTypes>
│ │ │ +
57 struct apply
│ │ │ +
58 : public apply_filter_wrapper<filter<Filter>,Node,ChildTypes>
│ │ │ +
59 {};
│ │ │ +
60 };
│ │ │ +
61 };
│ │ │ +
62
│ │ │ +
63 // specialization for AdvancedFilter
│ │ │ +
64 template<typename Filter>
│ │ │ +
65 struct get_filter<Filter,AdvancedFilterTag>
│ │ │ +
66 {
│ │ │ +
67 struct type
│ │ │ +
68 {
│ │ │ +
69 template<typename Node, typename ChildTypes>
│ │ │ +
70 struct apply
│ │ │ +
71 : public apply_filter_wrapper<Filter,Node,ChildTypes>
│ │ │ +
72 {};
│ │ │ +
73 };
│ │ │ +
74 };
│ │ │ +
75
│ │ │ +
76 } // anonymous namespace
│ │ │ +
77#endif // DOXYGEN
│ │ │ +
78
│ │ │ +
79
│ │ │ +
81 template<typename Node, typename Filter>
│ │ │ +
│ │ │ + │ │ │ +
83 {
│ │ │ +
84
│ │ │ +
85 typedef typename get_filter<Filter,typename Filter::FilterTag>::type filter;
│ │ │ +
86 typedef typename filter::template apply<Node,typename Node::ChildTypes>::type filter_result;
│ │ │ +
87 typedef typename filter_result::template apply<Node> mapped_children;
│ │ │ +
88
│ │ │ +
89 static const bool nodeIsConst = std::is_const<typename std::remove_reference<Node>::type>::value;
│ │ │ +
90
│ │ │ +
91 template<std::size_t k>
│ │ │ +
92 struct lazy_enable
│ │ │
93 {
│ │ │ -
94 return node().proxiedNode().template childStorage<k>();
│ │ │ -
95 }
│ │ │ -
│ │ │ -
96
│ │ │ +
94 static const bool value = !nodeIsConst;
│ │ │ +
95 };
│ │ │ +
96
│ │ │ +
97 public:
│ │ │
98
│ │ │ -
104 template<std::size_t k>
│ │ │ -
│ │ │ -
105 auto childStorage (index_constant<k> = {}) const
│ │ │ -
106 {
│ │ │ -
107 return node().proxiedNode().template childStorage<k>();
│ │ │ -
108 }
│ │ │ -
│ │ │ -
109
│ │ │ -
111 template<std::size_t k, class ProxyChild>
│ │ │ -
│ │ │ -
112 void setChild (ProxyChild&& child, typename std::enable_if<lazy_enabled<k>::value,void*>::type = 0)
│ │ │ -
113 {
│ │ │ -
114 node().proxiedNode().template setChild<k>(std::forward<ProxyChild>(child));
│ │ │ -
115 }
│ │ │ -
│ │ │ + │ │ │ +
101
│ │ │ +
103 typedef typename mapped_children::NodeStorage NodeStorage;
│ │ │ +
104
│ │ │ +
106 typedef typename mapped_children::ChildTypes ChildTypes;
│ │ │ +
107
│ │ │ +
109 static const bool isLeaf = false;
│ │ │ +
110
│ │ │ +
112 static const bool isPower = false;
│ │ │ +
113
│ │ │ +
115 static const bool isComposite = true;
│ │ │
116
│ │ │
│ │ │ -
117 const typename ProxiedNode::NodeStorage& nodeStorage () const
│ │ │ -
118 {
│ │ │ -
119 return node().proxiedNode().nodeStorage();
│ │ │ +
117 static constexpr auto degree ()
│ │ │ +
118 {
│ │ │ +
119 return std::integral_constant<std::size_t,filter_result::size>{};
│ │ │
120 }
│ │ │
│ │ │ -
121
│ │ │ -
122 };
│ │ │ -
│ │ │ -
123
│ │ │ -
125
│ │ │ -
130 template<typename ProxiedNode>
│ │ │ -
│ │ │ - │ │ │ -
132 : public StaticChildAccessors<ProxiedNode>
│ │ │ -
133 {
│ │ │ -
134
│ │ │ -
135 typedef ProxyNode<ProxiedNode> Node;
│ │ │ -
136
│ │ │ -
137 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<ProxiedNode>::type>::value;
│ │ │ -
138
│ │ │ -
139 template<bool enabled = !proxiedNodeIsConst>
│ │ │ -
140 typename std::enable_if<enabled,Node&>::type
│ │ │ -
141 node ()
│ │ │ -
142 {
│ │ │ -
143 return static_cast<Node&>(*this);
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 const Node& node () const
│ │ │ -
147 {
│ │ │ -
148 return static_cast<const Node&>(*this);
│ │ │ -
149 }
│ │ │ -
150
│ │ │ -
151 public:
│ │ │ -
152
│ │ │ -
155
│ │ │ -
157
│ │ │ -
160 template<bool enabled = !proxiedNodeIsConst,
│ │ │ -
161 typename std::enable_if<enabled, int>::type = 0>
│ │ │ -
│ │ │ -
162 auto& child (std::size_t i)
│ │ │ -
163 {
│ │ │ -
164 return node().proxiedNode().child(i);
│ │ │ -
165 }
│ │ │ +
121
│ │ │ +
123 template<std::size_t k>
│ │ │ +
│ │ │ +
124 struct Child {
│ │ │ +
125
│ │ │ +
126#ifndef DOXYGEN
│ │ │ +
127
│ │ │ +
128 typedef typename std::tuple_element<k,typename mapped_children::Children>::type OriginalChild;
│ │ │ +
129
│ │ │ +
130 static const std::size_t mapped_index = std::tuple_element<k,typename filter_result::IndexMap>::type::original_index;
│ │ │ +
131
│ │ │ +
132#endif // DOXYGEN
│ │ │ +
133
│ │ │ +
135 typedef typename OriginalChild::Type Type;
│ │ │ +
136
│ │ │ +
138 typedef typename OriginalChild::type type;
│ │ │ +
139 };
│ │ │ +
│ │ │ +
140
│ │ │ +
143
│ │ │ +
145
│ │ │ +
148 template<std::size_t k,
│ │ │ +
149 typename std::enable_if<lazy_enable<k>::value, int>::type = 0>
│ │ │ +
│ │ │ +
150 auto& child (index_constant<k> = {})
│ │ │ +
151 {
│ │ │ +
152 return _node->template child<Child<k>::mapped_index>();
│ │ │ +
153 }
│ │ │ +
│ │ │ +
154
│ │ │ +
156
│ │ │ +
159 template<std::size_t k>
│ │ │ +
│ │ │ +
160 const auto& child (index_constant<k> = {}) const
│ │ │ +
161 {
│ │ │ +
162 return _node->template child<Child<k>::mapped_index>();
│ │ │ +
163 }
│ │ │
│ │ │ +
164
│ │ │
166
│ │ │ -
168
│ │ │ +
169 template<std::size_t k,
│ │ │ +
170 typename std::enable_if<lazy_enable<k>::value, int>::type = 0>
│ │ │
│ │ │ -
171 const auto& child (std::size_t i) const
│ │ │ -
172 {
│ │ │ -
173 return node().proxiedNode().child(i);
│ │ │ +
171 auto childStorage (index_constant<k> = {})
│ │ │ +
172 {
│ │ │ +
173 return _node->template childStorage<Child<k>::mapped_index>();
│ │ │
174 }
│ │ │
│ │ │
175
│ │ │
177
│ │ │ -
180 template<bool enabled = !proxiedNodeIsConst,
│ │ │ -
181 typename std::enable_if<enabled, int>::type = 0>
│ │ │ -
│ │ │ -
182 auto childStorage (std::size_t i)
│ │ │ -
183 {
│ │ │ -
184 return node().proxiedNode().childStorage(i);
│ │ │ -
185 }
│ │ │ -
│ │ │ -
186
│ │ │ -
188
│ │ │ -
│ │ │ -
194 auto childStorage (std::size_t i) const
│ │ │ -
195 {
│ │ │ -
196 return node().proxiedNode().childStorage(i);
│ │ │ -
197 }
│ │ │ -
│ │ │ -
198
│ │ │ -
200 template<class ProxyChild, bool enabled = !proxiedNodeIsConst>
│ │ │ -
│ │ │ -
201 void setChild (std::size_t i, ProxyChild&& child, typename std::enable_if<enabled,void*>::type = 0)
│ │ │ -
202 {
│ │ │ -
203 node().proxiedNode().setChild(i, std::forward<ProxyChild>(child));
│ │ │ -
204 }
│ │ │ -
│ │ │ -
205
│ │ │ -
206 };
│ │ │ -
│ │ │ -
207
│ │ │ -
209 template<typename Node, typename NodeTag>
│ │ │ - │ │ │ -
211
│ │ │ -
213 template<typename Node>
│ │ │ -
│ │ │ - │ │ │ -
215 {
│ │ │ -
216 };
│ │ │ -
│ │ │ -
217
│ │ │ -
219 template<typename Node>
│ │ │ -
│ │ │ - │ │ │ -
221 : public StaticChildAccessors<Node>
│ │ │ -
222 {
│ │ │ -
223 typedef typename Node::ChildTypes ChildTypes;
│ │ │ -
224 typedef typename Node::NodeStorage NodeStorage;
│ │ │ -
225 };
│ │ │ -
│ │ │ -
226
│ │ │ -
228 template<typename Node>
│ │ │ -
│ │ │ - │ │ │ -
230 : public DynamicChildAccessors<Node>
│ │ │ -
231 {
│ │ │ -
232 typedef typename Node::ChildType ChildType;
│ │ │ -
233 typedef typename Node::NodeStorage NodeStorage;
│ │ │ -
234 };
│ │ │ -
│ │ │ -
235
│ │ │ -
237 template<typename Node>
│ │ │ -
│ │ │ - │ │ │ -
239 : public DynamicChildAccessors<Node>
│ │ │ -
240 {
│ │ │ -
241 typedef typename Node::ChildType ChildType;
│ │ │ -
242 typedef typename Node::NodeStorage NodeStorage;
│ │ │ -
243 };
│ │ │ -
│ │ │ -
244
│ │ │ +
180 template<std::size_t k>
│ │ │ +
│ │ │ +
181 auto childStorage (index_constant<k> = {}) const
│ │ │ +
182 {
│ │ │ +
183 return _node->template childStorage<Child<k>::mapped_index>();
│ │ │ +
184 }
│ │ │ +
│ │ │ +
185
│ │ │ +
187 template<std::size_t k, class ChildType>
│ │ │ +
│ │ │ +
188 void setChild (ChildType&& child, typename std::enable_if<lazy_enable<k>::value,void*>::type = 0)
│ │ │ +
189 {
│ │ │ +
190 _node->template setChild<Child<k>::mapped_index>(std::forward<ChildType>(child));
│ │ │ +
191 }
│ │ │ +
│ │ │ +
192
│ │ │ +
194
│ │ │ +
197
│ │ │ +
198 protected:
│ │ │ +
199
│ │ │ +
201
│ │ │ +
204 template<bool enabled = !nodeIsConst>
│ │ │ +
205 typename std::enable_if<enabled,Node&>::type
│ │ │ +
│ │ │ + │ │ │ +
207 {
│ │ │ +
208 return *_node;
│ │ │ +
209 }
│ │ │ +
│ │ │ +
210
│ │ │ +
212
│ │ │ +
│ │ │ +
215 const Node& unfiltered () const
│ │ │ +
216 {
│ │ │ +
217 return *_node;
│ │ │ +
218 }
│ │ │ +
│ │ │ +
219
│ │ │ +
221
│ │ │ +
224 template<bool enabled = !nodeIsConst>
│ │ │ +
225 typename std::enable_if<enabled,std::shared_ptr<Node> >::type
│ │ │ +
│ │ │ + │ │ │ +
227 {
│ │ │ +
228 return _node;
│ │ │ +
229 }
│ │ │ +
│ │ │ +
230
│ │ │ +
232
│ │ │ +
│ │ │ +
235 std::shared_ptr<const Node> unfilteredStorage () const
│ │ │ +
236 {
│ │ │ +
237 return _node;
│ │ │ +
238 }
│ │ │ +
│ │ │ +
239
│ │ │ +
241
│ │ │ +
242 public:
│ │ │ +
243
│ │ │
246
│ │ │ -
252 template<typename Node>
│ │ │ -
│ │ │ - │ │ │ -
254 : public ProxyNodeBase<Node,NodeTag<Node>>
│ │ │ -
255 {
│ │ │ -
256 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<Node>::type>::value;
│ │ │ -
257
│ │ │ -
258 template <class N>
│ │ │ -
259 using HasStaticDegree = index_constant<N::degree()>;
│ │ │ -
260
│ │ │ -
261 template <class N>
│ │ │ -
262 static constexpr bool hasStaticDegree = Std::is_detected<HasStaticDegree, N>::value;
│ │ │ -
263
│ │ │ -
264 // accessor mixins need to be friends for access to proxiedNode()
│ │ │ -
265 friend class StaticChildAccessors<Node>;
│ │ │ -
266 friend class DynamicChildAccessors<Node>;
│ │ │ +
│ │ │ +
248 FilteredCompositeNode (std::shared_ptr<Node> node)
│ │ │ +
249 : _node(std::move(node))
│ │ │ +
250 {}
│ │ │ +
│ │ │ +
251
│ │ │ +
│ │ │ + │ │ │ +
254 : _node(stackobject_to_shared_ptr(node))
│ │ │ +
255 {}
│ │ │ +
│ │ │ +
256
│ │ │ +
258
│ │ │ +
259 private:
│ │ │ +
260 std::shared_ptr<Node> _node;
│ │ │ +
261 };
│ │ │ +
│ │ │ +
262
│ │ │ +
264
│ │ │ +
265 } // namespace TypeTree
│ │ │ +
266} //namespace Dune
│ │ │
267
│ │ │ -
268 public:
│ │ │ -
269
│ │ │ -
270 typedef Node ProxiedNode;
│ │ │ -
271
│ │ │ - │ │ │ -
273
│ │ │ -
275 static const bool isLeaf = Node::isLeaf;
│ │ │ -
276
│ │ │ -
278 static const bool isPower = Node::isPower;
│ │ │ -
279
│ │ │ -
281 static const bool isComposite = Node::isComposite;
│ │ │ -
282
│ │ │ -
283 template <class N = Node,
│ │ │ -
284 std::enable_if_t<hasStaticDegree<N>, int> = 0>
│ │ │ -
│ │ │ -
285 static constexpr auto degree ()
│ │ │ -
286 {
│ │ │ -
287 return N::degree();
│ │ │ -
288 }
│ │ │ -
│ │ │ -
289
│ │ │ -
290 template <class N = Node,
│ │ │ -
291 std::enable_if_t<not hasStaticDegree<N>, int> = 0>
│ │ │ -
│ │ │ -
292 auto degree () const
│ │ │ -
293 {
│ │ │ -
294 return proxiedNode().degree();
│ │ │ -
295 }
│ │ │ -
│ │ │ -
296
│ │ │ -
297
│ │ │ -
298 protected:
│ │ │ -
299
│ │ │ -
302
│ │ │ -
304 template<bool enabled = !proxiedNodeIsConst>
│ │ │ -
305 typename std::enable_if<enabled,Node&>::type
│ │ │ -
│ │ │ - │ │ │ -
307 {
│ │ │ -
308 return *_node;
│ │ │ -
309 }
│ │ │ -
│ │ │ -
310
│ │ │ -
│ │ │ -
312 const Node& proxiedNode () const
│ │ │ -
313 {
│ │ │ -
314 return *_node;
│ │ │ -
315 }
│ │ │ -
│ │ │ -
316
│ │ │ -
318 template<bool enabled = !proxiedNodeIsConst>
│ │ │ -
319 typename std::enable_if<enabled,std::shared_ptr<Node> >::type
│ │ │ -
│ │ │ - │ │ │ -
321 {
│ │ │ -
322 return _node;
│ │ │ -
323 }
│ │ │ -
│ │ │ -
324
│ │ │ -
│ │ │ -
326 std::shared_ptr<const Node> proxiedNodeStorage () const
│ │ │ -
327 {
│ │ │ -
328 return _node;
│ │ │ -
329 }
│ │ │ -
│ │ │ -
330
│ │ │ -
332
│ │ │ -
335
│ │ │ -
│ │ │ -
336 ProxyNode (Node& node)
│ │ │ -
337 : _node(stackobject_to_shared_ptr(node))
│ │ │ -
338 {}
│ │ │ -
│ │ │ -
339
│ │ │ -
│ │ │ -
340 ProxyNode (std::shared_ptr<Node> node)
│ │ │ -
341 : _node(std::move(node))
│ │ │ -
342 {}
│ │ │ -
│ │ │ -
343
│ │ │ -
345
│ │ │ -
346 private:
│ │ │ -
347
│ │ │ -
348 std::shared_ptr<Node> _node;
│ │ │ -
349 };
│ │ │ -
│ │ │ -
350
│ │ │ -
352
│ │ │ -
353 } // namespace TypeTree
│ │ │ -
354} //namespace Dune
│ │ │ -
355
│ │ │ -
356#endif // DUNE_TYPETREE_PROXYNODE_HH
│ │ │ - │ │ │ - │ │ │ -
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │ +
268#endif // DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │ + │ │ │ + │ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ -
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ -
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ +
auto childStorage(Node &&node, Indices... indices)
Definition childextraction.hh:75
│ │ │ +
auto childStorage(index_constant< k >={}) const
Returns the storage of the k-th child (const version).
Definition filteredcompositenode.hh:181
│ │ │ +
static constexpr auto degree()
Definition filteredcompositenode.hh:117
│ │ │ +
mapped_children::NodeStorage NodeStorage
The type used for storing the children.
Definition filteredcompositenode.hh:103
│ │ │ +
void setChild(ChildType &&child, typename std::enable_if< lazy_enable< k >::value, void * >::type=0)
Sets the k-th child to the passed-in value.
Definition filteredcompositenode.hh:188
│ │ │ +
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition filteredcompositenode.hh:109
│ │ │ +
const Node & unfiltered() const
Returns the unfiltered node (const version).
Definition filteredcompositenode.hh:215
│ │ │ +
static const bool isComposite
Mark this class as a composite in the dune-typetree.
Definition filteredcompositenode.hh:115
│ │ │ +
std::enable_if< enabled, std::shared_ptr< Node > >::type unfilteredStorage()
Returns the storage object of the unfiltered node.
Definition filteredcompositenode.hh:226
│ │ │ +
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition filteredcompositenode.hh:112
│ │ │ +
FilteredCompositeNode(Node &node)
Initialize the CompositeNode with a copy of the passed-in storage type.
Definition filteredcompositenode.hh:253
│ │ │ +
FilteredCompositeNode(std::shared_ptr< Node > node)
Initialize the CompositeNode with copies of the passed in Storage objects.
Definition filteredcompositenode.hh:248
│ │ │ +
auto childStorage(index_constant< k >={})
Returns the storage of the k-th child.
Definition filteredcompositenode.hh:171
│ │ │ +
const auto & child(index_constant< k >={}) const
Returns the k-th child (const version).
Definition filteredcompositenode.hh:160
│ │ │ +
auto & child(index_constant< k >={})
Returns the k-th child.
Definition filteredcompositenode.hh:150
│ │ │ +
CompositeNodeTag NodeTag
The type tag that describes a CompositeNode.
Definition filteredcompositenode.hh:100
│ │ │ +
mapped_children::ChildTypes ChildTypes
A tuple storing the types of all children.
Definition filteredcompositenode.hh:106
│ │ │ +
std::enable_if< enabled, Node & >::type unfiltered()
Returns the unfiltered node.
Definition filteredcompositenode.hh:206
│ │ │ +
std::shared_ptr< const Node > unfilteredStorage() const
Returns the storage object of the unfiltered node (const version).
Definition filteredcompositenode.hh:235
│ │ │ +
Access to the type and storage type of the i-th child.
Definition filteredcompositenode.hh:124
│ │ │ +
OriginalChild::type type
The type of the child.
Definition filteredcompositenode.hh:138
│ │ │ +
OriginalChild::Type Type
The type of the child.
Definition filteredcompositenode.hh:135
│ │ │ +
Tag describing a simple filter that can only decide whether or not to include a single given child.
Definition filters.hh:58
│ │ │ +
Tag describing an advanced filter that has full control over the construction of the list of FilterEn...
Definition filters.hh:61
│ │ │
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ -
Base class for nodes acting as a proxy for an existing node.
Definition proxynode.hh:255
│ │ │ -
ProxyNode(Node &node)
Definition proxynode.hh:336
│ │ │ -
Dune::TypeTree::NodeTag< ProxiedNode > NodeTag
Definition proxynode.hh:272
│ │ │ -
static const bool isComposite
Definition proxynode.hh:281
│ │ │ -
static const bool isLeaf
Definition proxynode.hh:275
│ │ │ -
static const bool isPower
Definition proxynode.hh:278
│ │ │ -
auto degree() const
Definition proxynode.hh:292
│ │ │ -
std::enable_if< enabled, Node & >::type proxiedNode()
Returns the proxied node.
Definition proxynode.hh:306
│ │ │ -
std::shared_ptr< const Node > proxiedNodeStorage() const
Returns the storage of the proxied node (const version).
Definition proxynode.hh:326
│ │ │ -
ProxiedNode ProxiedNode
Definition proxynode.hh:270
│ │ │ -
std::enable_if< enabled, std::shared_ptr< Node > >::type proxiedNodeStorage()
Returns the storage of the proxied node.
Definition proxynode.hh:320
│ │ │ -
static constexpr auto degree()
Definition proxynode.hh:285
│ │ │ -
ProxyNode(std::shared_ptr< Node > node)
Definition proxynode.hh:340
│ │ │ -
const Node & proxiedNode() const
Returns the proxied node (const version).
Definition proxynode.hh:312
│ │ │ -
Mixin class providing methods for child access with compile-time parameter.
Definition proxynode.hh:30
│ │ │ -
auto & child(index_constant< k >={})
Returns the i-th child.
Definition proxynode.hh:71
│ │ │ -
void setChild(ProxyChild &&child, typename std::enable_if< lazy_enabled< k >::value, void * >::type=0)
Sets the i-th child to the passed-in value.
Definition proxynode.hh:112
│ │ │ -
const ProxiedNode::NodeStorage & nodeStorage() const
Definition proxynode.hh:117
│ │ │ -
auto childStorage(index_constant< k >={})
Returns the storage of the i-th child.
Definition proxynode.hh:92
│ │ │ -
const auto & child(index_constant< k >={}) const
Returns the i-th child (const version).
Definition proxynode.hh:81
│ │ │ -
auto childStorage(index_constant< k >={}) const
Returns the storage of the i-th child (const version).
Definition proxynode.hh:105
│ │ │ -
Access to the type and storage type of the i-th child.
Definition proxynode.hh:60
│ │ │ -
Mixin class providing methods for child access with run-time parameter.
Definition proxynode.hh:133
│ │ │ -
auto & child(std::size_t i)
Returns the i-th child.
Definition proxynode.hh:162
│ │ │ -
auto childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition proxynode.hh:194
│ │ │ -
void setChild(std::size_t i, ProxyChild &&child, typename std::enable_if< enabled, void * >::type=0)
Sets the i-th child to the passed-in value.
Definition proxynode.hh:201
│ │ │ -
const auto & child(std::size_t i) const
Returns the i-th child (const version).
Definition proxynode.hh:171
│ │ │ -
auto childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition proxynode.hh:182
│ │ │ -
Tag-based dispatch to appropriate base class that provides necessary functionality.
Definition proxynode.hh:210
│ │ │ -
Node::NodeStorage NodeStorage
Definition proxynode.hh:224
│ │ │ -
Node::ChildTypes ChildTypes
Definition proxynode.hh:223
│ │ │ -
Node::NodeStorage NodeStorage
Definition proxynode.hh:233
│ │ │ -
Node::ChildType ChildType
Definition proxynode.hh:232
│ │ │ -
Node::NodeStorage NodeStorage
Definition proxynode.hh:242
│ │ │ -
Node::ChildType ChildType
Definition proxynode.hh:241
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,446 +1,343 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -proxynode.hh │ │ │ │ +filteredcompositenode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ -7#define DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ +7#define DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -12#include │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15 │ │ │ │ -16namespace _D_u_n_e { │ │ │ │ -17 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12 │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ 18 │ │ │ │ -23 │ │ │ │ -24 template │ │ │ │ -25 class _P_r_o_x_y_N_o_d_e; │ │ │ │ -26 │ │ │ │ -28 template │ │ │ │ -_2_9 class _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -30 { │ │ │ │ -31 │ │ │ │ -32 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ -33 │ │ │ │ -34 template │ │ │ │ -35 struct lazy_enabled │ │ │ │ -36 { │ │ │ │ -37 static const bool value = !proxiedNodeIsConst; │ │ │ │ -38 }; │ │ │ │ -39 │ │ │ │ -40 typedef _P_r_o_x_y_N_o_d_e_<_P_r_o_x_i_e_d_N_o_d_e_> Node; │ │ │ │ -41 │ │ │ │ -42 template │ │ │ │ -43 typename std::enable_if::type │ │ │ │ -44 node () │ │ │ │ -45 { │ │ │ │ -46 return static_cast(*this); │ │ │ │ -47 } │ │ │ │ -48 │ │ │ │ -49 const Node& node () const │ │ │ │ -50 { │ │ │ │ -51 return static_cast(*this); │ │ │ │ -52 } │ │ │ │ -53 │ │ │ │ -54 public: │ │ │ │ -55 │ │ │ │ -57 template │ │ │ │ -_5_8 struct _C_h_i_l_d │ │ │ │ -59 : public ProxiedNode::template _C_h_i_l_d │ │ │ │ -60 {}; │ │ │ │ -61 │ │ │ │ -64 │ │ │ │ -66 │ │ │ │ -69 template::value, int>::type = 0> │ │ │ │ -_7_1 auto& _c_h_i_l_d (index_constant = {}) │ │ │ │ -72 { │ │ │ │ -73 return node().proxiedNode().template _c_h_i_l_d_<_k_>(); │ │ │ │ -74 } │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e { │ │ │ │ +23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +24 │ │ │ │ +29 │ │ │ │ +30#ifndef DOXYGEN │ │ │ │ +31 namespace { │ │ │ │ +32 │ │ │ │ +33 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +34 // Utility structs for filter construction and application │ │ │ │ +35 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +36 │ │ │ │ +37 // Gets the filter and wraps it in case of a SimpleFilter. │ │ │ │ +38 template │ │ │ │ +39 struct get_filter; │ │ │ │ +40 │ │ │ │ +41 // Helper struct to extract the child template parameter pack from the │ │ │ │ +ChildTypes tuple. │ │ │ │ +42 template │ │ │ │ +43 struct apply_filter_wrapper; │ │ │ │ +44 │ │ │ │ +45 template │ │ │ │ +46 struct apply_filter_wrapper > │ │ │ │ +47 : public Filter::template apply │ │ │ │ +48 {}; │ │ │ │ +49 │ │ │ │ +50 // specialization for SimpleFilter │ │ │ │ +51 template │ │ │ │ +52 struct get_filter │ │ │ │ +53 { │ │ │ │ +54 struct type │ │ │ │ +55 { │ │ │ │ +56 template │ │ │ │ +57 struct apply │ │ │ │ +58 : public apply_filter_wrapper,Node,ChildTypes> │ │ │ │ +59 {}; │ │ │ │ +60 }; │ │ │ │ +61 }; │ │ │ │ +62 │ │ │ │ +63 // specialization for AdvancedFilter │ │ │ │ +64 template │ │ │ │ +65 struct get_filter │ │ │ │ +66 { │ │ │ │ +67 struct type │ │ │ │ +68 { │ │ │ │ +69 template │ │ │ │ +70 struct apply │ │ │ │ +71 : public apply_filter_wrapper │ │ │ │ +72 {}; │ │ │ │ +73 }; │ │ │ │ +74 }; │ │ │ │ 75 │ │ │ │ -77 │ │ │ │ -80 template │ │ │ │ -_8_1 const auto& _c_h_i_l_d (index_constant = {}) const │ │ │ │ -82 { │ │ │ │ -83 return node().proxiedNode().template _c_h_i_l_d_<_k_>(); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -87 │ │ │ │ -90 template::value, int>::type = 0> │ │ │ │ -_9_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ +76 } // anonymous namespace │ │ │ │ +77#endif // DOXYGEN │ │ │ │ +78 │ │ │ │ +79 │ │ │ │ +81 template │ │ │ │ +_8_2 class _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +83 { │ │ │ │ +84 │ │ │ │ +85 typedef typename get_filter::type filter; │ │ │ │ +86 typedef typename filter::template apply:: │ │ │ │ +type filter_result; │ │ │ │ +87 typedef typename filter_result::template apply mapped_children; │ │ │ │ +88 │ │ │ │ +89 static const bool nodeIsConst = std::is_const::type>::value; │ │ │ │ +90 │ │ │ │ +91 template │ │ │ │ +92 struct lazy_enable │ │ │ │ 93 { │ │ │ │ -94 return node().proxiedNode().template _c_h_i_l_d_S_t_o_r_a_g_e_<_k_>(); │ │ │ │ -95 } │ │ │ │ +94 static const bool value = !nodeIsConst; │ │ │ │ +95 }; │ │ │ │ 96 │ │ │ │ +97 public: │ │ │ │ 98 │ │ │ │ -104 template │ │ │ │ -_1_0_5 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ -106 { │ │ │ │ -107 return node().proxiedNode().template _c_h_i_l_d_S_t_o_r_a_g_e_<_k_>(); │ │ │ │ -108 } │ │ │ │ -109 │ │ │ │ -111 template │ │ │ │ -_1_1_2 void _s_e_t_C_h_i_l_d (ProxyChild&& _c_h_i_l_d, typename std:: │ │ │ │ -enable_if::value,void*>::type = 0) │ │ │ │ -113 { │ │ │ │ -114 node().proxiedNode().template _s_e_t_C_h_i_l_d_<_k_>(std::forward(_c_h_i_l_d)); │ │ │ │ -115 } │ │ │ │ +_1_0_0 typedef _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ +101 │ │ │ │ +_1_0_3 typedef typename mapped_children::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +104 │ │ │ │ +_1_0_6 typedef typename mapped_children::ChildTypes _C_h_i_l_d_T_y_p_e_s; │ │ │ │ +107 │ │ │ │ +_1_0_9 static const bool _i_s_L_e_a_f = false; │ │ │ │ +110 │ │ │ │ +_1_1_2 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ +113 │ │ │ │ +_1_1_5 static const bool _i_s_C_o_m_p_o_s_i_t_e = true; │ │ │ │ 116 │ │ │ │ -_1_1_7 const typename ProxiedNode::NodeStorage& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +_1_1_7 static constexpr auto _d_e_g_r_e_e () │ │ │ │ 118 { │ │ │ │ -119 return node().proxiedNode().nodeStorage(); │ │ │ │ +119 return std::integral_constant{}; │ │ │ │ 120 } │ │ │ │ 121 │ │ │ │ -122 }; │ │ │ │ -123 │ │ │ │ +123 template │ │ │ │ +_1_2_4 struct _C_h_i_l_d { │ │ │ │ 125 │ │ │ │ -130 template │ │ │ │ -_1_3_1 class _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -132 : public _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -133 { │ │ │ │ -134 │ │ │ │ -135 typedef _P_r_o_x_y_N_o_d_e_<_P_r_o_x_i_e_d_N_o_d_e_> Node; │ │ │ │ +126#ifndef DOXYGEN │ │ │ │ +127 │ │ │ │ +128 typedef typename std::tuple_element:: │ │ │ │ +type OriginalChild; │ │ │ │ +129 │ │ │ │ +130 static const std::size_t mapped_index = std::tuple_element::type::original_index; │ │ │ │ +131 │ │ │ │ +132#endif // DOXYGEN │ │ │ │ +133 │ │ │ │ +_1_3_5 typedef typename OriginalChild::Type _T_y_p_e; │ │ │ │ 136 │ │ │ │ -137 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ -138 │ │ │ │ -139 template │ │ │ │ -140 typename std::enable_if::type │ │ │ │ -141 node () │ │ │ │ -142 { │ │ │ │ -143 return static_cast(*this); │ │ │ │ -144 } │ │ │ │ +_1_3_8 typedef typename OriginalChild::type _t_y_p_e; │ │ │ │ +139 }; │ │ │ │ +140 │ │ │ │ +143 │ │ │ │ 145 │ │ │ │ -146 const Node& node () const │ │ │ │ -147 { │ │ │ │ -148 return static_cast(*this); │ │ │ │ -149 } │ │ │ │ -150 │ │ │ │ -151 public: │ │ │ │ -152 │ │ │ │ -155 │ │ │ │ -157 │ │ │ │ -160 template::type = 0> │ │ │ │ -_1_6_2 auto& _c_h_i_l_d (std::size_t i) │ │ │ │ -163 { │ │ │ │ -164 return node().proxiedNode().child(i); │ │ │ │ -165 } │ │ │ │ +148 template::value, int>::type = 0> │ │ │ │ +_1_5_0 auto& _c_h_i_l_d (index_constant = {}) │ │ │ │ +151 { │ │ │ │ +152 return _node->template child::mapped_index>(); │ │ │ │ +153 } │ │ │ │ +154 │ │ │ │ +156 │ │ │ │ +159 template │ │ │ │ +_1_6_0 const auto& _c_h_i_l_d (index_constant = {}) const │ │ │ │ +161 { │ │ │ │ +162 return _node->template child::mapped_index>(); │ │ │ │ +163 } │ │ │ │ +164 │ │ │ │ 166 │ │ │ │ -168 │ │ │ │ -_1_7_1 const auto& _c_h_i_l_d (std::size_t i) const │ │ │ │ +169 template::value, int>::type = 0> │ │ │ │ +_1_7_1 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ 172 { │ │ │ │ -173 return node().proxiedNode().child(i); │ │ │ │ +173 return _node->template _c_h_i_l_d_S_t_o_r_a_g_e_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(); │ │ │ │ 174 } │ │ │ │ 175 │ │ │ │ 177 │ │ │ │ -180 template::type = 0> │ │ │ │ -_1_8_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ -183 { │ │ │ │ -184 return node().proxiedNode().childStorage(i); │ │ │ │ -185 } │ │ │ │ -186 │ │ │ │ -188 │ │ │ │ -_1_9_4 auto _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ -195 { │ │ │ │ -196 return node().proxiedNode().childStorage(i); │ │ │ │ -197 } │ │ │ │ -198 │ │ │ │ -200 template │ │ │ │ -_2_0_1 void _s_e_t_C_h_i_l_d (std::size_t i, ProxyChild&& _c_h_i_l_d, typename std:: │ │ │ │ -enable_if::type = 0) │ │ │ │ -202 { │ │ │ │ -203 node().proxiedNode().setChild(i, std::forward(_c_h_i_l_d)); │ │ │ │ -204 } │ │ │ │ -205 │ │ │ │ -206 }; │ │ │ │ -207 │ │ │ │ -209 template │ │ │ │ -_2_1_0 struct _P_r_o_x_y_N_o_d_e_B_a_s_e; │ │ │ │ -211 │ │ │ │ -213 template │ │ │ │ -_2_1_4 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ -215 { │ │ │ │ -216 }; │ │ │ │ -217 │ │ │ │ -219 template │ │ │ │ -_2_2_0 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ -221 : public _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -222 { │ │ │ │ -_2_2_3 typedef typename Node::ChildTypes _C_h_i_l_d_T_y_p_e_s; │ │ │ │ -_2_2_4 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -225 }; │ │ │ │ -226 │ │ │ │ -228 template │ │ │ │ -_2_2_9 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ -230 : public _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -231 { │ │ │ │ -_2_3_2 typedef typename Node::ChildType _C_h_i_l_d_T_y_p_e; │ │ │ │ -_2_3_3 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -234 }; │ │ │ │ -235 │ │ │ │ -237 template │ │ │ │ -_2_3_8 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ -239 : public _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -240 { │ │ │ │ -_2_4_1 typedef typename Node::ChildType _C_h_i_l_d_T_y_p_e; │ │ │ │ -_2_4_2 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -243 }; │ │ │ │ -244 │ │ │ │ +180 template │ │ │ │ +_1_8_1 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ +182 { │ │ │ │ +183 return _node->template _c_h_i_l_d_S_t_o_r_a_g_e_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(); │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +187 template │ │ │ │ +_1_8_8 void _s_e_t_C_h_i_l_d (ChildType&& _c_h_i_l_d, typename std::enable_if:: │ │ │ │ +value,void*>::type = 0) │ │ │ │ +189 { │ │ │ │ +190 _node->template _s_e_t_C_h_i_l_d_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(std::forward │ │ │ │ +(_c_h_i_l_d)); │ │ │ │ +191 } │ │ │ │ +192 │ │ │ │ +194 │ │ │ │ +197 │ │ │ │ +198 protected: │ │ │ │ +199 │ │ │ │ +201 │ │ │ │ +204 template │ │ │ │ +205 typename std::enable_if::type │ │ │ │ +_2_0_6 _u_n_f_i_l_t_e_r_e_d () │ │ │ │ +207 { │ │ │ │ +208 return *_node; │ │ │ │ +209 } │ │ │ │ +210 │ │ │ │ +212 │ │ │ │ +_2_1_5 const Node& _u_n_f_i_l_t_e_r_e_d () const │ │ │ │ +216 { │ │ │ │ +217 return *_node; │ │ │ │ +218 } │ │ │ │ +219 │ │ │ │ +221 │ │ │ │ +224 template │ │ │ │ +225 typename std::enable_if >::type │ │ │ │ +_2_2_6 _u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e () │ │ │ │ +227 { │ │ │ │ +228 return _node; │ │ │ │ +229 } │ │ │ │ +230 │ │ │ │ +232 │ │ │ │ +_2_3_5 std::shared_ptr _u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e () const │ │ │ │ +236 { │ │ │ │ +237 return _node; │ │ │ │ +238 } │ │ │ │ +239 │ │ │ │ +241 │ │ │ │ +242 public: │ │ │ │ +243 │ │ │ │ 246 │ │ │ │ -252 template │ │ │ │ -_2_5_3 class _P_r_o_x_y_N_o_d_e │ │ │ │ -254 : public _P_r_o_x_y_N_o_d_e_B_a_s_e> │ │ │ │ -255 { │ │ │ │ -256 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ -257 │ │ │ │ -258 template │ │ │ │ -259 using HasStaticDegree = index_constant; │ │ │ │ -260 │ │ │ │ -261 template │ │ │ │ -_2_6_2 static constexpr bool hasStaticDegree = Std::is_detected::value; │ │ │ │ -263 │ │ │ │ -264 // accessor mixins need to be friends for access to proxiedNode() │ │ │ │ -265 friend class _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s; │ │ │ │ -266 friend class _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s; │ │ │ │ +_2_4_8 _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e (std::shared_ptr node) │ │ │ │ +249 : _node(std::move(node)) │ │ │ │ +250 {} │ │ │ │ +251 │ │ │ │ +_2_5_3 _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e (Node& node) │ │ │ │ +254 : _node(stackobject_to_shared_ptr(node)) │ │ │ │ +255 {} │ │ │ │ +256 │ │ │ │ +258 │ │ │ │ +259 private: │ │ │ │ +260 std::shared_ptr _node; │ │ │ │ +261 }; │ │ │ │ +262 │ │ │ │ +264 │ │ │ │ +265 } // namespace TypeTree │ │ │ │ +266} //namespace Dune │ │ │ │ 267 │ │ │ │ -268 public: │ │ │ │ -269 │ │ │ │ -_2_7_0 typedef Node _P_r_o_x_i_e_d_N_o_d_e; │ │ │ │ -271 │ │ │ │ -_2_7_2 typedef _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g_<_N_o_d_e_> _N_o_d_e_T_a_g; │ │ │ │ -273 │ │ │ │ -_2_7_5 static const bool _i_s_L_e_a_f = Node::isLeaf; │ │ │ │ -276 │ │ │ │ -_2_7_8 static const bool _i_s_P_o_w_e_r = Node::isPower; │ │ │ │ -279 │ │ │ │ -_2_8_1 static const bool _i_s_C_o_m_p_o_s_i_t_e = Node::isComposite; │ │ │ │ -282 │ │ │ │ -283 template , int> = 0> │ │ │ │ -_2_8_5 static constexpr auto _d_e_g_r_e_e () │ │ │ │ -286 { │ │ │ │ -287 return N::degree(); │ │ │ │ -288 } │ │ │ │ -289 │ │ │ │ -290 template , int> = 0> │ │ │ │ -_2_9_2 auto _d_e_g_r_e_e () const │ │ │ │ -293 { │ │ │ │ -294 return _p_r_o_x_i_e_d_N_o_d_e().degree(); │ │ │ │ -295 } │ │ │ │ -296 │ │ │ │ -297 │ │ │ │ -298 protected: │ │ │ │ -299 │ │ │ │ -302 │ │ │ │ -304 template │ │ │ │ -305 typename std::enable_if::type │ │ │ │ -_3_0_6 _p_r_o_x_i_e_d_N_o_d_e () │ │ │ │ -307 { │ │ │ │ -308 return *_node; │ │ │ │ -309 } │ │ │ │ -310 │ │ │ │ -_3_1_2 const Node& _p_r_o_x_i_e_d_N_o_d_e () const │ │ │ │ -313 { │ │ │ │ -314 return *_node; │ │ │ │ -315 } │ │ │ │ -316 │ │ │ │ -318 template │ │ │ │ -319 typename std::enable_if >::type │ │ │ │ -_3_2_0 _p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e () │ │ │ │ -321 { │ │ │ │ -322 return _node; │ │ │ │ -323 } │ │ │ │ -324 │ │ │ │ -_3_2_6 std::shared_ptr _p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ -327 { │ │ │ │ -328 return _node; │ │ │ │ -329 } │ │ │ │ -330 │ │ │ │ -332 │ │ │ │ -335 │ │ │ │ -_3_3_6 _P_r_o_x_y_N_o_d_e (Node& node) │ │ │ │ -337 : _node(stackobject_to_shared_ptr(node)) │ │ │ │ -338 {} │ │ │ │ -339 │ │ │ │ -_3_4_0 _P_r_o_x_y_N_o_d_e (std::shared_ptr node) │ │ │ │ -341 : _node(std::move(node)) │ │ │ │ -342 {} │ │ │ │ -343 │ │ │ │ -345 │ │ │ │ -346 private: │ │ │ │ -347 │ │ │ │ -348 std::shared_ptr _node; │ │ │ │ -349 }; │ │ │ │ -350 │ │ │ │ -352 │ │ │ │ -353 } // namespace TypeTree │ │ │ │ -354} //namespace Dune │ │ │ │ -355 │ │ │ │ -356#endif // DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ +268#endif // DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ _n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ -typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ -Returns the node tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ +_f_i_l_t_e_r_s_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ -Tag designating a leaf node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node with runtime degree. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ -Tag designating a composite node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ -Base class for nodes acting as a proxy for an existing node. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:255 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ -ProxyNode(Node &node) │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:336 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_N_o_d_e_T_a_g │ │ │ │ -Dune::TypeTree::NodeTag< ProxiedNode > NodeTag │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:272 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ -static const bool isComposite │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:281 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:275 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:278 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -auto degree() const │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:292 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e │ │ │ │ -std::enable_if< enabled, Node & >::type proxiedNode() │ │ │ │ -Returns the proxied node. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:306 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< const Node > proxiedNodeStorage() const │ │ │ │ -Returns the storage of the proxied node (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:326 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_P_r_o_x_i_e_d_N_o_d_e │ │ │ │ -ProxiedNode ProxiedNode │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:270 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::enable_if< enabled, std::shared_ptr< Node > >::type proxiedNodeStorage() │ │ │ │ -Returns the storage of the proxied node. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:320 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(Node &&node, Indices... indices) │ │ │ │ +DDeeffiinniittiioonn childextraction.hh:75 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(index_constant< k >={}) const │ │ │ │ +Returns the storage of the k-th child (const version). │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:181 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ static constexpr auto degree() │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:285 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ -ProxyNode(std::shared_ptr< Node > node) │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:340 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e │ │ │ │ -const Node & proxiedNode() const │ │ │ │ -Returns the proxied node (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:312 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -Mixin class providing methods for child access with compile-time parameter. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:30 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ -auto & child(index_constant< k >={}) │ │ │ │ -Returns the i-th child. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:71 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(ProxyChild &&child, typename std::enable_if< lazy_enabled< k >:: │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:117 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +mapped_children::NodeStorage NodeStorage │ │ │ │ +The type used for storing the children. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:103 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(ChildType &&child, typename std::enable_if< lazy_enable< k >:: │ │ │ │ value, void * >::type=0) │ │ │ │ -Sets the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:112 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ -const ProxiedNode::NodeStorage & nodeStorage() const │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:117 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +Sets the k-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:188 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +Mark this class as non leaf in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:109 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d │ │ │ │ +const Node & unfiltered() const │ │ │ │ +Returns the unfiltered node (const version). │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:215 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +static const bool isComposite │ │ │ │ +Mark this class as a composite in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:115 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e │ │ │ │ +std::enable_if< enabled, std::shared_ptr< Node > >::type unfilteredStorage() │ │ │ │ +Returns the storage object of the unfiltered node. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:226 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +Mark this class as a non power in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:112 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +FilteredCompositeNode(Node &node) │ │ │ │ +Initialize the CompositeNode with a copy of the passed-in storage type. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:253 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +FilteredCompositeNode(std::shared_ptr< Node > node) │ │ │ │ +Initialize the CompositeNode with copies of the passed in Storage objects. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:248 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ auto childStorage(index_constant< k >={}) │ │ │ │ -Returns the storage of the i-th child. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:92 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ +Returns the storage of the k-th child. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:171 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ const auto & child(index_constant< k >={}) const │ │ │ │ -Returns the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:81 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(index_constant< k >={}) const │ │ │ │ -Returns the storage of the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:105 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_C_h_i_l_d │ │ │ │ +Returns the k-th child (const version). │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:160 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +auto & child(index_constant< k >={}) │ │ │ │ +Returns the k-th child. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:150 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ +CompositeNodeTag NodeTag │ │ │ │ +The type tag that describes a CompositeNode. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:100 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ +mapped_children::ChildTypes ChildTypes │ │ │ │ +A tuple storing the types of all children. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:106 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d │ │ │ │ +std::enable_if< enabled, Node & >::type unfiltered() │ │ │ │ +Returns the unfiltered node. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:206 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< const Node > unfilteredStorage() const │ │ │ │ +Returns the storage object of the unfiltered node (const version). │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:235 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ Access to the type and storage type of the i-th child. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:60 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ -Mixin class providing methods for child access with run-time parameter. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:133 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ -auto & child(std::size_t i) │ │ │ │ -Returns the i-th child. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:162 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(std::size_t i) const │ │ │ │ -Returns the storage of the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:194 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, ProxyChild &&child, typename std::enable_if< │ │ │ │ -enabled, void * >::type=0) │ │ │ │ -Sets the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:201 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ -const auto & child(std::size_t i) const │ │ │ │ -Returns the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:171 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(std::size_t i) │ │ │ │ -Returns the storage of the i-th child. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:182 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ -Tag-based dispatch to appropriate base class that provides necessary │ │ │ │ -functionality. │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:210 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -Node::NodeStorage NodeStorage │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:224 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ -Node::ChildTypes ChildTypes │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:223 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -Node::NodeStorage NodeStorage │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:233 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ -Node::ChildType ChildType │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:232 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -Node::NodeStorage NodeStorage │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:242 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ -Node::ChildType ChildType │ │ │ │ -DDeeffiinniittiioonn proxynode.hh:241 │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:124 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ +OriginalChild::type type │ │ │ │ +The type of the child. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:138 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ +OriginalChild::Type Type │ │ │ │ +The type of the child. │ │ │ │ +DDeeffiinniittiioonn filteredcompositenode.hh:135 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ +Tag describing a simple filter that can only decide whether or not to include a │ │ │ │ +single given child. │ │ │ │ +DDeeffiinniittiioonn filters.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ +Tag describing an advanced filter that has full control over the construction │ │ │ │ +of the list of FilterEn... │ │ │ │ +DDeeffiinniittiioonn filters.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ +Tag designating a composite node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00044.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: powernode.hh File Reference │ │ │ +dune-typetree: dynamicpowernode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,36 +74,33 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
powernode.hh File Reference
│ │ │ +
dynamicpowernode.hh File Reference
│ │ │
│ │ │
│ │ │
#include <cassert>
│ │ │ -#include <array>
│ │ │ +#include <vector>
│ │ │ #include <memory>
│ │ │ #include <type_traits>
│ │ │ #include <dune/common/typetraits.hh>
│ │ │ #include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/utility.hh>
│ │ │ -#include <dune/typetree/childextraction.hh>
│ │ │ -#include <dune/typetree/typetraits.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/utility.hh>
│ │ │ +#include <dune/typetree/typetraits.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

class  Dune::TypeTree::PowerNode< T, k >
 Collect k instances of type T within a dune-typetree. More...
struct  Dune::TypeTree::PowerNode< T, k >::Child< i >
 Access to the type and storage type of the i-th child. More...
class  Dune::TypeTree::DynamicPowerNode< T >
 Collect multiple instances of type T within a dune-typetree. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,26 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -powernode.hh File Reference │ │ │ │ +dynamicpowernode.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ #include │ │ │ │ #include │ │ │ │ #include │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_<_ _T_,_ _k_ _> │ │ │ │ -  Collect k instances of type T within a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_<_ _T_,_ _k_ _>_:_:_C_h_i_l_d_<_ _i_ _> │ │ │ │ -  Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ +class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_<_ _T_ _> │ │ │ │ +  Collect multiple instances of type T within a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00044_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: powernode.hh Source File │ │ │ +dune-typetree: dynamicpowernode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,402 +71,222 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
powernode.hh
│ │ │ +
dynamicpowernode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_POWERNODE_HH
│ │ │ -
7#define DUNE_TYPETREE_POWERNODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │ +
7#define DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │
8
│ │ │
9#include <cassert>
│ │ │ -
10#include <array>
│ │ │ +
10#include <vector>
│ │ │
11#include <memory>
│ │ │
12#include <type_traits>
│ │ │
13
│ │ │
14#include <dune/common/typetraits.hh>
│ │ │
15#include <dune/common/std/type_traits.hh>
│ │ │
16
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
21
│ │ │ -
22namespace Dune {
│ │ │ -
23 namespace TypeTree {
│ │ │ -
24
│ │ │ -
29
│ │ │ -
30
│ │ │ -
31#ifndef DOXYGEN
│ │ │ -
32
│ │ │ -
34 template<typename PowerNode, typename T, std::size_t k>
│ │ │ -
35 struct AssertPowerNodeChildCount
│ │ │ -
36 : public std::enable_if<std::is_same<
│ │ │ -
37 typename PowerNode::ChildType,
│ │ │ -
38 T>::value &&
│ │ │ -
39 PowerNode::degree() == k,
│ │ │ -
40 T>
│ │ │ -
41 {};
│ │ │ -
42
│ │ │ -
43#endif
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
20
│ │ │ +
21namespace Dune {
│ │ │ +
22 namespace TypeTree {
│ │ │ +
23
│ │ │ +
28
│ │ │ +
33 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
35 {
│ │ │ +
36
│ │ │ +
37 public:
│ │ │ +
38
│ │ │ +
40 static const bool isLeaf = false;
│ │ │ +
41
│ │ │ +
43 static const bool isPower = true;
│ │ │
44
│ │ │ -
50 template<typename T, std::size_t k>
│ │ │ -
│ │ │ - │ │ │ -
52 {
│ │ │ -
53
│ │ │ -
54 public:
│ │ │ -
55
│ │ │ -
57 static const bool isLeaf = false;
│ │ │ -
58
│ │ │ -
60 static const bool isPower = true;
│ │ │ -
61
│ │ │ -
63 static const bool isComposite = false;
│ │ │ -
64
│ │ │ -
│ │ │ -
65 static constexpr auto degree ()
│ │ │ -
66 {
│ │ │ -
67 return std::integral_constant<std::size_t,k>{};
│ │ │ -
68 }
│ │ │ -
│ │ │ +
46 static const bool isComposite = false;
│ │ │ +
47
│ │ │ +
│ │ │ +
49 std::size_t degree() const
│ │ │ +
50 {
│ │ │ +
51 return _children.size();
│ │ │ +
52 }
│ │ │ +
│ │ │ +
53
│ │ │ + │ │ │ +
56
│ │ │ +
58 typedef T ChildType;
│ │ │ +
59
│ │ │ +
61 typedef std::shared_ptr<T> ChildStorageType;
│ │ │ +
62
│ │ │ +
64 typedef std::shared_ptr<const T> ChildConstStorageType;
│ │ │ +
65
│ │ │ +
67 typedef std::vector<ChildStorageType> NodeStorage;
│ │ │ +
68
│ │ │
69
│ │ │ - │ │ │
72
│ │ │ -
74 typedef T ChildType;
│ │ │ -
75
│ │ │ -
77 typedef std::array<std::shared_ptr<T>,k> NodeStorage;
│ │ │ -
78
│ │ │ -
79
│ │ │ -
81 template<std::size_t i>
│ │ │ -
│ │ │ -
82 struct Child
│ │ │ -
83 {
│ │ │ -
84
│ │ │ -
85 static_assert((i < degree()), "child index out of range");
│ │ │ -
86
│ │ │ -
88 typedef T Type;
│ │ │ -
89
│ │ │ -
91 typedef T type;
│ │ │ -
92 };
│ │ │ -
│ │ │ -
93
│ │ │ -
96
│ │ │ -
98
│ │ │ -
101 template<std::size_t i>
│ │ │ -
│ │ │ -
102 T& child (index_constant<i> = {})
│ │ │ -
103 {
│ │ │ -
104 static_assert((i < degree()), "child index out of range");
│ │ │ -
105 return *_children[i];
│ │ │ -
106 }
│ │ │ -
│ │ │ -
107
│ │ │ -
109
│ │ │ -
112 template<std::size_t i>
│ │ │ -
│ │ │ -
113 const T& child (index_constant<i> = {}) const
│ │ │ -
114 {
│ │ │ -
115 static_assert((i < degree()), "child index out of range");
│ │ │ -
116 return *_children[i];
│ │ │ -
117 }
│ │ │ -
│ │ │ -
118
│ │ │ -
120
│ │ │ -
123 template<std::size_t i>
│ │ │ +
74
│ │ │ +
│ │ │ +
77 ChildType& child (std::size_t i)
│ │ │ +
78 {
│ │ │ +
79 assert(i < degree() && "child index out of range");
│ │ │ +
80 return *_children[i];
│ │ │ +
81 }
│ │ │ +
│ │ │ +
82
│ │ │ +
84
│ │ │ +
│ │ │ +
87 const ChildType& child (std::size_t i) const
│ │ │ +
88 {
│ │ │ +
89 assert(i < degree() && "child index out of range");
│ │ │ +
90 return *_children[i];
│ │ │ +
91 }
│ │ │ +
│ │ │ +
92
│ │ │ +
94
│ │ │ +
│ │ │ + │ │ │ +
98 {
│ │ │ +
99 assert(i < degree() && "child index out of range");
│ │ │ +
100 return _children[i];
│ │ │ +
101 }
│ │ │ +
│ │ │ +
102
│ │ │ +
104
│ │ │ +
│ │ │ + │ │ │ +
111 {
│ │ │ +
112 assert(i < degree() && "child index out of range");
│ │ │ +
113 return _children[i];
│ │ │ +
114 }
│ │ │ +
│ │ │ +
115
│ │ │ +
│ │ │ +
117 void setChild (std::size_t i, ChildType& t)
│ │ │ +
118 {
│ │ │ +
119 assert(i < degree() && "child index out of range");
│ │ │ +
120 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ +
121 }
│ │ │ +
│ │ │ +
122
│ │ │
│ │ │ -
124 std::shared_ptr<T> childStorage (index_constant<i> = {})
│ │ │ +
124 void setChild (std::size_t i, ChildType&& t)
│ │ │
125 {
│ │ │ -
126 static_assert((i < degree()), "child index out of range");
│ │ │ -
127 return _children[i];
│ │ │ +
126 assert(i < degree() && "child index out of range");
│ │ │ +
127 _children[i] = convert_arg(std::move(t));
│ │ │
128 }
│ │ │
│ │ │
129
│ │ │ -
131
│ │ │ -
134 template<std::size_t i>
│ │ │ -
│ │ │ -
135 std::shared_ptr<const T> childStorage (index_constant<i> = {}) const
│ │ │ -
136 {
│ │ │ -
137 static_assert((i < degree()), "child index out of range");
│ │ │ -
138 return _children[i];
│ │ │ -
139 }
│ │ │ -
│ │ │ -
140
│ │ │ -
142 template<std::size_t i>
│ │ │ -
│ │ │ -
143 void setChild (T& t, index_constant<i> = {})
│ │ │ -
144 {
│ │ │ -
145 static_assert((i < degree()), "child index out of range");
│ │ │ -
146 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ -
147 }
│ │ │ -
│ │ │ +
│ │ │ +
131 void setChild (std::size_t i, ChildStorageType st)
│ │ │ +
132 {
│ │ │ +
133 assert(i < degree() && "child index out of range");
│ │ │ +
134 _children[i] = std::move(st);
│ │ │ +
135 }
│ │ │ +
│ │ │ +
136
│ │ │ +
│ │ │ +
137 const NodeStorage& nodeStorage () const
│ │ │ +
138 {
│ │ │ +
139 return _children;
│ │ │ +
140 }
│ │ │ +
│ │ │ +
141
│ │ │ +
143
│ │ │ +
146
│ │ │ +
147 protected:
│ │ │
148
│ │ │ -
150 template<std::size_t i>
│ │ │ -
│ │ │ -
151 void setChild (T&& t, index_constant<i> = {})
│ │ │ -
152 {
│ │ │ -
153 static_assert((i < degree()), "child index out of range");
│ │ │ -
154 _children[i] = convert_arg(std::move(t));
│ │ │ -
155 }
│ │ │ -
│ │ │ -
156
│ │ │ -
158 template<std::size_t i>
│ │ │ -
│ │ │ -
159 void setChild (std::shared_ptr<T> st, index_constant<i> = {})
│ │ │ -
160 {
│ │ │ -
161 static_assert((i < degree()), "child index out of range");
│ │ │ -
162 _children[i] = std::move(st);
│ │ │ -
163 }
│ │ │ -
│ │ │ -
164
│ │ │ -
166
│ │ │ -
167
│ │ │ -
170
│ │ │ +
151 DynamicPowerNode () = delete;
│ │ │ +
152
│ │ │ +
154
│ │ │ +
│ │ │ +
162 explicit DynamicPowerNode (std::size_t size)
│ │ │ +
163 : _children(size)
│ │ │ +
164 {}
│ │ │ +
│ │ │ +
165
│ │ │ +
│ │ │ +
167 explicit DynamicPowerNode (NodeStorage children)
│ │ │ +
168 : _children(std::move(children))
│ │ │ +
169 {}
│ │ │ +
│ │ │ +
170
│ │ │ +
171#ifdef DOXYGEN
│ │ │
172
│ │ │ -
│ │ │ -
175 T& child (std::size_t i)
│ │ │ -
176 {
│ │ │ -
177 assert(i < degree() && "child index out of range");
│ │ │ -
178 return *_children[i];
│ │ │ -
179 }
│ │ │ -
│ │ │ -
180
│ │ │ -
182
│ │ │ -
│ │ │ -
185 const T& child (std::size_t i) const
│ │ │ -
186 {
│ │ │ -
187 assert(i < degree() && "child index out of range");
│ │ │ -
188 return *_children[i];
│ │ │ -
189 }
│ │ │ -
│ │ │ -
190
│ │ │ -
192
│ │ │ -
│ │ │ -
195 std::shared_ptr<T> childStorage (std::size_t i)
│ │ │ -
196 {
│ │ │ -
197 assert(i < degree() && "child index out of range");
│ │ │ -
198 return _children[i];
│ │ │ -
199 }
│ │ │ +
│ │ │ +
174 DynamicPowerNode (T& t1, T& t2, ...)
│ │ │ +
175 {}
│ │ │ +
│ │ │ +
176
│ │ │ +
177#else
│ │ │ +
178
│ │ │ +
179 template<typename... Children,
│ │ │ +
180 std::enable_if_t<(std::is_same_v<ChildType, std::decay_t<Children>> &&...), bool> = true>
│ │ │ +
181 DynamicPowerNode (Children&&... children)
│ │ │ +
182 {
│ │ │ +
183 _children = NodeStorage{convert_arg(std::forward<Children>(children))...};
│ │ │ +
184 }
│ │ │ +
185
│ │ │ +
186 template<typename... Children,
│ │ │ +
187 std::enable_if_t<(std::is_same_v<ChildType, std::decay_t<Children>> &&...), bool> = true>
│ │ │ +
188 DynamicPowerNode (std::shared_ptr<Children>... children)
│ │ │ +
189 {
│ │ │ +
190 _children = NodeStorage{std::move(children)...};
│ │ │ +
191 }
│ │ │ +
192
│ │ │ +
193#endif // DOXYGEN
│ │ │ +
194
│ │ │ +
196
│ │ │ +
197 private:
│ │ │ +
198 NodeStorage _children;
│ │ │ +
199 };
│ │ │
│ │ │
200
│ │ │ -
202
│ │ │ -
│ │ │ -
205 std::shared_ptr<const T> childStorage (std::size_t i) const
│ │ │ -
206 {
│ │ │ -
207 assert(i < degree() && "child index out of range");
│ │ │ -
208 return _children[i];
│ │ │ -
209 }
│ │ │ -
│ │ │ -
210
│ │ │ -
│ │ │ -
212 void setChild (std::size_t i, T& t)
│ │ │ -
213 {
│ │ │ -
214 assert(i < degree() && "child index out of range");
│ │ │ -
215 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ -
216 }
│ │ │ -
│ │ │ -
217
│ │ │ -
│ │ │ -
219 void setChild (std::size_t i, T&& t)
│ │ │ -
220 {
│ │ │ -
221 assert(i < degree() && "child index out of range");
│ │ │ -
222 _children[i] = convert_arg(std::move(t));
│ │ │ -
223 }
│ │ │ -
│ │ │ -
224
│ │ │ -
│ │ │ -
226 void setChild (std::size_t i, std::shared_ptr<T> st)
│ │ │ -
227 {
│ │ │ -
228 assert(i < degree() && "child index out of range");
│ │ │ -
229 _children[i] = std::move(st);
│ │ │ -
230 }
│ │ │ -
│ │ │ -
231
│ │ │ -
│ │ │ -
232 const NodeStorage& nodeStorage () const
│ │ │ -
233 {
│ │ │ -
234 return _children;
│ │ │ -
235 }
│ │ │ -
│ │ │ -
236
│ │ │ -
238
│ │ │ -
241
│ │ │ -
242 // The following two methods require a little bit of SFINAE trickery to work correctly:
│ │ │ -
243 // We have to make sure that they don't shadow the methods for direct child access because
│ │ │ -
244 // those get called by the generic child() machinery. If that machinery picks up the methods
│ │ │ -
245 // defined below, we have an infinite recursion.
│ │ │ -
246 // So the methods make sure that either
│ │ │ -
247 //
│ │ │ -
248 // * there are more than one argument. In that case, we got multiple indices and can forward
│ │ │ -
249 // to the general machine.
│ │ │ -
250 //
│ │ │ -
251 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
│ │ │ -
252 // The argument thus has to be some kind of TreePath instance that we can also pass to the
│ │ │ -
253 // generic machine.
│ │ │ -
254 //
│ │ │ -
255 // The above SFINAE logic works, but there is still a problem with the return type deduction.
│ │ │ -
256 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
│ │ │ -
257 // type deduction will trigger the infinite recursion.
│ │ │ -
258
│ │ │ -
260
│ │ │ -
264#ifdef DOXYGEN
│ │ │ -
265 template<typename... Indices>
│ │ │ -
│ │ │ -
266 ImplementationDefined& child (Indices... indices)
│ │ │ -
267#else
│ │ │ -
268 template<typename I0, typename... I,
│ │ │ -
269 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ -
270 decltype(auto) child (I0 i0, I... i)
│ │ │ -
271#endif
│ │ │ -
272 {
│ │ │ -
273 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ -
274 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ -
275 );
│ │ │ -
276 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ -
277 }
│ │ │ -
│ │ │ -
278
│ │ │ -
280
│ │ │ -
284#ifdef DOXYGEN
│ │ │ -
285 template<typename... Indices>
│ │ │ -
│ │ │ -
286 const ImplementationDefined& child (Indices... indices)
│ │ │ -
287#else
│ │ │ -
288 template<typename I0, typename... I,
│ │ │ -
289 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ -
290 decltype(auto) child (I0 i0, I... i) const
│ │ │ -
291#endif
│ │ │ -
292 {
│ │ │ -
293 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ -
294 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ -
295 );
│ │ │ -
296 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ -
297 }
│ │ │ -
│ │ │ -
298
│ │ │ -
300
│ │ │ -
303
│ │ │ -
304 protected:
│ │ │ -
305
│ │ │ -
307
│ │ │ -
│ │ │ - │ │ │ -
316 {}
│ │ │ -
│ │ │ -
317
│ │ │ -
│ │ │ -
319 explicit PowerNode (const NodeStorage& children)
│ │ │ -
320 : _children(children)
│ │ │ -
321 {}
│ │ │ -
│ │ │ -
322
│ │ │ -
│ │ │ -
324 explicit PowerNode (T& t, bool distinct_objects = true)
│ │ │ -
325 {
│ │ │ -
326 if (distinct_objects)
│ │ │ -
327 {
│ │ │ -
328 for (typename NodeStorage::iterator it = _children.begin(); it != _children.end(); ++it)
│ │ │ -
329 *it = std::make_shared<T>(t);
│ │ │ -
330 }
│ │ │ -
331 else
│ │ │ -
332 {
│ │ │ -
333 std::shared_ptr<T> sp = stackobject_to_shared_ptr(t);
│ │ │ -
334 std::fill(_children.begin(),_children.end(),sp);
│ │ │ -
335 }
│ │ │ -
336 }
│ │ │ -
│ │ │ -
337
│ │ │ -
338#ifdef DOXYGEN
│ │ │ -
339
│ │ │ -
│ │ │ -
341 PowerNode(T& t1, T& t2, ...)
│ │ │ -
342 {}
│ │ │ -
│ │ │ -
343
│ │ │ -
344#else
│ │ │ -
345
│ │ │ -
346 template<typename... Children,
│ │ │ -
347 std::enable_if_t<
│ │ │ -
348 std::conjunction<std::is_same<ChildType, std::decay_t<Children>>...>::value
│ │ │ -
349 ,int> = 0>
│ │ │ -
350 PowerNode (Children&&... children)
│ │ │ -
351 {
│ │ │ -
352 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
│ │ │ -
353 _children = NodeStorage{convert_arg(std::forward<Children>(children))...};
│ │ │ -
354 }
│ │ │ -
355
│ │ │ -
356 template<typename... Children,
│ │ │ -
357 std::enable_if_t<
│ │ │ -
358 std::conjunction<std::is_same<ChildType, Children>...>::value
│ │ │ -
359 ,int> = 0>
│ │ │ -
360 PowerNode (std::shared_ptr<Children>... children)
│ │ │ -
361 {
│ │ │ -
362 static_assert(degree() == sizeof...(Children), "PowerNode constructor is called with incorrect number of children");
│ │ │ -
363 _children = NodeStorage{children...};
│ │ │ -
364 }
│ │ │ -
365
│ │ │ -
366#endif // DOXYGEN
│ │ │ -
367
│ │ │ -
369
│ │ │ -
370 private:
│ │ │ -
371 NodeStorage _children;
│ │ │ -
372 };
│ │ │ -
│ │ │ -
373
│ │ │ -
375
│ │ │ -
376 } // namespace TypeTree
│ │ │ -
377} //namespace Dune
│ │ │ -
378
│ │ │ -
379#endif // DUNE_TYPETREE_POWERNODE_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ +
202
│ │ │ +
203 } // namespace TypeTree
│ │ │ +
204} //namespace Dune
│ │ │ +
205
│ │ │ +
206#endif // DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ -
void setChild(T &t, index_constant< i >={})
Sets the i-th child to the passed-in value.
Definition powernode.hh:143
│ │ │ -
T & child(std::size_t i)
Returns the i-th child.
Definition powernode.hh:175
│ │ │ -
const T & child(index_constant< i >={}) const
Returns the i-th child (const version).
Definition powernode.hh:113
│ │ │ -
void setChild(std::shared_ptr< T > st, index_constant< i >={})
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:159
│ │ │ -
std::shared_ptr< T > childStorage(index_constant< i >={})
Returns the storage of the i-th child.
Definition powernode.hh:124
│ │ │ -
PowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition powernode.hh:341
│ │ │ -
const NodeStorage & nodeStorage() const
Definition powernode.hh:232
│ │ │ -
std::array< std::shared_ptr< T >, k > NodeStorage
The type used for storing the children.
Definition powernode.hh:77
│ │ │ -
std::shared_ptr< const T > childStorage(index_constant< i >={}) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:135
│ │ │ -
PowerNode(T &t, bool distinct_objects=true)
Initialize all children with copies of a storage object constructed from the parameter t.
Definition powernode.hh:324
│ │ │ -
PowerNodeTag NodeTag
The type tag that describes a PowerNode.
Definition powernode.hh:71
│ │ │ -
const T & child(std::size_t i) const
Returns the i-th child (const version).
Definition powernode.hh:185
│ │ │ -
static constexpr auto degree()
Definition powernode.hh:65
│ │ │ -
std::shared_ptr< const T > childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition powernode.hh:205
│ │ │ -
void setChild(std::size_t i, std::shared_ptr< T > st)
Sets the stored value representing the i-th child to the passed-in value.
Definition powernode.hh:226
│ │ │ -
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition powernode.hh:63
│ │ │ -
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition powernode.hh:57
│ │ │ -
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition powernode.hh:60
│ │ │ -
PowerNode(const NodeStorage &children)
Initialize the PowerNode with a copy of the passed-in storage type.
Definition powernode.hh:319
│ │ │ -
T ChildType
The type of each child.
Definition powernode.hh:74
│ │ │ -
T & child(index_constant< i >={})
Returns the i-th child.
Definition powernode.hh:102
│ │ │ -
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:266
│ │ │ -
void setChild(std::size_t i, T &&t)
Store the passed value in i-th child.
Definition powernode.hh:219
│ │ │ -
void setChild(T &&t, index_constant< i >={})
Store the passed value in i-th child.
Definition powernode.hh:151
│ │ │ -
PowerNode()
Default constructor.
Definition powernode.hh:315
│ │ │ -
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition powernode.hh:286
│ │ │ -
void setChild(std::size_t i, T &t)
Sets the i-th child to the passed-in value.
Definition powernode.hh:212
│ │ │ -
std::shared_ptr< T > childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition powernode.hh:195
│ │ │ -
Access to the type and storage type of the i-th child.
Definition powernode.hh:83
│ │ │ -
T type
The type of the child.
Definition powernode.hh:91
│ │ │ -
T Type
The type of the child.
Definition powernode.hh:88
│ │ │ -
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │ +
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition dynamicpowernode.hh:43
│ │ │ +
std::vector< ChildStorageType > NodeStorage
The type used for storing the children.
Definition dynamicpowernode.hh:67
│ │ │ +
const NodeStorage & nodeStorage() const
Definition dynamicpowernode.hh:137
│ │ │ +
ChildConstStorageType childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition dynamicpowernode.hh:110
│ │ │ +
const ChildType & child(std::size_t i) const
Returns the i-th child (const version).
Definition dynamicpowernode.hh:87
│ │ │ +
std::shared_ptr< T > ChildStorageType
The storage type of each child.
Definition dynamicpowernode.hh:61
│ │ │ +
DynamicPowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition dynamicpowernode.hh:174
│ │ │ +
std::shared_ptr< const T > ChildConstStorageType
The const version of the storage type of each child.
Definition dynamicpowernode.hh:64
│ │ │ +
DynamicPowerNode(NodeStorage children)
Initialize the DynamicPowerNode with a copy of the passed-in storage type.
Definition dynamicpowernode.hh:167
│ │ │ +
DynamicPowerNodeTag NodeTag
The type tag that describes the node.
Definition dynamicpowernode.hh:55
│ │ │ +
T ChildType
The type of each child.
Definition dynamicpowernode.hh:58
│ │ │ +
void setChild(std::size_t i, ChildType &t)
Sets the i-th child to the passed-in value.
Definition dynamicpowernode.hh:117
│ │ │ +
void setChild(std::size_t i, ChildStorageType st)
Sets the stored value representing the i-th child to the passed-in value.
Definition dynamicpowernode.hh:131
│ │ │ +
DynamicPowerNode(std::size_t size)
Construct a node with the given number of children.
Definition dynamicpowernode.hh:162
│ │ │ +
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition dynamicpowernode.hh:46
│ │ │ +
void setChild(std::size_t i, ChildType &&t)
Store the passed value in i-th child.
Definition dynamicpowernode.hh:124
│ │ │ +
ChildType & child(std::size_t i)
Returns the i-th child.
Definition dynamicpowernode.hh:77
│ │ │ +
std::size_t degree() const
The number of children.
Definition dynamicpowernode.hh:49
│ │ │ +
ChildStorageType childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition dynamicpowernode.hh:97
│ │ │ +
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition dynamicpowernode.hh:40
│ │ │ + │ │ │ +
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,459 +1,257 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -powernode.hh │ │ │ │ +dynamicpowernode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_POWERNODE_HH │ │ │ │ -7#define DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ +7#define DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ 8 │ │ │ │ 9#include │ │ │ │ -10#include │ │ │ │ +10#include │ │ │ │ 11#include │ │ │ │ 12#include │ │ │ │ 13 │ │ │ │ 14#include │ │ │ │ 15#include │ │ │ │ 16 │ │ │ │ 17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ 18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ -21 │ │ │ │ -22namespace _D_u_n_e { │ │ │ │ -23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -24 │ │ │ │ -29 │ │ │ │ -30 │ │ │ │ -31#ifndef DOXYGEN │ │ │ │ -32 │ │ │ │ -34 template │ │ │ │ -35 struct AssertPowerNodeChildCount │ │ │ │ -36 : public std::enable_if::value && │ │ │ │ -39 PowerNode::degree() == k, │ │ │ │ -40 T> │ │ │ │ -41 {}; │ │ │ │ -42 │ │ │ │ -43#endif │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +20 │ │ │ │ +21namespace _D_u_n_e { │ │ │ │ +22 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +23 │ │ │ │ +28 │ │ │ │ +33 template │ │ │ │ +_3_4 class _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ +35 { │ │ │ │ +36 │ │ │ │ +37 public: │ │ │ │ +38 │ │ │ │ +_4_0 static const bool _i_s_L_e_a_f = false; │ │ │ │ +41 │ │ │ │ +_4_3 static const bool _i_s_P_o_w_e_r = true; │ │ │ │ 44 │ │ │ │ -50 template │ │ │ │ -_5_1 class _P_o_w_e_r_N_o_d_e │ │ │ │ -52 { │ │ │ │ +_4_6 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ +47 │ │ │ │ +_4_9 std::size_t _d_e_g_r_e_e() const │ │ │ │ +50 { │ │ │ │ +51 return _children.size(); │ │ │ │ +52 } │ │ │ │ 53 │ │ │ │ -54 public: │ │ │ │ -55 │ │ │ │ -_5_7 static const bool _i_s_L_e_a_f = false; │ │ │ │ -58 │ │ │ │ -_6_0 static const bool _i_s_P_o_w_e_r = true; │ │ │ │ -61 │ │ │ │ -_6_3 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ -64 │ │ │ │ -_6_5 static constexpr auto _d_e_g_r_e_e () │ │ │ │ -66 { │ │ │ │ -67 return std::integral_constant{}; │ │ │ │ -68 } │ │ │ │ +_5_5 typedef _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ +56 │ │ │ │ +_5_8 typedef T _C_h_i_l_d_T_y_p_e; │ │ │ │ +59 │ │ │ │ +_6_1 typedef std::shared_ptr _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e; │ │ │ │ +62 │ │ │ │ +_6_4 typedef std::shared_ptr _C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e; │ │ │ │ +65 │ │ │ │ +_6_7 typedef std::vector _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +68 │ │ │ │ 69 │ │ │ │ -_7_1 typedef _P_o_w_e_r_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ 72 │ │ │ │ -_7_4 typedef T _C_h_i_l_d_T_y_p_e; │ │ │ │ -75 │ │ │ │ -_7_7 typedef std::array,k> _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -78 │ │ │ │ -79 │ │ │ │ -81 template │ │ │ │ -_8_2 struct _C_h_i_l_d │ │ │ │ -83 { │ │ │ │ +74 │ │ │ │ +_7_7 _C_h_i_l_d_T_y_p_e& _c_h_i_l_d (std::size_t i) │ │ │ │ +78 { │ │ │ │ +79 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +80 return *_children[i]; │ │ │ │ +81 } │ │ │ │ +82 │ │ │ │ 84 │ │ │ │ -85 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -86 │ │ │ │ -_8_8 typedef T _T_y_p_e; │ │ │ │ -89 │ │ │ │ -_9_1 typedef T _t_y_p_e; │ │ │ │ -92 }; │ │ │ │ -93 │ │ │ │ -96 │ │ │ │ -98 │ │ │ │ -101 template │ │ │ │ -_1_0_2 T& _c_h_i_l_d (index_constant = {}) │ │ │ │ -103 { │ │ │ │ -104 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -105 return *_children[i]; │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -109 │ │ │ │ -112 template │ │ │ │ -_1_1_3 const T& _c_h_i_l_d (index_constant = {}) const │ │ │ │ -114 { │ │ │ │ -115 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -116 return *_children[i]; │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -120 │ │ │ │ -123 template │ │ │ │ -_1_2_4 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ +_8_7 const _C_h_i_l_d_T_y_p_e& _c_h_i_l_d (std::size_t i) const │ │ │ │ +88 { │ │ │ │ +89 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +90 return *_children[i]; │ │ │ │ +91 } │ │ │ │ +92 │ │ │ │ +94 │ │ │ │ +_9_7 _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ +98 { │ │ │ │ +99 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +100 return _children[i]; │ │ │ │ +101 } │ │ │ │ +102 │ │ │ │ +104 │ │ │ │ +_1_1_0 _C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ +111 { │ │ │ │ +112 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +113 return _children[i]; │ │ │ │ +114 } │ │ │ │ +115 │ │ │ │ +_1_1_7 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_T_y_p_e& t) │ │ │ │ +118 { │ │ │ │ +119 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +120 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ +121 } │ │ │ │ +122 │ │ │ │ +_1_2_4 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_T_y_p_e&& t) │ │ │ │ 125 { │ │ │ │ -126 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -127 return _children[i]; │ │ │ │ +126 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +127 _children[i] = convert_arg(std::move(t)); │ │ │ │ 128 } │ │ │ │ 129 │ │ │ │ -131 │ │ │ │ -134 template │ │ │ │ -_1_3_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ -136 { │ │ │ │ -137 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -138 return _children[i]; │ │ │ │ -139 } │ │ │ │ -140 │ │ │ │ -142 template │ │ │ │ -_1_4_3 void _s_e_t_C_h_i_l_d (T& t, index_constant = {}) │ │ │ │ -144 { │ │ │ │ -145 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -146 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ -147 } │ │ │ │ +_1_3_1 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e st) │ │ │ │ +132 { │ │ │ │ +133 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ +134 _children[i] = std::move(st); │ │ │ │ +135 } │ │ │ │ +136 │ │ │ │ +_1_3_7 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +138 { │ │ │ │ +139 return _children; │ │ │ │ +140 } │ │ │ │ +141 │ │ │ │ +143 │ │ │ │ +146 │ │ │ │ +147 protected: │ │ │ │ 148 │ │ │ │ -150 template │ │ │ │ -_1_5_1 void _s_e_t_C_h_i_l_d (T&& t, index_constant = {}) │ │ │ │ -152 { │ │ │ │ -153 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -154 _children[i] = convert_arg(std::move(t)); │ │ │ │ -155 } │ │ │ │ -156 │ │ │ │ -158 template │ │ │ │ -_1_5_9 void _s_e_t_C_h_i_l_d (std::shared_ptr st, index_constant = {}) │ │ │ │ -160 { │ │ │ │ -161 static_assert((i < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -162 _children[i] = std::move(st); │ │ │ │ -163 } │ │ │ │ -164 │ │ │ │ -166 │ │ │ │ -167 │ │ │ │ +_1_5_1 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e () = delete; │ │ │ │ +152 │ │ │ │ +154 │ │ │ │ +_1_6_2 explicit _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (std::size_t size) │ │ │ │ +163 : _children(size) │ │ │ │ +164 {} │ │ │ │ +165 │ │ │ │ +_1_6_7 explicit _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (_N_o_d_e_S_t_o_r_a_g_e children) │ │ │ │ +168 : _children(std::move(children)) │ │ │ │ +169 {} │ │ │ │ 170 │ │ │ │ +171#ifdef DOXYGEN │ │ │ │ 172 │ │ │ │ -_1_7_5 T& _c_h_i_l_d (std::size_t i) │ │ │ │ -176 { │ │ │ │ -177 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -178 return *_children[i]; │ │ │ │ -179 } │ │ │ │ -180 │ │ │ │ -182 │ │ │ │ -_1_8_5 const T& _c_h_i_l_d (std::size_t i) const │ │ │ │ -186 { │ │ │ │ -187 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -188 return *_children[i]; │ │ │ │ -189 } │ │ │ │ -190 │ │ │ │ +_1_7_4 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (T& t1, T& t2, ...) │ │ │ │ +175 {} │ │ │ │ +176 │ │ │ │ +177#else │ │ │ │ +178 │ │ │ │ +179 template> &&...), │ │ │ │ +bool> = true> │ │ │ │ +181 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (Children&&... children) │ │ │ │ +182 { │ │ │ │ +183 _children = _N_o_d_e_S_t_o_r_a_g_e{convert_arg(std::forward(children))...}; │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +186 template> &&...), │ │ │ │ +bool> = true> │ │ │ │ +188 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (std::shared_ptr... children) │ │ │ │ +189 { │ │ │ │ +190 _children = _N_o_d_e_S_t_o_r_a_g_e{std::move(children)...}; │ │ │ │ +191 } │ │ │ │ 192 │ │ │ │ -_1_9_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ -196 { │ │ │ │ -197 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -198 return _children[i]; │ │ │ │ -199 } │ │ │ │ +193#endif // DOXYGEN │ │ │ │ +194 │ │ │ │ +196 │ │ │ │ +197 private: │ │ │ │ +198 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ +199 }; │ │ │ │ 200 │ │ │ │ 202 │ │ │ │ -_2_0_5 std::shared_ptr _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ -206 { │ │ │ │ -207 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -208 return _children[i]; │ │ │ │ -209 } │ │ │ │ -210 │ │ │ │ -_2_1_2 void _s_e_t_C_h_i_l_d (std::size_t i, T& t) │ │ │ │ -213 { │ │ │ │ -214 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -215 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ -216 } │ │ │ │ -217 │ │ │ │ -_2_1_9 void _s_e_t_C_h_i_l_d (std::size_t i, T&& t) │ │ │ │ -220 { │ │ │ │ -221 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -222 _children[i] = convert_arg(std::move(t)); │ │ │ │ -223 } │ │ │ │ -224 │ │ │ │ -_2_2_6 void _s_e_t_C_h_i_l_d (std::size_t i, std::shared_ptr st) │ │ │ │ -227 { │ │ │ │ -228 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -229 _children[i] = std::move(st); │ │ │ │ -230 } │ │ │ │ -231 │ │ │ │ -_2_3_2 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ -233 { │ │ │ │ -234 return _children; │ │ │ │ -235 } │ │ │ │ -236 │ │ │ │ -238 │ │ │ │ -241 │ │ │ │ -242 // The following two methods require a little bit of SFINAE trickery to │ │ │ │ -work correctly: │ │ │ │ -243 // We have to make sure that they don't shadow the methods for direct child │ │ │ │ -access because │ │ │ │ -244 // those get called by the generic child() machinery. If that machinery │ │ │ │ -picks up the methods │ │ │ │ -245 // defined below, we have an infinite recursion. │ │ │ │ -246 // So the methods make sure that either │ │ │ │ -247 // │ │ │ │ -248 // * there are more than one argument. In that case, we got multiple │ │ │ │ -indices and can forward │ │ │ │ -249 // to the general machine. │ │ │ │ -250 // │ │ │ │ -251 // * the first argument is not a valid flat index, i.e. either a std:: │ │ │ │ -size_t or an index_constant. │ │ │ │ -252 // The argument thus has to be some kind of TreePath instance that we can │ │ │ │ -also pass to the │ │ │ │ -253 // generic machine. │ │ │ │ -254 // │ │ │ │ -255 // The above SFINAE logic works, but there is still a problem with the │ │ │ │ -return type deduction. │ │ │ │ -256 // We have to do a lazy lookup of the return type after SFINAE has │ │ │ │ -succeeded, otherwise the return │ │ │ │ -257 // type deduction will trigger the infinite recursion. │ │ │ │ -258 │ │ │ │ -260 │ │ │ │ -264#ifdef DOXYGEN │ │ │ │ -265 template │ │ │ │ -_2_6_6 ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ -267#else │ │ │ │ -268 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ -270 decltype(auto) _c_h_i_l_d (I0 i0, I... i) │ │ │ │ -271#endif │ │ │ │ -272 { │ │ │ │ -273 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ -274 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ -freestanding version child(node,treePath) instead." │ │ │ │ -275 ); │ │ │ │ -276 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ -277 } │ │ │ │ -278 │ │ │ │ -280 │ │ │ │ -284#ifdef DOXYGEN │ │ │ │ -285 template │ │ │ │ -_2_8_6 const ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ -287#else │ │ │ │ -288 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ -290 decltype(auto) _c_h_i_l_d (I0 i0, I... i) const │ │ │ │ -291#endif │ │ │ │ -292 { │ │ │ │ -293 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ -294 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ -freestanding version child(node,treePath) instead." │ │ │ │ -295 ); │ │ │ │ -296 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ -297 } │ │ │ │ -298 │ │ │ │ -300 │ │ │ │ -303 │ │ │ │ -304 protected: │ │ │ │ -305 │ │ │ │ -307 │ │ │ │ -_3_1_5 _P_o_w_e_r_N_o_d_e () │ │ │ │ -316 {} │ │ │ │ -317 │ │ │ │ -_3_1_9 explicit _P_o_w_e_r_N_o_d_e (const _N_o_d_e_S_t_o_r_a_g_e& children) │ │ │ │ -320 : _children(children) │ │ │ │ -321 {} │ │ │ │ -322 │ │ │ │ -_3_2_4 explicit _P_o_w_e_r_N_o_d_e (T& t, bool distinct_objects = true) │ │ │ │ -325 { │ │ │ │ -326 if (distinct_objects) │ │ │ │ -327 { │ │ │ │ -328 for (typename NodeStorage::iterator it = _children.begin(); it != │ │ │ │ -_children.end(); ++it) │ │ │ │ -329 *it = std::make_shared(t); │ │ │ │ -330 } │ │ │ │ -331 else │ │ │ │ -332 { │ │ │ │ -333 std::shared_ptr sp = stackobject_to_shared_ptr(t); │ │ │ │ -334 std::fill(_children.begin(),_children.end(),sp); │ │ │ │ -335 } │ │ │ │ -336 } │ │ │ │ -337 │ │ │ │ -338#ifdef DOXYGEN │ │ │ │ -339 │ │ │ │ -_3_4_1 _P_o_w_e_r_N_o_d_e(T& t1, T& t2, ...) │ │ │ │ -342 {} │ │ │ │ -343 │ │ │ │ -344#else │ │ │ │ -345 │ │ │ │ -346 template>...>::value │ │ │ │ -349 ,int> = 0> │ │ │ │ -350 _P_o_w_e_r_N_o_d_e (Children&&... children) │ │ │ │ -351 { │ │ │ │ -352 static_assert(_d_e_g_r_e_e() == sizeof...(Children), "PowerNode constructor is │ │ │ │ -called with incorrect number of children"); │ │ │ │ -353 _children = _N_o_d_e_S_t_o_r_a_g_e{convert_arg(std::forward(children))...}; │ │ │ │ -354 } │ │ │ │ -355 │ │ │ │ -356 template...>::value │ │ │ │ -359 ,int> = 0> │ │ │ │ -360 _P_o_w_e_r_N_o_d_e (std::shared_ptr... children) │ │ │ │ -361 { │ │ │ │ -362 static_assert(_d_e_g_r_e_e() == sizeof...(Children), "PowerNode constructor is │ │ │ │ -called with incorrect number of children"); │ │ │ │ -363 _children = _N_o_d_e_S_t_o_r_a_g_e{children...}; │ │ │ │ -364 } │ │ │ │ -365 │ │ │ │ -366#endif // DOXYGEN │ │ │ │ -367 │ │ │ │ -369 │ │ │ │ -370 private: │ │ │ │ -371 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ -372 }; │ │ │ │ -373 │ │ │ │ -375 │ │ │ │ -376 } // namespace TypeTree │ │ │ │ -377} //namespace Dune │ │ │ │ -378 │ │ │ │ -379#endif // DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +203 } // namespace TypeTree │ │ │ │ +204} //namespace Dune │ │ │ │ +205 │ │ │ │ +206#endif // DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ _u_t_i_l_i_t_y_._h_h │ │ │ │ _t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(T &t, index_constant< i >={}) │ │ │ │ -Sets the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:143 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -T & child(std::size_t i) │ │ │ │ -Returns the i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:175 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const T & child(index_constant< i >={}) const │ │ │ │ -Returns the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn powernode.hh:113 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::shared_ptr< T > st, index_constant< i >={}) │ │ │ │ -Sets the stored value representing the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:159 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< T > childStorage(index_constant< i >={}) │ │ │ │ -Returns the storage of the i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:124 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ -PowerNode(T &t1, T &t2,...) │ │ │ │ -Initialize all children with the passed-in objects. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:341 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ -const NodeStorage & nodeStorage() const │ │ │ │ -DDeeffiinniittiioonn powernode.hh:232 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::array< std::shared_ptr< T >, k > NodeStorage │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +Mark this class as a power in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:43 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::vector< ChildStorageType > NodeStorage │ │ │ │ The type used for storing the children. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:77 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< const T > childStorage(index_constant< i >={}) const │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:67 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ +const NodeStorage & nodeStorage() const │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:137 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +ChildConstStorageType childStorage(std::size_t i) const │ │ │ │ Returns the storage of the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn powernode.hh:135 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ -PowerNode(T &t, bool distinct_objects=true) │ │ │ │ -Initialize all children with copies of a storage object constructed from the │ │ │ │ -parameter t. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:324 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ -PowerNodeTag NodeTag │ │ │ │ -The type tag that describes a PowerNode. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:71 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const T & child(std::size_t i) const │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:110 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const ChildType & child(std::size_t i) const │ │ │ │ Returns the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn powernode.hh:185 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -static constexpr auto degree() │ │ │ │ -DDeeffiinniittiioonn powernode.hh:65 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< const T > childStorage(std::size_t i) const │ │ │ │ -Returns the storage of the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn powernode.hh:205 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, std::shared_ptr< T > st) │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:87 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e │ │ │ │ +std::shared_ptr< T > ChildStorageType │ │ │ │ +The storage type of each child. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ +DynamicPowerNode(T &t1, T &t2,...) │ │ │ │ +Initialize all children with the passed-in objects. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:174 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e │ │ │ │ +std::shared_ptr< const T > ChildConstStorageType │ │ │ │ +The const version of the storage type of each child. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:64 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ +DynamicPowerNode(NodeStorage children) │ │ │ │ +Initialize the DynamicPowerNode with a copy of the passed-in storage type. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:167 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ +DynamicPowerNodeTag NodeTag │ │ │ │ +The type tag that describes the node. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:55 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ +T ChildType │ │ │ │ +The type of each child. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, ChildType &t) │ │ │ │ +Sets the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:117 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, ChildStorageType st) │ │ │ │ Sets the stored value representing the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:226 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:131 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ +DynamicPowerNode(std::size_t size) │ │ │ │ +Construct a node with the given number of children. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:162 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ static const bool isComposite │ │ │ │ Mark this class as a non composite in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:63 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -Mark this class as non leaf in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:57 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -Mark this class as a power in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:60 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ -PowerNode(const NodeStorage &children) │ │ │ │ -Initialize the PowerNode with a copy of the passed-in storage type. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:319 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ -T ChildType │ │ │ │ -The type of each child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:74 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -T & child(index_constant< i >={}) │ │ │ │ -Returns the i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:102 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -ImplementationDefined & child(Indices... indices) │ │ │ │ -Returns the child given by the list of indices. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:266 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, T &&t) │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:46 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, ChildType &&t) │ │ │ │ Store the passed value in i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:219 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(T &&t, index_constant< i >={}) │ │ │ │ -Store the passed value in i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:151 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_P_o_w_e_r_N_o_d_e │ │ │ │ -PowerNode() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:315 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const ImplementationDefined & child(Indices... indices) │ │ │ │ -Returns the child given by the list of indices. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:286 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, T &t) │ │ │ │ -Sets the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:212 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< T > childStorage(std::size_t i) │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:124 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +ChildType & child(std::size_t i) │ │ │ │ +Returns the i-th child. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:77 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +std::size_t degree() const │ │ │ │ +The number of children. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:49 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +ChildStorageType childStorage(std::size_t i) │ │ │ │ Returns the storage of the i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:195 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ -Access to the type and storage type of the i-th child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ -T type │ │ │ │ -The type of the child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:91 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ -T Type │ │ │ │ -The type of the child. │ │ │ │ -DDeeffiinniittiioonn powernode.hh:88 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ -Check if type represents a tree path. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:97 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +Mark this class as non leaf in the dune-typetree. │ │ │ │ +DDeeffiinniittiioonn dynamicpowernode.hh:40 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ +DynamicPowerNode()=delete │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node with runtime degree. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00047.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: powercompositenodetransformationtemplates.hh File Reference │ │ │ +dune-typetree: generictransformationdescriptors.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,30 +74,39 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
powercompositenodetransformationtemplates.hh File Reference
│ │ │ +
generictransformationdescriptors.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cstddef>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ +
#include <array>
│ │ │ +#include <memory>
│ │ │ +#include <vector>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/powercompositenodetransformationtemplates.hh>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::GenericLeafNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,29 +1,42 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -powercompositenodetransformationtemplates.hh File Reference │ │ │ │ -#include │ │ │ │ +generictransformationdescriptors.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h> │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ + _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00047_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: powercompositenodetransformationtemplates.hh Source File │ │ │ +dune-typetree: generictransformationdescriptors.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,93 +71,291 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
powercompositenodetransformationtemplates.hh
│ │ │ +
generictransformationdescriptors.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │ -
7#define DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │ +
7#define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │
8
│ │ │ -
9#include <cstddef>
│ │ │ -
10
│ │ │ - │ │ │ +
9#include <array>
│ │ │ +
10#include <memory>
│ │ │ +
11#include <vector>
│ │ │
12
│ │ │ -
13namespace Dune {
│ │ │ -
14 namespace TypeTree {
│ │ │ -
15
│ │ │ -
20
│ │ │ -
21 template<typename SourceNode, typename Transformation, template<typename,typename,std::size_t> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
23 {
│ │ │ -
24 template<typename TC>
│ │ │ -
│ │ │ -
25 struct result
│ │ │ -
26 {
│ │ │ -
27 typedef TransformedNode<SourceNode,TC,StaticDegree<SourceNode>::value> type;
│ │ │ -
28 };
│ │ │ -
│ │ │ -
29 };
│ │ │ -
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
16#include <dune/common/exceptions.hh>
│ │ │ +
17
│ │ │ +
18
│ │ │ +
19namespace Dune {
│ │ │ +
20 namespace TypeTree {
│ │ │ +
21
│ │ │ +
26
│ │ │ +
27 template<typename SourceNode, typename Transformation, typename TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
29 {
│ │ │
30
│ │ │ -
31
│ │ │ -
32 template<typename SourceNode, typename Transformation, template<typename,typename> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
34 {
│ │ │ -
35 template<typename TC>
│ │ │ -
│ │ │ -
36 struct result
│ │ │ +
31 static const bool recursive = false;
│ │ │ +
32
│ │ │ +
33 typedef TransformedNode transformed_type;
│ │ │ +
34 typedef std::shared_ptr<transformed_type> transformed_storage_type;
│ │ │ +
35
│ │ │ +
│ │ │ +
36 static transformed_type transform(const SourceNode& s, const Transformation& t)
│ │ │
37 {
│ │ │ -
38 typedef TransformedNode<SourceNode,TC> type;
│ │ │ -
39 };
│ │ │ -
│ │ │ -
40 };
│ │ │ +
38 return transformed_type(s,t);
│ │ │ +
39 }
│ │ │
│ │ │ -
41
│ │ │ -
42 template<typename SourceNode, typename Transformation, template<typename,typename...> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
44 {
│ │ │ -
45 template<typename... TC>
│ │ │ -
│ │ │ -
46 struct result
│ │ │ +
40
│ │ │ +
│ │ │ +
41 static transformed_type transform(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │ +
42 {
│ │ │ +
43 return transformed_type(s,t);
│ │ │ +
44 }
│ │ │ +
│ │ │ +
45
│ │ │ +
│ │ │ +
46 static transformed_storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │
47 {
│ │ │ -
48 typedef TransformedNode<SourceNode,TC...> type;
│ │ │ -
49 };
│ │ │ +
48 return std::make_shared<transformed_type>(s,t);
│ │ │ +
49 }
│ │ │
│ │ │ -
50 };
│ │ │ +
50
│ │ │ +
51 };
│ │ │
│ │ │ -
51
│ │ │ +
52
│ │ │
53
│ │ │ -
54 } // namespace TypeTree
│ │ │ -
55} //namespace Dune
│ │ │ -
56
│ │ │ -
57#endif // DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH
│ │ │ - │ │ │ +
54 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNodeTemplate>
│ │ │ +
│ │ │ + │ │ │ +
56 {
│ │ │ +
57
│ │ │ +
58 static const bool recursive = true;
│ │ │ +
59
│ │ │ +
60 template<typename TC>
│ │ │ +
│ │ │ +
61 struct result
│ │ │ +
62 {
│ │ │ +
63 typedef typename TransformedNodeTemplate<TC>::type type;
│ │ │ +
64 typedef std::shared_ptr<type> storage_type;
│ │ │ +
65 static const std::size_t degree = StaticDegree<type>::value;
│ │ │ +
66 };
│ │ │ +
│ │ │ +
67
│ │ │ +
68 template<typename TC>
│ │ │ +
│ │ │ +
69 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ +
70 {
│ │ │ +
71 return typename result<TC>::type(s,t,children);
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
74 template<typename TC>
│ │ │ +
│ │ │ +
75 static typename result<TC>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ +
76 {
│ │ │ +
77 return typename result<TC>::type(s,t,children);
│ │ │ +
78 }
│ │ │ +
│ │ │ +
79
│ │ │ +
80 template<typename TC>
│ │ │ +
│ │ │ +
81 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ +
82 {
│ │ │ +
83 return std::make_shared<typename result<TC>::type>(s,t,children);
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
86 };
│ │ │ +
│ │ │ +
87
│ │ │ +
88
│ │ │ +
89 template<typename SourceNode, typename Transformation, template<typename,typename,std::size_t> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
92 Transformation,
│ │ │ +
93 GenericPowerNodeTransformationTemplate<SourceNode,
│ │ │ +
94 Transformation,
│ │ │ +
95 TransformedNode>::template result
│ │ │ +
96 >
│ │ │ +
97 {};
│ │ │ +
│ │ │ +
98
│ │ │ +
99
│ │ │ +
100 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNodeTemplate>
│ │ │ +
│ │ │ + │ │ │ +
102 {
│ │ │ +
103
│ │ │ +
104 static const bool recursive = true;
│ │ │ +
105
│ │ │ +
106 template<typename TC>
│ │ │ +
│ │ │ +
107 struct result
│ │ │ +
108 {
│ │ │ +
109 typedef typename TransformedNodeTemplate<TC>::type type;
│ │ │ +
110 typedef std::shared_ptr<type> storage_type;
│ │ │ +
111 };
│ │ │ +
│ │ │ +
112
│ │ │ +
113 template<typename TC>
│ │ │ +
│ │ │ +
114 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ +
115 {
│ │ │ +
116 return typename result<TC>::type(s,t,children);
│ │ │ +
117 }
│ │ │ +
│ │ │ +
118
│ │ │ +
119 template<typename TC>
│ │ │ +
│ │ │ +
120 static typename result<TC>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ +
121 {
│ │ │ +
122 return typename result<TC>::type(s,t,children);
│ │ │ +
123 }
│ │ │ +
│ │ │ +
124
│ │ │ +
125 template<typename TC>
│ │ │ +
│ │ │ +
126 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ +
127 {
│ │ │ +
128 return std::make_shared<typename result<TC>::type>(s,t,children);
│ │ │ +
129 }
│ │ │ +
│ │ │ +
130
│ │ │ +
131 };
│ │ │ +
│ │ │ +
132
│ │ │ +
133
│ │ │ +
134 template<typename SourceNode, typename Transformation, template<typename,typename> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
137 Transformation,
│ │ │ +
138 GenericDynamicPowerNodeTransformationTemplate<SourceNode,
│ │ │ +
139 Transformation,
│ │ │ +
140 TransformedNode>::template result
│ │ │ +
141 >
│ │ │ +
142 {};
│ │ │ +
│ │ │ +
143
│ │ │ +
144
│ │ │ +
145 template<typename SourceNode, typename Transformation, template<typename...> class TransformedNodeTemplate>
│ │ │ +
│ │ │ + │ │ │ +
147 {
│ │ │ +
148
│ │ │ +
149 static const bool recursive = true;
│ │ │ +
150
│ │ │ +
151 template<typename... TC>
│ │ │ +
│ │ │ +
152 struct result
│ │ │ +
153 {
│ │ │ +
154 typedef typename TransformedNodeTemplate<TC...>::type type;
│ │ │ +
155 typedef std::shared_ptr<type> storage_type;
│ │ │ +
156 };
│ │ │ +
│ │ │ +
157
│ │ │ +
158 template<typename... TC>
│ │ │ +
│ │ │ +
159 static typename result<TC...>::type transform(const SourceNode& s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ +
160 {
│ │ │ +
161 return typename result<TC...>::type(s,t,children...);
│ │ │ +
162 }
│ │ │ +
│ │ │ +
163
│ │ │ +
164 template<typename... TC>
│ │ │ +
│ │ │ +
165 static typename result<TC...>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ +
166 {
│ │ │ +
167 return typename result<TC...>::type(s,t,children...);
│ │ │ +
168 }
│ │ │ +
│ │ │ +
169
│ │ │ +
170 template<typename... TC>
│ │ │ +
│ │ │ +
171 static typename result<TC...>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ +
172 {
│ │ │ +
173 return std::make_shared<typename result<TC...>::type>(s,t,children...);
│ │ │ +
174 }
│ │ │ +
│ │ │ +
175
│ │ │ +
176 };
│ │ │ +
│ │ │ +
177
│ │ │ +
178
│ │ │ +
179 template<typename SourceNode, typename Transformation, template<typename,typename...> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
182 Transformation,
│ │ │ +
183 GenericCompositeNodeTransformationTemplate<SourceNode,
│ │ │ +
184 Transformation,
│ │ │ +
185 TransformedNode>::template result
│ │ │ +
186 >
│ │ │ +
187 {};
│ │ │ +
│ │ │ +
188
│ │ │ +
190
│ │ │ +
191 } // namespace TypeTree
│ │ │ +
192} //namespace Dune
│ │ │ +
193
│ │ │ +
194#endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:23
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:26
│ │ │ -
TransformedNode< SourceNode, TC, StaticDegree< SourceNode >::value > type
Definition powercompositenodetransformationtemplates.hh:27
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:34
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:37
│ │ │ -
TransformedNode< SourceNode, TC > type
Definition powercompositenodetransformationtemplates.hh:38
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:44
│ │ │ -
Definition powercompositenodetransformationtemplates.hh:47
│ │ │ -
TransformedNode< SourceNode, TC... > type
Definition powercompositenodetransformationtemplates.hh:48
│ │ │ +
Definition generictransformationdescriptors.hh:29
│ │ │ +
TransformedNode transformed_type
Definition generictransformationdescriptors.hh:33
│ │ │ +
std::shared_ptr< transformed_type > transformed_storage_type
Definition generictransformationdescriptors.hh:34
│ │ │ +
static transformed_type transform(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:41
│ │ │ +
static const bool recursive
Definition generictransformationdescriptors.hh:31
│ │ │ +
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:46
│ │ │ +
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition generictransformationdescriptors.hh:36
│ │ │ +
Definition generictransformationdescriptors.hh:56
│ │ │ +
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:81
│ │ │ +
static const bool recursive
Definition generictransformationdescriptors.hh:58
│ │ │ +
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:75
│ │ │ +
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:69
│ │ │ +
Definition generictransformationdescriptors.hh:62
│ │ │ +
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:63
│ │ │ +
static const std::size_t degree
Definition generictransformationdescriptors.hh:65
│ │ │ +
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:64
│ │ │ +
Definition generictransformationdescriptors.hh:97
│ │ │ +
Definition generictransformationdescriptors.hh:102
│ │ │ +
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:120
│ │ │ +
static const bool recursive
Definition generictransformationdescriptors.hh:104
│ │ │ +
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:114
│ │ │ +
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:126
│ │ │ +
Definition generictransformationdescriptors.hh:108
│ │ │ +
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:109
│ │ │ +
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:110
│ │ │ +
Definition generictransformationdescriptors.hh:142
│ │ │ +
Definition generictransformationdescriptors.hh:147
│ │ │ +
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:159
│ │ │ +
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:171
│ │ │ +
static result< TC... >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:165
│ │ │ +
static const bool recursive
Definition generictransformationdescriptors.hh:149
│ │ │ +
Definition generictransformationdescriptors.hh:153
│ │ │ +
TransformedNodeTemplate< TC... >::type type
Definition generictransformationdescriptors.hh:154
│ │ │ +
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:155
│ │ │ +
Definition generictransformationdescriptors.hh:187
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,93 +1,351 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -powercompositenodetransformationtemplates.hh │ │ │ │ +generictransformationdescriptors.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ -7#define DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +7#define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ 12 │ │ │ │ -13namespace _D_u_n_e { │ │ │ │ -14 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -15 │ │ │ │ -20 │ │ │ │ -21 template class TransformedNode> │ │ │ │ -_2_2 struct _G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -23 { │ │ │ │ -24 template │ │ │ │ -_2_5 struct _r_e_s_u_l_t │ │ │ │ -26 { │ │ │ │ -_2_7 typedef TransformedNode::value> _t_y_p_e; │ │ │ │ -28 }; │ │ │ │ -29 }; │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h> │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18 │ │ │ │ +19namespace _D_u_n_e { │ │ │ │ +20 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +21 │ │ │ │ +26 │ │ │ │ +27 template │ │ │ │ +_2_8 struct _G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +29 { │ │ │ │ 30 │ │ │ │ -31 │ │ │ │ -32 template class TransformedNode> │ │ │ │ -_3_3 struct _G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -34 { │ │ │ │ -35 template │ │ │ │ -_3_6 struct _r_e_s_u_l_t │ │ │ │ +_3_1 static const bool _r_e_c_u_r_s_i_v_e = false; │ │ │ │ +32 │ │ │ │ +_3_3 typedef TransformedNode _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e; │ │ │ │ +_3_4 typedef std::shared_ptr _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +35 │ │ │ │ +_3_6 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const Transformation& │ │ │ │ +t) │ │ │ │ 37 { │ │ │ │ -_3_8 typedef TransformedNode _t_y_p_e; │ │ │ │ -39 }; │ │ │ │ -40 }; │ │ │ │ -41 │ │ │ │ -42 template class TransformedNode> │ │ │ │ -_4_3 struct _G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -44 { │ │ │ │ -45 template │ │ │ │ -_4_6 struct _r_e_s_u_l_t │ │ │ │ +38 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(s,t); │ │ │ │ +39 } │ │ │ │ +40 │ │ │ │ +_4_1 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const │ │ │ │ +Transformation& t) │ │ │ │ +42 { │ │ │ │ +43 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(s,t); │ │ │ │ +44 } │ │ │ │ +45 │ │ │ │ +_4_6 static _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr s, const Transformation& t) │ │ │ │ 47 { │ │ │ │ -_4_8 typedef TransformedNode _t_y_p_e; │ │ │ │ -49 }; │ │ │ │ -50 }; │ │ │ │ -51 │ │ │ │ +48 return std::make_shared(s,t); │ │ │ │ +49 } │ │ │ │ +50 │ │ │ │ +51 }; │ │ │ │ +52 │ │ │ │ 53 │ │ │ │ -54 } // namespace TypeTree │ │ │ │ -55} //namespace Dune │ │ │ │ -56 │ │ │ │ -57#endif // DUNE_TYPETREE_POWERCOMPOSITENODETRANSFORMATIONTEMPLATES_HH │ │ │ │ +54 template class TransformedNodeTemplate> │ │ │ │ +_5_5 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +56 { │ │ │ │ +57 │ │ │ │ +_5_8 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ +59 │ │ │ │ +60 template │ │ │ │ +_6_1 struct _r_e_s_u_l_t │ │ │ │ +62 { │ │ │ │ +_6_3 typedef typename TransformedNodeTemplate::type _t_y_p_e; │ │ │ │ +_6_4 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +_6_5 static const std::size_t _d_e_g_r_e_e = _S_t_a_t_i_c_D_e_g_r_e_e_<_t_y_p_e_>_:_:_v_a_l_u_e; │ │ │ │ +66 }; │ │ │ │ +67 │ │ │ │ +68 template │ │ │ │ +_6_9 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& │ │ │ │ +children) │ │ │ │ +70 { │ │ │ │ +71 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +74 template │ │ │ │ +_7_5 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr │ │ │ │ +s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_: │ │ │ │ +_d_e_g_r_e_e>& children) │ │ │ │ +76 { │ │ │ │ +77 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ +78 } │ │ │ │ +79 │ │ │ │ +80 template │ │ │ │ +_8_1 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& children) │ │ │ │ +82 { │ │ │ │ +83 return std::make_shared::type>(s,t,children); │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +86 }; │ │ │ │ +87 │ │ │ │ +88 │ │ │ │ +89 template class TransformedNode> │ │ │ │ +_9_0 struct _G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +91 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ +96 > │ │ │ │ +97 {}; │ │ │ │ +98 │ │ │ │ +99 │ │ │ │ +100 template class TransformedNodeTemplate> │ │ │ │ +_1_0_1 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +102 { │ │ │ │ +103 │ │ │ │ +_1_0_4 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ +105 │ │ │ │ +106 template │ │ │ │ +_1_0_7 struct _r_e_s_u_l_t │ │ │ │ +108 { │ │ │ │ +_1_0_9 typedef typename TransformedNodeTemplate::type _t_y_p_e; │ │ │ │ +_1_1_0 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +111 }; │ │ │ │ +112 │ │ │ │ +113 template │ │ │ │ +_1_1_4 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, const std::vector>& children) │ │ │ │ +115 { │ │ │ │ +116 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ +117 } │ │ │ │ +118 │ │ │ │ +119 template │ │ │ │ +_1_2_0 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const Transformation& t, const std::vector>& │ │ │ │ +children) │ │ │ │ +121 { │ │ │ │ +122 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +125 template │ │ │ │ +_1_2_6 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, const std:: │ │ │ │ +vector>& children) │ │ │ │ +127 { │ │ │ │ +128 return std::make_shared::type>(s,t,children); │ │ │ │ +129 } │ │ │ │ +130 │ │ │ │ +131 }; │ │ │ │ +132 │ │ │ │ +133 │ │ │ │ +134 template class TransformedNode> │ │ │ │ +_1_3_5 struct _G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +136 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ +141 > │ │ │ │ +142 {}; │ │ │ │ +143 │ │ │ │ +144 │ │ │ │ +145 template class TransformedNodeTemplate> │ │ │ │ +_1_4_6 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +147 { │ │ │ │ +148 │ │ │ │ +_1_4_9 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ +150 │ │ │ │ +151 template │ │ │ │ +_1_5_2 struct _r_e_s_u_l_t │ │ │ │ +153 { │ │ │ │ +_1_5_4 typedef typename TransformedNodeTemplate_:_:_t_y_p_e _t_y_p_e; │ │ │ │ +_1_5_5 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +156 }; │ │ │ │ +157 │ │ │ │ +158 template │ │ │ │ +_1_5_9 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, std::shared_ptr... children) │ │ │ │ +160 { │ │ │ │ +161 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(s,t,children...); │ │ │ │ +162 } │ │ │ │ +163 │ │ │ │ +164 template │ │ │ │ +_1_6_5 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const Transformation& t, std::shared_ptr... children) │ │ │ │ +166 { │ │ │ │ +167 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(s,t,children...); │ │ │ │ +168 } │ │ │ │ +169 │ │ │ │ +170 template │ │ │ │ +_1_7_1 static typename _r_e_s_u_l_t::storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, std::shared_ptr... │ │ │ │ +children) │ │ │ │ +172 { │ │ │ │ +173 return std::make_shared::type>(s,t,children...); │ │ │ │ +174 } │ │ │ │ +175 │ │ │ │ +176 }; │ │ │ │ +177 │ │ │ │ +178 │ │ │ │ +179 template class TransformedNode> │ │ │ │ +_1_8_0 struct _G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +181 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ +186 > │ │ │ │ +187 {}; │ │ │ │ +188 │ │ │ │ +190 │ │ │ │ +191 } // namespace TypeTree │ │ │ │ +192} //namespace Dune │ │ │ │ +193 │ │ │ │ +194#endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ _n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ +decltype(Node::degree()) StaticDegree │ │ │ │ +Returns the statically known degree of the given Node type as a std:: │ │ │ │ +integral_constant. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:23 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:26 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< SourceNode, TC, StaticDegree< SourceNode >::value > type │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:27 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:34 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:37 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< SourceNode, TC > type │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:38 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:44 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:47 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_T_e_m_p_l_a_t_e_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNode< SourceNode, TC... > type │ │ │ │ -DDeeffiinniittiioonn powercompositenodetransformationtemplates.hh:48 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:29 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___t_y_p_e │ │ │ │ +TransformedNode transformed_type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:33 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< transformed_type > transformed_storage_type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:34 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(std::shared_ptr< const SourceNode > s, const │ │ │ │ +Transformation &t) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:41 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:31 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:46 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(const SourceNode &s, const Transformation &t) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:36 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:56 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC │ │ │ │ +>, result< TC >::degree > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:81 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ +const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC │ │ │ │ +>::degree > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:75 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ +&t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:69 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:62 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNodeTemplate< TC >::type type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:63 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_d_e_g_r_e_e │ │ │ │ +static const std::size_t degree │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:65 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:64 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:97 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:102 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ +const Transformation &t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:120 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:104 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ +&t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:114 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ +_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC │ │ │ │ +> > &children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:126 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNodeTemplate< TC >::type type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:109 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_: │ │ │ │ +_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:110 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:142 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:147 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC... >::type transform(const SourceNode &s, const │ │ │ │ +Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:159 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ +_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC... >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:171 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC... >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ +const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:165 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:149 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:153 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNodeTemplate< TC... >::type type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:154 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_: │ │ │ │ +_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:155 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn generictransformationdescriptors.hh:187 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00050.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: pairtraversal.hh File Reference │ │ │ +dune-typetree: proxynode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,43 +72,51 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
pairtraversal.hh File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
proxynode.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/treepath.hh>
│ │ │ -#include <dune/typetree/visitor.hh>
│ │ │ -#include <dune/typetree/traversal.hh>
│ │ │ +
#include <type_traits>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/common/shared_ptr.hh>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

class  Dune::TypeTree::StaticChildAccessors< ProxiedNode >
 Mixin class providing methods for child access with compile-time parameter. More...
struct  Dune::TypeTree::StaticChildAccessors< ProxiedNode >::Child< k >
 Access to the type and storage type of the i-th child. More...
class  Dune::TypeTree::DynamicChildAccessors< ProxiedNode >
 Mixin class providing methods for child access with run-time parameter. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag >
 ProxyNode base class for LeafNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, CompositeNodeTag >
 ProxyNode base class for CompositeNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, PowerNodeTag >
 ProxyNode base class for PowerNode. More...
struct  Dune::TypeTree::ProxyNodeBase< Node, DynamicPowerNodeTag >
 ProxyNode base class for DynamicPowerNode. More...
class  Dune::TypeTree::ProxyNode< Node >
 Base class for nodes acting as a proxy for an existing node. More...
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Detail
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<class T1, class T2, class TreePath, class V, std::enable_if_t<(std::decay_t< T1 >::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0>
void Dune::TypeTree::Detail::applyToTreePair (T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
template<class T1, class T2, class TreePath, class V, std::enable_if_t< not(std::decay_t< T1 >::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0>
void Dune::TypeTree::Detail::applyToTreePair (T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
template<typename Tree1, typename Tree2, typename Visitor>
void Dune::TypeTree::applyToTreePair (Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor)
 Apply visitor to a pair of TypeTrees.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,39 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -pairtraversal.hh File Reference │ │ │ │ -#include │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +proxynode.hh File Reference │ │ │ │ +#include │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _> │ │ │ │ +  Mixin class providing methods for child access with compile-time │ │ │ │ + parameter. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │ +  Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_<_ _P_r_o_x_i_e_d_N_o_d_e_ _> │ │ │ │ +  Mixin class providing methods for child access with run-time │ │ │ │ + parameter. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _L_e_a_f_N_o_d_e_T_a_g_ _> │ │ │ │ +  _P_r_o_x_y_N_o_d_e base class for _L_e_a_f_N_o_d_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _> │ │ │ │ +  _P_r_o_x_y_N_o_d_e base class for _C_o_m_p_o_s_i_t_e_N_o_d_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _> │ │ │ │ +  _P_r_o_x_y_N_o_d_e base class for _P_o_w_e_r_N_o_d_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _> │ │ │ │ +  _P_r_o_x_y_N_o_d_e base class for _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e. _M_o_r_e_._._. │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _N_o_d_e_ _> │ │ │ │ +  Base class for nodes acting as a proxy for an existing node. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0> │ │ │ │ -void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (T1 &&tree1, T2 &&tree2, TreePath │ │ │ │ - treePath, V &&visitor) │ │ │ │ -template::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0> │ │ │ │ -void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (T1 &&tree1, T2 &&tree2, TreePath │ │ │ │ - treePath, V &&visitor) │ │ │ │ -template │ │ │ │ -void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (Tree1 &&tree1, Tree2 &&tree2, Visitor │ │ │ │ - &&visitor) │ │ │ │ -  Apply visitor to a pair of TypeTrees. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00050_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: pairtraversal.hh Source File │ │ │ +dune-typetree: proxynode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,155 +71,399 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
pairtraversal.hh
│ │ │ +
proxynode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │ -
7#define DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_PROXYNODE_HH
│ │ │ +
7#define DUNE_TYPETREE_PROXYNODE_HH
│ │ │
8
│ │ │ -
9#include <dune/common/std/type_traits.hh>
│ │ │ -
10
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
16
│ │ │ -
17namespace Dune {
│ │ │ -
18 namespace TypeTree {
│ │ │ -
19
│ │ │ -
24
│ │ │ -
│ │ │ -
25 namespace Detail {
│ │ │ -
26
│ │ │ -
27 /* The signature is the same as for the public applyToTreePair
│ │ │ -
28 * function in Dune::Typtree, despite the additionally passed
│ │ │ -
29 * treePath argument. The path passed here is associated to
│ │ │ -
30 * the tree and the relative paths of the children (wrt. to tree)
│ │ │ -
31 * are appended to this. Hence the behavior of the public function
│ │ │ -
32 * is resembled by passing an empty treePath.
│ │ │ -
33 */
│ │ │ -
34
│ │ │ -
35 /*
│ │ │ -
36 * This is the overload for leaf traversal
│ │ │ -
37 */
│ │ │ -
38 template<class T1, class T2, class TreePath, class V,
│ │ │ -
39 std::enable_if_t<(std::decay_t<T1>::isLeaf or std::decay_t<T2>::isLeaf), int> = 0>
│ │ │ -
│ │ │ -
40 void applyToTreePair(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor)
│ │ │ -
41 {
│ │ │ -
42 visitor.leaf(tree1, tree2, treePath);
│ │ │ -
43 }
│ │ │ -
│ │ │ -
44
│ │ │ -
45 /*
│ │ │ -
46 * This is the general overload doing static child traversal.
│ │ │ -
47 */
│ │ │ -
48 template<class T1, class T2, class TreePath, class V,
│ │ │ -
49 std::enable_if_t<not(std::decay_t<T1>::isLeaf or std::decay_t<T2>::isLeaf), int> = 0>
│ │ │ -
│ │ │ -
50 void applyToTreePair(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor)
│ │ │ -
51 {
│ │ │ -
52 // Do we really want to take care for const-ness of the Tree
│ │ │ -
53 // when instanciating VisitChild below? I'd rather expect this:
│ │ │ -
54 // using Tree1 = std::decay_t<T1>;
│ │ │ -
55 // using Tree2 = std::decay_t<T2>;
│ │ │ -
56 // using Visitor = std::decay_t<V>;
│ │ │ -
57 using Tree1 = std::remove_reference_t<T1>;
│ │ │ -
58 using Tree2 = std::remove_reference_t<T2>;
│ │ │ -
59 using Visitor = std::remove_reference_t<V>;
│ │ │ -
60 visitor.pre(tree1, tree2, treePath);
│ │ │ -
61
│ │ │ -
62 // check which type of traversal is supported by the trees
│ │ │ -
63 using allowDynamicTraversal = std::conjunction<
│ │ │ -
64 Dune::Std::is_detected<DynamicTraversalConcept,Tree1>,
│ │ │ -
65 Dune::Std::is_detected<DynamicTraversalConcept,Tree2>>;
│ │ │ -
66 using allowStaticTraversal = std::conjunction<
│ │ │ -
67 Dune::Std::is_detected<StaticTraversalConcept,Tree1>,
│ │ │ -
68 Dune::Std::is_detected<StaticTraversalConcept,Tree2>>;
│ │ │ -
69
│ │ │ -
70 // both trees must support either dynamic or static traversal
│ │ │ -
71 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value);
│ │ │ -
72
│ │ │ -
73 // the visitor may specify preferred dynamic traversal
│ │ │ -
74 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │ -
75
│ │ │ -
76 // create a dynamic or static index range
│ │ │ -
77 auto indices = [&]{
│ │ │ -
78 if constexpr(preferDynamicTraversal::value && allowDynamicTraversal::value)
│ │ │ -
79 return Dune::range(std::size_t(tree1.degree()));
│ │ │ -
80 else
│ │ │ -
81 return Dune::range(tree1.degree());
│ │ │ -
82 }();
│ │ │ -
83
│ │ │ -
84 if constexpr(allowDynamicTraversal::value || allowStaticTraversal::value) {
│ │ │ -
85 Dune::Hybrid::forEach(indices, [&](auto i) {
│ │ │ -
86 auto&& child1 = tree1.child(i);
│ │ │ -
87 auto&& child2 = tree2.child(i);
│ │ │ -
88 using Child1 = std::decay_t<decltype(child1)>;
│ │ │ -
89 using Child2 = std::decay_t<decltype(child2)>;
│ │ │ -
90
│ │ │ -
91 visitor.beforeChild(tree1, child1, tree2, child2, treePath, i);
│ │ │ -
92
│ │ │ -
93 // This requires that visitor.in(...) can always be instantiated,
│ │ │ -
94 // even if there's a single child only.
│ │ │ -
95 if (i>0)
│ │ │ -
96 visitor.in(tree1, tree2, treePath);
│ │ │ -
97
│ │ │ -
98 constexpr bool visitChild = Visitor::template VisitChild<Tree1,Child1,Tree2,Child2,TreePath>::value;
│ │ │ -
99 if constexpr(visitChild) {
│ │ │ -
100 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ -
101 applyToTreePair(child1, child2, childTreePath, visitor);
│ │ │ -
102 }
│ │ │ -
103
│ │ │ -
104 visitor.afterChild(tree1, child1, tree2, child2, treePath, i);
│ │ │ -
105 });
│ │ │ -
106 }
│ │ │ -
107 visitor.post(tree1, tree2, treePath);
│ │ │ +
9#include <type_traits>
│ │ │ + │ │ │ + │ │ │ +
12#include <dune/common/shared_ptr.hh>
│ │ │ +
13#include <dune/common/indices.hh>
│ │ │ +
14#include <dune/common/std/type_traits.hh>
│ │ │ +
15
│ │ │ +
16namespace Dune {
│ │ │ +
17 namespace TypeTree {
│ │ │ +
18
│ │ │ +
23
│ │ │ +
24 template<typename Node>
│ │ │ +
25 class ProxyNode;
│ │ │ +
26
│ │ │ +
28 template<typename ProxiedNode>
│ │ │ +
│ │ │ + │ │ │ +
30 {
│ │ │ +
31
│ │ │ +
32 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<ProxiedNode>::type>::value;
│ │ │ +
33
│ │ │ +
34 template<std::size_t k>
│ │ │ +
35 struct lazy_enabled
│ │ │ +
36 {
│ │ │ +
37 static const bool value = !proxiedNodeIsConst;
│ │ │ +
38 };
│ │ │ +
39
│ │ │ +
40 typedef ProxyNode<ProxiedNode> Node;
│ │ │ +
41
│ │ │ +
42 template<bool enabled = !proxiedNodeIsConst>
│ │ │ +
43 typename std::enable_if<enabled,Node&>::type
│ │ │ +
44 node ()
│ │ │ +
45 {
│ │ │ +
46 return static_cast<Node&>(*this);
│ │ │ +
47 }
│ │ │ +
48
│ │ │ +
49 const Node& node () const
│ │ │ +
50 {
│ │ │ +
51 return static_cast<const Node&>(*this);
│ │ │ +
52 }
│ │ │ +
53
│ │ │ +
54 public:
│ │ │ +
55
│ │ │ +
57 template<std::size_t k>
│ │ │ +
│ │ │ +
58 struct Child
│ │ │ +
59 : public ProxiedNode::template Child<k>
│ │ │ +
60 {};
│ │ │ +
│ │ │ +
61
│ │ │ +
64
│ │ │ +
66
│ │ │ +
69 template<std::size_t k,
│ │ │ +
70 typename std::enable_if<lazy_enabled<k>::value, int>::type = 0>
│ │ │ +
│ │ │ +
71 auto& child (index_constant<k> = {})
│ │ │ +
72 {
│ │ │ +
73 return node().proxiedNode().template child<k>();
│ │ │ +
74 }
│ │ │ +
│ │ │ +
75
│ │ │ +
77
│ │ │ +
80 template<std::size_t k>
│ │ │ +
│ │ │ +
81 const auto& child (index_constant<k> = {}) const
│ │ │ +
82 {
│ │ │ +
83 return node().proxiedNode().template child<k>();
│ │ │ +
84 }
│ │ │ +
│ │ │ +
85
│ │ │ +
87
│ │ │ +
90 template<std::size_t k,
│ │ │ +
91 typename std::enable_if<lazy_enabled<k>::value, int>::type = 0>
│ │ │ +
│ │ │ +
92 auto childStorage (index_constant<k> = {})
│ │ │ +
93 {
│ │ │ +
94 return node().proxiedNode().template childStorage<k>();
│ │ │ +
95 }
│ │ │ +
│ │ │ +
96
│ │ │ +
98
│ │ │ +
104 template<std::size_t k>
│ │ │ +
│ │ │ +
105 auto childStorage (index_constant<k> = {}) const
│ │ │ +
106 {
│ │ │ +
107 return node().proxiedNode().template childStorage<k>();
│ │ │
108 }
│ │ │
│ │ │ -
109
│ │ │ -
110 } // namespace Detail
│ │ │ -
│ │ │ -
111
│ │ │ -
113
│ │ │ -
127 template<typename Tree1, typename Tree2, typename Visitor>
│ │ │ -
│ │ │ -
128 void applyToTreePair(Tree1&& tree1, Tree2&& tree2, Visitor&& visitor)
│ │ │ -
129 {
│ │ │ -
130 Detail::applyToTreePair(tree1, tree2, hybridTreePath(), visitor);
│ │ │ -
131 }
│ │ │ -
│ │ │ -
132
│ │ │ +
109
│ │ │ +
111 template<std::size_t k, class ProxyChild>
│ │ │ +
│ │ │ +
112 void setChild (ProxyChild&& child, typename std::enable_if<lazy_enabled<k>::value,void*>::type = 0)
│ │ │ +
113 {
│ │ │ +
114 node().proxiedNode().template setChild<k>(std::forward<ProxyChild>(child));
│ │ │ +
115 }
│ │ │ +
│ │ │ +
116
│ │ │ +
│ │ │ +
117 const typename ProxiedNode::NodeStorage& nodeStorage () const
│ │ │ +
118 {
│ │ │ +
119 return node().proxiedNode().nodeStorage();
│ │ │ +
120 }
│ │ │ +
│ │ │ +
121
│ │ │ +
122 };
│ │ │ +
│ │ │ +
123
│ │ │ +
125
│ │ │ +
130 template<typename ProxiedNode>
│ │ │ +
│ │ │ + │ │ │ +
132 : public StaticChildAccessors<ProxiedNode>
│ │ │ +
133 {
│ │ │
134
│ │ │ -
135 } // namespace TypeTree
│ │ │ -
136} //namespace Dune
│ │ │ -
137
│ │ │ -
138#endif // DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
void applyToTreePair(Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor)
Apply visitor to a pair of TypeTrees.
Definition pairtraversal.hh:128
│ │ │ -
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │ +
135 typedef ProxyNode<ProxiedNode> Node;
│ │ │ +
136
│ │ │ +
137 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<ProxiedNode>::type>::value;
│ │ │ +
138
│ │ │ +
139 template<bool enabled = !proxiedNodeIsConst>
│ │ │ +
140 typename std::enable_if<enabled,Node&>::type
│ │ │ +
141 node ()
│ │ │ +
142 {
│ │ │ +
143 return static_cast<Node&>(*this);
│ │ │ +
144 }
│ │ │ +
145
│ │ │ +
146 const Node& node () const
│ │ │ +
147 {
│ │ │ +
148 return static_cast<const Node&>(*this);
│ │ │ +
149 }
│ │ │ +
150
│ │ │ +
151 public:
│ │ │ +
152
│ │ │ +
155
│ │ │ +
157
│ │ │ +
160 template<bool enabled = !proxiedNodeIsConst,
│ │ │ +
161 typename std::enable_if<enabled, int>::type = 0>
│ │ │ +
│ │ │ +
162 auto& child (std::size_t i)
│ │ │ +
163 {
│ │ │ +
164 return node().proxiedNode().child(i);
│ │ │ +
165 }
│ │ │ +
│ │ │ +
166
│ │ │ +
168
│ │ │ +
│ │ │ +
171 const auto& child (std::size_t i) const
│ │ │ +
172 {
│ │ │ +
173 return node().proxiedNode().child(i);
│ │ │ +
174 }
│ │ │ +
│ │ │ +
175
│ │ │ +
177
│ │ │ +
180 template<bool enabled = !proxiedNodeIsConst,
│ │ │ +
181 typename std::enable_if<enabled, int>::type = 0>
│ │ │ +
│ │ │ +
182 auto childStorage (std::size_t i)
│ │ │ +
183 {
│ │ │ +
184 return node().proxiedNode().childStorage(i);
│ │ │ +
185 }
│ │ │ +
│ │ │ +
186
│ │ │ +
188
│ │ │ +
│ │ │ +
194 auto childStorage (std::size_t i) const
│ │ │ +
195 {
│ │ │ +
196 return node().proxiedNode().childStorage(i);
│ │ │ +
197 }
│ │ │ +
│ │ │ +
198
│ │ │ +
200 template<class ProxyChild, bool enabled = !proxiedNodeIsConst>
│ │ │ +
│ │ │ +
201 void setChild (std::size_t i, ProxyChild&& child, typename std::enable_if<enabled,void*>::type = 0)
│ │ │ +
202 {
│ │ │ +
203 node().proxiedNode().setChild(i, std::forward<ProxyChild>(child));
│ │ │ +
204 }
│ │ │ +
│ │ │ +
205
│ │ │ +
206 };
│ │ │ +
│ │ │ +
207
│ │ │ +
209 template<typename Node, typename NodeTag>
│ │ │ + │ │ │ +
211
│ │ │ +
213 template<typename Node>
│ │ │ +
│ │ │ + │ │ │ +
215 {
│ │ │ +
216 };
│ │ │ +
│ │ │ +
217
│ │ │ +
219 template<typename Node>
│ │ │ +
│ │ │ + │ │ │ +
221 : public StaticChildAccessors<Node>
│ │ │ +
222 {
│ │ │ +
223 typedef typename Node::ChildTypes ChildTypes;
│ │ │ +
224 typedef typename Node::NodeStorage NodeStorage;
│ │ │ +
225 };
│ │ │ +
│ │ │ +
226
│ │ │ +
228 template<typename Node>
│ │ │ +
│ │ │ + │ │ │ +
230 : public DynamicChildAccessors<Node>
│ │ │ +
231 {
│ │ │ +
232 typedef typename Node::ChildType ChildType;
│ │ │ +
233 typedef typename Node::NodeStorage NodeStorage;
│ │ │ +
234 };
│ │ │ +
│ │ │ +
235
│ │ │ +
237 template<typename Node>
│ │ │ +
│ │ │ + │ │ │ +
239 : public DynamicChildAccessors<Node>
│ │ │ +
240 {
│ │ │ +
241 typedef typename Node::ChildType ChildType;
│ │ │ +
242 typedef typename Node::NodeStorage NodeStorage;
│ │ │ +
243 };
│ │ │ +
│ │ │ +
244
│ │ │ +
246
│ │ │ +
252 template<typename Node>
│ │ │ +
│ │ │ + │ │ │ +
254 : public ProxyNodeBase<Node,NodeTag<Node>>
│ │ │ +
255 {
│ │ │ +
256 static const bool proxiedNodeIsConst = std::is_const<typename std::remove_reference<Node>::type>::value;
│ │ │ +
257
│ │ │ +
258 template <class N>
│ │ │ +
259 using HasStaticDegree = index_constant<N::degree()>;
│ │ │ +
260
│ │ │ +
261 template <class N>
│ │ │ +
262 static constexpr bool hasStaticDegree = Std::is_detected<HasStaticDegree, N>::value;
│ │ │ +
263
│ │ │ +
264 // accessor mixins need to be friends for access to proxiedNode()
│ │ │ +
265 friend class StaticChildAccessors<Node>;
│ │ │ +
266 friend class DynamicChildAccessors<Node>;
│ │ │ +
267
│ │ │ +
268 public:
│ │ │ +
269
│ │ │ +
270 typedef Node ProxiedNode;
│ │ │ +
271
│ │ │ + │ │ │ +
273
│ │ │ +
275 static const bool isLeaf = Node::isLeaf;
│ │ │ +
276
│ │ │ +
278 static const bool isPower = Node::isPower;
│ │ │ +
279
│ │ │ +
281 static const bool isComposite = Node::isComposite;
│ │ │ +
282
│ │ │ +
283 template <class N = Node,
│ │ │ +
284 std::enable_if_t<hasStaticDegree<N>, int> = 0>
│ │ │ +
│ │ │ +
285 static constexpr auto degree ()
│ │ │ +
286 {
│ │ │ +
287 return N::degree();
│ │ │ +
288 }
│ │ │ +
│ │ │ +
289
│ │ │ +
290 template <class N = Node,
│ │ │ +
291 std::enable_if_t<not hasStaticDegree<N>, int> = 0>
│ │ │ +
│ │ │ +
292 auto degree () const
│ │ │ +
293 {
│ │ │ +
294 return proxiedNode().degree();
│ │ │ +
295 }
│ │ │ +
│ │ │ +
296
│ │ │ +
297
│ │ │ +
298 protected:
│ │ │ +
299
│ │ │ +
302
│ │ │ +
304 template<bool enabled = !proxiedNodeIsConst>
│ │ │ +
305 typename std::enable_if<enabled,Node&>::type
│ │ │ +
│ │ │ + │ │ │ +
307 {
│ │ │ +
308 return *_node;
│ │ │ +
309 }
│ │ │ +
│ │ │ +
310
│ │ │ +
│ │ │ +
312 const Node& proxiedNode () const
│ │ │ +
313 {
│ │ │ +
314 return *_node;
│ │ │ +
315 }
│ │ │ +
│ │ │ +
316
│ │ │ +
318 template<bool enabled = !proxiedNodeIsConst>
│ │ │ +
319 typename std::enable_if<enabled,std::shared_ptr<Node> >::type
│ │ │ +
│ │ │ + │ │ │ +
321 {
│ │ │ +
322 return _node;
│ │ │ +
323 }
│ │ │ +
│ │ │ +
324
│ │ │ +
│ │ │ +
326 std::shared_ptr<const Node> proxiedNodeStorage () const
│ │ │ +
327 {
│ │ │ +
328 return _node;
│ │ │ +
329 }
│ │ │ +
│ │ │ +
330
│ │ │ +
332
│ │ │ +
335
│ │ │ +
│ │ │ +
336 ProxyNode (Node& node)
│ │ │ +
337 : _node(stackobject_to_shared_ptr(node))
│ │ │ +
338 {}
│ │ │ +
│ │ │ +
339
│ │ │ +
│ │ │ +
340 ProxyNode (std::shared_ptr<Node> node)
│ │ │ +
341 : _node(std::move(node))
│ │ │ +
342 {}
│ │ │ +
│ │ │ +
343
│ │ │ +
345
│ │ │ +
346 private:
│ │ │ +
347
│ │ │ +
348 std::shared_ptr<Node> _node;
│ │ │ +
349 };
│ │ │ +
│ │ │ +
350
│ │ │ +
352
│ │ │ +
353 } // namespace TypeTree
│ │ │ +
354} //namespace Dune
│ │ │ +
355
│ │ │ +
356#endif // DUNE_TYPETREE_PROXYNODE_HH
│ │ │ + │ │ │ + │ │ │ +
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition pairtraversal.hh:25
│ │ │ -
void applyToTreePair(T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
Definition pairtraversal.hh:40
│ │ │ +
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ +
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ +
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ +
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ +
Base class for nodes acting as a proxy for an existing node.
Definition proxynode.hh:255
│ │ │ +
ProxyNode(Node &node)
Definition proxynode.hh:336
│ │ │ +
Dune::TypeTree::NodeTag< ProxiedNode > NodeTag
Definition proxynode.hh:272
│ │ │ +
static const bool isComposite
Definition proxynode.hh:281
│ │ │ +
static const bool isLeaf
Definition proxynode.hh:275
│ │ │ +
static const bool isPower
Definition proxynode.hh:278
│ │ │ +
auto degree() const
Definition proxynode.hh:292
│ │ │ +
std::enable_if< enabled, Node & >::type proxiedNode()
Returns the proxied node.
Definition proxynode.hh:306
│ │ │ +
std::shared_ptr< const Node > proxiedNodeStorage() const
Returns the storage of the proxied node (const version).
Definition proxynode.hh:326
│ │ │ +
ProxiedNode ProxiedNode
Definition proxynode.hh:270
│ │ │ +
std::enable_if< enabled, std::shared_ptr< Node > >::type proxiedNodeStorage()
Returns the storage of the proxied node.
Definition proxynode.hh:320
│ │ │ +
static constexpr auto degree()
Definition proxynode.hh:285
│ │ │ +
ProxyNode(std::shared_ptr< Node > node)
Definition proxynode.hh:340
│ │ │ +
const Node & proxiedNode() const
Returns the proxied node (const version).
Definition proxynode.hh:312
│ │ │ +
Mixin class providing methods for child access with compile-time parameter.
Definition proxynode.hh:30
│ │ │ +
auto & child(index_constant< k >={})
Returns the i-th child.
Definition proxynode.hh:71
│ │ │ +
void setChild(ProxyChild &&child, typename std::enable_if< lazy_enabled< k >::value, void * >::type=0)
Sets the i-th child to the passed-in value.
Definition proxynode.hh:112
│ │ │ +
const ProxiedNode::NodeStorage & nodeStorage() const
Definition proxynode.hh:117
│ │ │ +
auto childStorage(index_constant< k >={})
Returns the storage of the i-th child.
Definition proxynode.hh:92
│ │ │ +
const auto & child(index_constant< k >={}) const
Returns the i-th child (const version).
Definition proxynode.hh:81
│ │ │ +
auto childStorage(index_constant< k >={}) const
Returns the storage of the i-th child (const version).
Definition proxynode.hh:105
│ │ │ +
Access to the type and storage type of the i-th child.
Definition proxynode.hh:60
│ │ │ +
Mixin class providing methods for child access with run-time parameter.
Definition proxynode.hh:133
│ │ │ +
auto & child(std::size_t i)
Returns the i-th child.
Definition proxynode.hh:162
│ │ │ +
auto childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition proxynode.hh:194
│ │ │ +
void setChild(std::size_t i, ProxyChild &&child, typename std::enable_if< enabled, void * >::type=0)
Sets the i-th child to the passed-in value.
Definition proxynode.hh:201
│ │ │ +
const auto & child(std::size_t i) const
Returns the i-th child (const version).
Definition proxynode.hh:171
│ │ │ +
auto childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition proxynode.hh:182
│ │ │ +
Tag-based dispatch to appropriate base class that provides necessary functionality.
Definition proxynode.hh:210
│ │ │ +
Node::NodeStorage NodeStorage
Definition proxynode.hh:224
│ │ │ +
Node::ChildTypes ChildTypes
Definition proxynode.hh:223
│ │ │ +
Node::NodeStorage NodeStorage
Definition proxynode.hh:233
│ │ │ +
Node::ChildType ChildType
Definition proxynode.hh:232
│ │ │ +
Node::NodeStorage NodeStorage
Definition proxynode.hh:242
│ │ │ +
Node::ChildType ChildType
Definition proxynode.hh:241
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,157 +1,446 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -pairtraversal.hh │ │ │ │ +proxynode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ -7#define DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ +7#define DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10 │ │ │ │ -11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ -15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -16 │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ -18 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -19 │ │ │ │ -24 │ │ │ │ -_2_5 namespace _D_e_t_a_i_l { │ │ │ │ +9#include │ │ │ │ +10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15 │ │ │ │ +16namespace _D_u_n_e { │ │ │ │ +17 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +18 │ │ │ │ +23 │ │ │ │ +24 template │ │ │ │ +25 class _P_r_o_x_y_N_o_d_e; │ │ │ │ 26 │ │ │ │ -27 /* The signature is the same as for the public applyToTreePair │ │ │ │ -28 * function in Dune::Typtree, despite the additionally passed │ │ │ │ -29 * treePath argument. The path passed here is associated to │ │ │ │ -30 * the tree and the relative paths of the children (wrt. to tree) │ │ │ │ -31 * are appended to this. Hence the behavior of the public function │ │ │ │ -32 * is resembled by passing an empty treePath. │ │ │ │ -33 */ │ │ │ │ -34 │ │ │ │ -35 /* │ │ │ │ -36 * This is the overload for leaf traversal │ │ │ │ -37 */ │ │ │ │ -38 template::isLeaf or std::decay_t::isLeaf), │ │ │ │ -int> = 0> │ │ │ │ -_4_0 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor) │ │ │ │ -41 { │ │ │ │ -42 visitor.leaf(tree1, tree2, treePath); │ │ │ │ -43 } │ │ │ │ -44 │ │ │ │ -45 /* │ │ │ │ -46 * This is the general overload doing static child traversal. │ │ │ │ -47 */ │ │ │ │ -48 template::isLeaf or std::decay_t::isLeaf), │ │ │ │ -int> = 0> │ │ │ │ -_5_0 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor) │ │ │ │ -51 { │ │ │ │ -52 // Do we really want to take care for const-ness of the Tree │ │ │ │ -53 // when instanciating VisitChild below? I'd rather expect this: │ │ │ │ -54 // using Tree1 = std::decay_t; │ │ │ │ -55 // using Tree2 = std::decay_t; │ │ │ │ -56 // using Visitor = std::decay_t; │ │ │ │ -57 using Tree1 = std::remove_reference_t; │ │ │ │ -58 using Tree2 = std::remove_reference_t; │ │ │ │ -59 using Visitor = std::remove_reference_t; │ │ │ │ -60 visitor.pre(tree1, tree2, treePath); │ │ │ │ +28 template │ │ │ │ +_2_9 class _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +30 { │ │ │ │ +31 │ │ │ │ +32 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ +33 │ │ │ │ +34 template │ │ │ │ +35 struct lazy_enabled │ │ │ │ +36 { │ │ │ │ +37 static const bool value = !proxiedNodeIsConst; │ │ │ │ +38 }; │ │ │ │ +39 │ │ │ │ +40 typedef _P_r_o_x_y_N_o_d_e_<_P_r_o_x_i_e_d_N_o_d_e_> Node; │ │ │ │ +41 │ │ │ │ +42 template │ │ │ │ +43 typename std::enable_if::type │ │ │ │ +44 node () │ │ │ │ +45 { │ │ │ │ +46 return static_cast(*this); │ │ │ │ +47 } │ │ │ │ +48 │ │ │ │ +49 const Node& node () const │ │ │ │ +50 { │ │ │ │ +51 return static_cast(*this); │ │ │ │ +52 } │ │ │ │ +53 │ │ │ │ +54 public: │ │ │ │ +55 │ │ │ │ +57 template │ │ │ │ +_5_8 struct _C_h_i_l_d │ │ │ │ +59 : public ProxiedNode::template _C_h_i_l_d │ │ │ │ +60 {}; │ │ │ │ 61 │ │ │ │ -62 // check which type of traversal is supported by the trees │ │ │ │ -63 using allowDynamicTraversal = std::conjunction< │ │ │ │ -64 Dune::Std::is_detected, │ │ │ │ -65 Dune::Std::is_detected>; │ │ │ │ -66 using allowStaticTraversal = std::conjunction< │ │ │ │ -67 Dune::Std::is_detected, │ │ │ │ -68 Dune::Std::is_detected>; │ │ │ │ -69 │ │ │ │ -70 // both trees must support either dynamic or static traversal │ │ │ │ -71 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value); │ │ │ │ -72 │ │ │ │ -73 // the visitor may specify preferred dynamic traversal │ │ │ │ -74 using preferDynamicTraversal = std::bool_constant; │ │ │ │ +64 │ │ │ │ +66 │ │ │ │ +69 template::value, int>::type = 0> │ │ │ │ +_7_1 auto& _c_h_i_l_d (index_constant = {}) │ │ │ │ +72 { │ │ │ │ +73 return node().proxiedNode().template _c_h_i_l_d_<_k_>(); │ │ │ │ +74 } │ │ │ │ 75 │ │ │ │ -76 // create a dynamic or static index range │ │ │ │ -77 auto indices = [&]{ │ │ │ │ -78 if constexpr(preferDynamicTraversal::value && allowDynamicTraversal::value) │ │ │ │ -79 return Dune::range(std::size_t(tree1.degree())); │ │ │ │ -80 else │ │ │ │ -81 return Dune::range(tree1.degree()); │ │ │ │ -82 }(); │ │ │ │ -83 │ │ │ │ -84 if constexpr(allowDynamicTraversal::value || allowStaticTraversal::value) { │ │ │ │ -85 Dune::Hybrid::forEach(indices, [&](auto i) { │ │ │ │ -86 auto&& child1 = tree1.child(i); │ │ │ │ -87 auto&& child2 = tree2.child(i); │ │ │ │ -88 using Child1 = std::decay_t; │ │ │ │ -89 using Child2 = std::decay_t; │ │ │ │ -90 │ │ │ │ -91 visitor.beforeChild(tree1, child1, tree2, child2, treePath, i); │ │ │ │ -92 │ │ │ │ -93 // This requires that visitor.in(...) can always be instantiated, │ │ │ │ -94 // even if there's a single child only. │ │ │ │ -95 if (i>0) │ │ │ │ -96 visitor.in(tree1, tree2, treePath); │ │ │ │ -97 │ │ │ │ -98 constexpr bool visitChild = Visitor::template │ │ │ │ -VisitChild::value; │ │ │ │ -99 if constexpr(visitChild) { │ │ │ │ -100 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ -101 _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(child1, child2, childTreePath, visitor); │ │ │ │ -102 } │ │ │ │ -103 │ │ │ │ -104 visitor.afterChild(tree1, child1, tree2, child2, treePath, i); │ │ │ │ -105 }); │ │ │ │ -106 } │ │ │ │ -107 visitor.post(tree1, tree2, treePath); │ │ │ │ +77 │ │ │ │ +80 template │ │ │ │ +_8_1 const auto& _c_h_i_l_d (index_constant = {}) const │ │ │ │ +82 { │ │ │ │ +83 return node().proxiedNode().template _c_h_i_l_d_<_k_>(); │ │ │ │ +84 } │ │ │ │ +85 │ │ │ │ +87 │ │ │ │ +90 template::value, int>::type = 0> │ │ │ │ +_9_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ +93 { │ │ │ │ +94 return node().proxiedNode().template _c_h_i_l_d_S_t_o_r_a_g_e_<_k_>(); │ │ │ │ +95 } │ │ │ │ +96 │ │ │ │ +98 │ │ │ │ +104 template │ │ │ │ +_1_0_5 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ +106 { │ │ │ │ +107 return node().proxiedNode().template _c_h_i_l_d_S_t_o_r_a_g_e_<_k_>(); │ │ │ │ 108 } │ │ │ │ 109 │ │ │ │ -110 } // namespace Detail │ │ │ │ -111 │ │ │ │ -113 │ │ │ │ -127 template │ │ │ │ -_1_2_8 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(Tree1&& tree1, Tree2&& tree2, Visitor&& visitor) │ │ │ │ -129 { │ │ │ │ -130 _D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(tree1, tree2, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor); │ │ │ │ -131 } │ │ │ │ -132 │ │ │ │ +111 template │ │ │ │ +_1_1_2 void _s_e_t_C_h_i_l_d (ProxyChild&& _c_h_i_l_d, typename std:: │ │ │ │ +enable_if::value,void*>::type = 0) │ │ │ │ +113 { │ │ │ │ +114 node().proxiedNode().template _s_e_t_C_h_i_l_d_<_k_>(std::forward(_c_h_i_l_d)); │ │ │ │ +115 } │ │ │ │ +116 │ │ │ │ +_1_1_7 const typename ProxiedNode::NodeStorage& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +118 { │ │ │ │ +119 return node().proxiedNode().nodeStorage(); │ │ │ │ +120 } │ │ │ │ +121 │ │ │ │ +122 }; │ │ │ │ +123 │ │ │ │ +125 │ │ │ │ +130 template │ │ │ │ +_1_3_1 class _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +132 : public _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +133 { │ │ │ │ 134 │ │ │ │ -135 } // namespace TypeTree │ │ │ │ -136} //namespace Dune │ │ │ │ -137 │ │ │ │ -138#endif // DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ -_v_i_s_i_t_o_r_._h_h │ │ │ │ -_t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ +135 typedef _P_r_o_x_y_N_o_d_e_<_P_r_o_x_i_e_d_N_o_d_e_> Node; │ │ │ │ +136 │ │ │ │ +137 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ +138 │ │ │ │ +139 template │ │ │ │ +140 typename std::enable_if::type │ │ │ │ +141 node () │ │ │ │ +142 { │ │ │ │ +143 return static_cast(*this); │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 const Node& node () const │ │ │ │ +147 { │ │ │ │ +148 return static_cast(*this); │ │ │ │ +149 } │ │ │ │ +150 │ │ │ │ +151 public: │ │ │ │ +152 │ │ │ │ +155 │ │ │ │ +157 │ │ │ │ +160 template::type = 0> │ │ │ │ +_1_6_2 auto& _c_h_i_l_d (std::size_t i) │ │ │ │ +163 { │ │ │ │ +164 return node().proxiedNode().child(i); │ │ │ │ +165 } │ │ │ │ +166 │ │ │ │ +168 │ │ │ │ +_1_7_1 const auto& _c_h_i_l_d (std::size_t i) const │ │ │ │ +172 { │ │ │ │ +173 return node().proxiedNode().child(i); │ │ │ │ +174 } │ │ │ │ +175 │ │ │ │ +177 │ │ │ │ +180 template::type = 0> │ │ │ │ +_1_8_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ +183 { │ │ │ │ +184 return node().proxiedNode().childStorage(i); │ │ │ │ +185 } │ │ │ │ +186 │ │ │ │ +188 │ │ │ │ +_1_9_4 auto _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ +195 { │ │ │ │ +196 return node().proxiedNode().childStorage(i); │ │ │ │ +197 } │ │ │ │ +198 │ │ │ │ +200 template │ │ │ │ +_2_0_1 void _s_e_t_C_h_i_l_d (std::size_t i, ProxyChild&& _c_h_i_l_d, typename std:: │ │ │ │ +enable_if::type = 0) │ │ │ │ +202 { │ │ │ │ +203 node().proxiedNode().setChild(i, std::forward(_c_h_i_l_d)); │ │ │ │ +204 } │ │ │ │ +205 │ │ │ │ +206 }; │ │ │ │ +207 │ │ │ │ +209 template │ │ │ │ +_2_1_0 struct _P_r_o_x_y_N_o_d_e_B_a_s_e; │ │ │ │ +211 │ │ │ │ +213 template │ │ │ │ +_2_1_4 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ +215 { │ │ │ │ +216 }; │ │ │ │ +217 │ │ │ │ +219 template │ │ │ │ +_2_2_0 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ +221 : public _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +222 { │ │ │ │ +_2_2_3 typedef typename Node::ChildTypes _C_h_i_l_d_T_y_p_e_s; │ │ │ │ +_2_2_4 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +225 }; │ │ │ │ +226 │ │ │ │ +228 template │ │ │ │ +_2_2_9 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ +230 : public _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +231 { │ │ │ │ +_2_3_2 typedef typename Node::ChildType _C_h_i_l_d_T_y_p_e; │ │ │ │ +_2_3_3 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +234 }; │ │ │ │ +235 │ │ │ │ +237 template │ │ │ │ +_2_3_8 struct _P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ +239 : public _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +240 { │ │ │ │ +_2_4_1 typedef typename Node::ChildType _C_h_i_l_d_T_y_p_e; │ │ │ │ +_2_4_2 typedef typename Node::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +243 }; │ │ │ │ +244 │ │ │ │ +246 │ │ │ │ +252 template │ │ │ │ +_2_5_3 class _P_r_o_x_y_N_o_d_e │ │ │ │ +254 : public _P_r_o_x_y_N_o_d_e_B_a_s_e> │ │ │ │ +255 { │ │ │ │ +256 static const bool proxiedNodeIsConst = std::is_const::type>::value; │ │ │ │ +257 │ │ │ │ +258 template │ │ │ │ +259 using HasStaticDegree = index_constant; │ │ │ │ +260 │ │ │ │ +261 template │ │ │ │ +_2_6_2 static constexpr bool hasStaticDegree = Std::is_detected::value; │ │ │ │ +263 │ │ │ │ +264 // accessor mixins need to be friends for access to proxiedNode() │ │ │ │ +265 friend class _S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s; │ │ │ │ +266 friend class _D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s; │ │ │ │ +267 │ │ │ │ +268 public: │ │ │ │ +269 │ │ │ │ +_2_7_0 typedef Node _P_r_o_x_i_e_d_N_o_d_e; │ │ │ │ +271 │ │ │ │ +_2_7_2 typedef _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g_<_N_o_d_e_> _N_o_d_e_T_a_g; │ │ │ │ +273 │ │ │ │ +_2_7_5 static const bool _i_s_L_e_a_f = Node::isLeaf; │ │ │ │ +276 │ │ │ │ +_2_7_8 static const bool _i_s_P_o_w_e_r = Node::isPower; │ │ │ │ +279 │ │ │ │ +_2_8_1 static const bool _i_s_C_o_m_p_o_s_i_t_e = Node::isComposite; │ │ │ │ +282 │ │ │ │ +283 template , int> = 0> │ │ │ │ +_2_8_5 static constexpr auto _d_e_g_r_e_e () │ │ │ │ +286 { │ │ │ │ +287 return N::degree(); │ │ │ │ +288 } │ │ │ │ +289 │ │ │ │ +290 template , int> = 0> │ │ │ │ +_2_9_2 auto _d_e_g_r_e_e () const │ │ │ │ +293 { │ │ │ │ +294 return _p_r_o_x_i_e_d_N_o_d_e().degree(); │ │ │ │ +295 } │ │ │ │ +296 │ │ │ │ +297 │ │ │ │ +298 protected: │ │ │ │ +299 │ │ │ │ +302 │ │ │ │ +304 template │ │ │ │ +305 typename std::enable_if::type │ │ │ │ +_3_0_6 _p_r_o_x_i_e_d_N_o_d_e () │ │ │ │ +307 { │ │ │ │ +308 return *_node; │ │ │ │ +309 } │ │ │ │ +310 │ │ │ │ +_3_1_2 const Node& _p_r_o_x_i_e_d_N_o_d_e () const │ │ │ │ +313 { │ │ │ │ +314 return *_node; │ │ │ │ +315 } │ │ │ │ +316 │ │ │ │ +318 template │ │ │ │ +319 typename std::enable_if >::type │ │ │ │ +_3_2_0 _p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e () │ │ │ │ +321 { │ │ │ │ +322 return _node; │ │ │ │ +323 } │ │ │ │ +324 │ │ │ │ +_3_2_6 std::shared_ptr _p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +327 { │ │ │ │ +328 return _node; │ │ │ │ +329 } │ │ │ │ +330 │ │ │ │ +332 │ │ │ │ +335 │ │ │ │ +_3_3_6 _P_r_o_x_y_N_o_d_e (Node& node) │ │ │ │ +337 : _node(stackobject_to_shared_ptr(node)) │ │ │ │ +338 {} │ │ │ │ +339 │ │ │ │ +_3_4_0 _P_r_o_x_y_N_o_d_e (std::shared_ptr node) │ │ │ │ +341 : _node(std::move(node)) │ │ │ │ +342 {} │ │ │ │ +343 │ │ │ │ +345 │ │ │ │ +346 private: │ │ │ │ +347 │ │ │ │ +348 std::shared_ptr _node; │ │ │ │ +349 }; │ │ │ │ +350 │ │ │ │ +352 │ │ │ │ +353 } // namespace TypeTree │ │ │ │ +354} //namespace Dune │ │ │ │ +355 │ │ │ │ +356#endif // DUNE_TYPETREE_PROXYNODE_HH │ │ │ │ _n_o_d_e_t_a_g_s_._h_h │ │ │ │ _n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r │ │ │ │ -void applyToTreePair(Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor) │ │ │ │ -Apply visitor to a pair of TypeTrees. │ │ │ │ -DDeeffiinniittiioonn pairtraversal.hh:128 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto hybridTreePath(const T &... t) │ │ │ │ -Constructs a new HybridTreePath from the given indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ +typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ +Returns the node tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ -DDeeffiinniittiioonn pairtraversal.hh:25 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r │ │ │ │ -void applyToTreePair(T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor) │ │ │ │ -DDeeffiinniittiioonn pairtraversal.hh:40 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ +Tag designating a leaf node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node with runtime degree. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ +Tag designating a composite node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ +Base class for nodes acting as a proxy for an existing node. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:255 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ +ProxyNode(Node &node) │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:336 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_N_o_d_e_T_a_g │ │ │ │ +Dune::TypeTree::NodeTag< ProxiedNode > NodeTag │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:272 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +static const bool isComposite │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:281 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_L_e_a_f │ │ │ │ +static const bool isLeaf │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:275 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_i_s_P_o_w_e_r │ │ │ │ +static const bool isPower │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:278 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +auto degree() const │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:292 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e │ │ │ │ +std::enable_if< enabled, Node & >::type proxiedNode() │ │ │ │ +Returns the proxied node. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:306 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< const Node > proxiedNodeStorage() const │ │ │ │ +Returns the storage of the proxied node (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:326 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_<_ _P_r_o_x_i_e_d_N_o_d_e_ _>_:_:_P_r_o_x_i_e_d_N_o_d_e │ │ │ │ +ProxiedNode ProxiedNode │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:270 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::enable_if< enabled, std::shared_ptr< Node > >::type proxiedNodeStorage() │ │ │ │ +Returns the storage of the proxied node. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:320 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +static constexpr auto degree() │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:285 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_P_r_o_x_y_N_o_d_e │ │ │ │ +ProxyNode(std::shared_ptr< Node > node) │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:340 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_:_:_p_r_o_x_i_e_d_N_o_d_e │ │ │ │ +const Node & proxiedNode() const │ │ │ │ +Returns the proxied node (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:312 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +Mixin class providing methods for child access with compile-time parameter. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:30 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ +auto & child(index_constant< k >={}) │ │ │ │ +Returns the i-th child. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:71 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(ProxyChild &&child, typename std::enable_if< lazy_enabled< k >:: │ │ │ │ +value, void * >::type=0) │ │ │ │ +Sets the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:112 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ +const ProxiedNode::NodeStorage & nodeStorage() const │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:117 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(index_constant< k >={}) │ │ │ │ +Returns the storage of the i-th child. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:92 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ +const auto & child(index_constant< k >={}) const │ │ │ │ +Returns the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:81 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(index_constant< k >={}) const │ │ │ │ +Returns the storage of the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:105 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_C_h_i_l_d │ │ │ │ +Access to the type and storage type of the i-th child. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:60 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s │ │ │ │ +Mixin class providing methods for child access with run-time parameter. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:133 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ +auto & child(std::size_t i) │ │ │ │ +Returns the i-th child. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:162 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(std::size_t i) const │ │ │ │ +Returns the storage of the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:194 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::size_t i, ProxyChild &&child, typename std::enable_if< │ │ │ │ +enabled, void * >::type=0) │ │ │ │ +Sets the i-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:201 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d │ │ │ │ +const auto & child(std::size_t i) const │ │ │ │ +Returns the i-th child (const version). │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:171 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_C_h_i_l_d_A_c_c_e_s_s_o_r_s_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(std::size_t i) │ │ │ │ +Returns the storage of the i-th child. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:182 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e │ │ │ │ +Tag-based dispatch to appropriate base class that provides necessary │ │ │ │ +functionality. │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:210 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +Node::NodeStorage NodeStorage │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:224 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ +Node::ChildTypes ChildTypes │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:223 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +Node::NodeStorage NodeStorage │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:233 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ +Node::ChildType ChildType │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:232 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +Node::NodeStorage NodeStorage │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:242 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_r_o_x_y_N_o_d_e_B_a_s_e_<_ _N_o_d_e_,_ _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g_ _>_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ +Node::ChildType ChildType │ │ │ │ +DDeeffiinniittiioonn proxynode.hh:241 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00053.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: nodetags.hh File Reference │ │ │ +dune-typetree: filters.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,30 +74,50 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
nodetags.hh File Reference
│ │ │ +
filters.hh File Reference
│ │ │
│ │ │
│ │ │ - │ │ │ +
#include <tuple>
│ │ │ +#include <memory>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::LeafNodeTag
 Tag designating a leaf node. More...
struct  Dune::TypeTree::PowerNodeTag
 Tag designating a power node. More...
struct  Dune::TypeTree::DynamicPowerNodeTag
 Tag designating a power node with runtime degree. More...
struct  Dune::TypeTree::CompositeNodeTag
 Tag designating a composite node. More...
struct  Dune::TypeTree::FilterEntry< new_k, old_k >
 A filter entry describing the mapping of one child in the filtered node. More...
struct  Dune::TypeTree::FilterResult< FilterEntries >
 The result of a filter. More...
struct  Dune::TypeTree::FilterResult< FilterEntries >::apply< Node >
struct  Dune::TypeTree::SimpleFilterTag
 Tag describing a simple filter that can only decide whether or not to include a single given child. More...
struct  Dune::TypeTree::AdvancedFilterTag
 Tag describing an advanced filter that has full control over the construction of the list of FilterEntries. More...
struct  Dune::TypeTree::AdvancedFilter
 Base class for advanced filters. More...
struct  Dune::TypeTree::AdvancedFilter::apply< Node, Children >
 Apply this filter to the given node and children. More...
struct  Dune::TypeTree::SimpleFilter
 Default simple filter that accepts any node and leaves its child structure unchanged. More...
struct  Dune::TypeTree::SimpleFilter::validate< Node >
 Validates the combination of filter and node. More...
struct  Dune::TypeTree::SimpleFilter::apply< Child, new_index, old_index >
 Applies the filter to the given child node. More...
struct  Dune::TypeTree::IndexFilter< indices >
 Filter class for FilteredCompositeNode that selects the children with the given indices. More...
struct  Dune::TypeTree::filter< Filter >
 Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter. More...
struct  Dune::TypeTree::filter< Filter >::apply< Node, Children >
 Apply the filter. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,49 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -nodetags.hh File Reference │ │ │ │ +filters.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ -  Tag designating a leaf node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -  Tag designating a power node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -  Tag designating a power node with runtime degree. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ -  Tag designating a composite node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_E_n_t_r_y_<_ _n_e_w___k_,_ _o_l_d___k_ _> │ │ │ │ +  A filter entry describing the mapping of one child in the filtered │ │ │ │ + node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_ _> │ │ │ │ +  The result of a filter. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_ _>_:_:_a_p_p_l_y_<_ _N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ +  Tag describing a simple filter that can only decide whether or not to │ │ │ │ + include a single given child. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ +  Tag describing an advanced filter that has full control over the │ │ │ │ + construction of the list of FilterEntries. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ +  Base class for advanced filters. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y_<_ _N_o_d_e_,_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ +  Apply this filter to the given node and children. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ +  Default simple filter that accepts any node and leaves its child │ │ │ │ + structure unchanged. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e_<_ _N_o_d_e_ _> │ │ │ │ +  Validates the combination of filter and node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y_<_ _C_h_i_l_d_,_ _n_e_w___i_n_d_e_x_,_ _o_l_d___i_n_d_e_x_ _> │ │ │ │ +  Applies the filter to the given child node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_n_d_e_x_F_i_l_t_e_r_<_ _i_n_d_i_c_e_s_ _> │ │ │ │ +  Filter class for _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e that selects the children with │ │ │ │ + the given indices. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_<_ _F_i_l_t_e_r_ _> │ │ │ │ +  Adapter class that takes a _S_i_m_p_l_e_F_i_l_t_e_r, validated it and turns it │ │ │ │ + into an _A_d_v_a_n_c_e_d_F_i_l_t_e_r. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_<_ _F_i_l_t_e_r_ _>_:_:_a_p_p_l_y_<_ _N_o_d_e_,_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ +  Apply the filter. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00053_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: nodetags.hh Source File │ │ │ +dune-typetree: filters.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,56 +71,263 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
nodetags.hh
│ │ │ +
filters.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_NODETAGS_HH
│ │ │ -
7#define DUNE_TYPETREE_NODETAGS_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_FILTERS_HH
│ │ │ +
7#define DUNE_TYPETREE_FILTERS_HH
│ │ │
8
│ │ │ -
9namespace Dune {
│ │ │ -
10 namespace TypeTree {
│ │ │ -
11
│ │ │ +
9#include <tuple>
│ │ │ +
10#include <memory>
│ │ │ +
11
│ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ +
13
│ │ │ +
14namespace Dune {
│ │ │ +
15 namespace TypeTree {
│ │ │
16
│ │ │ -
18 struct LeafNodeTag {};
│ │ │ -
19
│ │ │ -
21 struct PowerNodeTag {};
│ │ │ -
22
│ │ │ - │ │ │ -
25
│ │ │ - │ │ │ +
21
│ │ │ +
23 template<std::size_t new_k, std::size_t old_k>
│ │ │ +
│ │ │ + │ │ │ +
25 {
│ │ │ +
26
│ │ │ +
27#ifndef DOXYGEN
│ │ │
28
│ │ │ -
29#ifndef DOXYGEN
│ │ │ -
30
│ │ │ -
32 struct StartTag {};
│ │ │ +
29 // The precise contents of this class is an implementation detail.
│ │ │ +
30
│ │ │ +
31 static const std::size_t filtered_index = new_k;
│ │ │ +
32 static const std::size_t original_index = old_k;
│ │ │
33
│ │ │ -
34
│ │ │ +
34#endif // DOXYGEN
│ │ │
35
│ │ │ -
36#endif // DOXYGEN
│ │ │ +
36 };
│ │ │ +
│ │ │
37
│ │ │ -
39
│ │ │ -
40 } // namespace TypeTree
│ │ │ -
41} //namespace Dune
│ │ │ +
39 template<typename... FilterEntries>
│ │ │ +
│ │ │ + │ │ │ +
41 {
│ │ │
42
│ │ │ -
43#endif // DUNE_TYPETREE_NODETAGS_HH
│ │ │ +
43 static const std::size_t size = sizeof...(FilterEntries);
│ │ │ +
44
│ │ │ +
45 typedef std::tuple<FilterEntries...> IndexMap;
│ │ │ +
46
│ │ │ +
47 template<typename Node>
│ │ │ +
│ │ │ +
48 struct apply
│ │ │ +
49 {
│ │ │ +
50 typedef std::tuple<typename Node::template Child<FilterEntries::original_index>...> Children;
│ │ │ +
51 typedef std::tuple<typename Node::template Child<FilterEntries::original_index>::Type...> ChildTypes;
│ │ │ +
52 typedef std::tuple<std::shared_ptr<typename Node::template Child<FilterEntries::original_index>::Type>...> NodeStorage;
│ │ │ +
53 };
│ │ │ +
│ │ │ +
54
│ │ │ +
55 };
│ │ │ +
│ │ │ +
56
│ │ │ +
58 struct SimpleFilterTag {};
│ │ │ +
59
│ │ │ + │ │ │ +
62
│ │ │ +
63
│ │ │ +
│ │ │ + │ │ │ +
66 {
│ │ │ +
67
│ │ │ + │ │ │ +
70
│ │ │ +
71#ifdef DOXYGEN
│ │ │ +
72
│ │ │ +
74 template<typename Node, typename... Children>
│ │ │ +
│ │ │ +
75 struct apply
│ │ │ +
76 {
│ │ │ +
78
│ │ │ +
81 typedef implementation-defined type;
│ │ │ +
82 };
│ │ │ +
│ │ │ +
83
│ │ │ +
84#endif // DOXYGEN
│ │ │ +
85
│ │ │ +
86 };
│ │ │ +
│ │ │ +
87
│ │ │ +
89
│ │ │ +
│ │ │ + │ │ │ +
95 {
│ │ │ +
96
│ │ │ + │ │ │ +
99
│ │ │ +
100
│ │ │ +
102 template<typename Node>
│ │ │ +
│ │ │ +
103 struct validate
│ │ │ +
104 {
│ │ │ +
106 static const bool value = true;
│ │ │ +
107 };
│ │ │ +
│ │ │ +
108
│ │ │ +
110
│ │ │ +
118 template<typename Child, std::size_t new_index, std::size_t old_index>
│ │ │ +
│ │ │ +
119 struct apply
│ │ │ +
120 {
│ │ │ +
122 static const bool value = true;
│ │ │ +
123 };
│ │ │ +
│ │ │ +
124
│ │ │ +
125 };
│ │ │ +
│ │ │ +
126
│ │ │ +
127 namespace {
│ │ │ +
128
│ │ │ +
129 // ********************************************************************************
│ │ │ +
130 // IndexFilter helpers
│ │ │ +
131 // ********************************************************************************
│ │ │ +
132
│ │ │ +
133 template<typename Node, std::size_t new_index, std::size_t... indices>
│ │ │ +
134 struct index_filter_helper
│ │ │ +
135 {
│ │ │ +
136 template<typename... FilterEntries>
│ │ │ +
137 struct apply
│ │ │ +
138 {
│ │ │ +
139 typedef FilterResult<FilterEntries...> type;
│ │ │ +
140 };
│ │ │ +
141 };
│ │ │ +
142
│ │ │ +
143 template<typename Node, std::size_t new_index, std::size_t old_index, std::size_t... indices>
│ │ │ +
144 struct index_filter_helper<Node,new_index,old_index,indices...>
│ │ │ +
145 {
│ │ │ +
146 template<typename... FilterEntries>
│ │ │ +
147 struct apply
│ │ │ +
148 : public index_filter_helper<Node,new_index+1,indices...>::template apply<FilterEntries...,
│ │ │ +
149 FilterEntry<new_index,
│ │ │ +
150 old_index>
│ │ │ +
151 >
│ │ │ +
152 {};
│ │ │ +
153 };
│ │ │ +
154
│ │ │ +
155 } // anonymous namespace
│ │ │ +
156
│ │ │ +
157
│ │ │ +
159 template<std::size_t... indices>
│ │ │ +
│ │ │ + │ │ │ +
161 : public AdvancedFilter
│ │ │ +
162 {
│ │ │ +
163
│ │ │ +
164#ifndef DOXYGEN
│ │ │ +
165
│ │ │ +
166 template<typename Node, typename... Children>
│ │ │ +
167 struct apply
│ │ │ +
168 {
│ │ │ +
169 typedef typename index_filter_helper<Node,0,indices...>::template apply<>::type type;
│ │ │ +
170 };
│ │ │ +
171
│ │ │ +
172#endif // DOXYGEN
│ │ │ +
173
│ │ │ +
174 };
│ │ │ +
│ │ │ +
175
│ │ │ +
176
│ │ │ +
177 // ********************************************************************************
│ │ │ +
178 // filter: Wrapper class for turning a simple filter into an advanced filter
│ │ │ +
179 // usable by FilteredCompositeNode
│ │ │ +
180 // ********************************************************************************
│ │ │ +
181
│ │ │ +
182 namespace {
│ │ │ +
183
│ │ │ +
184 template<typename Filter, std::size_t new_k, std::size_t old_k, typename... tail>
│ │ │ +
185 struct filter_helper
│ │ │ +
186 {
│ │ │ +
187 template<typename... FilterDescriptors>
│ │ │ +
188 struct apply
│ │ │ +
189 {
│ │ │ +
190 typedef FilterResult<FilterDescriptors...> type;
│ │ │ +
191 };
│ │ │ +
192 };
│ │ │ +
193
│ │ │ +
194 template<typename Filter, std::size_t new_k, std::size_t old_k, typename child, typename... tail>
│ │ │ +
195 struct filter_helper<Filter,new_k,old_k,child,tail...>
│ │ │ +
196 {
│ │ │ +
197
│ │ │ +
198 template<typename... FilterDescriptors>
│ │ │ +
199 struct apply
│ │ │ +
200 : public std::conditional<Filter::template apply<child,new_k,old_k>::value,
│ │ │ +
201 typename filter_helper<Filter,new_k+1,old_k+1,tail...>::template apply<FilterDescriptors...,FilterEntry<new_k,old_k> >,
│ │ │ +
202 typename filter_helper<Filter,new_k,old_k+1,tail...>::template apply<FilterDescriptors...>
│ │ │ +
203 >::type
│ │ │ +
204 {};
│ │ │ +
205
│ │ │ +
206 };
│ │ │ +
207
│ │ │ +
208 } // anonymous namespace
│ │ │ +
209
│ │ │ +
211 template<typename Filter>
│ │ │ +
│ │ │ +
212 struct filter
│ │ │ +
213 {
│ │ │ +
214
│ │ │ +
216 template<typename Node, typename... Children>
│ │ │ +
│ │ │ +
217 struct apply
│ │ │ +
218 {
│ │ │ +
219
│ │ │ +
220 static_assert((Filter::template validate<Node>::value),"Invalid simple filter");
│ │ │ +
221
│ │ │ +
222 typedef typename filter_helper<Filter,0,0,Children...>::template apply<>::type type;
│ │ │ +
223
│ │ │ +
224 };
│ │ │ +
│ │ │ +
225
│ │ │ +
226 };
│ │ │ +
│ │ │ +
227
│ │ │ +
229
│ │ │ +
230 } // namespace TypeTree
│ │ │ +
231} //namespace Dune
│ │ │ +
232
│ │ │ +
233#endif // DUNE_TYPETREE_FILTERS_HH
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ -
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ -
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ -
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ +
A filter entry describing the mapping of one child in the filtered node.
Definition filters.hh:25
│ │ │ +
The result of a filter.
Definition filters.hh:41
│ │ │ +
std::tuple< FilterEntries... > IndexMap
Definition filters.hh:45
│ │ │ +
static const std::size_t size
Definition filters.hh:43
│ │ │ +
Definition filters.hh:49
│ │ │ +
std::tuple< typename Node::template Child< FilterEntries::original_index >... > Children
Definition filters.hh:50
│ │ │ +
std::tuple< typename Node::template Child< FilterEntries::original_index >::Type... > ChildTypes
Definition filters.hh:51
│ │ │ +
std::tuple< std::shared_ptr< typename Node::template Child< FilterEntries::original_index >::Type >... > NodeStorage
Definition filters.hh:52
│ │ │ +
Tag describing a simple filter that can only decide whether or not to include a single given child.
Definition filters.hh:58
│ │ │ +
Tag describing an advanced filter that has full control over the construction of the list of FilterEn...
Definition filters.hh:61
│ │ │ +
Base class for advanced filters.
Definition filters.hh:66
│ │ │ +
AdvancedFilterTag FilterTag
Filter tag for deciding on filter application mechanism.
Definition filters.hh:69
│ │ │ +
Apply this filter to the given node and children.
Definition filters.hh:76
│ │ │ +
implementation defined type
The result of the filtering process.
Definition filters.hh:81
│ │ │ +
Default simple filter that accepts any node and leaves its child structure unchanged.
Definition filters.hh:95
│ │ │ +
SimpleFilterTag FilterTag
Filter tag for deciding on filter application mechanism.
Definition filters.hh:98
│ │ │ +
Validates the combination of filter and node.
Definition filters.hh:104
│ │ │ +
static const bool value
True if the combination of filter and node is valid.
Definition filters.hh:106
│ │ │ +
Applies the filter to the given child node.
Definition filters.hh:120
│ │ │ +
static const bool value
True if the child will be included in the filtered node.
Definition filters.hh:122
│ │ │ +
Filter class for FilteredCompositeNode that selects the children with the given indices.
Definition filters.hh:162
│ │ │ +
Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter.
Definition filters.hh:213
│ │ │ +
Apply the filter.
Definition filters.hh:218
│ │ │ +
filter_helper< Filter, 0, 0, Children... >::template apply ::type type
Definition filters.hh:222
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,61 +1,319 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -nodetags.hh │ │ │ │ +filters.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_NODETAGS_HH │ │ │ │ -7#define DUNE_TYPETREE_NODETAGS_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_FILTERS_HH │ │ │ │ +7#define DUNE_TYPETREE_FILTERS_HH │ │ │ │ 8 │ │ │ │ -9namespace _D_u_n_e { │ │ │ │ -10 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ 11 │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14namespace _D_u_n_e { │ │ │ │ +15 namespace _T_y_p_e_T_r_e_e { │ │ │ │ 16 │ │ │ │ -_1_8 struct _L_e_a_f_N_o_d_e_T_a_g {}; │ │ │ │ -19 │ │ │ │ -_2_1 struct _P_o_w_e_r_N_o_d_e_T_a_g {}; │ │ │ │ -22 │ │ │ │ -_2_4 struct _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g {}; │ │ │ │ -25 │ │ │ │ -_2_7 struct _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g {}; │ │ │ │ +21 │ │ │ │ +23 template │ │ │ │ +_2_4 struct _F_i_l_t_e_r_E_n_t_r_y │ │ │ │ +25 { │ │ │ │ +26 │ │ │ │ +27#ifndef DOXYGEN │ │ │ │ 28 │ │ │ │ -29#ifndef DOXYGEN │ │ │ │ +29 // The precise contents of this class is an implementation detail. │ │ │ │ 30 │ │ │ │ -32 struct StartTag {}; │ │ │ │ +31 static const std::size_t filtered_index = new_k; │ │ │ │ +32 static const std::size_t original_index = old_k; │ │ │ │ 33 │ │ │ │ -34 │ │ │ │ +34#endif // DOXYGEN │ │ │ │ 35 │ │ │ │ -36#endif // DOXYGEN │ │ │ │ +36 }; │ │ │ │ 37 │ │ │ │ -39 │ │ │ │ -40 } // namespace TypeTree │ │ │ │ -41} //namespace Dune │ │ │ │ +39 template │ │ │ │ +_4_0 struct _F_i_l_t_e_r_R_e_s_u_l_t │ │ │ │ +41 { │ │ │ │ 42 │ │ │ │ -43#endif // DUNE_TYPETREE_NODETAGS_HH │ │ │ │ +_4_3 static const std::size_t _s_i_z_e = sizeof...(FilterEntries); │ │ │ │ +44 │ │ │ │ +_4_5 typedef std::tuple _I_n_d_e_x_M_a_p; │ │ │ │ +46 │ │ │ │ +47 template │ │ │ │ +_4_8 struct _a_p_p_l_y │ │ │ │ +49 { │ │ │ │ +_5_0 typedef std::tuple...> _C_h_i_l_d_r_e_n; │ │ │ │ +_5_1 typedef std::tuple::Type...> _C_h_i_l_d_T_y_p_e_s; │ │ │ │ +_5_2 typedef std::tuple::Type>...> _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +53 }; │ │ │ │ +54 │ │ │ │ +55 }; │ │ │ │ +56 │ │ │ │ +_5_8 struct _S_i_m_p_l_e_F_i_l_t_e_r_T_a_g {}; │ │ │ │ +59 │ │ │ │ +_6_1 struct _A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g {}; │ │ │ │ +62 │ │ │ │ +63 │ │ │ │ +_6_5 struct _A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ +66 { │ │ │ │ +67 │ │ │ │ +_6_9 typedef _A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g _F_i_l_t_e_r_T_a_g; │ │ │ │ +70 │ │ │ │ +71#ifdef DOXYGEN │ │ │ │ +72 │ │ │ │ +74 template │ │ │ │ +_7_5 struct _a_p_p_l_y │ │ │ │ +76 { │ │ │ │ +78 │ │ │ │ +_8_1 typedef implementation-defined _t_y_p_e; │ │ │ │ +82 }; │ │ │ │ +83 │ │ │ │ +84#endif // DOXYGEN │ │ │ │ +85 │ │ │ │ +86 }; │ │ │ │ +87 │ │ │ │ +89 │ │ │ │ +_9_4 struct _S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ +95 { │ │ │ │ +96 │ │ │ │ +_9_8 typedef _S_i_m_p_l_e_F_i_l_t_e_r_T_a_g _F_i_l_t_e_r_T_a_g; │ │ │ │ +99 │ │ │ │ +100 │ │ │ │ +102 template │ │ │ │ +_1_0_3 struct _v_a_l_i_d_a_t_e │ │ │ │ +104 { │ │ │ │ +_1_0_6 static const bool _v_a_l_u_e = true; │ │ │ │ +107 }; │ │ │ │ +108 │ │ │ │ +110 │ │ │ │ +118 template │ │ │ │ +_1_1_9 struct _a_p_p_l_y │ │ │ │ +120 { │ │ │ │ +_1_2_2 static const bool _v_a_l_u_e = true; │ │ │ │ +123 }; │ │ │ │ +124 │ │ │ │ +125 }; │ │ │ │ +126 │ │ │ │ +127 namespace { │ │ │ │ +128 │ │ │ │ +129 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +130 // IndexFilter helpers │ │ │ │ +131 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +132 │ │ │ │ +133 template │ │ │ │ +134 struct index_filter_helper │ │ │ │ +135 { │ │ │ │ +136 template │ │ │ │ +137 struct apply │ │ │ │ +138 { │ │ │ │ +139 typedef _F_i_l_t_e_r_R_e_s_u_l_t type; │ │ │ │ +140 }; │ │ │ │ +141 }; │ │ │ │ +142 │ │ │ │ +143 template │ │ │ │ +144 struct index_filter_helper │ │ │ │ +145 { │ │ │ │ +146 template │ │ │ │ +147 struct apply │ │ │ │ +148 : public index_filter_helper::template │ │ │ │ +apply │ │ │ │ +151 > │ │ │ │ +152 {}; │ │ │ │ +153 }; │ │ │ │ +154 │ │ │ │ +155 } // anonymous namespace │ │ │ │ +156 │ │ │ │ +157 │ │ │ │ +159 template │ │ │ │ +_1_6_0 struct _I_n_d_e_x_F_i_l_t_e_r │ │ │ │ +161 : public _A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ +162 { │ │ │ │ +163 │ │ │ │ +164#ifndef DOXYGEN │ │ │ │ +165 │ │ │ │ +166 template │ │ │ │ +167 struct _a_p_p_l_y │ │ │ │ +168 { │ │ │ │ +169 typedef typename index_filter_helper::template _a_p_p_l_y_<_>_:_: │ │ │ │ +_t_y_p_e type; │ │ │ │ +170 }; │ │ │ │ +171 │ │ │ │ +172#endif // DOXYGEN │ │ │ │ +173 │ │ │ │ +174 }; │ │ │ │ +175 │ │ │ │ +176 │ │ │ │ +177 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +178 // filter: Wrapper class for turning a simple filter into an advanced │ │ │ │ +filter │ │ │ │ +179 // usable by FilteredCompositeNode │ │ │ │ +180 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +181 │ │ │ │ +182 namespace { │ │ │ │ +183 │ │ │ │ +184 template │ │ │ │ +185 struct filter_helper │ │ │ │ +186 { │ │ │ │ +187 template │ │ │ │ +188 struct apply │ │ │ │ +189 { │ │ │ │ +190 typedef _F_i_l_t_e_r_R_e_s_u_l_t type; │ │ │ │ +191 }; │ │ │ │ +192 }; │ │ │ │ +193 │ │ │ │ +194 template │ │ │ │ +195 struct filter_helper │ │ │ │ +196 { │ │ │ │ +197 │ │ │ │ +198 template │ │ │ │ +199 struct apply │ │ │ │ +200 : public std::conditional::value, │ │ │ │ +201 typename filter_helper::template │ │ │ │ +apply >, │ │ │ │ +202 typename filter_helper::template │ │ │ │ +apply │ │ │ │ +203 >::type │ │ │ │ +204 {}; │ │ │ │ +205 │ │ │ │ +206 }; │ │ │ │ +207 │ │ │ │ +208 } // anonymous namespace │ │ │ │ +209 │ │ │ │ +211 template │ │ │ │ +_2_1_2 struct _f_i_l_t_e_r │ │ │ │ +213 { │ │ │ │ +214 │ │ │ │ +216 template │ │ │ │ +_2_1_7 struct _a_p_p_l_y │ │ │ │ +218 { │ │ │ │ +219 │ │ │ │ +220 static_assert((Filter::template validate::value),"Invalid simple │ │ │ │ +filter"); │ │ │ │ +221 │ │ │ │ +_2_2_2 typedef typename filter_helper::template _a_p_p_l_y_<_>_:_: │ │ │ │ +_t_y_p_e _t_y_p_e; │ │ │ │ +223 │ │ │ │ +224 }; │ │ │ │ +225 │ │ │ │ +226 }; │ │ │ │ +227 │ │ │ │ +229 │ │ │ │ +230 } // namespace TypeTree │ │ │ │ +231} //namespace Dune │ │ │ │ +232 │ │ │ │ +233#endif // DUNE_TYPETREE_FILTERS_HH │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ -Tag designating a leaf node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node with runtime degree. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ -Tag designating a composite node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_E_n_t_r_y │ │ │ │ +A filter entry describing the mapping of one child in the filtered node. │ │ │ │ +DDeeffiinniittiioonn filters.hh:25 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t │ │ │ │ +The result of a filter. │ │ │ │ +DDeeffiinniittiioonn filters.hh:41 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_I_n_d_e_x_M_a_p │ │ │ │ +std::tuple< FilterEntries... > IndexMap │ │ │ │ +DDeeffiinniittiioonn filters.hh:45 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_._._._ _>_:_:_s_i_z_e │ │ │ │ +static const std::size_t size │ │ │ │ +DDeeffiinniittiioonn filters.hh:43 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y │ │ │ │ +DDeeffiinniittiioonn filters.hh:49 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_C_h_i_l_d_r_e_n │ │ │ │ +std::tuple< typename Node::template Child< FilterEntries::original_index >... > │ │ │ │ +Children │ │ │ │ +DDeeffiinniittiioonn filters.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ +std::tuple< typename Node::template Child< FilterEntries::original_index >:: │ │ │ │ +Type... > ChildTypes │ │ │ │ +DDeeffiinniittiioonn filters.hh:51 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::tuple< std::shared_ptr< typename Node::template Child< FilterEntries:: │ │ │ │ +original_index >::Type >... > NodeStorage │ │ │ │ +DDeeffiinniittiioonn filters.hh:52 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ +Tag describing a simple filter that can only decide whether or not to include a │ │ │ │ +single given child. │ │ │ │ +DDeeffiinniittiioonn filters.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ +Tag describing an advanced filter that has full control over the construction │ │ │ │ +of the list of FilterEn... │ │ │ │ +DDeeffiinniittiioonn filters.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ +Base class for advanced filters. │ │ │ │ +DDeeffiinniittiioonn filters.hh:66 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_F_i_l_t_e_r_T_a_g │ │ │ │ +AdvancedFilterTag FilterTag │ │ │ │ +Filter tag for deciding on filter application mechanism. │ │ │ │ +DDeeffiinniittiioonn filters.hh:69 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ +Apply this filter to the given node and children. │ │ │ │ +DDeeffiinniittiioonn filters.hh:76 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y_:_:_t_y_p_e │ │ │ │ +implementation defined type │ │ │ │ +The result of the filtering process. │ │ │ │ +DDeeffiinniittiioonn filters.hh:81 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ +Default simple filter that accepts any node and leaves its child structure │ │ │ │ +unchanged. │ │ │ │ +DDeeffiinniittiioonn filters.hh:95 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_F_i_l_t_e_r_T_a_g │ │ │ │ +SimpleFilterTag FilterTag │ │ │ │ +Filter tag for deciding on filter application mechanism. │ │ │ │ +DDeeffiinniittiioonn filters.hh:98 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e │ │ │ │ +Validates the combination of filter and node. │ │ │ │ +DDeeffiinniittiioonn filters.hh:104 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e_:_:_v_a_l_u_e │ │ │ │ +static const bool value │ │ │ │ +True if the combination of filter and node is valid. │ │ │ │ +DDeeffiinniittiioonn filters.hh:106 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ +Applies the filter to the given child node. │ │ │ │ +DDeeffiinniittiioonn filters.hh:120 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y_:_:_v_a_l_u_e │ │ │ │ +static const bool value │ │ │ │ +True if the child will be included in the filtered node. │ │ │ │ +DDeeffiinniittiioonn filters.hh:122 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_n_d_e_x_F_i_l_t_e_r │ │ │ │ +Filter class for FilteredCompositeNode that selects the children with the given │ │ │ │ +indices. │ │ │ │ +DDeeffiinniittiioonn filters.hh:162 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r │ │ │ │ +Adapter class that takes a SimpleFilter, validated it and turns it into an │ │ │ │ +AdvancedFilter. │ │ │ │ +DDeeffiinniittiioonn filters.hh:213 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ +Apply the filter. │ │ │ │ +DDeeffiinniittiioonn filters.hh:218 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_:_:_a_p_p_l_y_:_:_t_y_p_e │ │ │ │ +filter_helper< Filter, 0, 0, Children... >::template apply ::type type │ │ │ │ +DDeeffiinniittiioonn filters.hh:222 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00056.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: nodeinterface.hh File Reference │ │ │ +dune-typetree: pairtraversal.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,54 +72,43 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
nodeinterface.hh File Reference
│ │ │ +
pairtraversal.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cstddef>
│ │ │ -#include <type_traits>
│ │ │ -#include <dune/common/documentation.hh>
│ │ │ +
#include <dune/common/std/type_traits.hh>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/typetree/visitor.hh>
│ │ │ +#include <dune/typetree/traversal.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

struct  Dune::TypeTree::NodeInterface
 Interface for nodes in a dune-typetree. More...
│ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -Typedefs

template<typename Node>
using Dune::TypeTree::NodeTag = typename std::decay_t<Node>::NodeTag
 Returns the node tag of the given Node.
template<typename T>
using Dune::TypeTree::ImplementationTag = typename std::decay_t<T>::ImplementationTag
 Returns the implementation tag of the given Node.
template<typename Node>
using Dune::TypeTree::StaticDegree = decltype(Node::degree())
 Returns the statically known degree of the given Node type as a std::integral_constant.
namespace  Dune::TypeTree::Detail
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename Node>
std::size_t Dune::TypeTree::degree (const Node &node)
 Returns the degree of node as run time information.
template<class T1, class T2, class TreePath, class V, std::enable_if_t<(std::decay_t< T1 >::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0>
void Dune::TypeTree::Detail::applyToTreePair (T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
template<class T1, class T2, class TreePath, class V, std::enable_if_t< not(std::decay_t< T1 >::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0>
void Dune::TypeTree::Detail::applyToTreePair (T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
template<typename Tree1, typename Tree2, typename Visitor>
void Dune::TypeTree::applyToTreePair (Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor)
 Apply visitor to a pair of TypeTrees.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,36 +1,34 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -nodeinterface.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +pairtraversal.hh File Reference │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ -  Interface for nodes in a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g = typename std::decay_t::NodeTag │ │ │ │ -  Returns the node tag of the given Node. │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g = typename std::decay_t:: │ │ │ │ - ImplementationTag │ │ │ │ -  Returns the implementation tag of the given Node. │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e = decltype(Node::degree()) │ │ │ │ -  Returns the statically known degree of the given Node type as a std:: │ │ │ │ - integral_constant. │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -std::size_t  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_g_r_e_e (const Node &node) │ │ │ │ -  Returns the degree of node as run time information. │ │ │ │ +template::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0> │ │ │ │ +void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (T1 &&tree1, T2 &&tree2, TreePath │ │ │ │ + treePath, V &&visitor) │ │ │ │ +template::isLeaf or std::decay_t< T2 >::isLeaf), int > = 0> │ │ │ │ +void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (T1 &&tree1, T2 &&tree2, TreePath │ │ │ │ + treePath, V &&visitor) │ │ │ │ +template │ │ │ │ +void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r (Tree1 &&tree1, Tree2 &&tree2, Visitor │ │ │ │ + &&visitor) │ │ │ │ +  Apply visitor to a pair of TypeTrees. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00056_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: nodeinterface.hh Source File │ │ │ +dune-typetree: pairtraversal.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,102 +71,155 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
nodeinterface.hh
│ │ │ +
pairtraversal.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=8 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │ -
7#define DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │ +
7#define DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │
8
│ │ │ -
9#include <cstddef>
│ │ │ -
10#include <type_traits>
│ │ │ -
11
│ │ │ -
12#include <dune/common/documentation.hh>
│ │ │ -
13
│ │ │ -
14namespace Dune {
│ │ │ -
15 namespace TypeTree {
│ │ │ -
16
│ │ │ -
21
│ │ │ -
│ │ │ - │ │ │ -
35 {
│ │ │ -
37 static const bool isLeaf = implementationDefined;
│ │ │ -
38
│ │ │ -
40 static const bool isPower = implementationDefined;
│ │ │ -
41
│ │ │ -
43 static const bool isComposite = implementationDefined;
│ │ │ -
44
│ │ │ -
46
│ │ │ -
51 static auto degree();
│ │ │ -
52
│ │ │ -
54
│ │ │ -
59 typedef ImplementationDefined NodeTag;
│ │ │ -
60
│ │ │ -
62
│ │ │ -
65 typedef ImplementationDefined NodeStorage;
│ │ │ -
66 };
│ │ │ -
│ │ │ -
67
│ │ │ -
69 template<typename Node>
│ │ │ -
70 using NodeTag = typename std::decay_t<Node>::NodeTag;
│ │ │ -
71
│ │ │ -
73 template<typename T>
│ │ │ -
74 using ImplementationTag = typename std::decay_t<T>::ImplementationTag;
│ │ │ +
9#include <dune/common/std/type_traits.hh>
│ │ │ +
10
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
16
│ │ │ +
17namespace Dune {
│ │ │ +
18 namespace TypeTree {
│ │ │ +
19
│ │ │ +
24
│ │ │ +
│ │ │ +
25 namespace Detail {
│ │ │ +
26
│ │ │ +
27 /* The signature is the same as for the public applyToTreePair
│ │ │ +
28 * function in Dune::Typtree, despite the additionally passed
│ │ │ +
29 * treePath argument. The path passed here is associated to
│ │ │ +
30 * the tree and the relative paths of the children (wrt. to tree)
│ │ │ +
31 * are appended to this. Hence the behavior of the public function
│ │ │ +
32 * is resembled by passing an empty treePath.
│ │ │ +
33 */
│ │ │ +
34
│ │ │ +
35 /*
│ │ │ +
36 * This is the overload for leaf traversal
│ │ │ +
37 */
│ │ │ +
38 template<class T1, class T2, class TreePath, class V,
│ │ │ +
39 std::enable_if_t<(std::decay_t<T1>::isLeaf or std::decay_t<T2>::isLeaf), int> = 0>
│ │ │ +
│ │ │ +
40 void applyToTreePair(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor)
│ │ │ +
41 {
│ │ │ +
42 visitor.leaf(tree1, tree2, treePath);
│ │ │ +
43 }
│ │ │ +
│ │ │ +
44
│ │ │ +
45 /*
│ │ │ +
46 * This is the general overload doing static child traversal.
│ │ │ +
47 */
│ │ │ +
48 template<class T1, class T2, class TreePath, class V,
│ │ │ +
49 std::enable_if_t<not(std::decay_t<T1>::isLeaf or std::decay_t<T2>::isLeaf), int> = 0>
│ │ │ +
│ │ │ +
50 void applyToTreePair(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor)
│ │ │ +
51 {
│ │ │ +
52 // Do we really want to take care for const-ness of the Tree
│ │ │ +
53 // when instanciating VisitChild below? I'd rather expect this:
│ │ │ +
54 // using Tree1 = std::decay_t<T1>;
│ │ │ +
55 // using Tree2 = std::decay_t<T2>;
│ │ │ +
56 // using Visitor = std::decay_t<V>;
│ │ │ +
57 using Tree1 = std::remove_reference_t<T1>;
│ │ │ +
58 using Tree2 = std::remove_reference_t<T2>;
│ │ │ +
59 using Visitor = std::remove_reference_t<V>;
│ │ │ +
60 visitor.pre(tree1, tree2, treePath);
│ │ │ +
61
│ │ │ +
62 // check which type of traversal is supported by the trees
│ │ │ +
63 using allowDynamicTraversal = std::conjunction<
│ │ │ +
64 Dune::Std::is_detected<DynamicTraversalConcept,Tree1>,
│ │ │ +
65 Dune::Std::is_detected<DynamicTraversalConcept,Tree2>>;
│ │ │ +
66 using allowStaticTraversal = std::conjunction<
│ │ │ +
67 Dune::Std::is_detected<StaticTraversalConcept,Tree1>,
│ │ │ +
68 Dune::Std::is_detected<StaticTraversalConcept,Tree2>>;
│ │ │ +
69
│ │ │ +
70 // both trees must support either dynamic or static traversal
│ │ │ +
71 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value);
│ │ │ +
72
│ │ │ +
73 // the visitor may specify preferred dynamic traversal
│ │ │ +
74 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │
75
│ │ │ -
76
│ │ │ -
78 template<typename Node>
│ │ │ -
│ │ │ -
79 std::size_t degree(const Node& node)
│ │ │ -
80 {
│ │ │ -
81 return degree(&node,NodeTag<Node>());
│ │ │ -
82 }
│ │ │ -
│ │ │ +
76 // create a dynamic or static index range
│ │ │ +
77 auto indices = [&]{
│ │ │ +
78 if constexpr(preferDynamicTraversal::value && allowDynamicTraversal::value)
│ │ │ +
79 return Dune::range(std::size_t(tree1.degree()));
│ │ │ +
80 else
│ │ │ +
81 return Dune::range(tree1.degree());
│ │ │ +
82 }();
│ │ │
83
│ │ │ -
84#ifndef DOXYGEN
│ │ │ -
85
│ │ │ -
87
│ │ │ -
93 template<typename Node, typename NodeTag>
│ │ │ -
94 std::size_t degree(const Node* node, NodeTag)
│ │ │ -
95 {
│ │ │ -
96 return node->degree();
│ │ │ -
97 }
│ │ │ -
98
│ │ │ -
99#endif // DOXYGEN
│ │ │ -
100
│ │ │ -
102
│ │ │ -
106 template<typename Node>
│ │ │ -
107 using StaticDegree = decltype(Node::degree());
│ │ │ -
108
│ │ │ -
110
│ │ │ -
111 } // namespace TypeTree
│ │ │ -
112} //namespace Dune
│ │ │ -
113
│ │ │ -
114#endif // DUNE_TYPETREE_NODEINTERFACE_HH
│ │ │ -
std::size_t degree(const Node &node)
Returns the degree of node as run time information.
Definition nodeinterface.hh:79
│ │ │ -
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition nodeinterface.hh:74
│ │ │ -
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │ -
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │ +
84 if constexpr(allowDynamicTraversal::value || allowStaticTraversal::value) {
│ │ │ +
85 Dune::Hybrid::forEach(indices, [&](auto i) {
│ │ │ +
86 auto&& child1 = tree1.child(i);
│ │ │ +
87 auto&& child2 = tree2.child(i);
│ │ │ +
88 using Child1 = std::decay_t<decltype(child1)>;
│ │ │ +
89 using Child2 = std::decay_t<decltype(child2)>;
│ │ │ +
90
│ │ │ +
91 visitor.beforeChild(tree1, child1, tree2, child2, treePath, i);
│ │ │ +
92
│ │ │ +
93 // This requires that visitor.in(...) can always be instantiated,
│ │ │ +
94 // even if there's a single child only.
│ │ │ +
95 if (i>0)
│ │ │ +
96 visitor.in(tree1, tree2, treePath);
│ │ │ +
97
│ │ │ +
98 constexpr bool visitChild = Visitor::template VisitChild<Tree1,Child1,Tree2,Child2,TreePath>::value;
│ │ │ +
99 if constexpr(visitChild) {
│ │ │ +
100 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ +
101 applyToTreePair(child1, child2, childTreePath, visitor);
│ │ │ +
102 }
│ │ │ +
103
│ │ │ +
104 visitor.afterChild(tree1, child1, tree2, child2, treePath, i);
│ │ │ +
105 });
│ │ │ +
106 }
│ │ │ +
107 visitor.post(tree1, tree2, treePath);
│ │ │ +
108 }
│ │ │ +
│ │ │ +
109
│ │ │ +
110 } // namespace Detail
│ │ │ +
│ │ │ +
111
│ │ │ +
113
│ │ │ +
127 template<typename Tree1, typename Tree2, typename Visitor>
│ │ │ +
│ │ │ +
128 void applyToTreePair(Tree1&& tree1, Tree2&& tree2, Visitor&& visitor)
│ │ │ +
129 {
│ │ │ +
130 Detail::applyToTreePair(tree1, tree2, hybridTreePath(), visitor);
│ │ │ +
131 }
│ │ │ +
│ │ │ +
132
│ │ │ +
134
│ │ │ +
135 } // namespace TypeTree
│ │ │ +
136} //namespace Dune
│ │ │ +
137
│ │ │ +
138#endif // DUNE_TYPETREE_PAIRTRAVERSAL_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
void applyToTreePair(Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor)
Apply visitor to a pair of TypeTrees.
Definition pairtraversal.hh:128
│ │ │ +
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Interface for nodes in a dune-typetree.
Definition nodeinterface.hh:35
│ │ │ -
static auto degree()
Number of children of this node in the dune-typetree.
│ │ │ -
static const bool isPower
Whether this is a power node in the dune-typetree.
Definition nodeinterface.hh:40
│ │ │ -
static const bool isLeaf
Whether this is a leaf node in a dune-typetree.
Definition nodeinterface.hh:37
│ │ │ -
ImplementationDefined NodeStorage
container type to pass around a collection of children
Definition nodeinterface.hh:65
│ │ │ -
static const bool isComposite
Whether this is a composite node in the dune-typetree.
Definition nodeinterface.hh:43
│ │ │ -
ImplementationDefined NodeTag
The type tag that describes what kind of node this is.
Definition nodeinterface.hh:59
│ │ │ +
Definition pairtraversal.hh:25
│ │ │ +
void applyToTreePair(T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor)
Definition pairtraversal.hh:40
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,127 +1,157 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -nodeinterface.hh │ │ │ │ +pairtraversal.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ -7#define DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ +7#define DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ -15 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ +15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ 16 │ │ │ │ -21 │ │ │ │ -_3_4 struct _N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ -35 { │ │ │ │ -_3_7 static const bool _i_s_L_e_a_f = implementationDefined; │ │ │ │ -38 │ │ │ │ -_4_0 static const bool _i_s_P_o_w_e_r = implementationDefined; │ │ │ │ -41 │ │ │ │ -_4_3 static const bool _i_s_C_o_m_p_o_s_i_t_e = implementationDefined; │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ +18 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +19 │ │ │ │ +24 │ │ │ │ +_2_5 namespace _D_e_t_a_i_l { │ │ │ │ +26 │ │ │ │ +27 /* The signature is the same as for the public applyToTreePair │ │ │ │ +28 * function in Dune::Typtree, despite the additionally passed │ │ │ │ +29 * treePath argument. The path passed here is associated to │ │ │ │ +30 * the tree and the relative paths of the children (wrt. to tree) │ │ │ │ +31 * are appended to this. Hence the behavior of the public function │ │ │ │ +32 * is resembled by passing an empty treePath. │ │ │ │ +33 */ │ │ │ │ +34 │ │ │ │ +35 /* │ │ │ │ +36 * This is the overload for leaf traversal │ │ │ │ +37 */ │ │ │ │ +38 template::isLeaf or std::decay_t::isLeaf), │ │ │ │ +int> = 0> │ │ │ │ +_4_0 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor) │ │ │ │ +41 { │ │ │ │ +42 visitor.leaf(tree1, tree2, treePath); │ │ │ │ +43 } │ │ │ │ 44 │ │ │ │ -46 │ │ │ │ -_5_1 static auto _d_e_g_r_e_e(); │ │ │ │ -52 │ │ │ │ -54 │ │ │ │ -_5_9 typedef ImplementationDefined _N_o_d_e_T_a_g; │ │ │ │ -60 │ │ │ │ -62 │ │ │ │ -_6_5 typedef ImplementationDefined _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -66 }; │ │ │ │ -67 │ │ │ │ -69 template │ │ │ │ -_7_0 using _N_o_d_e_T_a_g = typename std::decay_t::NodeTag; │ │ │ │ -71 │ │ │ │ -73 template │ │ │ │ -_7_4 using _I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g = typename std::decay_t::ImplementationTag; │ │ │ │ +45 /* │ │ │ │ +46 * This is the general overload doing static child traversal. │ │ │ │ +47 */ │ │ │ │ +48 template::isLeaf or std::decay_t::isLeaf), │ │ │ │ +int> = 0> │ │ │ │ +_5_0 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(T1&& tree1, T2&& tree2, TreePath treePath, V&& visitor) │ │ │ │ +51 { │ │ │ │ +52 // Do we really want to take care for const-ness of the Tree │ │ │ │ +53 // when instanciating VisitChild below? I'd rather expect this: │ │ │ │ +54 // using Tree1 = std::decay_t; │ │ │ │ +55 // using Tree2 = std::decay_t; │ │ │ │ +56 // using Visitor = std::decay_t; │ │ │ │ +57 using Tree1 = std::remove_reference_t; │ │ │ │ +58 using Tree2 = std::remove_reference_t; │ │ │ │ +59 using Visitor = std::remove_reference_t; │ │ │ │ +60 visitor.pre(tree1, tree2, treePath); │ │ │ │ +61 │ │ │ │ +62 // check which type of traversal is supported by the trees │ │ │ │ +63 using allowDynamicTraversal = std::conjunction< │ │ │ │ +64 Dune::Std::is_detected, │ │ │ │ +65 Dune::Std::is_detected>; │ │ │ │ +66 using allowStaticTraversal = std::conjunction< │ │ │ │ +67 Dune::Std::is_detected, │ │ │ │ +68 Dune::Std::is_detected>; │ │ │ │ +69 │ │ │ │ +70 // both trees must support either dynamic or static traversal │ │ │ │ +71 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value); │ │ │ │ +72 │ │ │ │ +73 // the visitor may specify preferred dynamic traversal │ │ │ │ +74 using preferDynamicTraversal = std::bool_constant; │ │ │ │ 75 │ │ │ │ -76 │ │ │ │ -78 template │ │ │ │ -_7_9 std::size_t _d_e_g_r_e_e(const Node& node) │ │ │ │ -80 { │ │ │ │ -81 return _d_e_g_r_e_e(&node,_N_o_d_e_T_a_g_<_N_o_d_e_>()); │ │ │ │ -82 } │ │ │ │ +76 // create a dynamic or static index range │ │ │ │ +77 auto indices = [&]{ │ │ │ │ +78 if constexpr(preferDynamicTraversal::value && allowDynamicTraversal::value) │ │ │ │ +79 return Dune::range(std::size_t(tree1.degree())); │ │ │ │ +80 else │ │ │ │ +81 return Dune::range(tree1.degree()); │ │ │ │ +82 }(); │ │ │ │ 83 │ │ │ │ -84#ifndef DOXYGEN │ │ │ │ -85 │ │ │ │ -87 │ │ │ │ -93 template │ │ │ │ -94 std::size_t _d_e_g_r_e_e(const Node* node, _N_o_d_e_T_a_g) │ │ │ │ -95 { │ │ │ │ -96 return node->degree(); │ │ │ │ -97 } │ │ │ │ -98 │ │ │ │ -99#endif // DOXYGEN │ │ │ │ -100 │ │ │ │ -102 │ │ │ │ -106 template │ │ │ │ -_1_0_7 using _S_t_a_t_i_c_D_e_g_r_e_e = decltype(Node::degree()); │ │ │ │ -108 │ │ │ │ -110 │ │ │ │ -111 } // namespace TypeTree │ │ │ │ -112} //namespace Dune │ │ │ │ +84 if constexpr(allowDynamicTraversal::value || allowStaticTraversal::value) { │ │ │ │ +85 Dune::Hybrid::forEach(indices, [&](auto i) { │ │ │ │ +86 auto&& child1 = tree1.child(i); │ │ │ │ +87 auto&& child2 = tree2.child(i); │ │ │ │ +88 using Child1 = std::decay_t; │ │ │ │ +89 using Child2 = std::decay_t; │ │ │ │ +90 │ │ │ │ +91 visitor.beforeChild(tree1, child1, tree2, child2, treePath, i); │ │ │ │ +92 │ │ │ │ +93 // This requires that visitor.in(...) can always be instantiated, │ │ │ │ +94 // even if there's a single child only. │ │ │ │ +95 if (i>0) │ │ │ │ +96 visitor.in(tree1, tree2, treePath); │ │ │ │ +97 │ │ │ │ +98 constexpr bool visitChild = Visitor::template │ │ │ │ +VisitChild::value; │ │ │ │ +99 if constexpr(visitChild) { │ │ │ │ +100 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ +101 _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(child1, child2, childTreePath, visitor); │ │ │ │ +102 } │ │ │ │ +103 │ │ │ │ +104 visitor.afterChild(tree1, child1, tree2, child2, treePath, i); │ │ │ │ +105 }); │ │ │ │ +106 } │ │ │ │ +107 visitor.post(tree1, tree2, treePath); │ │ │ │ +108 } │ │ │ │ +109 │ │ │ │ +110 } // namespace Detail │ │ │ │ +111 │ │ │ │ 113 │ │ │ │ -114#endif // DUNE_TYPETREE_NODEINTERFACE_HH │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_g_r_e_e │ │ │ │ -std::size_t degree(const Node &node) │ │ │ │ -Returns the degree of node as run time information. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:79 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g │ │ │ │ -typename std::decay_t< T >::ImplementationTag ImplementationTag │ │ │ │ -Returns the implementation tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:74 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ -decltype(Node::degree()) StaticDegree │ │ │ │ -Returns the statically known degree of the given Node type as a std:: │ │ │ │ -integral_constant. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ -typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ -Returns the node tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ +127 template │ │ │ │ +_1_2_8 void _a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(Tree1&& tree1, Tree2&& tree2, Visitor&& visitor) │ │ │ │ +129 { │ │ │ │ +130 _D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r(tree1, tree2, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor); │ │ │ │ +131 } │ │ │ │ +132 │ │ │ │ +134 │ │ │ │ +135 } // namespace TypeTree │ │ │ │ +136} //namespace Dune │ │ │ │ +137 │ │ │ │ +138#endif // DUNE_TYPETREE_PAIRTRAVERSAL_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ +_t_r_e_e_p_a_t_h_._h_h │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ +_v_i_s_i_t_o_r_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r │ │ │ │ +void applyToTreePair(Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor) │ │ │ │ +Apply visitor to a pair of TypeTrees. │ │ │ │ +DDeeffiinniittiioonn pairtraversal.hh:128 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto hybridTreePath(const T &... t) │ │ │ │ +Constructs a new HybridTreePath from the given indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e │ │ │ │ -Interface for nodes in a dune-typetree. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:35 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_d_e_g_r_e_e │ │ │ │ -static auto degree() │ │ │ │ -Number of children of this node in the dune-typetree. │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -Whether this is a power node in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:40 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -Whether this is a leaf node in a dune-typetree. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:37 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -ImplementationDefined NodeStorage │ │ │ │ -container type to pass around a collection of children │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:65 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ -static const bool isComposite │ │ │ │ -Whether this is a composite node in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:43 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_I_n_t_e_r_f_a_c_e_:_:_N_o_d_e_T_a_g │ │ │ │ -ImplementationDefined NodeTag │ │ │ │ -The type tag that describes what kind of node this is. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:59 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ +DDeeffiinniittiioonn pairtraversal.hh:25 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e_P_a_i_r │ │ │ │ +void applyToTreePair(T1 &&tree1, T2 &&tree2, TreePath treePath, V &&visitor) │ │ │ │ +DDeeffiinniittiioonn pairtraversal.hh:40 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00059.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: leafnode.hh File Reference │ │ │ +dune-typetree: transformation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -73,33 +73,48 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ -Namespaces
│ │ │ -
leafnode.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
transformation.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/typetree/nodetags.hh>
│ │ │ -#include <cstddef>
│ │ │ -#include <type_traits>
│ │ │ +
#include <array>
│ │ │ +#include <tuple>
│ │ │ +#include <memory>
│ │ │ +#include <utility>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │ +#include <dune/common/typetraits.hh>
│ │ │ +#include <dune/typetree/typetraits.hh>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/utility.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

class  Dune::TypeTree::LeafNode
 Base class for leaf nodes in a dune-typetree. More...
struct  Dune::TypeTree::TransformTree< SourceTree, Transformation, Tag, recursive >
 Transform a TypeTree. More...
│ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename SourceNode, typename Transformation, typename Tag>
void Dune::TypeTree::registerNodeTransformation (SourceNode *, Transformation *, Tag *)
 Register transformation descriptor to transform SourceNode with Transformation.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,20 +1,35 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -leafnode.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +transformation.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e │ │ │ │ -  Base class for leaf nodes in a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_<_ _S_o_u_r_c_e_T_r_e_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_a_g_, │ │ │ │ + _r_e_c_u_r_s_i_v_e_ _> │ │ │ │ +  Transform a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n (SourceNode *, Transformation │ │ │ │ + *, Tag *) │ │ │ │ +  Register transformation descriptor to transform SourceNode with │ │ │ │ + Transformation. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00059_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: leafnode.hh Source File │ │ │ +dune-typetree: transformation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,77 +71,517 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
leafnode.hh
│ │ │ +
transformation.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_LEAFNODE_HH
│ │ │ -
7#define DUNE_TYPETREE_LEAFNODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │ +
7#define DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │
8
│ │ │ - │ │ │ -
10#include <cstddef>
│ │ │ -
11#include <type_traits>
│ │ │ -
12
│ │ │ -
13namespace Dune {
│ │ │ -
14 namespace TypeTree {
│ │ │ -
15
│ │ │ -
20
│ │ │ -
26
│ │ │ -
│ │ │ - │ │ │ -
28 {
│ │ │ -
29
│ │ │ -
30 public:
│ │ │ -
31
│ │ │ -
33 static const bool isLeaf = true;
│ │ │ +
9#include <array>
│ │ │ +
10#include <tuple>
│ │ │ +
11#include <memory>
│ │ │ +
12#include <utility>
│ │ │ +
13
│ │ │ +
14#include <dune/common/hybridutilities.hh>
│ │ │ +
15#include <dune/common/exceptions.hh>
│ │ │ +
16#include <dune/common/typetraits.hh>
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
21
│ │ │ +
22
│ │ │ +
23namespace Dune {
│ │ │ +
24 namespace TypeTree {
│ │ │ +
25
│ │ │ +
30
│ │ │ +
31#ifdef DOXYGEN
│ │ │ +
32
│ │ │
34
│ │ │ -
36 static const bool isPower = false;
│ │ │ -
37
│ │ │ -
39 static const bool isComposite = false;
│ │ │ -
40
│ │ │ - │ │ │ -
43
│ │ │ -
│ │ │ -
44 static constexpr auto degree()
│ │ │ -
45 {
│ │ │ -
46 return std::integral_constant<std::size_t,0>{};
│ │ │ -
47 }
│ │ │ -
│ │ │ -
48
│ │ │ -
49 protected:
│ │ │ -
50
│ │ │ -
52
│ │ │ - │ │ │ -
58 };
│ │ │ -
│ │ │ -
59
│ │ │ -
61
│ │ │ -
62 } // namespace TypeTree
│ │ │ -
63} //namespace Dune
│ │ │ -
64
│ │ │ -
65#endif // DUNE_TYPETREE_POWERNODE_HH
│ │ │ - │ │ │ +
53 template<typename SourceNode, typename Transformation, typename Tag>
│ │ │ +
54 void registerNodeTransformation(SourceNode*, Transformation*, Tag*);
│ │ │ +
55
│ │ │ +
56#else // DOXYGEN
│ │ │ +
57
│ │ │ +
68 template<typename S, typename T, typename Tag>
│ │ │ +
69 struct LookupNodeTransformation
│ │ │ +
70 {
│ │ │ +
71
│ │ │ +
72 typedef decltype(registerNodeTransformation(declptr<S>(),declptr<T>(),declptr<Tag>())) lookup_type;
│ │ │ +
73
│ │ │ +
74 typedef typename evaluate_if_meta_function<
│ │ │ +
75 lookup_type
│ │ │ +
76 >::type type;
│ │ │ +
77
│ │ │ +
78 static_assert((!std::is_same<type,void>::value), "Unable to find valid transformation descriptor");
│ │ │ +
79 };
│ │ │ +
80
│ │ │ +
81#endif // DOXYGEN
│ │ │ +
82
│ │ │ +
83
│ │ │ +
85
│ │ │ +
94 template<typename SourceTree, typename Transformation, typename Tag = StartTag, bool recursive = true>
│ │ │ +
│ │ │ + │ │ │ +
96 {
│ │ │ +
97
│ │ │ +
98#ifndef DOXYGEN
│ │ │ +
99
│ │ │ +
100 typedef typename LookupNodeTransformation<SourceTree,Transformation,typename SourceTree::ImplementationTag>::type NodeTransformation;
│ │ │ +
101
│ │ │ +
102 // the type of the new tree that will result from this transformation
│ │ │ +
103 typedef typename TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transformed_type transformed_type;
│ │ │ +
104
│ │ │ +
105 // the storage type of the new tree that will result from this transformation
│ │ │ +
106 typedef typename TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transformed_storage_type transformed_storage_type;
│ │ │ +
107
│ │ │ +
108#endif // DOXYGEN
│ │ │ +
109
│ │ │ +
111 typedef transformed_type type;
│ │ │ +
112
│ │ │ +
113 typedef type Type;
│ │ │ +
114
│ │ │ +
│ │ │ +
116 static transformed_type transform(const SourceTree& s, const Transformation& t = Transformation())
│ │ │ +
117 {
│ │ │ +
118 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(s,t);
│ │ │ +
119 }
│ │ │ +
│ │ │ +
120
│ │ │ +
│ │ │ +
122 static transformed_type transform(const SourceTree& s, Transformation& t)
│ │ │ +
123 {
│ │ │ +
124 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(s,t);
│ │ │ +
125 }
│ │ │ +
│ │ │ +
126
│ │ │ +
│ │ │ +
128 static transformed_type transform(std::shared_ptr<const SourceTree> sp, const Transformation& t = Transformation())
│ │ │ +
129 {
│ │ │ +
130 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(sp,t);
│ │ │ +
131 }
│ │ │ +
│ │ │ +
132
│ │ │ +
│ │ │ +
134 static transformed_type transform(std::shared_ptr<const SourceTree> sp, Transformation& t)
│ │ │ +
135 {
│ │ │ +
136 return TransformTree<SourceTree,Transformation,NodeTag<SourceTree>,NodeTransformation::recursive>::transform(sp,t);
│ │ │ +
137 }
│ │ │ +
│ │ │ +
138
│ │ │ +
│ │ │ +
141 static transformed_storage_type transform_storage(std::shared_ptr<const SourceTree> sp, const Transformation& t = Transformation())
│ │ │ +
142 {
│ │ │ + │ │ │ +
144 }
│ │ │ +
│ │ │ +
145
│ │ │ +
│ │ │ +
148 static transformed_storage_type transform_storage(std::shared_ptr<const SourceTree> sp, Transformation& t)
│ │ │ +
149 {
│ │ │ + │ │ │ +
151 }
│ │ │ +
│ │ │ +
152
│ │ │ +
153
│ │ │ +
154 };
│ │ │ +
│ │ │ +
155
│ │ │ +
156#ifndef DOXYGEN // internal per-node implementations of the transformation algorithm
│ │ │ +
157
│ │ │ +
158 // handle a leaf node - this is easy
│ │ │ +
159 template<typename S, typename T, bool recursive>
│ │ │ +
160 struct TransformTree<S,T,LeafNodeTag,recursive>
│ │ │ +
161 {
│ │ │ +
162 // get transformed type from specification
│ │ │ +
163 typedef typename LookupNodeTransformation<S,T,ImplementationTag<S>>::type NodeTransformation;
│ │ │ +
164
│ │ │ +
165 typedef typename NodeTransformation::transformed_type transformed_type;
│ │ │ +
166 typedef typename NodeTransformation::transformed_storage_type transformed_storage_type;
│ │ │ +
167
│ │ │ +
168 // delegate instance transformation to per-node specification
│ │ │ +
169 static transformed_type transform(const S& s, T& t)
│ │ │ +
170 {
│ │ │ +
171 return NodeTransformation::transform(s,t);
│ │ │ +
172 }
│ │ │ +
173
│ │ │ +
174 // delegate instance transformation to per-node specification
│ │ │ +
175 static transformed_type transform(const S& s, const T& t)
│ │ │ +
176 {
│ │ │ +
177 return NodeTransformation::transform(s,t);
│ │ │ +
178 }
│ │ │ +
179
│ │ │ +
180 // delegate instance transformation to per-node specification
│ │ │ +
181 static transformed_type transform(std::shared_ptr<const S> sp, T& t)
│ │ │ +
182 {
│ │ │ +
183 return NodeTransformation::transform(sp,t);
│ │ │ +
184 }
│ │ │ +
185
│ │ │ +
186 // delegate instance transformation to per-node specification
│ │ │ +
187 static transformed_type transform(std::shared_ptr<const S> sp, const T& t)
│ │ │ +
188 {
│ │ │ +
189 return NodeTransformation::transform(sp,t);
│ │ │ +
190 }
│ │ │ +
191
│ │ │ +
192 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ +
193 {
│ │ │ +
194 return NodeTransformation::transform_storage(sp,t);
│ │ │ +
195 }
│ │ │ +
196
│ │ │ +
197 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ +
198 {
│ │ │ +
199 return NodeTransformation::transform_storage(sp,t);
│ │ │ +
200 }
│ │ │ +
201
│ │ │ +
202 };
│ │ │ +
203
│ │ │ +
204
│ │ │ +
205 // common implementation for non-recursive transformation of non-leaf nodes
│ │ │ +
206 template<typename S, typename T>
│ │ │ +
207 struct TransformTreeNonRecursive
│ │ │ +
208 {
│ │ │ +
209 // get transformed type from specification
│ │ │ +
210 typedef typename LookupNodeTransformation<S,T,ImplementationTag<S>>::type NodeTransformation;
│ │ │ +
211
│ │ │ +
212 typedef typename NodeTransformation::transformed_type transformed_type;
│ │ │ +
213 typedef typename NodeTransformation::transformed_storage_type transformed_storage_type;
│ │ │ +
214
│ │ │ +
215 // delegate instance transformation to per-node specification
│ │ │ +
216 static transformed_type transform(const S& s, T& t)
│ │ │ +
217 {
│ │ │ +
218 return NodeTransformation::transform(s,t);
│ │ │ +
219 }
│ │ │ +
220
│ │ │ +
221 // delegate instance transformation to per-node specification
│ │ │ +
222 static transformed_type transform(const S& s, const T& t)
│ │ │ +
223 {
│ │ │ +
224 return NodeTransformation::transform(s,t);
│ │ │ +
225 }
│ │ │ +
226
│ │ │ +
227 // delegate instance transformation to per-node specification
│ │ │ +
228 static transformed_type transform(std::shared_ptr<const S> sp, T& t)
│ │ │ +
229 {
│ │ │ +
230 return NodeTransformation::transform(sp,t);
│ │ │ +
231 }
│ │ │ +
232
│ │ │ +
233 // delegate instance transformation to per-node specification
│ │ │ +
234 static transformed_type transform(std::shared_ptr<const S> sp, const T& t)
│ │ │ +
235 {
│ │ │ +
236 return NodeTransformation::transform(sp,t);
│ │ │ +
237 }
│ │ │ +
238
│ │ │ +
239 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ +
240 {
│ │ │ +
241 return NodeTransformation::transform_storage(sp,t);
│ │ │ +
242 }
│ │ │ +
243
│ │ │ +
244 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ +
245 {
│ │ │ +
246 return NodeTransformation::transform_storage(sp,t);
│ │ │ +
247 }
│ │ │ +
248
│ │ │ +
249 };
│ │ │ +
250
│ │ │ +
251
│ │ │ +
252 namespace Impl {
│ │ │ +
253
│ │ │ +
254 // Helper class to handle recursive power nodes
│ │ │ +
255 template<class Source, class Transformation, class Tag>
│ │ │ +
256 class RecursivePowerTransformTree
│ │ │ +
257 {
│ │ │ +
258 // We only know two types of tags!
│ │ │ +
259 static_assert(std::is_same_v<Tag,PowerNodeTag> or std::is_same_v<Tag,DynamicPowerNodeTag>);
│ │ │ +
260
│ │ │ +
261 using ChildType = typename Source::ChildType;
│ │ │ +
262
│ │ │ +
263 // in case degree is dynamic, provid a vector correctly initialized
│ │ │ +
264 template<class NodeStorage>
│ │ │ +
265 static auto node_storage_provider(const std::size_t& degree)
│ │ │ +
266 {
│ │ │ +
267 return std::vector<NodeStorage>(degree);
│ │ │ +
268 }
│ │ │ +
269
│ │ │ +
270 // in case degree is static, provid an array
│ │ │ +
271 template<class NodeStorage, class StaticIndex>
│ │ │ +
272 static auto node_storage_provider(StaticIndex)
│ │ │ +
273 {
│ │ │ +
274 return std::array<NodeStorage,std::size_t(StaticIndex{})>();
│ │ │ +
275 }
│ │ │ +
276
│ │ │ +
277 public:
│ │ │ +
278 // get transformed type from specification
│ │ │ +
279 // Handling this transformation in a way that makes the per-node specification easy to write
│ │ │ +
280 // is a little involved:
│ │ │ +
281 // The problem is that the transformed power node must be parameterized on the transformed child
│ │ │ +
282 // type. So we need to transform the child type and pass the transformed child type to an inner
│ │ │ +
283 // template of the node transformation struct called result (see example of such a specification
│ │ │ +
284 // further down).
│ │ │ +
285 using NodeTransformation = typename LookupNodeTransformation<Source,Transformation,ImplementationTag<Source>>::type;
│ │ │ +
286 using ChildNodeTransformation = typename LookupNodeTransformation<ChildType,Transformation,ImplementationTag<ChildType>>::type;
│ │ │ +
287
│ │ │ +
288 private:
│ │ │ +
289 // Since every child is same type, is enough to get transformation once
│ │ │ +
290 using ChildTreeTransformation = TransformTree<ChildType,
│ │ │ +
291 Transformation,
│ │ │ +
292 NodeTag<ChildType>,
│ │ │ +
293 ChildNodeTransformation::recursive>;
│ │ │ +
294
│ │ │ +
295 // Get transformed type of children
│ │ │ +
296 using transformed_child_type = typename ChildTreeTransformation::transformed_type;
│ │ │ +
297 using transformed_child_storage_type = typename ChildTreeTransformation::transformed_storage_type;
│ │ │ +
298 public:
│ │ │ +
299 // Apply transformation from children to current node
│ │ │ +
300 using transformed_type = typename NodeTransformation::template result<transformed_child_type>::type;
│ │ │ +
301 using transformed_storage_type = typename NodeTransformation::template result<transformed_child_type>::storage_type;
│ │ │ +
302
│ │ │ +
303 // Transform an instance of source tree.
│ │ │ +
304 static transformed_type transform(const Source& source, Transformation& transformation)
│ │ │ +
305 {
│ │ │ +
306 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source.degree());
│ │ │ +
307 for (std::size_t k = 0; k < source.degree(); ++k) {
│ │ │ +
308 children_storage[k] = ChildTreeTransformation::transform_storage(source.childStorage(k),transformation);
│ │ │ +
309 }
│ │ │ +
310 return NodeTransformation::transform(source,transformation,children_storage);
│ │ │ +
311 }
│ │ │ +
312
│ │ │ +
313 // Transform an instance of source tree.
│ │ │ +
314 static transformed_type transform(const Source& source, const Transformation& transformation)
│ │ │ +
315 {
│ │ │ +
316 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source.degree());
│ │ │ +
317 for (std::size_t k = 0; k < source.degree(); ++k) {
│ │ │ +
318 children_storage[k] = ChildTreeTransformation::transform_storage(source.childStorage(k),transformation);
│ │ │ +
319 }
│ │ │ +
320 return NodeTransformation::transform(source,transformation,children_storage);
│ │ │ +
321 }
│ │ │ +
322
│ │ │ +
323 // Transform an instance of source tree.
│ │ │ +
324 static transformed_type transform(std::shared_ptr<const Source> source_ptr, Transformation& transformation)
│ │ │ +
325 {
│ │ │ +
326 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source_ptr->degree());
│ │ │ +
327 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ +
328 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ +
329 }
│ │ │ +
330 return NodeTransformation::transform(source_ptr,transformation,children_storage);
│ │ │ +
331 }
│ │ │ +
332
│ │ │ +
333 // Transform an instance of source tree.
│ │ │ +
334 static transformed_type transform(std::shared_ptr<const Source> source_ptr, const Transformation& transformation)
│ │ │ +
335 {
│ │ │ +
336 auto children_storage = node_storage_provider<std::shared_ptr<transformed_child_type>>(source_ptr->degree());
│ │ │ +
337 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ +
338 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ +
339 }
│ │ │ +
340 return NodeTransformation::transform(source_ptr,transformation,children_storage);
│ │ │ +
341 }
│ │ │ +
342
│ │ │ +
343 // Transform an instance of source tree ptr.
│ │ │ +
344 static transformed_storage_type transform_storage(std::shared_ptr<const Source> source_ptr, Transformation& transformation)
│ │ │ +
345 {
│ │ │ +
346 auto children_storage = node_storage_provider<transformed_child_storage_type>(source_ptr->degree());
│ │ │ +
347 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ +
348 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ +
349 }
│ │ │ +
350 return NodeTransformation::transform_storage(source_ptr,transformation,children_storage);
│ │ │ +
351 }
│ │ │ +
352
│ │ │ +
353 // Transform an instance of source tree ptr.
│ │ │ +
354 static transformed_storage_type transform_storage(std::shared_ptr<const Source> source_ptr, const Transformation& transformation)
│ │ │ +
355 {
│ │ │ +
356 auto children_storage = node_storage_provider<transformed_child_storage_type>(source_ptr->degree());
│ │ │ +
357 for (std::size_t k = 0; k < source_ptr->degree(); ++k) {
│ │ │ +
358 children_storage[k] = ChildTreeTransformation::transform_storage(source_ptr->childStorage(k),transformation);
│ │ │ +
359 }
│ │ │ +
360 return NodeTransformation::transform_storage(source_ptr,transformation,children_storage);
│ │ │ +
361 }
│ │ │ +
362
│ │ │ +
363 };
│ │ │ +
364 } // namespace Impl
│ │ │ +
365
│ │ │ +
366 // Recursive version of the PowerNode transformation for static nodes.
│ │ │ +
367 template<typename Source, typename Transformation>
│ │ │ +
368 struct TransformTree<Source,Transformation,PowerNodeTag,true>
│ │ │ +
369 : public Impl::RecursivePowerTransformTree<Source,Transformation,PowerNodeTag>
│ │ │ +
370 {};
│ │ │ +
371
│ │ │ +
372 // Recursive version of the DynamicPowerNode transformation for static nodes.
│ │ │ +
373 template<typename Source, typename Transformation>
│ │ │ +
374 struct TransformTree<Source,Transformation,DynamicPowerNodeTag,true>
│ │ │ +
375 : public Impl::RecursivePowerTransformTree<Source,Transformation,DynamicPowerNodeTag>
│ │ │ +
376 {};
│ │ │ +
377
│ │ │ +
378 // non-recursive version of the PowerNode transformation.
│ │ │ +
379 template<typename S, typename T>
│ │ │ +
380 struct TransformTree<S,T,PowerNodeTag,false>
│ │ │ +
381 : public TransformTreeNonRecursive<S,T>
│ │ │ +
382 {};
│ │ │ +
383
│ │ │ +
384 // non-recursive version of the DynamicPowerNodeTag transformation.
│ │ │ +
385 template<typename S, typename T>
│ │ │ +
386 struct TransformTree<S,T,DynamicPowerNodeTag,false>
│ │ │ +
387 : public TransformTreeNonRecursive<S,T>
│ │ │ +
388 {};
│ │ │ +
389
│ │ │ +
390 // helper struct that does the actual transformation for a composite node. We need this additional struct
│ │ │ +
391 // to extract the template argument list with the types of all children from the node, which we cannot do
│ │ │ +
392 // directly in the transformation<> template, as the type passed to transformation<> will usually be a
│ │ │ +
393 // derived type and will normally have more template arguments than just the children. This declaration
│ │ │ +
394 // just introduces the type of the helper struct, we always instantiate the specialization defined below;
│ │ │ +
395 template<typename S, typename Children, typename T>
│ │ │ +
396 struct transform_composite_node;
│ │ │ +
397
│ │ │ +
398 // specialized version of the helper struct which extracts the template argument list with the children from
│ │ │ +
399 // its second template parameter, which has to be CompositeNode::ChildTypes. Apart from that, the struct is
│ │ │ +
400 // similar to the one for a PowerNode, but it obviously delegates transformation of the children to the TMP.
│ │ │ +
401 template<typename S, typename T, typename... C>
│ │ │ +
402 struct transform_composite_node<S,std::tuple<C...>,T>
│ │ │ +
403 {
│ │ │ +
404
│ │ │ +
405 // transformed type, using the same nested struct trick as the PowerNode
│ │ │ +
406 typedef ImplementationTag<S> Tag;
│ │ │ +
407 typedef typename LookupNodeTransformation<S,T,Tag>::type NodeTransformation;
│ │ │ +
408 typedef typename NodeTransformation::template result<typename TransformTree<C,
│ │ │ +
409 T,
│ │ │ +
410 NodeTag<C>,
│ │ │ +
411 LookupNodeTransformation<C,T,ImplementationTag<C>>::type::recursive
│ │ │ +
412 >::transformed_type...
│ │ │ +
413 >::type transformed_type;
│ │ │ +
414
│ │ │ +
415 typedef typename NodeTransformation::template result<typename TransformTree<C,
│ │ │ +
416 T,
│ │ │ +
417 NodeTag<C>,
│ │ │ +
418 LookupNodeTransformation<C,T,ImplementationTag<C>>::type::recursive
│ │ │ +
419 >::transformed_type...
│ │ │ +
420 >::storage_type transformed_storage_type;
│ │ │ +
421
│ │ │ +
422 // Retrieve the transformation descriptor for the child with index i.
│ │ │ +
423 // This little helper improves really improves the readability of the
│ │ │ +
424 // transformation functions.
│ │ │ +
425 template<std::size_t i>
│ │ │ +
426 struct ChildTransformation
│ │ │ +
427 : public TransformTree<typename S::template Child<i>::Type,
│ │ │ +
428 T,
│ │ │ +
429 NodeTag<typename S::template Child<i>::Type>,
│ │ │ +
430 LookupNodeTransformation<
│ │ │ +
431 typename S::template Child<i>::Type,
│ │ │ +
432 T,
│ │ │ +
433 ImplementationTag<typename S::template Child<i>::Type>
│ │ │ +
434 >::type::recursive
│ │ │ +
435 >
│ │ │ +
436 {};
│ │ │ +
437
│ │ │ +
438 template<std::size_t i, typename Tuple, typename Value>
│ │ │ +
439 static void setElement(Tuple& tuple, Value&& value)
│ │ │ +
440 {
│ │ │ +
441 std::get<i>(tuple) = std::forward<Value>(value);
│ │ │ +
442 }
│ │ │ +
443
│ │ │ +
444 template<typename Trafo, std::size_t... i>
│ │ │ +
445 static transformed_type transform(const S& s, Trafo&& t, std::index_sequence<i...> indices)
│ │ │ +
446 {
│ │ │ +
447 std::tuple<typename ChildTransformation<i>::transformed_storage_type...> storage;
│ │ │ +
448 Dune::Hybrid::Impl::evaluateFoldExpression<int>({(setElement<i>(storage, ChildTransformation<i>::transform_storage(s.template childStorage<i>(), std::forward<Trafo>(t))),0)...});
│ │ │ +
449 return NodeTransformation::transform(s, std::forward<Trafo>(t), std::get<i>(storage)...);
│ │ │ +
450 }
│ │ │ +
451
│ │ │ +
452 template<typename Trafo, std::size_t... i>
│ │ │ +
453 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, Trafo&& t, std::index_sequence<i...> indices)
│ │ │ +
454 {
│ │ │ +
455 std::tuple<typename ChildTransformation<i>::transformed_storage_type...> storage;
│ │ │ +
456 Dune::Hybrid::Impl::evaluateFoldExpression<int>({(setElement<i>(storage, ChildTransformation<i>::transform_storage(sp->template childStorage<i>(), std::forward<Trafo>(t))),0)...});
│ │ │ +
457 return NodeTransformation::transform_storage(sp, std::forward<Trafo>(t), std::get<i>(storage)...);
│ │ │ +
458 }
│ │ │ +
459 };
│ │ │ +
460
│ │ │ +
461
│ │ │ +
462 // the specialization of transformation<> for the CompositeNode. This just extracts the
│ │ │ +
463 // CompositeNode::ChildTypes member and forwards to the helper struct
│ │ │ +
464 template<typename S, typename T>
│ │ │ +
465 struct TransformTree<S,T,CompositeNodeTag,true>
│ │ │ +
466 {
│ │ │ +
467
│ │ │ +
468 private:
│ │ │ +
469
│ │ │ +
470 typedef typename S::ChildTypes ChildTypes;
│ │ │ +
471
│ │ │ +
472 static auto child_indices()
│ │ │ +
473 {
│ │ │ +
474 return std::make_index_sequence<S::degree()>();
│ │ │ +
475 }
│ │ │ +
476
│ │ │ +
477 public:
│ │ │ +
478
│ │ │ +
479 typedef typename transform_composite_node<S,ChildTypes,T>::transformed_type transformed_type;
│ │ │ +
480 typedef typename transform_composite_node<S,ChildTypes,T>::transformed_storage_type transformed_storage_type;
│ │ │ +
481
│ │ │ +
482 static transformed_type transform(const S& s, T& t)
│ │ │ +
483 {
│ │ │ +
484 return transform_composite_node<S,ChildTypes,T>::transform(s,t,child_indices());
│ │ │ +
485 }
│ │ │ +
486
│ │ │ +
487 static transformed_type transform(const S& s, const T& t)
│ │ │ +
488 {
│ │ │ +
489 return transform_composite_node<S,ChildTypes,T>::transform(s,t,child_indices());
│ │ │ +
490 }
│ │ │ +
491
│ │ │ +
492 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, T& t)
│ │ │ +
493 {
│ │ │ +
494 return transform_composite_node<S,ChildTypes,T>::transform_storage(sp,t,child_indices());
│ │ │ +
495 }
│ │ │ +
496
│ │ │ +
497 static transformed_storage_type transform_storage(std::shared_ptr<const S> sp, const T& t)
│ │ │ +
498 {
│ │ │ +
499 return transform_composite_node<S,ChildTypes,T>::transform_storage(sp,t,child_indices());
│ │ │ +
500 }
│ │ │ +
501
│ │ │ +
502 };
│ │ │ +
503
│ │ │ +
504 // non-recursive version of the CompositeNode transformation.
│ │ │ +
505 template<typename S, typename T>
│ │ │ +
506 struct TransformTree<S,T,CompositeNodeTag,false>
│ │ │ +
507 : public TransformTreeNonRecursive<S,T>
│ │ │ +
508 {};
│ │ │ +
509
│ │ │ +
510#endif // DOXYGEN
│ │ │ +
511
│ │ │ +
513
│ │ │ +
514 } // namespace TypeTree
│ │ │ +
515} //namespace Dune
│ │ │ +
516
│ │ │ +
517#endif // DUNE_TYPETREE_TRANSFORMATION_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
void registerNodeTransformation(SourceNode *, Transformation *, Tag *)
Register transformation descriptor to transform SourceNode with Transformation.
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
LeafNodeTag NodeTag
The type tag that describes a LeafNode.
Definition leafnode.hh:42
│ │ │ -
static const bool isLeaf
Mark this class as a leaf in a dune-typetree.
Definition leafnode.hh:33
│ │ │ -
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition leafnode.hh:36
│ │ │ -
LeafNode()
Default constructor.
Definition leafnode.hh:57
│ │ │ -
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition leafnode.hh:39
│ │ │ -
static constexpr auto degree()
Definition leafnode.hh:44
│ │ │ -
Tag designating a leaf node.
Definition nodetags.hh:18
│ │ │ +
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
│ │ │ +
Tag designating a power node.
Definition nodetags.hh:21
│ │ │ +
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ +
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ +
Transform a TypeTree.
Definition transformation.hh:96
│ │ │ +
type Type
Definition transformation.hh:113
│ │ │ +
static transformed_type transform(std::shared_ptr< const SourceTree > sp, Transformation &t)
Apply transformation to an existing tree s.
Definition transformation.hh:134
│ │ │ +
static transformed_type transform(std::shared_ptr< const SourceTree > sp, const Transformation &t=Transformation())
Apply transformation to an existing tree s.
Definition transformation.hh:128
│ │ │ +
static transformed_type transform(const SourceTree &s, Transformation &t)
Apply transformation to an existing tree s.
Definition transformation.hh:122
│ │ │ +
transformed_type type
The type of the transformed tree.
Definition transformation.hh:111
│ │ │ +
static transformed_type transform(const SourceTree &s, const Transformation &t=Transformation())
Apply transformation to an existing tree s.
Definition transformation.hh:116
│ │ │ +
static transformed_storage_type transform_storage(std::shared_ptr< const SourceTree > sp, const Transformation &t=Transformation())
Definition transformation.hh:141
│ │ │ +
static transformed_storage_type transform_storage(std::shared_ptr< const SourceTree > sp, Transformation &t)
Definition transformation.hh:148
│ │ │ +
Meta function that evaluates its argument iff it inherits from meta_function.
Definition typetraits.hh:142
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,89 +1,647 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -leafnode.hh │ │ │ │ +transformation.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_LEAFNODE_HH │ │ │ │ -7#define DUNE_TYPETREE_LEAFNODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ +7#define DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ 8 │ │ │ │ -9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12 │ │ │ │ -13namespace _D_u_n_e { │ │ │ │ -14 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -15 │ │ │ │ -20 │ │ │ │ -26 │ │ │ │ -_2_7 class _L_e_a_f_N_o_d_e │ │ │ │ -28 { │ │ │ │ -29 │ │ │ │ -30 public: │ │ │ │ -31 │ │ │ │ -_3_3 static const bool _i_s_L_e_a_f = true; │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13 │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +21 │ │ │ │ +22 │ │ │ │ +23namespace _D_u_n_e { │ │ │ │ +24 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +25 │ │ │ │ +30 │ │ │ │ +31#ifdef DOXYGEN │ │ │ │ +32 │ │ │ │ 34 │ │ │ │ -_3_6 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ -37 │ │ │ │ -_3_9 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ -40 │ │ │ │ -_4_2 typedef _L_e_a_f_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ -43 │ │ │ │ -_4_4 static constexpr auto _d_e_g_r_e_e() │ │ │ │ -45 { │ │ │ │ -46 return std::integral_constant{}; │ │ │ │ -47 } │ │ │ │ -48 │ │ │ │ -49 protected: │ │ │ │ -50 │ │ │ │ -52 │ │ │ │ -_5_7 _L_e_a_f_N_o_d_e() {} │ │ │ │ -58 }; │ │ │ │ -59 │ │ │ │ -61 │ │ │ │ -62 } // namespace TypeTree │ │ │ │ -63} //namespace Dune │ │ │ │ -64 │ │ │ │ -65#endif // DUNE_TYPETREE_POWERNODE_HH │ │ │ │ +53 template │ │ │ │ +_5_4 void _r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n(SourceNode*, Transformation*, Tag*); │ │ │ │ +55 │ │ │ │ +56#else // DOXYGEN │ │ │ │ +57 │ │ │ │ +68 template │ │ │ │ +69 struct LookupNodeTransformation │ │ │ │ +70 { │ │ │ │ +71 │ │ │ │ +72 typedef decltype(_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n(_d_e_c_l_p_t_r_<_S_>(),_d_e_c_l_p_t_r_<_T_> │ │ │ │ +(),_d_e_c_l_p_t_r_<_T_a_g_>())) lookup_type; │ │ │ │ +73 │ │ │ │ +74 typedef typename _e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n< │ │ │ │ +75 lookup_type │ │ │ │ +76 >::type type; │ │ │ │ +77 │ │ │ │ +78 static_assert((!std::is_same::value), "Unable to find valid │ │ │ │ +transformation descriptor"); │ │ │ │ +79 }; │ │ │ │ +80 │ │ │ │ +81#endif // DOXYGEN │ │ │ │ +82 │ │ │ │ +83 │ │ │ │ +85 │ │ │ │ +94 template │ │ │ │ +_9_5 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +96 { │ │ │ │ +97 │ │ │ │ +98#ifndef DOXYGEN │ │ │ │ +99 │ │ │ │ +100 typedef typename │ │ │ │ +LookupNodeTransformation::type NodeTransformation; │ │ │ │ +101 │ │ │ │ +102 // the type of the new tree that will result from this transformation │ │ │ │ +103 typedef typename │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>::transformed_type transformed_type; │ │ │ │ +104 │ │ │ │ +105 // the storage type of the new tree that will result from this │ │ │ │ +transformation │ │ │ │ +106 typedef typename │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>::transformed_storage_type transformed_storage_type; │ │ │ │ +107 │ │ │ │ +108#endif // DOXYGEN │ │ │ │ +109 │ │ │ │ +_1_1_1 typedef transformed_type _t_y_p_e; │ │ │ │ +112 │ │ │ │ +_1_1_3 typedef _t_y_p_e _T_y_p_e; │ │ │ │ +114 │ │ │ │ +_1_1_6 static transformed_type _t_r_a_n_s_f_o_r_m(const SourceTree& s, const │ │ │ │ +Transformation& t = Transformation()) │ │ │ │ +117 { │ │ │ │ +118 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m(s,t); │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +_1_2_2 static transformed_type _t_r_a_n_s_f_o_r_m(const SourceTree& s, Transformation& t) │ │ │ │ +123 { │ │ │ │ +124 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m(s,t); │ │ │ │ +125 } │ │ │ │ +126 │ │ │ │ +_1_2_8 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, │ │ │ │ +const Transformation& t = Transformation()) │ │ │ │ +129 { │ │ │ │ +130 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m(sp,t); │ │ │ │ +131 } │ │ │ │ +132 │ │ │ │ +_1_3_4 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, │ │ │ │ +Transformation& t) │ │ │ │ +135 { │ │ │ │ +136 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m(sp,t); │ │ │ │ +137 } │ │ │ │ +138 │ │ │ │ +_1_4_1 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr sp, const Transformation& t = Transformation()) │ │ │ │ +142 { │ │ │ │ +143 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(sp,t); │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +_1_4_8 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr sp, Transformation& t) │ │ │ │ +149 { │ │ │ │ +150 return │ │ │ │ +_T_r_a_n_s_f_o_r_m_T_r_e_e_<_S_o_u_r_c_e_T_r_e_e_,_T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_N_o_d_e_T_a_g_<_S_o_u_r_c_e_T_r_e_e_>,NodeTransformation:: │ │ │ │ +recursive>_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(sp,t); │ │ │ │ +151 } │ │ │ │ +152 │ │ │ │ +153 │ │ │ │ +154 }; │ │ │ │ +155 │ │ │ │ +156#ifndef DOXYGEN // internal per-node implementations of the transformation │ │ │ │ +algorithm │ │ │ │ +157 │ │ │ │ +158 // handle a leaf node - this is easy │ │ │ │ +159 template │ │ │ │ +160 struct TransformTree │ │ │ │ +161 { │ │ │ │ +162 // get transformed type from specification │ │ │ │ +163 typedef typename LookupNodeTransformation>_:_:_t_y_p_e │ │ │ │ +NodeTransformation; │ │ │ │ +164 │ │ │ │ +165 typedef typename NodeTransformation::transformed_type transformed_type; │ │ │ │ +166 typedef typename NodeTransformation::transformed_storage_type │ │ │ │ +transformed_storage_type; │ │ │ │ +167 │ │ │ │ +168 // delegate instance transformation to per-node specification │ │ │ │ +169 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, T& t) │ │ │ │ +170 { │ │ │ │ +171 return NodeTransformation::transform(s,t); │ │ │ │ +172 } │ │ │ │ +173 │ │ │ │ +174 // delegate instance transformation to per-node specification │ │ │ │ +175 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, const T& t) │ │ │ │ +176 { │ │ │ │ +177 return NodeTransformation::transform(s,t); │ │ │ │ +178 } │ │ │ │ +179 │ │ │ │ +180 // delegate instance transformation to per-node specification │ │ │ │ +181 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, T& t) │ │ │ │ +182 { │ │ │ │ +183 return NodeTransformation::transform(sp,t); │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +186 // delegate instance transformation to per-node specification │ │ │ │ +187 static transformed_type _t_r_a_n_s_f_o_r_m(std::shared_ptr sp, const T& t) │ │ │ │ +188 { │ │ │ │ +189 return NodeTransformation::transform(sp,t); │ │ │ │ +190 } │ │ │ │ +191 │ │ │ │ +192 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ +sp, T& t) │ │ │ │ +193 { │ │ │ │ +194 return NodeTransformation::transform_storage(sp,t); │ │ │ │ +195 } │ │ │ │ +196 │ │ │ │ +197 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ +sp, const T& t) │ │ │ │ +198 { │ │ │ │ +199 return NodeTransformation::transform_storage(sp,t); │ │ │ │ +200 } │ │ │ │ +201 │ │ │ │ +202 }; │ │ │ │ +203 │ │ │ │ +204 │ │ │ │ +205 // common implementation for non-recursive transformation of non-leaf nodes │ │ │ │ +206 template │ │ │ │ +207 struct TransformTreeNonRecursive │ │ │ │ +208 { │ │ │ │ +209 // get transformed type from specification │ │ │ │ +210 typedef typename LookupNodeTransformation>::type │ │ │ │ +NodeTransformation; │ │ │ │ +211 │ │ │ │ +212 typedef typename NodeTransformation::transformed_type transformed_type; │ │ │ │ +213 typedef typename NodeTransformation::transformed_storage_type │ │ │ │ +transformed_storage_type; │ │ │ │ +214 │ │ │ │ +215 // delegate instance transformation to per-node specification │ │ │ │ +216 static transformed_type transform(const S& s, T& t) │ │ │ │ +217 { │ │ │ │ +218 return NodeTransformation::transform(s,t); │ │ │ │ +219 } │ │ │ │ +220 │ │ │ │ +221 // delegate instance transformation to per-node specification │ │ │ │ +222 static transformed_type transform(const S& s, const T& t) │ │ │ │ +223 { │ │ │ │ +224 return NodeTransformation::transform(s,t); │ │ │ │ +225 } │ │ │ │ +226 │ │ │ │ +227 // delegate instance transformation to per-node specification │ │ │ │ +228 static transformed_type transform(std::shared_ptr sp, T& t) │ │ │ │ +229 { │ │ │ │ +230 return NodeTransformation::transform(sp,t); │ │ │ │ +231 } │ │ │ │ +232 │ │ │ │ +233 // delegate instance transformation to per-node specification │ │ │ │ +234 static transformed_type transform(std::shared_ptr sp, const T& t) │ │ │ │ +235 { │ │ │ │ +236 return NodeTransformation::transform(sp,t); │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ +sp, T& t) │ │ │ │ +240 { │ │ │ │ +241 return NodeTransformation::transform_storage(sp,t); │ │ │ │ +242 } │ │ │ │ +243 │ │ │ │ +244 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ +sp, const T& t) │ │ │ │ +245 { │ │ │ │ +246 return NodeTransformation::transform_storage(sp,t); │ │ │ │ +247 } │ │ │ │ +248 │ │ │ │ +249 }; │ │ │ │ +250 │ │ │ │ +251 │ │ │ │ +252 namespace Impl { │ │ │ │ +253 │ │ │ │ +254 // Helper class to handle recursive power nodes │ │ │ │ +255 template │ │ │ │ +256 class RecursivePowerTransformTree │ │ │ │ +257 { │ │ │ │ +258 // We only know two types of tags! │ │ │ │ +259 static_assert(std::is_same_v or std:: │ │ │ │ +is_same_v); │ │ │ │ +260 │ │ │ │ +261 using ChildType = typename Source::ChildType; │ │ │ │ +262 │ │ │ │ +263 // in case degree is dynamic, provid a vector correctly initialized │ │ │ │ +264 template │ │ │ │ +265 static auto node_storage_provider(const std::size_t& degree) │ │ │ │ +266 { │ │ │ │ +267 return std::vector(degree); │ │ │ │ +268 } │ │ │ │ +269 │ │ │ │ +270 // in case degree is static, provid an array │ │ │ │ +271 template │ │ │ │ +272 static auto node_storage_provider(StaticIndex) │ │ │ │ +273 { │ │ │ │ +274 return std::array(); │ │ │ │ +275 } │ │ │ │ +276 │ │ │ │ +277 public: │ │ │ │ +278 // get transformed type from specification │ │ │ │ +279 // Handling this transformation in a way that makes the per-node │ │ │ │ +specification easy to write │ │ │ │ +280 // is a little involved: │ │ │ │ +281 // The problem is that the transformed power node must be parameterized on │ │ │ │ +the transformed child │ │ │ │ +282 // type. So we need to transform the child type and pass the transformed │ │ │ │ +child type to an inner │ │ │ │ +283 // template of the node transformation struct called result (see example of │ │ │ │ +such a specification │ │ │ │ +284 // further down). │ │ │ │ +285 using NodeTransformation = typename │ │ │ │ +LookupNodeTransformation>:: │ │ │ │ +type; │ │ │ │ +286 using ChildNodeTransformation = typename │ │ │ │ +LookupNodeTransformation>:: │ │ │ │ +type; │ │ │ │ +287 │ │ │ │ +288 private: │ │ │ │ +289 // Since every child is same type, is enough to get transformation once │ │ │ │ +290 using ChildTreeTransformation = TransformTree, │ │ │ │ +293 ChildNodeTransformation::recursive>; │ │ │ │ +294 │ │ │ │ +295 // Get transformed type of children │ │ │ │ +296 using transformed_child_type = typename ChildTreeTransformation:: │ │ │ │ +transformed_type; │ │ │ │ +297 using transformed_child_storage_type = typename ChildTreeTransformation:: │ │ │ │ +transformed_storage_type; │ │ │ │ +298 public: │ │ │ │ +299 // Apply transformation from children to current node │ │ │ │ +300 using transformed_type = typename NodeTransformation::template │ │ │ │ +result::type; │ │ │ │ +301 using transformed_storage_type = typename NodeTransformation::template │ │ │ │ +result::storage_type; │ │ │ │ +302 │ │ │ │ +303 // Transform an instance of source tree. │ │ │ │ +304 static transformed_type transform(const Source& source, Transformation& │ │ │ │ +transformation) │ │ │ │ +305 { │ │ │ │ +306 auto children_storage = node_storage_provider>(source.degree()); │ │ │ │ +307 for (std::size_t k = 0; k < source.degree(); ++k) { │ │ │ │ +308 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source.childStorage(k),transformation); │ │ │ │ +309 } │ │ │ │ +310 return NodeTransformation::transform │ │ │ │ +(source,transformation,children_storage); │ │ │ │ +311 } │ │ │ │ +312 │ │ │ │ +313 // Transform an instance of source tree. │ │ │ │ +314 static transformed_type transform(const Source& source, const │ │ │ │ +Transformation& transformation) │ │ │ │ +315 { │ │ │ │ +316 auto children_storage = node_storage_provider>(source.degree()); │ │ │ │ +317 for (std::size_t k = 0; k < source.degree(); ++k) { │ │ │ │ +318 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source.childStorage(k),transformation); │ │ │ │ +319 } │ │ │ │ +320 return NodeTransformation::transform │ │ │ │ +(source,transformation,children_storage); │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ +323 // Transform an instance of source tree. │ │ │ │ +324 static transformed_type transform(std::shared_ptr source_ptr, │ │ │ │ +Transformation& transformation) │ │ │ │ +325 { │ │ │ │ +326 auto children_storage = node_storage_provider>(source_ptr->degree()); │ │ │ │ +327 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ +328 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source_ptr->childStorage(k),transformation); │ │ │ │ +329 } │ │ │ │ +330 return NodeTransformation::transform │ │ │ │ +(source_ptr,transformation,children_storage); │ │ │ │ +331 } │ │ │ │ +332 │ │ │ │ +333 // Transform an instance of source tree. │ │ │ │ +334 static transformed_type transform(std::shared_ptr source_ptr, │ │ │ │ +const Transformation& transformation) │ │ │ │ +335 { │ │ │ │ +336 auto children_storage = node_storage_provider>(source_ptr->degree()); │ │ │ │ +337 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ +338 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source_ptr->childStorage(k),transformation); │ │ │ │ +339 } │ │ │ │ +340 return NodeTransformation::transform │ │ │ │ +(source_ptr,transformation,children_storage); │ │ │ │ +341 } │ │ │ │ +342 │ │ │ │ +343 // Transform an instance of source tree ptr. │ │ │ │ +344 static transformed_storage_type transform_storage(std::shared_ptr source_ptr, Transformation& transformation) │ │ │ │ +345 { │ │ │ │ +346 auto children_storage = │ │ │ │ +node_storage_provider(source_ptr->degree()); │ │ │ │ +347 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ +348 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source_ptr->childStorage(k),transformation); │ │ │ │ +349 } │ │ │ │ +350 return NodeTransformation::transform_storage │ │ │ │ +(source_ptr,transformation,children_storage); │ │ │ │ +351 } │ │ │ │ +352 │ │ │ │ +353 // Transform an instance of source tree ptr. │ │ │ │ +354 static transformed_storage_type transform_storage(std::shared_ptr source_ptr, const Transformation& transformation) │ │ │ │ +355 { │ │ │ │ +356 auto children_storage = │ │ │ │ +node_storage_provider(source_ptr->degree()); │ │ │ │ +357 for (std::size_t k = 0; k < source_ptr->degree(); ++k) { │ │ │ │ +358 children_storage[k] = ChildTreeTransformation::transform_storage │ │ │ │ +(source_ptr->childStorage(k),transformation); │ │ │ │ +359 } │ │ │ │ +360 return NodeTransformation::transform_storage │ │ │ │ +(source_ptr,transformation,children_storage); │ │ │ │ +361 } │ │ │ │ +362 │ │ │ │ +363 }; │ │ │ │ +364 } // namespace Impl │ │ │ │ +365 │ │ │ │ +366 // Recursive version of the PowerNode transformation for static nodes. │ │ │ │ +367 template │ │ │ │ +368 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +369 : public Impl:: │ │ │ │ +RecursivePowerTransformTree │ │ │ │ +370 {}; │ │ │ │ +371 │ │ │ │ +372 // Recursive version of the DynamicPowerNode transformation for static │ │ │ │ +nodes. │ │ │ │ +373 template │ │ │ │ +374 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +375 : public Impl:: │ │ │ │ +RecursivePowerTransformTree │ │ │ │ +376 {}; │ │ │ │ +377 │ │ │ │ +378 // non-recursive version of the PowerNode transformation. │ │ │ │ +379 template │ │ │ │ +380 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +381 : public TransformTreeNonRecursive │ │ │ │ +382 {}; │ │ │ │ +383 │ │ │ │ +384 // non-recursive version of the DynamicPowerNodeTag transformation. │ │ │ │ +385 template │ │ │ │ +386 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +387 : public TransformTreeNonRecursive │ │ │ │ +388 {}; │ │ │ │ +389 │ │ │ │ +390 // helper struct that does the actual transformation for a composite node. │ │ │ │ +We need this additional struct │ │ │ │ +391 // to extract the template argument list with the types of all children │ │ │ │ +from the node, which we cannot do │ │ │ │ +392 // directly in the transformation<> template, as the type passed to │ │ │ │ +transformation<> will usually be a │ │ │ │ +393 // derived type and will normally have more template arguments than just │ │ │ │ +the children. This declaration │ │ │ │ +394 // just introduces the type of the helper struct, we always instantiate the │ │ │ │ +specialization defined below; │ │ │ │ +395 template │ │ │ │ +396 struct transform_composite_node; │ │ │ │ +397 │ │ │ │ +398 // specialized version of the helper struct which extracts the template │ │ │ │ +argument list with the children from │ │ │ │ +399 // its second template parameter, which has to be CompositeNode:: │ │ │ │ +ChildTypes. Apart from that, the struct is │ │ │ │ +400 // similar to the one for a PowerNode, but it obviously delegates │ │ │ │ +transformation of the children to the TMP. │ │ │ │ +401 template │ │ │ │ +402 struct transform_composite_node,T> │ │ │ │ +403 { │ │ │ │ +404 │ │ │ │ +405 // transformed type, using the same nested struct trick as the PowerNode │ │ │ │ +406 typedef ImplementationTag Tag; │ │ │ │ +407 typedef typename LookupNodeTransformation::type │ │ │ │ +NodeTransformation; │ │ │ │ +408 typedef typename NodeTransformation::template result, │ │ │ │ +411 LookupNodeTransformation>::type::recursive │ │ │ │ +412 >::transformed_type... │ │ │ │ +413 >::type transformed_type; │ │ │ │ +414 │ │ │ │ +415 typedef typename NodeTransformation::template result, │ │ │ │ +418 LookupNodeTransformation>::type::recursive │ │ │ │ +419 >::transformed_type... │ │ │ │ +420 >::storage_type transformed_storage_type; │ │ │ │ +421 │ │ │ │ +422 // Retrieve the transformation descriptor for the child with index i. │ │ │ │ +423 // This little helper improves really improves the readability of the │ │ │ │ +424 // transformation functions. │ │ │ │ +425 template │ │ │ │ +426 struct ChildTransformation │ │ │ │ +427 : public TransformTree::Type, │ │ │ │ +428 T, │ │ │ │ +429 NodeTag::Type>, │ │ │ │ +430 LookupNodeTransformation< │ │ │ │ +431 typename S::template Child::Type, │ │ │ │ +432 T, │ │ │ │ +433 ImplementationTag::Type> │ │ │ │ +434 >::type::recursive │ │ │ │ +435 > │ │ │ │ +436 {}; │ │ │ │ +437 │ │ │ │ +438 template │ │ │ │ +439 static void setElement(Tuple& tuple, Value&& value) │ │ │ │ +440 { │ │ │ │ +441 std::get(tuple) = std::forward(value); │ │ │ │ +442 } │ │ │ │ +443 │ │ │ │ +444 template │ │ │ │ +445 static transformed_type transform(const S& s, Trafo&& t, std:: │ │ │ │ +index_sequence indices) │ │ │ │ +446 { │ │ │ │ +447 std::tuple::transformed_storage_type...> │ │ │ │ +storage; │ │ │ │ +448 Dune::Hybrid::Impl::evaluateFoldExpression({(setElement(storage, │ │ │ │ +ChildTransformation::transform_storage(s.template childStorage(), std:: │ │ │ │ +forward(t))),0)...}); │ │ │ │ +449 return NodeTransformation::transform(s, std::forward(t), std::get │ │ │ │ +(storage)...); │ │ │ │ +450 } │ │ │ │ +451 │ │ │ │ +452 template │ │ │ │ +453 static transformed_storage_type transform_storage(std::shared_ptr │ │ │ │ +sp, Trafo&& t, std::index_sequence indices) │ │ │ │ +454 { │ │ │ │ +455 std::tuple::transformed_storage_type...> │ │ │ │ +storage; │ │ │ │ +456 Dune::Hybrid::Impl::evaluateFoldExpression({(setElement(storage, │ │ │ │ +ChildTransformation::transform_storage(sp->template childStorage(), std:: │ │ │ │ +forward(t))),0)...}); │ │ │ │ +457 return NodeTransformation::transform_storage(sp, std::forward(t), │ │ │ │ +std::get(storage)...); │ │ │ │ +458 } │ │ │ │ +459 }; │ │ │ │ +460 │ │ │ │ +461 │ │ │ │ +462 // the specialization of transformation<> for the CompositeNode. This just │ │ │ │ +extracts the │ │ │ │ +463 // CompositeNode::ChildTypes member and forwards to the helper struct │ │ │ │ +464 template │ │ │ │ +465 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +466 { │ │ │ │ +467 │ │ │ │ +468 private: │ │ │ │ +469 │ │ │ │ +470 typedef typename S::ChildTypes ChildTypes; │ │ │ │ +471 │ │ │ │ +472 static auto child_indices() │ │ │ │ +473 { │ │ │ │ +474 return std::make_index_sequence(); │ │ │ │ +475 } │ │ │ │ +476 │ │ │ │ +477 public: │ │ │ │ +478 │ │ │ │ +479 typedef typename transform_composite_node::transformed_type │ │ │ │ +transformed_type; │ │ │ │ +480 typedef typename transform_composite_node:: │ │ │ │ +transformed_storage_type transformed_storage_type; │ │ │ │ +481 │ │ │ │ +482 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, T& t) │ │ │ │ +483 { │ │ │ │ +484 return transform_composite_node::transform │ │ │ │ +(s,t,child_indices()); │ │ │ │ +485 } │ │ │ │ +486 │ │ │ │ +487 static transformed_type _t_r_a_n_s_f_o_r_m(const S& s, const T& t) │ │ │ │ +488 { │ │ │ │ +489 return transform_composite_node::transform │ │ │ │ +(s,t,child_indices()); │ │ │ │ +490 } │ │ │ │ +491 │ │ │ │ +492 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ +sp, T& t) │ │ │ │ +493 { │ │ │ │ +494 return transform_composite_node::transform_storage │ │ │ │ +(sp,t,child_indices()); │ │ │ │ +495 } │ │ │ │ +496 │ │ │ │ +497 static transformed_storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr │ │ │ │ +sp, const T& t) │ │ │ │ +498 { │ │ │ │ +499 return transform_composite_node::transform_storage │ │ │ │ +(sp,t,child_indices()); │ │ │ │ +500 } │ │ │ │ +501 │ │ │ │ +502 }; │ │ │ │ +503 │ │ │ │ +504 // non-recursive version of the CompositeNode transformation. │ │ │ │ +505 template │ │ │ │ +506 struct _T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +507 : public TransformTreeNonRecursive │ │ │ │ +508 {}; │ │ │ │ +509 │ │ │ │ +510#endif // DOXYGEN │ │ │ │ +511 │ │ │ │ +513 │ │ │ │ +514 } // namespace TypeTree │ │ │ │ +515} //namespace Dune │ │ │ │ +516 │ │ │ │ +517#endif // DUNE_TYPETREE_TRANSFORMATION_HH │ │ │ │ _n_o_d_e_t_a_g_s_._h_h │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_u_t_i_l_i_t_y_._h_h │ │ │ │ +_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_g_i_s_t_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +void registerNodeTransformation(SourceNode *, Transformation *, Tag *) │ │ │ │ +Register transformation descriptor to transform SourceNode with Transformation. │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ -LeafNodeTag NodeTag │ │ │ │ -The type tag that describes a LeafNode. │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:42 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -Mark this class as a leaf in a dune-typetree. │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:33 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -Mark this class as a non power in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:36 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_L_e_a_f_N_o_d_e │ │ │ │ -LeafNode() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:57 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ -static const bool isComposite │ │ │ │ -Mark this class as a non composite in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:39 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -static constexpr auto degree() │ │ │ │ -DDeeffiinniittiioonn leafnode.hh:44 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_L_e_a_f_N_o_d_e_T_a_g │ │ │ │ -Tag designating a leaf node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:18 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r │ │ │ │ +T * declptr() │ │ │ │ +Helper function for generating a pointer to a value of type T in an unevaluated │ │ │ │ +operand setting. │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:21 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ +Tag designating a power node with runtime degree. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ +Tag designating a composite node. │ │ │ │ +DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e │ │ │ │ +Transform a TypeTree. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:96 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_T_y_p_e │ │ │ │ +type Type │ │ │ │ +DDeeffiinniittiioonn transformation.hh:113 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(std::shared_ptr< const SourceTree > sp, │ │ │ │ +Transformation &t) │ │ │ │ +Apply transformation to an existing tree s. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:134 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(std::shared_ptr< const SourceTree > sp, const │ │ │ │ +Transformation &t=Transformation()) │ │ │ │ +Apply transformation to an existing tree s. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:128 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(const SourceTree &s, Transformation &t) │ │ │ │ +Apply transformation to an existing tree s. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:122 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_y_p_e │ │ │ │ +transformed_type type │ │ │ │ +The type of the transformed tree. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:111 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(const SourceTree &s, const Transformation │ │ │ │ +&t=Transformation()) │ │ │ │ +Apply transformation to an existing tree s. │ │ │ │ +DDeeffiinniittiioonn transformation.hh:116 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceTree > sp, const Transformation &t=Transformation()) │ │ │ │ +DDeeffiinniittiioonn transformation.hh:141 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_a_n_s_f_o_r_m_T_r_e_e_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceTree > sp, Transformation &t) │ │ │ │ +DDeeffiinniittiioonn transformation.hh:148 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ +Meta function that evaluates its argument iff it inherits from meta_function. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:142 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00062.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: generictransformationdescriptors.hh File Reference │ │ │ +dune-typetree: fixedcapacitystack.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,39 +74,26 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
generictransformationdescriptors.hh File Reference
│ │ │ +
fixedcapacitystack.hh File Reference
│ │ │
│ │ │
│ │ │
#include <array>
│ │ │ -#include <memory>
│ │ │ -#include <vector>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/powercompositenodetransformationtemplates.hh>
│ │ │ -#include <dune/common/exceptions.hh>
│ │ │ +#include <cassert>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::GenericLeafNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >
struct  Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC >
struct  Dune::TypeTree::GenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >
class  Dune::TypeTree::FixedCapacityStackView< T >
class  Dune::TypeTree::FixedCapacityStack< T, capacity >
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,42 +1,19 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -generictransformationdescriptors.hh File Reference │ │ │ │ +fixedcapacitystack.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h> │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_< │ │ │ │ - _S_o_u_r_c_e_N_o_d_e_,_ _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_T_e_m_p_l_a_t_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ - _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_<_ _T_ _> │ │ │ │ +class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_<_ _T_,_ _c_a_p_a_c_i_t_y_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00062_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: generictransformationdescriptors.hh Source File │ │ │ +dune-typetree: fixedcapacitystack.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,291 +71,216 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
generictransformationdescriptors.hh
│ │ │ +
fixedcapacitystack.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=8 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │ -
7#define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │ +
7#define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │
8
│ │ │
9#include <array>
│ │ │ -
10#include <memory>
│ │ │ -
11#include <vector>
│ │ │ -
12
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
16#include <dune/common/exceptions.hh>
│ │ │ -
17
│ │ │ -
18
│ │ │ -
19namespace Dune {
│ │ │ -
20 namespace TypeTree {
│ │ │ -
21
│ │ │ -
26
│ │ │ -
27 template<typename SourceNode, typename Transformation, typename TransformedNode>
│ │ │ -
│ │ │ - │ │ │ -
29 {
│ │ │ -
30
│ │ │ -
31 static const bool recursive = false;
│ │ │ -
32
│ │ │ -
33 typedef TransformedNode transformed_type;
│ │ │ -
34 typedef std::shared_ptr<transformed_type> transformed_storage_type;
│ │ │ -
35
│ │ │ -
│ │ │ -
36 static transformed_type transform(const SourceNode& s, const Transformation& t)
│ │ │ -
37 {
│ │ │ -
38 return transformed_type(s,t);
│ │ │ -
39 }
│ │ │ -
│ │ │ -
40
│ │ │ -
│ │ │ -
41 static transformed_type transform(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │ -
42 {
│ │ │ -
43 return transformed_type(s,t);
│ │ │ -
44 }
│ │ │ +
10#include <cassert>
│ │ │ +
11
│ │ │ +
12namespace Dune {
│ │ │ +
13 namespace TypeTree {
│ │ │ +
14
│ │ │ +
15
│ │ │ +
19
│ │ │ +
20 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
22 {
│ │ │ +
23
│ │ │ +
24 public:
│ │ │ +
25
│ │ │ +
26 struct Impl
│ │ │ +
27 {
│ │ │ +
28
│ │ │ +
29 Impl(T* data, std::size_t capacity)
│ │ │ +
30 : _data(data)
│ │ │ +
31 , _size(0)
│ │ │ +
32 , _capacity(capacity)
│ │ │ +
33 {}
│ │ │ +
34
│ │ │ +
35 T * const _data;
│ │ │ +
36 std::size_t _size;
│ │ │ +
37 const std::size_t _capacity;
│ │ │ +
38 };
│ │ │ +
39
│ │ │ +
│ │ │ + │ │ │ +
41 : _impl(impl)
│ │ │ +
42 {}
│ │ │
│ │ │ +
43
│ │ │ +
44 public:
│ │ │
45
│ │ │
│ │ │ -
46 static transformed_storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │ -
47 {
│ │ │ -
48 return std::make_shared<transformed_type>(s,t);
│ │ │ +
46 std::size_t size() const
│ │ │ +
47 {
│ │ │ +
48 return _impl._size;
│ │ │
49 }
│ │ │
│ │ │
50
│ │ │ -
51 };
│ │ │ -
│ │ │ -
52
│ │ │ -
53
│ │ │ -
54 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNodeTemplate>
│ │ │ -
│ │ │ - │ │ │ -
56 {
│ │ │ -
57
│ │ │ -
58 static const bool recursive = true;
│ │ │ -
59
│ │ │ -
60 template<typename TC>
│ │ │ -
│ │ │ -
61 struct result
│ │ │ -
62 {
│ │ │ -
63 typedef typename TransformedNodeTemplate<TC>::type type;
│ │ │ -
64 typedef std::shared_ptr<type> storage_type;
│ │ │ -
65 static const std::size_t degree = StaticDegree<type>::value;
│ │ │ -
66 };
│ │ │ -
│ │ │ -
67
│ │ │ -
68 template<typename TC>
│ │ │ -
│ │ │ -
69 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ -
70 {
│ │ │ -
71 return typename result<TC>::type(s,t,children);
│ │ │ -
72 }
│ │ │ -
│ │ │ -
73
│ │ │ -
74 template<typename TC>
│ │ │ -
│ │ │ -
75 static typename result<TC>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ -
76 {
│ │ │ -
77 return typename result<TC>::type(s,t,children);
│ │ │ -
78 }
│ │ │ -
│ │ │ -
79
│ │ │ -
80 template<typename TC>
│ │ │ -
│ │ │ -
81 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ -
82 {
│ │ │ -
83 return std::make_shared<typename result<TC>::type>(s,t,children);
│ │ │ -
84 }
│ │ │ -
│ │ │ -
85
│ │ │ -
86 };
│ │ │ -
│ │ │ -
87
│ │ │ -
88
│ │ │ -
89 template<typename SourceNode, typename Transformation, template<typename,typename,std::size_t> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
92 Transformation,
│ │ │ -
93 GenericPowerNodeTransformationTemplate<SourceNode,
│ │ │ -
94 Transformation,
│ │ │ -
95 TransformedNode>::template result
│ │ │ -
96 >
│ │ │ -
97 {};
│ │ │ -
│ │ │ -
98
│ │ │ -
99
│ │ │ -
100 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNodeTemplate>
│ │ │ -
│ │ │ - │ │ │ -
102 {
│ │ │ -
103
│ │ │ -
104 static const bool recursive = true;
│ │ │ -
105
│ │ │ -
106 template<typename TC>
│ │ │ -
│ │ │ -
107 struct result
│ │ │ -
108 {
│ │ │ -
109 typedef typename TransformedNodeTemplate<TC>::type type;
│ │ │ -
110 typedef std::shared_ptr<type> storage_type;
│ │ │ -
111 };
│ │ │ -
│ │ │ -
112
│ │ │ -
113 template<typename TC>
│ │ │ -
│ │ │ -
114 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ -
115 {
│ │ │ -
116 return typename result<TC>::type(s,t,children);
│ │ │ -
117 }
│ │ │ +
│ │ │ +
51 std::size_t capacity() const
│ │ │ +
52 {
│ │ │ +
53 return _impl._capacity;
│ │ │ +
54 }
│ │ │ +
│ │ │ +
55
│ │ │ +
│ │ │ +
56 bool empty() const
│ │ │ +
57 {
│ │ │ +
58 return _impl._size == 0;
│ │ │ +
59 }
│ │ │ +
│ │ │ +
60
│ │ │ +
│ │ │ +
61 bool full() const
│ │ │ +
62 {
│ │ │ +
63 return _impl._size == _impl._capacity;
│ │ │ +
64 }
│ │ │ +
│ │ │ +
65
│ │ │ +
│ │ │ +
66 void push_back(const T& t)
│ │ │ +
67 {
│ │ │ +
68 assert(!full());
│ │ │ +
69 _impl._data[_impl._size++] = t;
│ │ │ +
70 }
│ │ │ +
│ │ │ +
71
│ │ │ +
│ │ │ +
72 void pop_back()
│ │ │ +
73 {
│ │ │ +
74 assert(!empty());
│ │ │ +
75 --_impl._size;
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
│ │ │ +
78 T& back()
│ │ │ +
79 {
│ │ │ +
80 assert(!empty());
│ │ │ +
81 return _impl._data[_impl._size-1];
│ │ │ +
82 }
│ │ │ +
│ │ │ +
83
│ │ │ +
│ │ │ +
84 const T& back() const
│ │ │ +
85 {
│ │ │ +
86 assert(!empty());
│ │ │ +
87 return _impl._data[_impl._size-1];
│ │ │ +
88 }
│ │ │ +
│ │ │ +
89
│ │ │ +
│ │ │ +
90 T& front()
│ │ │ +
91 {
│ │ │ +
92 assert(!empty());
│ │ │ +
93 return _impl._data[0];
│ │ │ +
94 }
│ │ │ +
│ │ │ +
95
│ │ │ +
│ │ │ +
96 const T& front() const
│ │ │ +
97 {
│ │ │ +
98 assert(!empty());
│ │ │ +
99 return _impl._data[0];
│ │ │ +
100 }
│ │ │ +
│ │ │ +
101
│ │ │ +
│ │ │ +
102 T& operator[](std::size_t k)
│ │ │ +
103 {
│ │ │ +
104 assert(k < _impl._size);
│ │ │ +
105 return _impl._data[k];
│ │ │ +
106 }
│ │ │ +
│ │ │ +
107
│ │ │ +
│ │ │ +
108 const T& operator[](std::size_t k) const
│ │ │ +
109 {
│ │ │ +
110 assert(k < _impl._size);
│ │ │ +
111 return _impl._data[k];
│ │ │ +
112 }
│ │ │ +
│ │ │ +
113
│ │ │ +
114 private:
│ │ │ +
115 Impl& _impl;
│ │ │ +
116
│ │ │ +
117 };
│ │ │
│ │ │
118
│ │ │ -
119 template<typename TC>
│ │ │ -
│ │ │ -
120 static typename result<TC>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ -
121 {
│ │ │ -
122 return typename result<TC>::type(s,t,children);
│ │ │ -
123 }
│ │ │ -
│ │ │ -
124
│ │ │ -
125 template<typename TC>
│ │ │ -
│ │ │ -
126 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ -
127 {
│ │ │ -
128 return std::make_shared<typename result<TC>::type>(s,t,children);
│ │ │ -
129 }
│ │ │ -
│ │ │ +
119
│ │ │ +
120 template<typename T, std::size_t capacity>
│ │ │ +
│ │ │ + │ │ │ +
122 : private std::array<T,capacity>
│ │ │ +
123 , private FixedCapacityStackView<T>::Impl
│ │ │ +
124 , public FixedCapacityStackView<T>
│ │ │ +
125 {
│ │ │ +
126
│ │ │ +
127 typedef FixedCapacityStackView<T> view_base;
│ │ │ +
128
│ │ │ +
129 public:
│ │ │
130
│ │ │ -
131 };
│ │ │ -
│ │ │ -
132
│ │ │ -
133
│ │ │ -
134 template<typename SourceNode, typename Transformation, template<typename,typename> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
137 Transformation,
│ │ │ -
138 GenericDynamicPowerNodeTransformationTemplate<SourceNode,
│ │ │ -
139 Transformation,
│ │ │ -
140 TransformedNode>::template result
│ │ │ -
141 >
│ │ │ -
142 {};
│ │ │ -
│ │ │ -
143
│ │ │ -
144
│ │ │ -
145 template<typename SourceNode, typename Transformation, template<typename...> class TransformedNodeTemplate>
│ │ │ -
│ │ │ - │ │ │ -
147 {
│ │ │ -
148
│ │ │ -
149 static const bool recursive = true;
│ │ │ -
150
│ │ │ -
151 template<typename... TC>
│ │ │ -
│ │ │ -
152 struct result
│ │ │ -
153 {
│ │ │ -
154 typedef typename TransformedNodeTemplate<TC...>::type type;
│ │ │ -
155 typedef std::shared_ptr<type> storage_type;
│ │ │ -
156 };
│ │ │ -
│ │ │ -
157
│ │ │ -
158 template<typename... TC>
│ │ │ -
│ │ │ -
159 static typename result<TC...>::type transform(const SourceNode& s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ -
160 {
│ │ │ -
161 return typename result<TC...>::type(s,t,children...);
│ │ │ -
162 }
│ │ │ -
│ │ │ -
163
│ │ │ -
164 template<typename... TC>
│ │ │ -
│ │ │ -
165 static typename result<TC...>::type transform(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ -
166 {
│ │ │ -
167 return typename result<TC...>::type(s,t,children...);
│ │ │ -
168 }
│ │ │ -
│ │ │ -
169
│ │ │ -
170 template<typename... TC>
│ │ │ -
│ │ │ -
171 static typename result<TC...>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ -
172 {
│ │ │ -
173 return std::make_shared<typename result<TC...>::type>(s,t,children...);
│ │ │ -
174 }
│ │ │ -
│ │ │ -
175
│ │ │ -
176 };
│ │ │ -
│ │ │ -
177
│ │ │ -
178
│ │ │ -
179 template<typename SourceNode, typename Transformation, template<typename,typename...> class TransformedNode>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
182 Transformation,
│ │ │ -
183 GenericCompositeNodeTransformationTemplate<SourceNode,
│ │ │ -
184 Transformation,
│ │ │ -
185 TransformedNode>::template result
│ │ │ -
186 >
│ │ │ -
187 {};
│ │ │ -
│ │ │ -
188
│ │ │ -
190
│ │ │ -
191 } // namespace TypeTree
│ │ │ -
192} //namespace Dune
│ │ │ -
193
│ │ │ -
194#endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │ +
131 using view_base::back;
│ │ │ +
132 using view_base::front;
│ │ │ +
133 using view_base::size;
│ │ │ +
134 using view_base::operator[];
│ │ │ +
135
│ │ │ +
│ │ │ + │ │ │ +
137 : FixedCapacityStackView<T>::Impl(&(static_cast<std::array<T,capacity>&>(*this)[0]),capacity)
│ │ │ +
138 , FixedCapacityStackView<T>(static_cast<typename FixedCapacityStackView<T>::Impl&>(*this))
│ │ │ +
139 {}
│ │ │ +
│ │ │ +
140
│ │ │ +
141 private:
│ │ │ +
142
│ │ │ +
143 //FixedCapacityStack(const FixedCapacityStack&);
│ │ │ +
144 FixedCapacityStack& operator=(const FixedCapacityStack&);
│ │ │ +
145
│ │ │ +
146 };
│ │ │ +
│ │ │ +
147
│ │ │ +
149
│ │ │ +
150 } // namespace TypeTree
│ │ │ +
151} //namespace Dune
│ │ │ +
152
│ │ │ +
153#endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition generictransformationdescriptors.hh:29
│ │ │ -
TransformedNode transformed_type
Definition generictransformationdescriptors.hh:33
│ │ │ -
std::shared_ptr< transformed_type > transformed_storage_type
Definition generictransformationdescriptors.hh:34
│ │ │ -
static transformed_type transform(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:41
│ │ │ -
static const bool recursive
Definition generictransformationdescriptors.hh:31
│ │ │ -
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:46
│ │ │ -
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition generictransformationdescriptors.hh:36
│ │ │ -
Definition generictransformationdescriptors.hh:56
│ │ │ -
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:81
│ │ │ -
static const bool recursive
Definition generictransformationdescriptors.hh:58
│ │ │ -
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:75
│ │ │ -
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:69
│ │ │ -
Definition generictransformationdescriptors.hh:62
│ │ │ -
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:63
│ │ │ -
static const std::size_t degree
Definition generictransformationdescriptors.hh:65
│ │ │ -
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:64
│ │ │ -
Definition generictransformationdescriptors.hh:97
│ │ │ -
Definition generictransformationdescriptors.hh:102
│ │ │ -
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:120
│ │ │ -
static const bool recursive
Definition generictransformationdescriptors.hh:104
│ │ │ -
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:114
│ │ │ -
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:126
│ │ │ -
Definition generictransformationdescriptors.hh:108
│ │ │ -
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:109
│ │ │ -
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:110
│ │ │ -
Definition generictransformationdescriptors.hh:142
│ │ │ -
Definition generictransformationdescriptors.hh:147
│ │ │ -
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:159
│ │ │ -
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:171
│ │ │ -
static result< TC... >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:165
│ │ │ -
static const bool recursive
Definition generictransformationdescriptors.hh:149
│ │ │ -
Definition generictransformationdescriptors.hh:153
│ │ │ -
TransformedNodeTemplate< TC... >::type type
Definition generictransformationdescriptors.hh:154
│ │ │ -
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:155
│ │ │ -
Definition generictransformationdescriptors.hh:187
│ │ │ +
Definition typetraits.hh:150
│ │ │ +
bool empty() const
Definition fixedcapacitystack.hh:56
│ │ │ +
bool full() const
Definition fixedcapacitystack.hh:61
│ │ │ +
T & operator[](std::size_t k)
Definition fixedcapacitystack.hh:102
│ │ │ +
void pop_back()
Definition fixedcapacitystack.hh:72
│ │ │ +
T & back()
Definition fixedcapacitystack.hh:78
│ │ │ +
std::size_t capacity() const
Definition fixedcapacitystack.hh:51
│ │ │ +
T & front()
Definition fixedcapacitystack.hh:90
│ │ │ +
const T & front() const
Definition fixedcapacitystack.hh:96
│ │ │ +
const T & operator[](std::size_t k) const
Definition fixedcapacitystack.hh:108
│ │ │ +
void push_back(const T &t)
Definition fixedcapacitystack.hh:66
│ │ │ +
const T & back() const
Definition fixedcapacitystack.hh:84
│ │ │ +
std::size_t size() const
Definition fixedcapacitystack.hh:46
│ │ │ +
FixedCapacityStackView(Impl &impl)
Definition fixedcapacitystack.hh:40
│ │ │ +
Definition fixedcapacitystack.hh:125
│ │ │ +
FixedCapacityStack()
Definition fixedcapacitystack.hh:136
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,351 +1,213 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -generictransformationdescriptors.hh │ │ │ │ +fixedcapacitystack.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ -7#define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ +7#define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ 8 │ │ │ │ 9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12 │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h> │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18 │ │ │ │ -19namespace _D_u_n_e { │ │ │ │ -20 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -21 │ │ │ │ -26 │ │ │ │ -27 template │ │ │ │ -_2_8 struct _G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -29 { │ │ │ │ -30 │ │ │ │ -_3_1 static const bool _r_e_c_u_r_s_i_v_e = false; │ │ │ │ -32 │ │ │ │ -_3_3 typedef TransformedNode _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e; │ │ │ │ -_3_4 typedef std::shared_ptr _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -35 │ │ │ │ -_3_6 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const Transformation& │ │ │ │ -t) │ │ │ │ -37 { │ │ │ │ -38 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(s,t); │ │ │ │ -39 } │ │ │ │ -40 │ │ │ │ -_4_1 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const │ │ │ │ -Transformation& t) │ │ │ │ -42 { │ │ │ │ -43 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(s,t); │ │ │ │ -44 } │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ +13 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +14 │ │ │ │ +15 │ │ │ │ +19 │ │ │ │ +20 template │ │ │ │ +_2_1 class _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ +22 { │ │ │ │ +23 │ │ │ │ +24 public: │ │ │ │ +25 │ │ │ │ +26 struct Impl │ │ │ │ +27 { │ │ │ │ +28 │ │ │ │ +29 Impl(T* data, std::size_t _c_a_p_a_c_i_t_y) │ │ │ │ +30 : _data(data) │ │ │ │ +31 , _size(0) │ │ │ │ +32 , _capacity(_c_a_p_a_c_i_t_y) │ │ │ │ +33 {} │ │ │ │ +34 │ │ │ │ +35 T * const _data; │ │ │ │ +36 std::size_t _size; │ │ │ │ +37 const std::size_t _capacity; │ │ │ │ +38 }; │ │ │ │ +39 │ │ │ │ +_4_0 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w(Impl& _i_m_p_l) │ │ │ │ +41 : _impl(_i_m_p_l) │ │ │ │ +42 {} │ │ │ │ +43 │ │ │ │ +44 public: │ │ │ │ 45 │ │ │ │ -_4_6 static _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr s, const Transformation& t) │ │ │ │ +_4_6 std::size_t _s_i_z_e() const │ │ │ │ 47 { │ │ │ │ -48 return std::make_shared(s,t); │ │ │ │ +48 return _impl._size; │ │ │ │ 49 } │ │ │ │ 50 │ │ │ │ -51 }; │ │ │ │ -52 │ │ │ │ -53 │ │ │ │ -54 template class TransformedNodeTemplate> │ │ │ │ -_5_5 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -56 { │ │ │ │ -57 │ │ │ │ -_5_8 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -59 │ │ │ │ -60 template │ │ │ │ -_6_1 struct _r_e_s_u_l_t │ │ │ │ +_5_1 std::size_t _c_a_p_a_c_i_t_y() const │ │ │ │ +52 { │ │ │ │ +53 return _impl._capacity; │ │ │ │ +54 } │ │ │ │ +55 │ │ │ │ +_5_6 bool _e_m_p_t_y() const │ │ │ │ +57 { │ │ │ │ +58 return _impl._size == 0; │ │ │ │ +59 } │ │ │ │ +60 │ │ │ │ +_6_1 bool _f_u_l_l() const │ │ │ │ 62 { │ │ │ │ -_6_3 typedef typename TransformedNodeTemplate::type _t_y_p_e; │ │ │ │ -_6_4 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -_6_5 static const std::size_t _d_e_g_r_e_e = _S_t_a_t_i_c_D_e_g_r_e_e_<_t_y_p_e_>_:_:_v_a_l_u_e; │ │ │ │ -66 }; │ │ │ │ -67 │ │ │ │ -68 template │ │ │ │ -_6_9 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& │ │ │ │ -children) │ │ │ │ -70 { │ │ │ │ -71 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ -72 } │ │ │ │ -73 │ │ │ │ -74 template │ │ │ │ -_7_5 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr │ │ │ │ -s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_: │ │ │ │ -_d_e_g_r_e_e>& children) │ │ │ │ -76 { │ │ │ │ -77 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ -78 } │ │ │ │ -79 │ │ │ │ -80 template │ │ │ │ -_8_1 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& children) │ │ │ │ -82 { │ │ │ │ -83 return std::make_shared::type>(s,t,children); │ │ │ │ -84 } │ │ │ │ -85 │ │ │ │ -86 }; │ │ │ │ -87 │ │ │ │ -88 │ │ │ │ -89 template class TransformedNode> │ │ │ │ -_9_0 struct _G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -91 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ -96 > │ │ │ │ -97 {}; │ │ │ │ -98 │ │ │ │ -99 │ │ │ │ -100 template class TransformedNodeTemplate> │ │ │ │ -_1_0_1 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -102 { │ │ │ │ -103 │ │ │ │ -_1_0_4 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -105 │ │ │ │ -106 template │ │ │ │ -_1_0_7 struct _r_e_s_u_l_t │ │ │ │ -108 { │ │ │ │ -_1_0_9 typedef typename TransformedNodeTemplate::type _t_y_p_e; │ │ │ │ -_1_1_0 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -111 }; │ │ │ │ -112 │ │ │ │ -113 template │ │ │ │ -_1_1_4 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, const std::vector>& children) │ │ │ │ -115 { │ │ │ │ -116 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ -117 } │ │ │ │ +63 return _impl._size == _impl._capacity; │ │ │ │ +64 } │ │ │ │ +65 │ │ │ │ +_6_6 void _p_u_s_h___b_a_c_k(const T& t) │ │ │ │ +67 { │ │ │ │ +68 assert(!_f_u_l_l()); │ │ │ │ +69 _impl._data[_impl._size++] = t; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +_7_2 void _p_o_p___b_a_c_k() │ │ │ │ +73 { │ │ │ │ +74 assert(!_e_m_p_t_y()); │ │ │ │ +75 --_impl._size; │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +_7_8 T& _b_a_c_k() │ │ │ │ +79 { │ │ │ │ +80 assert(!_e_m_p_t_y()); │ │ │ │ +81 return _impl._data[_impl._size-1]; │ │ │ │ +82 } │ │ │ │ +83 │ │ │ │ +_8_4 const T& _b_a_c_k() const │ │ │ │ +85 { │ │ │ │ +86 assert(!_e_m_p_t_y()); │ │ │ │ +87 return _impl._data[_impl._size-1]; │ │ │ │ +88 } │ │ │ │ +89 │ │ │ │ +_9_0 T& _f_r_o_n_t() │ │ │ │ +91 { │ │ │ │ +92 assert(!_e_m_p_t_y()); │ │ │ │ +93 return _impl._data[0]; │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +_9_6 const T& _f_r_o_n_t() const │ │ │ │ +97 { │ │ │ │ +98 assert(!_e_m_p_t_y()); │ │ │ │ +99 return _impl._data[0]; │ │ │ │ +100 } │ │ │ │ +101 │ │ │ │ +_1_0_2 T& _o_p_e_r_a_t_o_r_[_](std::size_t k) │ │ │ │ +103 { │ │ │ │ +104 assert(k < _impl._size); │ │ │ │ +105 return _impl._data[k]; │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +_1_0_8 const T& _o_p_e_r_a_t_o_r_[_](std::size_t k) const │ │ │ │ +109 { │ │ │ │ +110 assert(k < _impl._size); │ │ │ │ +111 return _impl._data[k]; │ │ │ │ +112 } │ │ │ │ +113 │ │ │ │ +114 private: │ │ │ │ +115 Impl& _impl; │ │ │ │ +116 │ │ │ │ +117 }; │ │ │ │ 118 │ │ │ │ -119 template │ │ │ │ -_1_2_0 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const Transformation& t, const std::vector>& │ │ │ │ -children) │ │ │ │ -121 { │ │ │ │ -122 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(s,t,children); │ │ │ │ -123 } │ │ │ │ -124 │ │ │ │ -125 template │ │ │ │ -_1_2_6 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, const std:: │ │ │ │ -vector>& children) │ │ │ │ -127 { │ │ │ │ -128 return std::make_shared::type>(s,t,children); │ │ │ │ -129 } │ │ │ │ +119 │ │ │ │ +120 template │ │ │ │ +_1_2_1 class _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ +122 : private std::array │ │ │ │ +123 , private _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w::Impl │ │ │ │ +124 , public _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ +125 { │ │ │ │ +126 │ │ │ │ +127 typedef _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_<_T_> view_base; │ │ │ │ +128 │ │ │ │ +129 public: │ │ │ │ 130 │ │ │ │ -131 }; │ │ │ │ -132 │ │ │ │ -133 │ │ │ │ -134 template class TransformedNode> │ │ │ │ -_1_3_5 struct _G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -136 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ -141 > │ │ │ │ -142 {}; │ │ │ │ -143 │ │ │ │ -144 │ │ │ │ -145 template class TransformedNodeTemplate> │ │ │ │ -_1_4_6 struct _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -147 { │ │ │ │ -148 │ │ │ │ -_1_4_9 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ -150 │ │ │ │ -151 template │ │ │ │ -_1_5_2 struct _r_e_s_u_l_t │ │ │ │ -153 { │ │ │ │ -_1_5_4 typedef typename TransformedNodeTemplate_:_:_t_y_p_e _t_y_p_e; │ │ │ │ -_1_5_5 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ -156 }; │ │ │ │ -157 │ │ │ │ -158 template │ │ │ │ -_1_5_9 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ -Transformation& t, std::shared_ptr... children) │ │ │ │ -160 { │ │ │ │ -161 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(s,t,children...); │ │ │ │ -162 } │ │ │ │ -163 │ │ │ │ -164 template │ │ │ │ -_1_6_5 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(std::shared_ptr s, const Transformation& t, std::shared_ptr... children) │ │ │ │ -166 { │ │ │ │ -167 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(s,t,children...); │ │ │ │ -168 } │ │ │ │ -169 │ │ │ │ -170 template │ │ │ │ -_1_7_1 static typename _r_e_s_u_l_t::storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ -shared_ptr s, const Transformation& t, std::shared_ptr... │ │ │ │ -children) │ │ │ │ -172 { │ │ │ │ -173 return std::make_shared::type>(s,t,children...); │ │ │ │ -174 } │ │ │ │ -175 │ │ │ │ -176 }; │ │ │ │ -177 │ │ │ │ -178 │ │ │ │ -179 template class TransformedNode> │ │ │ │ -_1_8_0 struct _G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -181 : public _T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n::template result │ │ │ │ -186 > │ │ │ │ -187 {}; │ │ │ │ -188 │ │ │ │ -190 │ │ │ │ -191 } // namespace TypeTree │ │ │ │ -192} //namespace Dune │ │ │ │ -193 │ │ │ │ -194#endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH │ │ │ │ -_p_o_w_e_r_c_o_m_p_o_s_i_t_e_n_o_d_e_t_r_a_n_s_f_o_r_m_a_t_i_o_n_t_e_m_p_l_a_t_e_s_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ -decltype(Node::degree()) StaticDegree │ │ │ │ -Returns the statically known degree of the given Node type as a std:: │ │ │ │ -integral_constant. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ +131 using _v_i_e_w___b_a_s_e_:_:_b_a_c_k; │ │ │ │ +132 using _v_i_e_w___b_a_s_e_:_:_f_r_o_n_t; │ │ │ │ +133 using _v_i_e_w___b_a_s_e_:_:_s_i_z_e; │ │ │ │ +134 using view_base::operator[]; │ │ │ │ +135 │ │ │ │ +_1_3_6 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k() │ │ │ │ +137 : _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w::Impl(&(static_cast&> │ │ │ │ +(*this)[0]),_c_a_p_a_c_i_t_y) │ │ │ │ +138 , _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w(static_cast::Impl&>(*this)) │ │ │ │ +139 {} │ │ │ │ +140 │ │ │ │ +141 private: │ │ │ │ +142 │ │ │ │ +143 //FixedCapacityStack(const FixedCapacityStack&); │ │ │ │ +144 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k& operator=(const _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k&); │ │ │ │ +145 │ │ │ │ +146 }; │ │ │ │ +147 │ │ │ │ +149 │ │ │ │ +150 } // namespace TypeTree │ │ │ │ +151} //namespace Dune │ │ │ │ +152 │ │ │ │ +153#endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:29 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___t_y_p_e │ │ │ │ -TransformedNode transformed_type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:33 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< transformed_type > transformed_storage_type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:34 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(std::shared_ptr< const SourceNode > s, const │ │ │ │ -Transformation &t) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:41 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:31 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:46 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static transformed_type transform(const SourceNode &s, const Transformation &t) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:36 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:56 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC │ │ │ │ ->, result< TC >::degree > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:81 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ -const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC │ │ │ │ ->::degree > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:75 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ -&t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:69 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:62 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNodeTemplate< TC >::type type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:63 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_d_e_g_r_e_e │ │ │ │ -static const std::size_t degree │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:65 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:64 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:97 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:102 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ -const Transformation &t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:120 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:104 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ -&t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:114 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ -_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC │ │ │ │ -> > &children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:126 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNodeTemplate< TC >::type type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:109 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_: │ │ │ │ -_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:110 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:142 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:147 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC... >::type transform(const SourceNode &s, const │ │ │ │ -Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:159 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_: │ │ │ │ -_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ -static result< TC... >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ -SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:171 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ -static result< TC... >::type transform(std::shared_ptr< const SourceNode > s, │ │ │ │ -const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:165 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ -static const bool recursive │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:149 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:153 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ -TransformedNodeTemplate< TC... >::type type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:154 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_e_m_p_l_a_t_i_z_e_d_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_: │ │ │ │ -_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ -std::shared_ptr< type > storage_type │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:155 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_G_e_n_e_r_i_c_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ -DDeeffiinniittiioonn generictransformationdescriptors.hh:187 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:150 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_e_m_p_t_y │ │ │ │ +bool empty() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:56 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_u_l_l │ │ │ │ +bool full() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +T & operator[](std::size_t k) │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:102 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_p_o_p___b_a_c_k │ │ │ │ +void pop_back() │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:72 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_b_a_c_k │ │ │ │ +T & back() │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:78 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_c_a_p_a_c_i_t_y │ │ │ │ +std::size_t capacity() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:51 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_r_o_n_t │ │ │ │ +T & front() │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:90 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_r_o_n_t │ │ │ │ +const T & front() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:96 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +const T & operator[](std::size_t k) const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_p_u_s_h___b_a_c_k │ │ │ │ +void push_back(const T &t) │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:66 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_b_a_c_k │ │ │ │ +const T & back() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:84 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_s_i_z_e │ │ │ │ +std::size_t size() const │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:46 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ +FixedCapacityStackView(Impl &impl) │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:40 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:125 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ +FixedCapacityStack() │ │ │ │ +DDeeffiinniittiioonn fixedcapacitystack.hh:136 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00065.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: fixedcapacitystack.hh File Reference │ │ │ +dune-typetree: traversalutilities.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,33 +72,33 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
fixedcapacitystack.hh File Reference
│ │ │ +Namespaces | │ │ │ +Functions
│ │ │ +
traversalutilities.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <array>
│ │ │ -#include <cassert>
│ │ │ +
#include <dune/typetree/traversal.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  Dune::TypeTree::FixedCapacityStackView< T >
class  Dune::TypeTree::FixedCapacityStack< T, capacity >
│ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename ResultType, typename Tree, typename F, typename R>
ResultType Dune::TypeTree::reduceOverLeafs (const Tree &tree, F functor, R reduction, ResultType startValue)
 Calculate a quantity as a reduction over the leaf nodes of a TypeTree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,21 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -fixedcapacitystack.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +traversalutilities.hh File Reference │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_<_ _T_ _> │ │ │ │ -class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_<_ _T_,_ _c_a_p_a_c_i_t_y_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +ResultType  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_d_u_c_e_O_v_e_r_L_e_a_f_s (const Tree &tree, F functor, R │ │ │ │ + reduction, ResultType startValue) │ │ │ │ +  Calculate a quantity as a reduction over the leaf nodes of a │ │ │ │ + _T_y_p_e_T_r_e_e. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00065_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: fixedcapacitystack.hh Source File │ │ │ +dune-typetree: traversalutilities.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,216 +71,86 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
fixedcapacitystack.hh
│ │ │ +
traversalutilities.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=8 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │ -
7#define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │ +
7#define DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │
8
│ │ │ -
9#include <array>
│ │ │ -
10#include <cassert>
│ │ │ -
11
│ │ │ -
12namespace Dune {
│ │ │ -
13 namespace TypeTree {
│ │ │ -
14
│ │ │ -
15
│ │ │ -
19
│ │ │ -
20 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
22 {
│ │ │ -
23
│ │ │ -
24 public:
│ │ │ -
25
│ │ │ -
26 struct Impl
│ │ │ -
27 {
│ │ │ -
28
│ │ │ -
29 Impl(T* data, std::size_t capacity)
│ │ │ -
30 : _data(data)
│ │ │ -
31 , _size(0)
│ │ │ -
32 , _capacity(capacity)
│ │ │ -
33 {}
│ │ │ -
34
│ │ │ -
35 T * const _data;
│ │ │ -
36 std::size_t _size;
│ │ │ -
37 const std::size_t _capacity;
│ │ │ -
38 };
│ │ │ + │ │ │ +
10
│ │ │ +
11namespace Dune {
│ │ │ +
12 namespace TypeTree {
│ │ │ +
13
│ │ │ +
18
│ │ │ +
19 namespace {
│ │ │ +
20
│ │ │ +
22
│ │ │ +
27 template<typename F, typename R, typename ResultType>
│ │ │ +
28 struct LeafReductionVisitor
│ │ │ +
29 : public TypeTree::TreeVisitor
│ │ │ +
30 {
│ │ │ +
31
│ │ │ +
32 static const TreePathType::Type treePathType = TreePathType::dynamic;
│ │ │ +
33
│ │ │ +
34 template<typename Node, typename TreePath>
│ │ │ +
35 void leaf(const Node& node, TreePath treePath)
│ │ │ +
36 {
│ │ │ +
37 _value = _reduction(_value,_functor(node,treePath));
│ │ │ +
38 }
│ │ │
39
│ │ │ -
│ │ │ - │ │ │ -
41 : _impl(impl)
│ │ │ -
42 {}
│ │ │ -
│ │ │ -
43
│ │ │ -
44 public:
│ │ │ +
40 LeafReductionVisitor(F functor, R reduction, ResultType startValue)
│ │ │ +
41 : _functor(functor)
│ │ │ +
42 , _reduction(reduction)
│ │ │ +
43 , _value(startValue)
│ │ │ +
44 {}
│ │ │
45
│ │ │ -
│ │ │ -
46 std::size_t size() const
│ │ │ -
47 {
│ │ │ -
48 return _impl._size;
│ │ │ -
49 }
│ │ │ -
│ │ │ -
50
│ │ │ -
│ │ │ -
51 std::size_t capacity() const
│ │ │ -
52 {
│ │ │ -
53 return _impl._capacity;
│ │ │ -
54 }
│ │ │ -
│ │ │ -
55
│ │ │ -
│ │ │ -
56 bool empty() const
│ │ │ -
57 {
│ │ │ -
58 return _impl._size == 0;
│ │ │ -
59 }
│ │ │ -
│ │ │ -
60
│ │ │ -
│ │ │ -
61 bool full() const
│ │ │ -
62 {
│ │ │ -
63 return _impl._size == _impl._capacity;
│ │ │ -
64 }
│ │ │ -
│ │ │ -
65
│ │ │ -
│ │ │ -
66 void push_back(const T& t)
│ │ │ -
67 {
│ │ │ -
68 assert(!full());
│ │ │ -
69 _impl._data[_impl._size++] = t;
│ │ │ -
70 }
│ │ │ -
│ │ │ -
71
│ │ │ -
│ │ │ -
72 void pop_back()
│ │ │ -
73 {
│ │ │ -
74 assert(!empty());
│ │ │ -
75 --_impl._size;
│ │ │ -
76 }
│ │ │ -
│ │ │ -
77
│ │ │ -
│ │ │ -
78 T& back()
│ │ │ -
79 {
│ │ │ -
80 assert(!empty());
│ │ │ -
81 return _impl._data[_impl._size-1];
│ │ │ -
82 }
│ │ │ -
│ │ │ -
83
│ │ │ -
│ │ │ -
84 const T& back() const
│ │ │ -
85 {
│ │ │ -
86 assert(!empty());
│ │ │ -
87 return _impl._data[_impl._size-1];
│ │ │ -
88 }
│ │ │ -
│ │ │ -
89
│ │ │ -
│ │ │ -
90 T& front()
│ │ │ -
91 {
│ │ │ -
92 assert(!empty());
│ │ │ -
93 return _impl._data[0];
│ │ │ -
94 }
│ │ │ -
│ │ │ -
95
│ │ │ -
│ │ │ -
96 const T& front() const
│ │ │ -
97 {
│ │ │ -
98 assert(!empty());
│ │ │ -
99 return _impl._data[0];
│ │ │ -
100 }
│ │ │ -
│ │ │ -
101
│ │ │ -
│ │ │ -
102 T& operator[](std::size_t k)
│ │ │ -
103 {
│ │ │ -
104 assert(k < _impl._size);
│ │ │ -
105 return _impl._data[k];
│ │ │ -
106 }
│ │ │ -
│ │ │ -
107
│ │ │ -
│ │ │ -
108 const T& operator[](std::size_t k) const
│ │ │ -
109 {
│ │ │ -
110 assert(k < _impl._size);
│ │ │ -
111 return _impl._data[k];
│ │ │ -
112 }
│ │ │ -
│ │ │ -
113
│ │ │ -
114 private:
│ │ │ -
115 Impl& _impl;
│ │ │ -
116
│ │ │ -
117 };
│ │ │ -
│ │ │ -
118
│ │ │ -
119
│ │ │ -
120 template<typename T, std::size_t capacity>
│ │ │ -
│ │ │ - │ │ │ -
122 : private std::array<T,capacity>
│ │ │ -
123 , private FixedCapacityStackView<T>::Impl
│ │ │ -
124 , public FixedCapacityStackView<T>
│ │ │ -
125 {
│ │ │ -
126
│ │ │ -
127 typedef FixedCapacityStackView<T> view_base;
│ │ │ -
128
│ │ │ -
129 public:
│ │ │ -
130
│ │ │ -
131 using view_base::back;
│ │ │ -
132 using view_base::front;
│ │ │ -
133 using view_base::size;
│ │ │ -
134 using view_base::operator[];
│ │ │ -
135
│ │ │ -
│ │ │ - │ │ │ -
137 : FixedCapacityStackView<T>::Impl(&(static_cast<std::array<T,capacity>&>(*this)[0]),capacity)
│ │ │ -
138 , FixedCapacityStackView<T>(static_cast<typename FixedCapacityStackView<T>::Impl&>(*this))
│ │ │ -
139 {}
│ │ │ -
│ │ │ -
140
│ │ │ -
141 private:
│ │ │ -
142
│ │ │ -
143 //FixedCapacityStack(const FixedCapacityStack&);
│ │ │ -
144 FixedCapacityStack& operator=(const FixedCapacityStack&);
│ │ │ -
145
│ │ │ -
146 };
│ │ │ -
│ │ │ -
147
│ │ │ -
149
│ │ │ -
150 } // namespace TypeTree
│ │ │ -
151} //namespace Dune
│ │ │ -
152
│ │ │ -
153#endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH
│ │ │ +
46 ResultType result() { return _value; }
│ │ │ +
47
│ │ │ +
48 F _functor;
│ │ │ +
49 R _reduction;
│ │ │ +
50 ResultType _value;
│ │ │ +
51
│ │ │ +
52 };
│ │ │ +
53
│ │ │ +
54 } // anonymous namespace
│ │ │ +
55
│ │ │ +
57
│ │ │ +
82 template<typename ResultType, typename Tree, typename F, typename R>
│ │ │ +
│ │ │ +
83 ResultType reduceOverLeafs(const Tree& tree, F functor, R reduction, ResultType startValue)
│ │ │ +
84 {
│ │ │ +
85 LeafReductionVisitor<F,R,ResultType> visitor(functor,reduction,startValue);
│ │ │ +
86 TypeTree::applyToTree(tree,visitor);
│ │ │ +
87 return visitor.result();
│ │ │ +
88 }
│ │ │ +
│ │ │ +
89
│ │ │ +
91
│ │ │ +
92 } // namespace TypeTree
│ │ │ +
93} //namespace Dune
│ │ │ +
94
│ │ │ +
95#endif // DUNE_TYPETREE_TRAVERSALUTILITIES_HH
│ │ │ + │ │ │ +
ResultType reduceOverLeafs(const Tree &tree, F functor, R reduction, ResultType startValue)
Calculate a quantity as a reduction over the leaf nodes of a TypeTree.
Definition traversalutilities.hh:83
│ │ │ +
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:184
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition typetraits.hh:150
│ │ │ -
bool empty() const
Definition fixedcapacitystack.hh:56
│ │ │ -
bool full() const
Definition fixedcapacitystack.hh:61
│ │ │ -
T & operator[](std::size_t k)
Definition fixedcapacitystack.hh:102
│ │ │ -
void pop_back()
Definition fixedcapacitystack.hh:72
│ │ │ -
T & back()
Definition fixedcapacitystack.hh:78
│ │ │ -
std::size_t capacity() const
Definition fixedcapacitystack.hh:51
│ │ │ -
T & front()
Definition fixedcapacitystack.hh:90
│ │ │ -
const T & front() const
Definition fixedcapacitystack.hh:96
│ │ │ -
const T & operator[](std::size_t k) const
Definition fixedcapacitystack.hh:108
│ │ │ -
void push_back(const T &t)
Definition fixedcapacitystack.hh:66
│ │ │ -
const T & back() const
Definition fixedcapacitystack.hh:84
│ │ │ -
std::size_t size() const
Definition fixedcapacitystack.hh:46
│ │ │ -
FixedCapacityStackView(Impl &impl)
Definition fixedcapacitystack.hh:40
│ │ │ -
Definition fixedcapacitystack.hh:125
│ │ │ -
FixedCapacityStack()
Definition fixedcapacitystack.hh:136
│ │ │ +
Type
Definition treepath.hh:108
│ │ │ +
@ dynamic
Definition treepath.hh:108
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,213 +1,93 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -fixedcapacitystack.hh │ │ │ │ +traversalutilities.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ -7#define DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ +7#define DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11 │ │ │ │ -12namespace _D_u_n_e { │ │ │ │ -13 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -14 │ │ │ │ -15 │ │ │ │ -19 │ │ │ │ -20 template │ │ │ │ -_2_1 class _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ -22 { │ │ │ │ -23 │ │ │ │ -24 public: │ │ │ │ -25 │ │ │ │ -26 struct Impl │ │ │ │ -27 { │ │ │ │ -28 │ │ │ │ -29 Impl(T* data, std::size_t _c_a_p_a_c_i_t_y) │ │ │ │ -30 : _data(data) │ │ │ │ -31 , _size(0) │ │ │ │ -32 , _capacity(_c_a_p_a_c_i_t_y) │ │ │ │ -33 {} │ │ │ │ -34 │ │ │ │ -35 T * const _data; │ │ │ │ -36 std::size_t _size; │ │ │ │ -37 const std::size_t _capacity; │ │ │ │ -38 }; │ │ │ │ +9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +10 │ │ │ │ +11namespace _D_u_n_e { │ │ │ │ +12 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +13 │ │ │ │ +18 │ │ │ │ +19 namespace { │ │ │ │ +20 │ │ │ │ +22 │ │ │ │ +27 template │ │ │ │ +28 struct LeafReductionVisitor │ │ │ │ +29 : public TypeTree::TreeVisitor │ │ │ │ +30 { │ │ │ │ +31 │ │ │ │ +32 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e treePathType = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c; │ │ │ │ +33 │ │ │ │ +34 template │ │ │ │ +35 void leaf(const Node& node, TreePath treePath) │ │ │ │ +36 { │ │ │ │ +37 _value = _reduction(_value,_functor(node,treePath)); │ │ │ │ +38 } │ │ │ │ 39 │ │ │ │ -_4_0 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w(Impl& _i_m_p_l) │ │ │ │ -41 : _impl(_i_m_p_l) │ │ │ │ -42 {} │ │ │ │ -43 │ │ │ │ -44 public: │ │ │ │ +40 LeafReductionVisitor(F functor, R reduction, ResultType startValue) │ │ │ │ +41 : _functor(functor) │ │ │ │ +42 , _reduction(reduction) │ │ │ │ +43 , _value(startValue) │ │ │ │ +44 {} │ │ │ │ 45 │ │ │ │ -_4_6 std::size_t _s_i_z_e() const │ │ │ │ -47 { │ │ │ │ -48 return _impl._size; │ │ │ │ -49 } │ │ │ │ -50 │ │ │ │ -_5_1 std::size_t _c_a_p_a_c_i_t_y() const │ │ │ │ -52 { │ │ │ │ -53 return _impl._capacity; │ │ │ │ -54 } │ │ │ │ +46 ResultType result() { return _value; } │ │ │ │ +47 │ │ │ │ +48 F _functor; │ │ │ │ +49 R _reduction; │ │ │ │ +50 ResultType _value; │ │ │ │ +51 │ │ │ │ +52 }; │ │ │ │ +53 │ │ │ │ +54 } // anonymous namespace │ │ │ │ 55 │ │ │ │ -_5_6 bool _e_m_p_t_y() const │ │ │ │ -57 { │ │ │ │ -58 return _impl._size == 0; │ │ │ │ -59 } │ │ │ │ -60 │ │ │ │ -_6_1 bool _f_u_l_l() const │ │ │ │ -62 { │ │ │ │ -63 return _impl._size == _impl._capacity; │ │ │ │ -64 } │ │ │ │ -65 │ │ │ │ -_6_6 void _p_u_s_h___b_a_c_k(const T& t) │ │ │ │ -67 { │ │ │ │ -68 assert(!_f_u_l_l()); │ │ │ │ -69 _impl._data[_impl._size++] = t; │ │ │ │ -70 } │ │ │ │ -71 │ │ │ │ -_7_2 void _p_o_p___b_a_c_k() │ │ │ │ -73 { │ │ │ │ -74 assert(!_e_m_p_t_y()); │ │ │ │ -75 --_impl._size; │ │ │ │ -76 } │ │ │ │ -77 │ │ │ │ -_7_8 T& _b_a_c_k() │ │ │ │ -79 { │ │ │ │ -80 assert(!_e_m_p_t_y()); │ │ │ │ -81 return _impl._data[_impl._size-1]; │ │ │ │ -82 } │ │ │ │ -83 │ │ │ │ -_8_4 const T& _b_a_c_k() const │ │ │ │ -85 { │ │ │ │ -86 assert(!_e_m_p_t_y()); │ │ │ │ -87 return _impl._data[_impl._size-1]; │ │ │ │ +57 │ │ │ │ +82 template │ │ │ │ +_8_3 ResultType _r_e_d_u_c_e_O_v_e_r_L_e_a_f_s(const Tree& tree, F functor, R reduction, │ │ │ │ +ResultType startValue) │ │ │ │ +84 { │ │ │ │ +85 LeafReductionVisitor visitor(functor,reduction,startValue); │ │ │ │ +86 _T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e(tree,visitor); │ │ │ │ +87 return visitor.result(); │ │ │ │ 88 } │ │ │ │ 89 │ │ │ │ -_9_0 T& _f_r_o_n_t() │ │ │ │ -91 { │ │ │ │ -92 assert(!_e_m_p_t_y()); │ │ │ │ -93 return _impl._data[0]; │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -_9_6 const T& _f_r_o_n_t() const │ │ │ │ -97 { │ │ │ │ -98 assert(!_e_m_p_t_y()); │ │ │ │ -99 return _impl._data[0]; │ │ │ │ -100 } │ │ │ │ -101 │ │ │ │ -_1_0_2 T& _o_p_e_r_a_t_o_r_[_](std::size_t k) │ │ │ │ -103 { │ │ │ │ -104 assert(k < _impl._size); │ │ │ │ -105 return _impl._data[k]; │ │ │ │ -106 } │ │ │ │ -107 │ │ │ │ -_1_0_8 const T& _o_p_e_r_a_t_o_r_[_](std::size_t k) const │ │ │ │ -109 { │ │ │ │ -110 assert(k < _impl._size); │ │ │ │ -111 return _impl._data[k]; │ │ │ │ -112 } │ │ │ │ -113 │ │ │ │ -114 private: │ │ │ │ -115 Impl& _impl; │ │ │ │ -116 │ │ │ │ -117 }; │ │ │ │ -118 │ │ │ │ -119 │ │ │ │ -120 template │ │ │ │ -_1_2_1 class _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ -122 : private std::array │ │ │ │ -123 , private _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w::Impl │ │ │ │ -124 , public _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ -125 { │ │ │ │ -126 │ │ │ │ -127 typedef _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_<_T_> view_base; │ │ │ │ -128 │ │ │ │ -129 public: │ │ │ │ -130 │ │ │ │ -131 using _v_i_e_w___b_a_s_e_:_:_b_a_c_k; │ │ │ │ -132 using _v_i_e_w___b_a_s_e_:_:_f_r_o_n_t; │ │ │ │ -133 using _v_i_e_w___b_a_s_e_:_:_s_i_z_e; │ │ │ │ -134 using view_base::operator[]; │ │ │ │ -135 │ │ │ │ -_1_3_6 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k() │ │ │ │ -137 : _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w::Impl(&(static_cast&> │ │ │ │ -(*this)[0]),_c_a_p_a_c_i_t_y) │ │ │ │ -138 , _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w(static_cast::Impl&>(*this)) │ │ │ │ -139 {} │ │ │ │ -140 │ │ │ │ -141 private: │ │ │ │ -142 │ │ │ │ -143 //FixedCapacityStack(const FixedCapacityStack&); │ │ │ │ -144 _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k& operator=(const _F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k&); │ │ │ │ -145 │ │ │ │ -146 }; │ │ │ │ -147 │ │ │ │ -149 │ │ │ │ -150 } // namespace TypeTree │ │ │ │ -151} //namespace Dune │ │ │ │ -152 │ │ │ │ -153#endif // DUNE_TYPETREE_FIXEDCAPACITYSTACK_HH │ │ │ │ +91 │ │ │ │ +92 } // namespace TypeTree │ │ │ │ +93} //namespace Dune │ │ │ │ +94 │ │ │ │ +95#endif // DUNE_TYPETREE_TRAVERSALUTILITIES_HH │ │ │ │ +_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_r_e_d_u_c_e_O_v_e_r_L_e_a_f_s │ │ │ │ +ResultType reduceOverLeafs(const Tree &tree, F functor, R reduction, ResultType │ │ │ │ +startValue) │ │ │ │ +Calculate a quantity as a reduction over the leaf nodes of a TypeTree. │ │ │ │ +DDeeffiinniittiioonn traversalutilities.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ +void applyToTree(Tree &&tree, Visitor &&visitor) │ │ │ │ +Apply visitor to TypeTree. │ │ │ │ +DDeeffiinniittiioonn traversal.hh:184 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:150 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_e_m_p_t_y │ │ │ │ -bool empty() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:56 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_u_l_l │ │ │ │ -bool full() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:61 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -T & operator[](std::size_t k) │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:102 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_p_o_p___b_a_c_k │ │ │ │ -void pop_back() │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:72 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_b_a_c_k │ │ │ │ -T & back() │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:78 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_c_a_p_a_c_i_t_y │ │ │ │ -std::size_t capacity() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:51 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_r_o_n_t │ │ │ │ -T & front() │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:90 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_f_r_o_n_t │ │ │ │ -const T & front() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:96 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -const T & operator[](std::size_t k) const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:108 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_p_u_s_h___b_a_c_k │ │ │ │ -void push_back(const T &t) │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:66 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_b_a_c_k │ │ │ │ -const T & back() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:84 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_s_i_z_e │ │ │ │ -std::size_t size() const │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:46 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_V_i_e_w │ │ │ │ -FixedCapacityStackView(Impl &impl) │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:40 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:125 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k_:_:_F_i_x_e_d_C_a_p_a_c_i_t_y_S_t_a_c_k │ │ │ │ -FixedCapacityStack() │ │ │ │ -DDeeffiinniittiioonn fixedcapacitystack.hh:136 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ +Type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ +@ dynamic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00068.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: filters.hh File Reference │ │ │ +dune-typetree: simpletransformationdescriptors.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,50 +74,35 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
filters.hh File Reference
│ │ │ +
simpletransformationdescriptors.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <tuple>
│ │ │ +
#include <array>
│ │ │ #include <memory>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ +#include <vector>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/common/exceptions.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::FilterEntry< new_k, old_k >
 A filter entry describing the mapping of one child in the filtered node. More...
struct  Dune::TypeTree::FilterResult< FilterEntries >
 The result of a filter. More...
struct  Dune::TypeTree::FilterResult< FilterEntries >::apply< Node >
struct  Dune::TypeTree::SimpleFilterTag
 Tag describing a simple filter that can only decide whether or not to include a single given child. More...
struct  Dune::TypeTree::AdvancedFilterTag
 Tag describing an advanced filter that has full control over the construction of the list of FilterEntries. More...
struct  Dune::TypeTree::AdvancedFilter
 Base class for advanced filters. More...
struct  Dune::TypeTree::AdvancedFilter::apply< Node, Children >
 Apply this filter to the given node and children. More...
struct  Dune::TypeTree::SimpleFilter
 Default simple filter that accepts any node and leaves its child structure unchanged. More...
struct  Dune::TypeTree::SimpleFilter::validate< Node >
 Validates the combination of filter and node. More...
struct  Dune::TypeTree::SimpleFilter::apply< Child, new_index, old_index >
 Applies the filter to the given child node. More...
struct  Dune::TypeTree::IndexFilter< indices >
 Filter class for FilteredCompositeNode that selects the children with the given indices. More...
struct  Dune::TypeTree::filter< Filter >
 Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter. More...
struct  Dune::TypeTree::filter< Filter >::apply< Node, Children >
 Apply the filter. More...
struct  Dune::TypeTree::SimpleLeafNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
struct  Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >
struct  Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC >
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,49 +1,35 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -filters.hh File Reference │ │ │ │ -#include │ │ │ │ +simpletransformationdescriptors.hh File Reference │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_E_n_t_r_y_<_ _n_e_w___k_,_ _o_l_d___k_ _> │ │ │ │ -  A filter entry describing the mapping of one child in the filtered │ │ │ │ - node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_ _> │ │ │ │ -  The result of a filter. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_ _>_:_:_a_p_p_l_y_<_ _N_o_d_e_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ -  Tag describing a simple filter that can only decide whether or not to │ │ │ │ - include a single given child. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ -  Tag describing an advanced filter that has full control over the │ │ │ │ - construction of the list of FilterEntries. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ -  Base class for advanced filters. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y_<_ _N_o_d_e_,_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ -  Apply this filter to the given node and children. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ -  Default simple filter that accepts any node and leaves its child │ │ │ │ - structure unchanged. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e_<_ _N_o_d_e_ _> │ │ │ │ -  Validates the combination of filter and node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y_<_ _C_h_i_l_d_,_ _n_e_w___i_n_d_e_x_,_ _o_l_d___i_n_d_e_x_ _> │ │ │ │ -  Applies the filter to the given child node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_n_d_e_x_F_i_l_t_e_r_<_ _i_n_d_i_c_e_s_ _> │ │ │ │ -  Filter class for _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e that selects the children with │ │ │ │ - the given indices. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_<_ _F_i_l_t_e_r_ _> │ │ │ │ -  Adapter class that takes a _S_i_m_p_l_e_F_i_l_t_e_r, validated it and turns it │ │ │ │ - into an _A_d_v_a_n_c_e_d_F_i_l_t_e_r. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_<_ _F_i_l_t_e_r_ _>_:_:_a_p_p_l_y_<_ _N_o_d_e_,_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ -  Apply the filter. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_<_ _S_o_u_r_c_e_N_o_d_e_, │ │ │ │ + _T_r_a_n_s_f_o_r_m_a_t_i_o_n_,_ _T_r_a_n_s_f_o_r_m_e_d_N_o_d_e_ _>_:_:_r_e_s_u_l_t_<_ _T_C_ _> │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00068_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: filters.hh Source File │ │ │ +dune-typetree: simpletransformationdescriptors.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,263 +71,212 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
filters.hh
│ │ │ +
simpletransformationdescriptors.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_FILTERS_HH
│ │ │ -
7#define DUNE_TYPETREE_FILTERS_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │ +
7#define DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │
8
│ │ │ -
9#include <tuple>
│ │ │ +
9#include <array>
│ │ │
10#include <memory>
│ │ │ -
11
│ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ -
13
│ │ │ -
14namespace Dune {
│ │ │ -
15 namespace TypeTree {
│ │ │ -
16
│ │ │ -
21
│ │ │ -
23 template<std::size_t new_k, std::size_t old_k>
│ │ │ -
│ │ │ - │ │ │ -
25 {
│ │ │ -
26
│ │ │ -
27#ifndef DOXYGEN
│ │ │ -
28
│ │ │ -
29 // The precise contents of this class is an implementation detail.
│ │ │ -
30
│ │ │ -
31 static const std::size_t filtered_index = new_k;
│ │ │ -
32 static const std::size_t original_index = old_k;
│ │ │ -
33
│ │ │ -
34#endif // DOXYGEN
│ │ │ -
35
│ │ │ -
36 };
│ │ │ -
│ │ │ -
37
│ │ │ -
39 template<typename... FilterEntries>
│ │ │ -
│ │ │ - │ │ │ -
41 {
│ │ │ -
42
│ │ │ -
43 static const std::size_t size = sizeof...(FilterEntries);
│ │ │ +
11#include <vector>
│ │ │ +
12
│ │ │ + │ │ │ + │ │ │ +
15#include <dune/common/exceptions.hh>
│ │ │ +
16
│ │ │ +
17
│ │ │ +
18namespace Dune {
│ │ │ +
19 namespace TypeTree {
│ │ │ +
20
│ │ │ +
25
│ │ │ +
26 template<typename SourceNode, typename Transformation, typename TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
28 {
│ │ │ +
29
│ │ │ +
30 static const bool recursive = false;
│ │ │ +
31
│ │ │ +
32 typedef TransformedNode transformed_type;
│ │ │ +
33 typedef std::shared_ptr<transformed_type> transformed_storage_type;
│ │ │ +
34
│ │ │ +
│ │ │ +
35 static transformed_type transform(const SourceNode& s, const Transformation& t)
│ │ │ +
36 {
│ │ │ +
37 return transformed_type();
│ │ │ +
38 }
│ │ │ +
│ │ │ +
39
│ │ │ +
│ │ │ +
40 static transformed_storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t)
│ │ │ +
41 {
│ │ │ +
42 return std::make_shared<transformed_type>();
│ │ │ +
43 }
│ │ │ +
│ │ │
44
│ │ │ -
45 typedef std::tuple<FilterEntries...> IndexMap;
│ │ │ +
45 };
│ │ │ +
│ │ │
46
│ │ │ -
47 template<typename Node>
│ │ │ -
│ │ │ -
48 struct apply
│ │ │ -
49 {
│ │ │ -
50 typedef std::tuple<typename Node::template Child<FilterEntries::original_index>...> Children;
│ │ │ -
51 typedef std::tuple<typename Node::template Child<FilterEntries::original_index>::Type...> ChildTypes;
│ │ │ -
52 typedef std::tuple<std::shared_ptr<typename Node::template Child<FilterEntries::original_index>::Type>...> NodeStorage;
│ │ │ -
53 };
│ │ │ -
│ │ │ -
54
│ │ │ -
55 };
│ │ │ -
│ │ │ -
56
│ │ │ -
58 struct SimpleFilterTag {};
│ │ │ -
59
│ │ │ - │ │ │ -
62
│ │ │ -
63
│ │ │ -
│ │ │ - │ │ │ -
66 {
│ │ │ -
67
│ │ │ - │ │ │ -
70
│ │ │ -
71#ifdef DOXYGEN
│ │ │ -
72
│ │ │ -
74 template<typename Node, typename... Children>
│ │ │ -
│ │ │ -
75 struct apply
│ │ │ -
76 {
│ │ │ -
78
│ │ │ -
81 typedef implementation-defined type;
│ │ │ -
82 };
│ │ │ -
│ │ │ -
83
│ │ │ -
84#endif // DOXYGEN
│ │ │ -
85
│ │ │ -
86 };
│ │ │ -
│ │ │ -
87
│ │ │ -
89
│ │ │ -
│ │ │ - │ │ │ -
95 {
│ │ │ -
96
│ │ │ - │ │ │ -
99
│ │ │ -
100
│ │ │ -
102 template<typename Node>
│ │ │ -
│ │ │ -
103 struct validate
│ │ │ -
104 {
│ │ │ -
106 static const bool value = true;
│ │ │ -
107 };
│ │ │ -
│ │ │ -
108
│ │ │ -
110
│ │ │ -
118 template<typename Child, std::size_t new_index, std::size_t old_index>
│ │ │ -
│ │ │ -
119 struct apply
│ │ │ +
47
│ │ │ +
48 template<typename SourceNode, typename Transformation, template<typename Child, std::size_t> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
50 {
│ │ │ +
51
│ │ │ +
52 static const bool recursive = true;
│ │ │ +
53
│ │ │ +
54 template<typename TC>
│ │ │ +
│ │ │ +
55 struct result
│ │ │ +
56 {
│ │ │ +
57 typedef TransformedNode<TC, StaticDegree<SourceNode>::value> type;
│ │ │ +
58 typedef std::shared_ptr<type> storage_type;
│ │ │ +
59 static const std::size_t degree = StaticDegree<type>::value;
│ │ │ +
60 };
│ │ │ +
│ │ │ +
61
│ │ │ +
62 template<typename TC>
│ │ │ +
│ │ │ +
63 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ +
64 {
│ │ │ +
65 return typename result<TC>::type(children);
│ │ │ +
66 }
│ │ │ +
│ │ │ +
67
│ │ │ +
68 template<typename TC>
│ │ │ +
│ │ │ +
69 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::array<std::shared_ptr<TC>,result<TC>::degree>& children)
│ │ │ +
70 {
│ │ │ +
71 return std::make_shared<typename result<TC>::type>(children);
│ │ │ +
72 }
│ │ │ +
│ │ │ +
73
│ │ │ +
74 };
│ │ │ +
│ │ │ +
75
│ │ │ +
76
│ │ │ +
77 template<typename SourceNode, typename Transformation, template<typename Child> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
79 {
│ │ │ +
80
│ │ │ +
81 static const bool recursive = true;
│ │ │ +
82
│ │ │ +
83 template<typename TC>
│ │ │ +
│ │ │ +
84 struct result
│ │ │ +
85 {
│ │ │ +
86 typedef TransformedNode<TC> type;
│ │ │ +
87 typedef std::shared_ptr<type> storage_type;
│ │ │ +
88 };
│ │ │ +
│ │ │ +
89
│ │ │ +
90 template<typename TC>
│ │ │ +
│ │ │ +
91 static typename result<TC>::type transform(const SourceNode& s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ +
92 {
│ │ │ +
93 return typename result<TC>::type(children);
│ │ │ +
94 }
│ │ │ +
│ │ │ +
95
│ │ │ +
96 template<typename TC>
│ │ │ +
│ │ │ +
97 static typename result<TC>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, const std::vector<std::shared_ptr<TC>>& children)
│ │ │ +
98 {
│ │ │ +
99 return std::make_shared<typename result<TC>::type>(children);
│ │ │ +
100 }
│ │ │ +
│ │ │ +
101
│ │ │ +
102 };
│ │ │ +
│ │ │ +
103
│ │ │ +
104
│ │ │ +
105 template<typename SourceNode, typename Transformation, template<typename...> class TransformedNode>
│ │ │ +
│ │ │ + │ │ │ +
107 {
│ │ │ +
108
│ │ │ +
109 static const bool recursive = true;
│ │ │ +
110
│ │ │ +
111 template<typename... TC>
│ │ │ +
│ │ │ +
112 struct result
│ │ │ +
113 {
│ │ │ +
114 typedef TransformedNode<TC...> type;
│ │ │ +
115 typedef std::shared_ptr<type> storage_type;
│ │ │ +
116 };
│ │ │ +
│ │ │ +
117
│ │ │ +
118 template<typename... TC>
│ │ │ +
│ │ │ +
119 static typename result<TC...>::type transform(const SourceNode& s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │
120 {
│ │ │ -
122 static const bool value = true;
│ │ │ -
123 };
│ │ │ -
│ │ │ -
124
│ │ │ -
125 };
│ │ │ +
121 return typename result<TC...>::type(children...);
│ │ │ +
122 }
│ │ │
│ │ │ -
126
│ │ │ -
127 namespace {
│ │ │ -
128
│ │ │ -
129 // ********************************************************************************
│ │ │ -
130 // IndexFilter helpers
│ │ │ -
131 // ********************************************************************************
│ │ │ -
132
│ │ │ -
133 template<typename Node, std::size_t new_index, std::size_t... indices>
│ │ │ -
134 struct index_filter_helper
│ │ │ -
135 {
│ │ │ -
136 template<typename... FilterEntries>
│ │ │ -
137 struct apply
│ │ │ -
138 {
│ │ │ -
139 typedef FilterResult<FilterEntries...> type;
│ │ │ -
140 };
│ │ │ -
141 };
│ │ │ -
142
│ │ │ -
143 template<typename Node, std::size_t new_index, std::size_t old_index, std::size_t... indices>
│ │ │ -
144 struct index_filter_helper<Node,new_index,old_index,indices...>
│ │ │ -
145 {
│ │ │ -
146 template<typename... FilterEntries>
│ │ │ -
147 struct apply
│ │ │ -
148 : public index_filter_helper<Node,new_index+1,indices...>::template apply<FilterEntries...,
│ │ │ -
149 FilterEntry<new_index,
│ │ │ -
150 old_index>
│ │ │ -
151 >
│ │ │ -
152 {};
│ │ │ -
153 };
│ │ │ -
154
│ │ │ -
155 } // anonymous namespace
│ │ │ -
156
│ │ │ -
157
│ │ │ -
159 template<std::size_t... indices>
│ │ │ -
│ │ │ - │ │ │ -
161 : public AdvancedFilter
│ │ │ -
162 {
│ │ │ -
163
│ │ │ -
164#ifndef DOXYGEN
│ │ │ -
165
│ │ │ -
166 template<typename Node, typename... Children>
│ │ │ -
167 struct apply
│ │ │ -
168 {
│ │ │ -
169 typedef typename index_filter_helper<Node,0,indices...>::template apply<>::type type;
│ │ │ -
170 };
│ │ │ -
171
│ │ │ -
172#endif // DOXYGEN
│ │ │ -
173
│ │ │ -
174 };
│ │ │ -
│ │ │ -
175
│ │ │ -
176
│ │ │ -
177 // ********************************************************************************
│ │ │ -
178 // filter: Wrapper class for turning a simple filter into an advanced filter
│ │ │ -
179 // usable by FilteredCompositeNode
│ │ │ -
180 // ********************************************************************************
│ │ │ -
181
│ │ │ -
182 namespace {
│ │ │ -
183
│ │ │ -
184 template<typename Filter, std::size_t new_k, std::size_t old_k, typename... tail>
│ │ │ -
185 struct filter_helper
│ │ │ -
186 {
│ │ │ -
187 template<typename... FilterDescriptors>
│ │ │ -
188 struct apply
│ │ │ -
189 {
│ │ │ -
190 typedef FilterResult<FilterDescriptors...> type;
│ │ │ -
191 };
│ │ │ -
192 };
│ │ │ -
193
│ │ │ -
194 template<typename Filter, std::size_t new_k, std::size_t old_k, typename child, typename... tail>
│ │ │ -
195 struct filter_helper<Filter,new_k,old_k,child,tail...>
│ │ │ -
196 {
│ │ │ -
197
│ │ │ -
198 template<typename... FilterDescriptors>
│ │ │ -
199 struct apply
│ │ │ -
200 : public std::conditional<Filter::template apply<child,new_k,old_k>::value,
│ │ │ -
201 typename filter_helper<Filter,new_k+1,old_k+1,tail...>::template apply<FilterDescriptors...,FilterEntry<new_k,old_k> >,
│ │ │ -
202 typename filter_helper<Filter,new_k,old_k+1,tail...>::template apply<FilterDescriptors...>
│ │ │ -
203 >::type
│ │ │ -
204 {};
│ │ │ -
205
│ │ │ -
206 };
│ │ │ -
207
│ │ │ -
208 } // anonymous namespace
│ │ │ -
209
│ │ │ -
211 template<typename Filter>
│ │ │ -
│ │ │ -
212 struct filter
│ │ │ -
213 {
│ │ │ -
214
│ │ │ -
216 template<typename Node, typename... Children>
│ │ │ -
│ │ │ -
217 struct apply
│ │ │ -
218 {
│ │ │ -
219
│ │ │ -
220 static_assert((Filter::template validate<Node>::value),"Invalid simple filter");
│ │ │ -
221
│ │ │ -
222 typedef typename filter_helper<Filter,0,0,Children...>::template apply<>::type type;
│ │ │ -
223
│ │ │ -
224 };
│ │ │ -
│ │ │ -
225
│ │ │ -
226 };
│ │ │ -
│ │ │ -
227
│ │ │ -
229
│ │ │ -
230 } // namespace TypeTree
│ │ │ -
231} //namespace Dune
│ │ │ -
232
│ │ │ -
233#endif // DUNE_TYPETREE_FILTERS_HH
│ │ │ +
123
│ │ │ +
124 template<typename... TC>
│ │ │ +
│ │ │ +
125 static typename result<TC...>::storage_type transform_storage(std::shared_ptr<const SourceNode> s, const Transformation& t, std::shared_ptr<TC>... children)
│ │ │ +
126 {
│ │ │ +
127 return std::make_shared<typename result<TC...>::type>(children...);
│ │ │ +
128 }
│ │ │ +
│ │ │ +
129
│ │ │ +
130 };
│ │ │ +
│ │ │ +
131
│ │ │ +
133
│ │ │ +
134 } // namespace TypeTree
│ │ │ +
135} //namespace Dune
│ │ │ +
136
│ │ │ +
137#endif // DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH
│ │ │ + │ │ │ + │ │ │ +
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
A filter entry describing the mapping of one child in the filtered node.
Definition filters.hh:25
│ │ │ -
The result of a filter.
Definition filters.hh:41
│ │ │ -
std::tuple< FilterEntries... > IndexMap
Definition filters.hh:45
│ │ │ -
static const std::size_t size
Definition filters.hh:43
│ │ │ -
Definition filters.hh:49
│ │ │ -
std::tuple< typename Node::template Child< FilterEntries::original_index >... > Children
Definition filters.hh:50
│ │ │ -
std::tuple< typename Node::template Child< FilterEntries::original_index >::Type... > ChildTypes
Definition filters.hh:51
│ │ │ -
std::tuple< std::shared_ptr< typename Node::template Child< FilterEntries::original_index >::Type >... > NodeStorage
Definition filters.hh:52
│ │ │ -
Tag describing a simple filter that can only decide whether or not to include a single given child.
Definition filters.hh:58
│ │ │ -
Tag describing an advanced filter that has full control over the construction of the list of FilterEn...
Definition filters.hh:61
│ │ │ -
Base class for advanced filters.
Definition filters.hh:66
│ │ │ -
AdvancedFilterTag FilterTag
Filter tag for deciding on filter application mechanism.
Definition filters.hh:69
│ │ │ -
Apply this filter to the given node and children.
Definition filters.hh:76
│ │ │ -
implementation defined type
The result of the filtering process.
Definition filters.hh:81
│ │ │ -
Default simple filter that accepts any node and leaves its child structure unchanged.
Definition filters.hh:95
│ │ │ -
SimpleFilterTag FilterTag
Filter tag for deciding on filter application mechanism.
Definition filters.hh:98
│ │ │ -
Validates the combination of filter and node.
Definition filters.hh:104
│ │ │ -
static const bool value
True if the combination of filter and node is valid.
Definition filters.hh:106
│ │ │ -
Applies the filter to the given child node.
Definition filters.hh:120
│ │ │ -
static const bool value
True if the child will be included in the filtered node.
Definition filters.hh:122
│ │ │ -
Filter class for FilteredCompositeNode that selects the children with the given indices.
Definition filters.hh:162
│ │ │ -
Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter.
Definition filters.hh:213
│ │ │ -
Apply the filter.
Definition filters.hh:218
│ │ │ -
filter_helper< Filter, 0, 0, Children... >::template apply ::type type
Definition filters.hh:222
│ │ │ +
Definition simpletransformationdescriptors.hh:28
│ │ │ +
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition simpletransformationdescriptors.hh:35
│ │ │ +
static const bool recursive
Definition simpletransformationdescriptors.hh:30
│ │ │ +
std::shared_ptr< transformed_type > transformed_storage_type
Definition simpletransformationdescriptors.hh:33
│ │ │ +
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition simpletransformationdescriptors.hh:40
│ │ │ +
TransformedNode transformed_type
Definition simpletransformationdescriptors.hh:32
│ │ │ +
Definition simpletransformationdescriptors.hh:50
│ │ │ +
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition simpletransformationdescriptors.hh:69
│ │ │ +
static const bool recursive
Definition simpletransformationdescriptors.hh:52
│ │ │ +
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition simpletransformationdescriptors.hh:63
│ │ │ +
Definition simpletransformationdescriptors.hh:56
│ │ │ +
TransformedNode< TC, StaticDegree< SourceNode >::value > type
Definition simpletransformationdescriptors.hh:57
│ │ │ +
static const std::size_t degree
Definition simpletransformationdescriptors.hh:59
│ │ │ +
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:58
│ │ │ +
Definition simpletransformationdescriptors.hh:79
│ │ │ +
static const bool recursive
Definition simpletransformationdescriptors.hh:81
│ │ │ +
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition simpletransformationdescriptors.hh:91
│ │ │ +
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition simpletransformationdescriptors.hh:97
│ │ │ +
Definition simpletransformationdescriptors.hh:85
│ │ │ +
TransformedNode< TC > type
Definition simpletransformationdescriptors.hh:86
│ │ │ +
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:87
│ │ │ +
Definition simpletransformationdescriptors.hh:107
│ │ │ +
static const bool recursive
Definition simpletransformationdescriptors.hh:109
│ │ │ +
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition simpletransformationdescriptors.hh:125
│ │ │ +
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >... children)
Definition simpletransformationdescriptors.hh:119
│ │ │ +
Definition simpletransformationdescriptors.hh:113
│ │ │ +
std::shared_ptr< type > storage_type
Definition simpletransformationdescriptors.hh:115
│ │ │ +
TransformedNode< TC... > type
Definition simpletransformationdescriptors.hh:114
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,319 +1,257 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -filters.hh │ │ │ │ +simpletransformationdescriptors.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_FILTERS_HH │ │ │ │ -7#define DUNE_TYPETREE_FILTERS_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +7#define DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ +9#include │ │ │ │ 10#include │ │ │ │ -11 │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14namespace _D_u_n_e { │ │ │ │ -15 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +11#include │ │ │ │ +12 │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ +15#include │ │ │ │ 16 │ │ │ │ -21 │ │ │ │ -23 template │ │ │ │ -_2_4 struct _F_i_l_t_e_r_E_n_t_r_y │ │ │ │ -25 { │ │ │ │ -26 │ │ │ │ -27#ifndef DOXYGEN │ │ │ │ -28 │ │ │ │ -29 // The precise contents of this class is an implementation detail. │ │ │ │ -30 │ │ │ │ -31 static const std::size_t filtered_index = new_k; │ │ │ │ -32 static const std::size_t original_index = old_k; │ │ │ │ -33 │ │ │ │ -34#endif // DOXYGEN │ │ │ │ -35 │ │ │ │ -36 }; │ │ │ │ -37 │ │ │ │ -39 template │ │ │ │ -_4_0 struct _F_i_l_t_e_r_R_e_s_u_l_t │ │ │ │ +17 │ │ │ │ +18namespace _D_u_n_e { │ │ │ │ +19 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +20 │ │ │ │ +25 │ │ │ │ +26 template │ │ │ │ +_2_7 struct _S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +28 { │ │ │ │ +29 │ │ │ │ +_3_0 static const bool _r_e_c_u_r_s_i_v_e = false; │ │ │ │ +31 │ │ │ │ +_3_2 typedef TransformedNode _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e; │ │ │ │ +_3_3 typedef std::shared_ptr _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +34 │ │ │ │ +_3_5 static _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const Transformation& │ │ │ │ +t) │ │ │ │ +36 { │ │ │ │ +37 return _t_r_a_n_s_f_o_r_m_e_d___t_y_p_e(); │ │ │ │ +38 } │ │ │ │ +39 │ │ │ │ +_4_0 static _t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std::shared_ptr s, const Transformation& t) │ │ │ │ 41 { │ │ │ │ -42 │ │ │ │ -_4_3 static const std::size_t _s_i_z_e = sizeof...(FilterEntries); │ │ │ │ +42 return std::make_shared(); │ │ │ │ +43 } │ │ │ │ 44 │ │ │ │ -_4_5 typedef std::tuple _I_n_d_e_x_M_a_p; │ │ │ │ +45 }; │ │ │ │ 46 │ │ │ │ -47 template │ │ │ │ -_4_8 struct _a_p_p_l_y │ │ │ │ -49 { │ │ │ │ -_5_0 typedef std::tuple...> _C_h_i_l_d_r_e_n; │ │ │ │ -_5_1 typedef std::tuple::Type...> _C_h_i_l_d_T_y_p_e_s; │ │ │ │ -_5_2 typedef std::tuple::Type>...> _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -53 }; │ │ │ │ -54 │ │ │ │ -55 }; │ │ │ │ -56 │ │ │ │ -_5_8 struct _S_i_m_p_l_e_F_i_l_t_e_r_T_a_g {}; │ │ │ │ -59 │ │ │ │ -_6_1 struct _A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g {}; │ │ │ │ -62 │ │ │ │ -63 │ │ │ │ -_6_5 struct _A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ -66 { │ │ │ │ +47 │ │ │ │ +48 template class TransformedNode> │ │ │ │ +_4_9 struct _S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +50 { │ │ │ │ +51 │ │ │ │ +_5_2 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ +53 │ │ │ │ +54 template │ │ │ │ +_5_5 struct _r_e_s_u_l_t │ │ │ │ +56 { │ │ │ │ +_5_7 typedef TransformedNode::value> _t_y_p_e; │ │ │ │ +_5_8 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +_5_9 static const std::size_t _d_e_g_r_e_e = _S_t_a_t_i_c_D_e_g_r_e_e_<_t_y_p_e_>_:_:_v_a_l_u_e; │ │ │ │ +60 }; │ │ │ │ +61 │ │ │ │ +62 template │ │ │ │ +_6_3 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& │ │ │ │ +children) │ │ │ │ +64 { │ │ │ │ +65 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(children); │ │ │ │ +66 } │ │ │ │ 67 │ │ │ │ -_6_9 typedef _A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g _F_i_l_t_e_r_T_a_g; │ │ │ │ -70 │ │ │ │ -71#ifdef DOXYGEN │ │ │ │ -72 │ │ │ │ -74 template │ │ │ │ -_7_5 struct _a_p_p_l_y │ │ │ │ -76 { │ │ │ │ -78 │ │ │ │ -_8_1 typedef implementation-defined _t_y_p_e; │ │ │ │ -82 }; │ │ │ │ -83 │ │ │ │ -84#endif // DOXYGEN │ │ │ │ -85 │ │ │ │ -86 }; │ │ │ │ -87 │ │ │ │ +68 template │ │ │ │ +_6_9 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, const std::array,_r_e_s_u_l_t_<_T_C_>_:_:_d_e_g_r_e_e>& children) │ │ │ │ +70 { │ │ │ │ +71 return std::make_shared::type>(children); │ │ │ │ +72 } │ │ │ │ +73 │ │ │ │ +74 }; │ │ │ │ +75 │ │ │ │ +76 │ │ │ │ +77 template class TransformedNode> │ │ │ │ +_7_8 struct _S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +79 { │ │ │ │ +80 │ │ │ │ +_8_1 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ +82 │ │ │ │ +83 template │ │ │ │ +_8_4 struct _r_e_s_u_l_t │ │ │ │ +85 { │ │ │ │ +_8_6 typedef TransformedNode _t_y_p_e; │ │ │ │ +_8_7 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +88 }; │ │ │ │ 89 │ │ │ │ -_9_4 struct _S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ -95 { │ │ │ │ -96 │ │ │ │ -_9_8 typedef _S_i_m_p_l_e_F_i_l_t_e_r_T_a_g _F_i_l_t_e_r_T_a_g; │ │ │ │ -99 │ │ │ │ -100 │ │ │ │ -102 template │ │ │ │ -_1_0_3 struct _v_a_l_i_d_a_t_e │ │ │ │ -104 { │ │ │ │ -_1_0_6 static const bool _v_a_l_u_e = true; │ │ │ │ -107 }; │ │ │ │ +90 template │ │ │ │ +_9_1 static typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, const std::vector>& children) │ │ │ │ +92 { │ │ │ │ +93 return typename _r_e_s_u_l_t_<_T_C_>_:_:_t_y_p_e(children); │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +96 template │ │ │ │ +_9_7 static typename _r_e_s_u_l_t_<_T_C_>_:_:_s_t_o_r_a_g_e___t_y_p_e _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, const std:: │ │ │ │ +vector>& children) │ │ │ │ +98 { │ │ │ │ +99 return std::make_shared::type>(children); │ │ │ │ +100 } │ │ │ │ +101 │ │ │ │ +102 }; │ │ │ │ +103 │ │ │ │ +104 │ │ │ │ +105 template class TransformedNode> │ │ │ │ +_1_0_6 struct _S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +107 { │ │ │ │ 108 │ │ │ │ +_1_0_9 static const bool _r_e_c_u_r_s_i_v_e = true; │ │ │ │ 110 │ │ │ │ -118 template │ │ │ │ -_1_1_9 struct _a_p_p_l_y │ │ │ │ +111 template │ │ │ │ +_1_1_2 struct _r_e_s_u_l_t │ │ │ │ +113 { │ │ │ │ +_1_1_4 typedef TransformedNode _t_y_p_e; │ │ │ │ +_1_1_5 typedef std::shared_ptr _s_t_o_r_a_g_e___t_y_p_e; │ │ │ │ +116 }; │ │ │ │ +117 │ │ │ │ +118 template │ │ │ │ +_1_1_9 static typename _r_e_s_u_l_t::type _t_r_a_n_s_f_o_r_m(const SourceNode& s, const │ │ │ │ +Transformation& t, std::shared_ptr... children) │ │ │ │ 120 { │ │ │ │ -_1_2_2 static const bool _v_a_l_u_e = true; │ │ │ │ -123 }; │ │ │ │ -124 │ │ │ │ -125 }; │ │ │ │ -126 │ │ │ │ -127 namespace { │ │ │ │ -128 │ │ │ │ -129 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -130 // IndexFilter helpers │ │ │ │ -131 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -132 │ │ │ │ -133 template │ │ │ │ -134 struct index_filter_helper │ │ │ │ -135 { │ │ │ │ -136 template │ │ │ │ -137 struct apply │ │ │ │ -138 { │ │ │ │ -139 typedef _F_i_l_t_e_r_R_e_s_u_l_t type; │ │ │ │ -140 }; │ │ │ │ -141 }; │ │ │ │ -142 │ │ │ │ -143 template │ │ │ │ -144 struct index_filter_helper │ │ │ │ -145 { │ │ │ │ -146 template │ │ │ │ -147 struct apply │ │ │ │ -148 : public index_filter_helper::template │ │ │ │ -apply │ │ │ │ -151 > │ │ │ │ -152 {}; │ │ │ │ -153 }; │ │ │ │ -154 │ │ │ │ -155 } // anonymous namespace │ │ │ │ -156 │ │ │ │ -157 │ │ │ │ -159 template │ │ │ │ -_1_6_0 struct _I_n_d_e_x_F_i_l_t_e_r │ │ │ │ -161 : public _A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ -162 { │ │ │ │ -163 │ │ │ │ -164#ifndef DOXYGEN │ │ │ │ -165 │ │ │ │ -166 template │ │ │ │ -167 struct _a_p_p_l_y │ │ │ │ -168 { │ │ │ │ -169 typedef typename index_filter_helper::template _a_p_p_l_y_<_>_:_: │ │ │ │ -_t_y_p_e type; │ │ │ │ -170 }; │ │ │ │ -171 │ │ │ │ -172#endif // DOXYGEN │ │ │ │ -173 │ │ │ │ -174 }; │ │ │ │ -175 │ │ │ │ -176 │ │ │ │ -177 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -178 // filter: Wrapper class for turning a simple filter into an advanced │ │ │ │ -filter │ │ │ │ -179 // usable by FilteredCompositeNode │ │ │ │ -180 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -181 │ │ │ │ -182 namespace { │ │ │ │ -183 │ │ │ │ -184 template │ │ │ │ -185 struct filter_helper │ │ │ │ -186 { │ │ │ │ -187 template │ │ │ │ -188 struct apply │ │ │ │ -189 { │ │ │ │ -190 typedef _F_i_l_t_e_r_R_e_s_u_l_t type; │ │ │ │ -191 }; │ │ │ │ -192 }; │ │ │ │ -193 │ │ │ │ -194 template │ │ │ │ -195 struct filter_helper │ │ │ │ -196 { │ │ │ │ -197 │ │ │ │ -198 template │ │ │ │ -199 struct apply │ │ │ │ -200 : public std::conditional::value, │ │ │ │ -201 typename filter_helper::template │ │ │ │ -apply >, │ │ │ │ -202 typename filter_helper::template │ │ │ │ -apply │ │ │ │ -203 >::type │ │ │ │ -204 {}; │ │ │ │ -205 │ │ │ │ -206 }; │ │ │ │ -207 │ │ │ │ -208 } // anonymous namespace │ │ │ │ -209 │ │ │ │ -211 template │ │ │ │ -_2_1_2 struct _f_i_l_t_e_r │ │ │ │ -213 { │ │ │ │ -214 │ │ │ │ -216 template │ │ │ │ -_2_1_7 struct _a_p_p_l_y │ │ │ │ -218 { │ │ │ │ -219 │ │ │ │ -220 static_assert((Filter::template validate::value),"Invalid simple │ │ │ │ -filter"); │ │ │ │ -221 │ │ │ │ -_2_2_2 typedef typename filter_helper::template _a_p_p_l_y_<_>_:_: │ │ │ │ -_t_y_p_e _t_y_p_e; │ │ │ │ -223 │ │ │ │ -224 }; │ │ │ │ -225 │ │ │ │ -226 }; │ │ │ │ -227 │ │ │ │ -229 │ │ │ │ -230 } // namespace TypeTree │ │ │ │ -231} //namespace Dune │ │ │ │ -232 │ │ │ │ -233#endif // DUNE_TYPETREE_FILTERS_HH │ │ │ │ +121 return typename _r_e_s_u_l_t_<_T_C_._._._>_:_:_t_y_p_e(children...); │ │ │ │ +122 } │ │ │ │ +123 │ │ │ │ +124 template │ │ │ │ +_1_2_5 static typename _r_e_s_u_l_t::storage_type _t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e(std:: │ │ │ │ +shared_ptr s, const Transformation& t, std::shared_ptr... │ │ │ │ +children) │ │ │ │ +126 { │ │ │ │ +127 return std::make_shared::type>(children...); │ │ │ │ +128 } │ │ │ │ +129 │ │ │ │ +130 }; │ │ │ │ +131 │ │ │ │ +133 │ │ │ │ +134 } // namespace TypeTree │ │ │ │ +135} //namespace Dune │ │ │ │ +136 │ │ │ │ +137#endif // DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH │ │ │ │ +_n_o_d_e_t_a_g_s_._h_h │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_D_e_g_r_e_e │ │ │ │ +decltype(Node::degree()) StaticDegree │ │ │ │ +Returns the statically known degree of the given Node type as a std:: │ │ │ │ +integral_constant. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:107 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_E_n_t_r_y │ │ │ │ -A filter entry describing the mapping of one child in the filtered node. │ │ │ │ -DDeeffiinniittiioonn filters.hh:25 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t │ │ │ │ -The result of a filter. │ │ │ │ -DDeeffiinniittiioonn filters.hh:41 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_I_n_d_e_x_M_a_p │ │ │ │ -std::tuple< FilterEntries... > IndexMap │ │ │ │ -DDeeffiinniittiioonn filters.hh:45 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_<_ _F_i_l_t_e_r_E_n_t_r_i_e_s_._._._ _>_:_:_s_i_z_e │ │ │ │ -static const std::size_t size │ │ │ │ -DDeeffiinniittiioonn filters.hh:43 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y │ │ │ │ -DDeeffiinniittiioonn filters.hh:49 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_C_h_i_l_d_r_e_n │ │ │ │ -std::tuple< typename Node::template Child< FilterEntries::original_index >... > │ │ │ │ -Children │ │ │ │ -DDeeffiinniittiioonn filters.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ -std::tuple< typename Node::template Child< FilterEntries::original_index >:: │ │ │ │ -Type... > ChildTypes │ │ │ │ -DDeeffiinniittiioonn filters.hh:51 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_R_e_s_u_l_t_:_:_a_p_p_l_y_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::tuple< std::shared_ptr< typename Node::template Child< FilterEntries:: │ │ │ │ -original_index >::Type >... > NodeStorage │ │ │ │ -DDeeffiinniittiioonn filters.hh:52 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ -Tag describing a simple filter that can only decide whether or not to include a │ │ │ │ -single given child. │ │ │ │ -DDeeffiinniittiioonn filters.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ -Tag describing an advanced filter that has full control over the construction │ │ │ │ -of the list of FilterEn... │ │ │ │ -DDeeffiinniittiioonn filters.hh:61 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r │ │ │ │ -Base class for advanced filters. │ │ │ │ -DDeeffiinniittiioonn filters.hh:66 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_F_i_l_t_e_r_T_a_g │ │ │ │ -AdvancedFilterTag FilterTag │ │ │ │ -Filter tag for deciding on filter application mechanism. │ │ │ │ -DDeeffiinniittiioonn filters.hh:69 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ -Apply this filter to the given node and children. │ │ │ │ -DDeeffiinniittiioonn filters.hh:76 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_:_:_a_p_p_l_y_:_:_t_y_p_e │ │ │ │ -implementation defined type │ │ │ │ -The result of the filtering process. │ │ │ │ -DDeeffiinniittiioonn filters.hh:81 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r │ │ │ │ -Default simple filter that accepts any node and leaves its child structure │ │ │ │ -unchanged. │ │ │ │ -DDeeffiinniittiioonn filters.hh:95 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_F_i_l_t_e_r_T_a_g │ │ │ │ -SimpleFilterTag FilterTag │ │ │ │ -Filter tag for deciding on filter application mechanism. │ │ │ │ -DDeeffiinniittiioonn filters.hh:98 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e │ │ │ │ -Validates the combination of filter and node. │ │ │ │ -DDeeffiinniittiioonn filters.hh:104 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_v_a_l_i_d_a_t_e_:_:_v_a_l_u_e │ │ │ │ -static const bool value │ │ │ │ -True if the combination of filter and node is valid. │ │ │ │ -DDeeffiinniittiioonn filters.hh:106 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ -Applies the filter to the given child node. │ │ │ │ -DDeeffiinniittiioonn filters.hh:120 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_:_:_a_p_p_l_y_:_:_v_a_l_u_e │ │ │ │ -static const bool value │ │ │ │ -True if the child will be included in the filtered node. │ │ │ │ -DDeeffiinniittiioonn filters.hh:122 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_n_d_e_x_F_i_l_t_e_r │ │ │ │ -Filter class for FilteredCompositeNode that selects the children with the given │ │ │ │ -indices. │ │ │ │ -DDeeffiinniittiioonn filters.hh:162 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r │ │ │ │ -Adapter class that takes a SimpleFilter, validated it and turns it into an │ │ │ │ -AdvancedFilter. │ │ │ │ -DDeeffiinniittiioonn filters.hh:213 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_:_:_a_p_p_l_y │ │ │ │ -Apply the filter. │ │ │ │ -DDeeffiinniittiioonn filters.hh:218 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_f_i_l_t_e_r_:_:_a_p_p_l_y_:_:_t_y_p_e │ │ │ │ -filter_helper< Filter, 0, 0, Children... >::template apply ::type type │ │ │ │ -DDeeffiinniittiioonn filters.hh:222 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:28 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static transformed_type transform(const SourceNode &s, const Transformation &t) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:35 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:30 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< transformed_type > transformed_storage_type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:33 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static transformed_storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:40 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_L_e_a_f_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m_e_d___t_y_p_e │ │ │ │ +TransformedNode transformed_type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:32 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC │ │ │ │ +>, result< TC >::degree > &children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:69 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:52 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ +&t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:63 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:56 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< TC, StaticDegree< SourceNode >::value > type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:57 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_d_e_g_r_e_e │ │ │ │ +static const std::size_t degree │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:59 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:58 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:79 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:81 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC >::type transform(const SourceNode &s, const Transformation │ │ │ │ +&t, const std::vector< std::shared_ptr< TC > > &children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:91 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC │ │ │ │ +> > &children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:97 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< TC > type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:86 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:87 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:107 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_c_u_r_s_i_v_e │ │ │ │ +static const bool recursive │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:109 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m___s_t_o_r_a_g_e │ │ │ │ +static result< TC... >::storage_type transform_storage(std::shared_ptr< const │ │ │ │ +SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:125 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_t_r_a_n_s_f_o_r_m │ │ │ │ +static result< TC... >::type transform(const SourceNode &s, const │ │ │ │ +Transformation &t, std::shared_ptr< TC >... children) │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:119 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:113 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_s_t_o_r_a_g_e___t_y_p_e │ │ │ │ +std::shared_ptr< type > storage_type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:115 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_C_o_m_p_o_s_i_t_e_N_o_d_e_T_r_a_n_s_f_o_r_m_a_t_i_o_n_:_:_r_e_s_u_l_t_:_:_t_y_p_e │ │ │ │ +TransformedNode< TC... > type │ │ │ │ +DDeeffiinniittiioonn simpletransformationdescriptors.hh:114 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00071.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: filteredcompositenode.hh File Reference │ │ │ +dune-typetree: compositenode.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,34 +74,32 @@ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
filteredcompositenode.hh File Reference
│ │ │ +
compositenode.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <memory>
│ │ │ -#include <tuple>
│ │ │ +
#include <tuple>
│ │ │ +#include <memory>
│ │ │ #include <type_traits>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/filters.hh>
│ │ │ -#include <dune/common/shared_ptr.hh>
│ │ │ -#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ +#include <dune/typetree/nodetags.hh>
│ │ │ +#include <dune/typetree/childextraction.hh>
│ │ │ +#include <dune/typetree/typetraits.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

class  Dune::TypeTree::FilteredCompositeNode< Node, Filter >
 Base class for composite nodes representing a filtered view on an underlying composite node. More...
struct  Dune::TypeTree::FilteredCompositeNode< Node, Filter >::Child< k >
 Access to the type and storage type of the i-th child. More...
class  Dune::TypeTree::CompositeNode< Children >
 Base class for composite nodes based on variadic templates. More...
struct  Dune::TypeTree::CompositeNode< Children >::Child< k >
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,28 +1,25 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -filteredcompositenode.hh File Reference │ │ │ │ -#include │ │ │ │ +compositenode.hh File Reference │ │ │ │ #include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _N_o_d_e_,_ _F_i_l_t_e_r_ _> │ │ │ │ -  Base class for composite nodes representing a filtered view on an │ │ │ │ - underlying composite node. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _N_o_d_e_,_ _F_i_l_t_e_r_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │ + class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ +  Base class for composite nodes based on variadic templates. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _C_h_i_l_d_r_e_n_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │   Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00071_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: filteredcompositenode.hh Source File │ │ │ +dune-typetree: compositenode.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,291 +71,268 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
filteredcompositenode.hh
│ │ │ +
compositenode.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │ -
7#define DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │ +
7#define DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │
8
│ │ │ -
9#include <memory>
│ │ │ -
10#include <tuple>
│ │ │ +
9#include <tuple>
│ │ │ +
10#include <memory>
│ │ │
11#include <type_traits>
│ │ │
12
│ │ │ - │ │ │ - │ │ │ -
15#include <dune/common/shared_ptr.hh>
│ │ │ -
16#include <dune/common/typetraits.hh>
│ │ │ -
17#include <dune/common/indices.hh>
│ │ │ -
18
│ │ │ - │ │ │ - │ │ │ -
21
│ │ │ -
22namespace Dune {
│ │ │ -
23 namespace TypeTree {
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
16
│ │ │ +
17namespace Dune {
│ │ │ +
18 namespace TypeTree {
│ │ │ +
19
│ │ │
24
│ │ │ +
26 template<typename... Children>
│ │ │ +
│ │ │ + │ │ │ +
28 {
│ │ │
29
│ │ │ -
30#ifndef DOXYGEN
│ │ │ -
31 namespace {
│ │ │ -
32
│ │ │ -
33 // ********************************************************************************
│ │ │ -
34 // Utility structs for filter construction and application
│ │ │ -
35 // ********************************************************************************
│ │ │ -
36
│ │ │ -
37 // Gets the filter and wraps it in case of a SimpleFilter.
│ │ │ -
38 template<typename Filter, typename Tag>
│ │ │ -
39 struct get_filter;
│ │ │ -
40
│ │ │ -
41 // Helper struct to extract the child template parameter pack from the ChildTypes tuple.
│ │ │ -
42 template<typename Filter, typename Node, typename ChildTypes>
│ │ │ -
43 struct apply_filter_wrapper;
│ │ │ -
44
│ │ │ -
45 template<typename Filter, typename Node, typename... Children>
│ │ │ -
46 struct apply_filter_wrapper<Filter,Node,std::tuple<Children...> >
│ │ │ -
47 : public Filter::template apply<Node,Children...>
│ │ │ -
48 {};
│ │ │ +
30 public:
│ │ │ +
31
│ │ │ + │ │ │ +
34
│ │ │ +
36 typedef std::tuple<std::shared_ptr<Children>... > NodeStorage;
│ │ │ +
37
│ │ │ +
39 typedef std::tuple<Children...> ChildTypes;
│ │ │ +
40
│ │ │ +
42 static const bool isLeaf = false;
│ │ │ +
43
│ │ │ +
45 static const bool isPower = false;
│ │ │ +
46
│ │ │ +
48 static const bool isComposite = true;
│ │ │
49
│ │ │ -
50 // specialization for SimpleFilter
│ │ │ -
51 template<typename Filter>
│ │ │ -
52 struct get_filter<Filter,SimpleFilterTag>
│ │ │ -
53 {
│ │ │ -
54 struct type
│ │ │ -
55 {
│ │ │ -
56 template<typename Node, typename ChildTypes>
│ │ │ -
57 struct apply
│ │ │ -
58 : public apply_filter_wrapper<filter<Filter>,Node,ChildTypes>
│ │ │ -
59 {};
│ │ │ -
60 };
│ │ │ -
61 };
│ │ │ -
62
│ │ │ -
63 // specialization for AdvancedFilter
│ │ │ -
64 template<typename Filter>
│ │ │ -
65 struct get_filter<Filter,AdvancedFilterTag>
│ │ │ -
66 {
│ │ │ -
67 struct type
│ │ │ -
68 {
│ │ │ -
69 template<typename Node, typename ChildTypes>
│ │ │ -
70 struct apply
│ │ │ -
71 : public apply_filter_wrapper<Filter,Node,ChildTypes>
│ │ │ -
72 {};
│ │ │ -
73 };
│ │ │ -
74 };
│ │ │ -
75
│ │ │ -
76 } // anonymous namespace
│ │ │ -
77#endif // DOXYGEN
│ │ │ -
78
│ │ │ -
79
│ │ │ -
81 template<typename Node, typename Filter>
│ │ │ -
│ │ │ - │ │ │ -
83 {
│ │ │ -
84
│ │ │ -
85 typedef typename get_filter<Filter,typename Filter::FilterTag>::type filter;
│ │ │ -
86 typedef typename filter::template apply<Node,typename Node::ChildTypes>::type filter_result;
│ │ │ -
87 typedef typename filter_result::template apply<Node> mapped_children;
│ │ │ -
88
│ │ │ -
89 static const bool nodeIsConst = std::is_const<typename std::remove_reference<Node>::type>::value;
│ │ │ -
90
│ │ │ -
91 template<std::size_t k>
│ │ │ -
92 struct lazy_enable
│ │ │ -
93 {
│ │ │ -
94 static const bool value = !nodeIsConst;
│ │ │ -
95 };
│ │ │ -
96
│ │ │ -
97 public:
│ │ │ -
98
│ │ │ - │ │ │ -
101
│ │ │ -
103 typedef typename mapped_children::NodeStorage NodeStorage;
│ │ │ -
104
│ │ │ -
106 typedef typename mapped_children::ChildTypes ChildTypes;
│ │ │ -
107
│ │ │ -
109 static const bool isLeaf = false;
│ │ │ +
│ │ │ +
50 static constexpr auto degree ()
│ │ │ +
51 {
│ │ │ +
52 return std::integral_constant<std::size_t,sizeof...(Children)>{};
│ │ │ +
53 }
│ │ │ +
│ │ │ +
54
│ │ │ +
56 template<std::size_t k>
│ │ │ +
│ │ │ +
57 struct Child {
│ │ │ +
58
│ │ │ +
59 static_assert((k < degree()), "child index out of range");
│ │ │ +
60
│ │ │ +
62 typedef typename std::tuple_element<k,ChildTypes>::type Type;
│ │ │ +
63
│ │ │ +
65 typedef typename std::tuple_element<k,ChildTypes>::type type;
│ │ │ +
66 };
│ │ │ +
│ │ │ +
67
│ │ │ +
70
│ │ │ +
72
│ │ │ +
75 template<std::size_t k>
│ │ │ +
│ │ │ +
76 typename Child<k>::Type& child (index_constant<k> = {})
│ │ │ +
77 {
│ │ │ +
78 return *std::get<k>(_children);
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
82
│ │ │ +
85 template<std::size_t k>
│ │ │ +
│ │ │ +
86 const typename Child<k>::Type& child (index_constant<k> = {}) const
│ │ │ +
87 {
│ │ │ +
88 return *std::get<k>(_children);
│ │ │ +
89 }
│ │ │ +
│ │ │ +
90
│ │ │ +
92
│ │ │ +
95 template<std::size_t k>
│ │ │ +
│ │ │ +
96 std::shared_ptr<typename Child<k>::Type> childStorage (index_constant<k> = {})
│ │ │ +
97 {
│ │ │ +
98 return std::get<k>(_children);
│ │ │ +
99 }
│ │ │ +
│ │ │ +
100
│ │ │ +
102
│ │ │ +
105 template<std::size_t k>
│ │ │ +
│ │ │ +
106 std::shared_ptr<const typename Child<k>::Type> childStorage (index_constant<k> = {}) const
│ │ │ +
107 {
│ │ │ +
108 return std::get<k>(_children);
│ │ │ +
109 }
│ │ │ +
│ │ │
110
│ │ │ -
112 static const bool isPower = false;
│ │ │ -
113
│ │ │ -
115 static const bool isComposite = true;
│ │ │ -
116
│ │ │ -
│ │ │ -
117 static constexpr auto degree ()
│ │ │ -
118 {
│ │ │ -
119 return std::integral_constant<std::size_t,filter_result::size>{};
│ │ │ -
120 }
│ │ │ -
│ │ │ -
121
│ │ │ -
123 template<std::size_t k>
│ │ │ -
│ │ │ -
124 struct Child {
│ │ │ -
125
│ │ │ -
126#ifndef DOXYGEN
│ │ │ -
127
│ │ │ -
128 typedef typename std::tuple_element<k,typename mapped_children::Children>::type OriginalChild;
│ │ │ -
129
│ │ │ -
130 static const std::size_t mapped_index = std::tuple_element<k,typename filter_result::IndexMap>::type::original_index;
│ │ │ +
112 template<std::size_t k>
│ │ │ +
│ │ │ +
113 void setChild (typename Child<k>::Type& child, index_constant<k> = {})
│ │ │ +
114 {
│ │ │ +
115 std::get<k>(_children) = stackobject_to_shared_ptr(child);
│ │ │ +
116 }
│ │ │ +
│ │ │ +
117
│ │ │ +
119 template<std::size_t k>
│ │ │ +
│ │ │ +
120 void setChild (typename Child<k>::Type&& child, index_constant<k> = {})
│ │ │ +
121 {
│ │ │ +
122 std::get<k>(_children) = convert_arg(std::move(child));
│ │ │ +
123 }
│ │ │ +
│ │ │ +
124
│ │ │ +
126 template<std::size_t k>
│ │ │ +
│ │ │ +
127 void setChild (std::shared_ptr<typename Child<k>::Type> child, index_constant<k> = {})
│ │ │ +
128 {
│ │ │ +
129 std::get<k>(_children) = std::move(child);
│ │ │ +
130 }
│ │ │ +
│ │ │
131
│ │ │ -
132#endif // DOXYGEN
│ │ │ -
133
│ │ │ -
135 typedef typename OriginalChild::Type Type;
│ │ │ -
136
│ │ │ -
138 typedef typename OriginalChild::type type;
│ │ │ -
139 };
│ │ │ +
│ │ │ +
132 const NodeStorage& nodeStorage () const
│ │ │ +
133 {
│ │ │ +
134 return _children;
│ │ │ +
135 }
│ │ │
│ │ │ -
140
│ │ │ -
143
│ │ │ -
145
│ │ │ -
148 template<std::size_t k,
│ │ │ -
149 typename std::enable_if<lazy_enable<k>::value, int>::type = 0>
│ │ │ -
│ │ │ -
150 auto& child (index_constant<k> = {})
│ │ │ -
151 {
│ │ │ -
152 return _node->template child<Child<k>::mapped_index>();
│ │ │ -
153 }
│ │ │ -
│ │ │ -
154
│ │ │ -
156
│ │ │ -
159 template<std::size_t k>
│ │ │ -
│ │ │ -
160 const auto& child (index_constant<k> = {}) const
│ │ │ -
161 {
│ │ │ -
162 return _node->template child<Child<k>::mapped_index>();
│ │ │ -
163 }
│ │ │ -
│ │ │ -
164
│ │ │ -
166
│ │ │ -
169 template<std::size_t k,
│ │ │ -
170 typename std::enable_if<lazy_enable<k>::value, int>::type = 0>
│ │ │ -
│ │ │ -
171 auto childStorage (index_constant<k> = {})
│ │ │ +
136
│ │ │ +
138
│ │ │ +
141
│ │ │ +
142 // The following two methods require a little bit of SFINAE trickery to work correctly:
│ │ │ +
143 // We have to make sure that they don't shadow the methods for direct child access because
│ │ │ +
144 // those get called by the generic child() machinery. If that machinery picks up the methods
│ │ │ +
145 // defined below, we have an infinite recursion.
│ │ │ +
146 // So the methods make sure that either
│ │ │ +
147 //
│ │ │ +
148 // * there are more than one argument. In that case, we got multiple indices and can forward
│ │ │ +
149 // to the general machine.
│ │ │ +
150 //
│ │ │ +
151 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
│ │ │ +
152 // The argument thus has to be some kind of TreePath instance that we can also pass to the
│ │ │ +
153 // generic machine.
│ │ │ +
154 //
│ │ │ +
155 // The above SFINAE logic works, but there is still a problem with the return type deduction.
│ │ │ +
156 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
│ │ │ +
157 // type deduction will trigger the infinite recursion.
│ │ │ +
158
│ │ │ +
160
│ │ │ +
164#ifdef DOXYGEN
│ │ │ +
165 template<typename... Indices>
│ │ │ +
│ │ │ +
166 ImplementationDefined& child (Indices... indices)
│ │ │ +
167#else
│ │ │ +
168 template<typename I0, typename... I,
│ │ │ +
169 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ +
170 decltype(auto) child (I0 i0, I... i)
│ │ │ +
171#endif
│ │ │
172 {
│ │ │ -
173 return _node->template childStorage<Child<k>::mapped_index>();
│ │ │ -
174 }
│ │ │ -
│ │ │ -
175
│ │ │ -
177
│ │ │ -
180 template<std::size_t k>
│ │ │ -
│ │ │ -
181 auto childStorage (index_constant<k> = {}) const
│ │ │ -
182 {
│ │ │ -
183 return _node->template childStorage<Child<k>::mapped_index>();
│ │ │ -
184 }
│ │ │ -
│ │ │ -
185
│ │ │ -
187 template<std::size_t k, class ChildType>
│ │ │ -
│ │ │ -
188 void setChild (ChildType&& child, typename std::enable_if<lazy_enable<k>::value,void*>::type = 0)
│ │ │ -
189 {
│ │ │ -
190 _node->template setChild<Child<k>::mapped_index>(std::forward<ChildType>(child));
│ │ │ -
191 }
│ │ │ -
│ │ │ -
192
│ │ │ -
194
│ │ │ -
197
│ │ │ -
198 protected:
│ │ │ -
199
│ │ │ -
201
│ │ │ -
204 template<bool enabled = !nodeIsConst>
│ │ │ -
205 typename std::enable_if<enabled,Node&>::type
│ │ │ -
│ │ │ - │ │ │ -
207 {
│ │ │ -
208 return *_node;
│ │ │ -
209 }
│ │ │ -
│ │ │ -
210
│ │ │ -
212
│ │ │ -
│ │ │ -
215 const Node& unfiltered () const
│ │ │ -
216 {
│ │ │ -
217 return *_node;
│ │ │ -
218 }
│ │ │ -
│ │ │ -
219
│ │ │ -
221
│ │ │ -
224 template<bool enabled = !nodeIsConst>
│ │ │ -
225 typename std::enable_if<enabled,std::shared_ptr<Node> >::type
│ │ │ -
│ │ │ - │ │ │ -
227 {
│ │ │ -
228 return _node;
│ │ │ -
229 }
│ │ │ +
173 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ +
174 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ +
175 );
│ │ │ +
176 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ +
177 }
│ │ │ +
│ │ │ +
178
│ │ │ +
180
│ │ │ +
184#ifdef DOXYGEN
│ │ │ +
185 template<typename... Indices>
│ │ │ +
│ │ │ +
186 const ImplementationDefined& child (Indices... indices)
│ │ │ +
187#else
│ │ │ +
188 template<typename I0, typename... I,
│ │ │ +
189 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ +
190 decltype(auto) child (I0 i0, I... i) const
│ │ │ +
191#endif
│ │ │ +
192 {
│ │ │ +
193 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ +
194 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ +
195 );
│ │ │ +
196 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ +
197 }
│ │ │ +
│ │ │ +
198
│ │ │ +
200
│ │ │ +
201 protected:
│ │ │ +
202
│ │ │ +
205
│ │ │ +
207
│ │ │ +
│ │ │ + │ │ │ +
215 {}
│ │ │ +
│ │ │ +
216
│ │ │ +
218 template<typename... Args, typename = typename std::enable_if<(sizeof...(Args) == degree())>::type>
│ │ │ +
│ │ │ +
219 CompositeNode (Args&&... args)
│ │ │ +
220 : _children(convert_arg(std::forward<Args>(args))...)
│ │ │ +
221 {}
│ │ │ +
│ │ │ +
222
│ │ │ +
│ │ │ +
224 CompositeNode (std::shared_ptr<Children>... children)
│ │ │ +
225 : _children(std::move(children)...)
│ │ │ +
226 {}
│ │ │ +
│ │ │ +
227
│ │ │ +
│ │ │ +
229 CompositeNode (const NodeStorage& children)
│ │ │ +
230 : _children(children)
│ │ │ +
231 {}
│ │ │
│ │ │ -
230
│ │ │
232
│ │ │ -
│ │ │ -
235 std::shared_ptr<const Node> unfilteredStorage () const
│ │ │ -
236 {
│ │ │ -
237 return _node;
│ │ │ -
238 }
│ │ │ -
│ │ │ -
239
│ │ │ -
241
│ │ │ -
242 public:
│ │ │ -
243
│ │ │ -
246
│ │ │ -
│ │ │ -
248 FilteredCompositeNode (std::shared_ptr<Node> node)
│ │ │ -
249 : _node(std::move(node))
│ │ │ -
250 {}
│ │ │ -
│ │ │ -
251
│ │ │ -
│ │ │ - │ │ │ -
254 : _node(stackobject_to_shared_ptr(node))
│ │ │ -
255 {}
│ │ │ -
│ │ │ -
256
│ │ │ -
258
│ │ │ -
259 private:
│ │ │ -
260 std::shared_ptr<Node> _node;
│ │ │ -
261 };
│ │ │ -
│ │ │ -
262
│ │ │ -
264
│ │ │ -
265 } // namespace TypeTree
│ │ │ -
266} //namespace Dune
│ │ │ -
267
│ │ │ -
268#endif // DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH
│ │ │ - │ │ │ - │ │ │ +
234
│ │ │ +
235 private:
│ │ │ +
236 NodeStorage _children;
│ │ │ +
237 };
│ │ │ +
│ │ │ +
238
│ │ │ +
240
│ │ │ +
241 } // namespace TypeTree
│ │ │ +
242} //namespace Dune
│ │ │ +
243
│ │ │ +
244#endif // DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │ + │ │ │ + │ │ │ + │ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
auto childStorage(Node &&node, Indices... indices)
Definition childextraction.hh:75
│ │ │ -
auto childStorage(index_constant< k >={}) const
Returns the storage of the k-th child (const version).
Definition filteredcompositenode.hh:181
│ │ │ -
static constexpr auto degree()
Definition filteredcompositenode.hh:117
│ │ │ -
mapped_children::NodeStorage NodeStorage
The type used for storing the children.
Definition filteredcompositenode.hh:103
│ │ │ -
void setChild(ChildType &&child, typename std::enable_if< lazy_enable< k >::value, void * >::type=0)
Sets the k-th child to the passed-in value.
Definition filteredcompositenode.hh:188
│ │ │ -
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition filteredcompositenode.hh:109
│ │ │ -
const Node & unfiltered() const
Returns the unfiltered node (const version).
Definition filteredcompositenode.hh:215
│ │ │ -
static const bool isComposite
Mark this class as a composite in the dune-typetree.
Definition filteredcompositenode.hh:115
│ │ │ -
std::enable_if< enabled, std::shared_ptr< Node > >::type unfilteredStorage()
Returns the storage object of the unfiltered node.
Definition filteredcompositenode.hh:226
│ │ │ -
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition filteredcompositenode.hh:112
│ │ │ -
FilteredCompositeNode(Node &node)
Initialize the CompositeNode with a copy of the passed-in storage type.
Definition filteredcompositenode.hh:253
│ │ │ -
FilteredCompositeNode(std::shared_ptr< Node > node)
Initialize the CompositeNode with copies of the passed in Storage objects.
Definition filteredcompositenode.hh:248
│ │ │ -
auto childStorage(index_constant< k >={})
Returns the storage of the k-th child.
Definition filteredcompositenode.hh:171
│ │ │ -
const auto & child(index_constant< k >={}) const
Returns the k-th child (const version).
Definition filteredcompositenode.hh:160
│ │ │ -
auto & child(index_constant< k >={})
Returns the k-th child.
Definition filteredcompositenode.hh:150
│ │ │ -
CompositeNodeTag NodeTag
The type tag that describes a CompositeNode.
Definition filteredcompositenode.hh:100
│ │ │ -
mapped_children::ChildTypes ChildTypes
A tuple storing the types of all children.
Definition filteredcompositenode.hh:106
│ │ │ -
std::enable_if< enabled, Node & >::type unfiltered()
Returns the unfiltered node.
Definition filteredcompositenode.hh:206
│ │ │ -
std::shared_ptr< const Node > unfilteredStorage() const
Returns the storage object of the unfiltered node (const version).
Definition filteredcompositenode.hh:235
│ │ │ -
Access to the type and storage type of the i-th child.
Definition filteredcompositenode.hh:124
│ │ │ -
OriginalChild::type type
The type of the child.
Definition filteredcompositenode.hh:138
│ │ │ -
OriginalChild::Type Type
The type of the child.
Definition filteredcompositenode.hh:135
│ │ │ -
Tag describing a simple filter that can only decide whether or not to include a single given child.
Definition filters.hh:58
│ │ │ -
Tag describing an advanced filter that has full control over the construction of the list of FilterEn...
Definition filters.hh:61
│ │ │ +
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition compositenode.hh:42
│ │ │ +
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:166
│ │ │ +
static const bool isComposite
Mark this class as a composite in the dune-typetree.
Definition compositenode.hh:48
│ │ │ +
CompositeNode()
Default constructor.
Definition compositenode.hh:214
│ │ │ +
CompositeNodeTag NodeTag
The type tag that describes a CompositeNode.
Definition compositenode.hh:33
│ │ │ +
void setChild(typename Child< k >::Type &child, index_constant< k >={})
Sets the k-th child to the passed-in value.
Definition compositenode.hh:113
│ │ │ +
void setChild(typename Child< k >::Type &&child, index_constant< k >={})
Store the passed value in k-th child.
Definition compositenode.hh:120
│ │ │ +
static constexpr auto degree()
Definition compositenode.hh:50
│ │ │ +
const NodeStorage & nodeStorage() const
Definition compositenode.hh:132
│ │ │ +
CompositeNode(std::shared_ptr< Children >... children)
Initialize the CompositeNode with copies of the passed in Storage objects.
Definition compositenode.hh:224
│ │ │ +
std::shared_ptr< typename Child< k >::Type > childStorage(index_constant< k >={})
Returns the storage of the k-th child.
Definition compositenode.hh:96
│ │ │ +
std::tuple< Children... > ChildTypes
A tuple storing the types of all children.
Definition compositenode.hh:39
│ │ │ +
void setChild(std::shared_ptr< typename Child< k >::Type > child, index_constant< k >={})
Sets the storage of the k-th child to the passed-in value.
Definition compositenode.hh:127
│ │ │ +
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:186
│ │ │ +
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition compositenode.hh:45
│ │ │ +
std::shared_ptr< const typename Child< k >::Type > childStorage(index_constant< k >={}) const
Returns the storage of the k-th child (const version).
Definition compositenode.hh:106
│ │ │ +
Child< k >::Type & child(index_constant< k >={})
Returns the k-th child.
Definition compositenode.hh:76
│ │ │ +
CompositeNode(const NodeStorage &children)
Initialize the CompositeNode with a copy of the passed-in storage type.
Definition compositenode.hh:229
│ │ │ +
std::tuple< std::shared_ptr< Children >... > NodeStorage
The type used for storing the children.
Definition compositenode.hh:36
│ │ │ +
const Child< k >::Type & child(index_constant< k >={}) const
Returns the k-th child (const version).
Definition compositenode.hh:86
│ │ │ +
Access to the type and storage type of the i-th child.
Definition compositenode.hh:57
│ │ │ +
std::tuple_element< k, ChildTypes >::type Type
The type of the child.
Definition compositenode.hh:62
│ │ │ +
std::tuple_element< k, ChildTypes >::type type
The type of the child.
Definition compositenode.hh:65
│ │ │
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ +
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,343 +1,318 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -filteredcompositenode.hh │ │ │ │ +compositenode.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ -7#define DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ +7#define DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ 11#include │ │ │ │ 12 │ │ │ │ 13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17#include │ │ │ │ -18 │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_f_i_l_t_e_r_s_._h_h> │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -21 │ │ │ │ -22namespace _D_u_n_e { │ │ │ │ -23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ +15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +16 │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ +18 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +19 │ │ │ │ 24 │ │ │ │ +26 template │ │ │ │ +_2_7 class _C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +28 { │ │ │ │ 29 │ │ │ │ -30#ifndef DOXYGEN │ │ │ │ -31 namespace { │ │ │ │ -32 │ │ │ │ -33 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -34 // Utility structs for filter construction and application │ │ │ │ -35 / │ │ │ │ -/ │ │ │ │ -******************************************************************************** │ │ │ │ -36 │ │ │ │ -37 // Gets the filter and wraps it in case of a SimpleFilter. │ │ │ │ -38 template │ │ │ │ -39 struct get_filter; │ │ │ │ +30 public: │ │ │ │ +31 │ │ │ │ +_3_3 typedef _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ +34 │ │ │ │ +_3_6 typedef std::tuple... > _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ +37 │ │ │ │ +_3_9 typedef std::tuple _C_h_i_l_d_T_y_p_e_s; │ │ │ │ 40 │ │ │ │ -41 // Helper struct to extract the child template parameter pack from the │ │ │ │ -ChildTypes tuple. │ │ │ │ -42 template │ │ │ │ -43 struct apply_filter_wrapper; │ │ │ │ -44 │ │ │ │ -45 template │ │ │ │ -46 struct apply_filter_wrapper > │ │ │ │ -47 : public Filter::template apply │ │ │ │ -48 {}; │ │ │ │ +_4_2 static const bool _i_s_L_e_a_f = false; │ │ │ │ +43 │ │ │ │ +_4_5 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ +46 │ │ │ │ +_4_8 static const bool _i_s_C_o_m_p_o_s_i_t_e = true; │ │ │ │ 49 │ │ │ │ -50 // specialization for SimpleFilter │ │ │ │ -51 template │ │ │ │ -52 struct get_filter │ │ │ │ -53 { │ │ │ │ -54 struct type │ │ │ │ -55 { │ │ │ │ -56 template │ │ │ │ -57 struct apply │ │ │ │ -58 : public apply_filter_wrapper,Node,ChildTypes> │ │ │ │ -59 {}; │ │ │ │ -60 }; │ │ │ │ -61 }; │ │ │ │ -62 │ │ │ │ -63 // specialization for AdvancedFilter │ │ │ │ -64 template │ │ │ │ -65 struct get_filter │ │ │ │ -66 { │ │ │ │ -67 struct type │ │ │ │ -68 { │ │ │ │ -69 template │ │ │ │ -70 struct apply │ │ │ │ -71 : public apply_filter_wrapper │ │ │ │ -72 {}; │ │ │ │ -73 }; │ │ │ │ -74 }; │ │ │ │ -75 │ │ │ │ -76 } // anonymous namespace │ │ │ │ -77#endif // DOXYGEN │ │ │ │ -78 │ │ │ │ -79 │ │ │ │ -81 template │ │ │ │ -_8_2 class _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -83 { │ │ │ │ -84 │ │ │ │ -85 typedef typename get_filter::type filter; │ │ │ │ -86 typedef typename filter::template apply:: │ │ │ │ -type filter_result; │ │ │ │ -87 typedef typename filter_result::template apply mapped_children; │ │ │ │ -88 │ │ │ │ -89 static const bool nodeIsConst = std::is_const::type>::value; │ │ │ │ +_5_0 static constexpr auto _d_e_g_r_e_e () │ │ │ │ +51 { │ │ │ │ +52 return std::integral_constant{}; │ │ │ │ +53 } │ │ │ │ +54 │ │ │ │ +56 template │ │ │ │ +_5_7 struct _C_h_i_l_d { │ │ │ │ +58 │ │ │ │ +59 static_assert((k < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ +60 │ │ │ │ +_6_2 typedef typename std::tuple_element::type _T_y_p_e; │ │ │ │ +63 │ │ │ │ +_6_5 typedef typename std::tuple_element::type _t_y_p_e; │ │ │ │ +66 }; │ │ │ │ +67 │ │ │ │ +70 │ │ │ │ +72 │ │ │ │ +75 template │ │ │ │ +_7_6 typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d (index_constant = {}) │ │ │ │ +77 { │ │ │ │ +78 return *std::get(_children); │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +82 │ │ │ │ +85 template │ │ │ │ +_8_6 const typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d (index_constant = {}) const │ │ │ │ +87 { │ │ │ │ +88 return *std::get(_children); │ │ │ │ +89 } │ │ │ │ 90 │ │ │ │ -91 template │ │ │ │ -92 struct lazy_enable │ │ │ │ -93 { │ │ │ │ -94 static const bool value = !nodeIsConst; │ │ │ │ -95 }; │ │ │ │ -96 │ │ │ │ -97 public: │ │ │ │ -98 │ │ │ │ -_1_0_0 typedef _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ -101 │ │ │ │ -_1_0_3 typedef typename mapped_children::NodeStorage _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -104 │ │ │ │ -_1_0_6 typedef typename mapped_children::ChildTypes _C_h_i_l_d_T_y_p_e_s; │ │ │ │ -107 │ │ │ │ -_1_0_9 static const bool _i_s_L_e_a_f = false; │ │ │ │ +92 │ │ │ │ +95 template │ │ │ │ +_9_6 std::shared_ptr::Type> _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = │ │ │ │ +{}) │ │ │ │ +97 { │ │ │ │ +98 return std::get(_children); │ │ │ │ +99 } │ │ │ │ +100 │ │ │ │ +102 │ │ │ │ +105 template │ │ │ │ +_1_0_6 std::shared_ptr::Type> _c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +(index_constant = {}) const │ │ │ │ +107 { │ │ │ │ +108 return std::get(_children); │ │ │ │ +109 } │ │ │ │ 110 │ │ │ │ -_1_1_2 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ -113 │ │ │ │ -_1_1_5 static const bool _i_s_C_o_m_p_o_s_i_t_e = true; │ │ │ │ -116 │ │ │ │ -_1_1_7 static constexpr auto _d_e_g_r_e_e () │ │ │ │ -118 { │ │ │ │ -119 return std::integral_constant{}; │ │ │ │ -120 } │ │ │ │ -121 │ │ │ │ -123 template │ │ │ │ -_1_2_4 struct _C_h_i_l_d { │ │ │ │ -125 │ │ │ │ -126#ifndef DOXYGEN │ │ │ │ -127 │ │ │ │ -128 typedef typename std::tuple_element:: │ │ │ │ -type OriginalChild; │ │ │ │ -129 │ │ │ │ -130 static const std::size_t mapped_index = std::tuple_element::type::original_index; │ │ │ │ +112 template │ │ │ │ +_1_1_3 void _s_e_t_C_h_i_l_d (typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d, index_constant = {}) │ │ │ │ +114 { │ │ │ │ +115 std::get(_children) = stackobject_to_shared_ptr(_c_h_i_l_d); │ │ │ │ +116 } │ │ │ │ +117 │ │ │ │ +119 template │ │ │ │ +_1_2_0 void _s_e_t_C_h_i_l_d (typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e&& _c_h_i_l_d, index_constant = {}) │ │ │ │ +121 { │ │ │ │ +122 std::get(_children) = convert_arg(std::move(_c_h_i_l_d)); │ │ │ │ +123 } │ │ │ │ +124 │ │ │ │ +126 template │ │ │ │ +_1_2_7 void _s_e_t_C_h_i_l_d (std::shared_ptr_:_:_T_y_p_e> _c_h_i_l_d, │ │ │ │ +index_constant = {}) │ │ │ │ +128 { │ │ │ │ +129 std::get(_children) = std::move(_c_h_i_l_d); │ │ │ │ +130 } │ │ │ │ 131 │ │ │ │ -132#endif // DOXYGEN │ │ │ │ -133 │ │ │ │ -_1_3_5 typedef typename OriginalChild::Type _T_y_p_e; │ │ │ │ +_1_3_2 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ +133 { │ │ │ │ +134 return _children; │ │ │ │ +135 } │ │ │ │ 136 │ │ │ │ -_1_3_8 typedef typename OriginalChild::type _t_y_p_e; │ │ │ │ -139 }; │ │ │ │ -140 │ │ │ │ -143 │ │ │ │ -145 │ │ │ │ -148 template::value, int>::type = 0> │ │ │ │ -_1_5_0 auto& _c_h_i_l_d (index_constant = {}) │ │ │ │ -151 { │ │ │ │ -152 return _node->template child::mapped_index>(); │ │ │ │ -153 } │ │ │ │ -154 │ │ │ │ -156 │ │ │ │ -159 template │ │ │ │ -_1_6_0 const auto& _c_h_i_l_d (index_constant = {}) const │ │ │ │ -161 { │ │ │ │ -162 return _node->template child::mapped_index>(); │ │ │ │ -163 } │ │ │ │ -164 │ │ │ │ -166 │ │ │ │ -169 template::value, int>::type = 0> │ │ │ │ -_1_7_1 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) │ │ │ │ +138 │ │ │ │ +141 │ │ │ │ +142 // The following two methods require a little bit of SFINAE trickery to │ │ │ │ +work correctly: │ │ │ │ +143 // We have to make sure that they don't shadow the methods for direct child │ │ │ │ +access because │ │ │ │ +144 // those get called by the generic child() machinery. If that machinery │ │ │ │ +picks up the methods │ │ │ │ +145 // defined below, we have an infinite recursion. │ │ │ │ +146 // So the methods make sure that either │ │ │ │ +147 // │ │ │ │ +148 // * there are more than one argument. In that case, we got multiple │ │ │ │ +indices and can forward │ │ │ │ +149 // to the general machine. │ │ │ │ +150 // │ │ │ │ +151 // * the first argument is not a valid flat index, i.e. either a std:: │ │ │ │ +size_t or an index_constant. │ │ │ │ +152 // The argument thus has to be some kind of TreePath instance that we can │ │ │ │ +also pass to the │ │ │ │ +153 // generic machine. │ │ │ │ +154 // │ │ │ │ +155 // The above SFINAE logic works, but there is still a problem with the │ │ │ │ +return type deduction. │ │ │ │ +156 // We have to do a lazy lookup of the return type after SFINAE has │ │ │ │ +succeeded, otherwise the return │ │ │ │ +157 // type deduction will trigger the infinite recursion. │ │ │ │ +158 │ │ │ │ +160 │ │ │ │ +164#ifdef DOXYGEN │ │ │ │ +165 template │ │ │ │ +_1_6_6 ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ +167#else │ │ │ │ +168 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ +170 decltype(auto) _c_h_i_l_d (I0 i0, I... i) │ │ │ │ +171#endif │ │ │ │ 172 { │ │ │ │ -173 return _node->template _c_h_i_l_d_S_t_o_r_a_g_e_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(); │ │ │ │ -174 } │ │ │ │ -175 │ │ │ │ -177 │ │ │ │ -180 template │ │ │ │ -_1_8_1 auto _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = {}) const │ │ │ │ -182 { │ │ │ │ -183 return _node->template _c_h_i_l_d_S_t_o_r_a_g_e_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(); │ │ │ │ -184 } │ │ │ │ -185 │ │ │ │ -187 template │ │ │ │ -_1_8_8 void _s_e_t_C_h_i_l_d (ChildType&& _c_h_i_l_d, typename std::enable_if:: │ │ │ │ -value,void*>::type = 0) │ │ │ │ -189 { │ │ │ │ -190 _node->template _s_e_t_C_h_i_l_d_<_C_h_i_l_d_<_k_>_:_:_m_a_p_p_e_d___i_n_d_e_x>(std::forward │ │ │ │ -(_c_h_i_l_d)); │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -194 │ │ │ │ -197 │ │ │ │ -198 protected: │ │ │ │ -199 │ │ │ │ -201 │ │ │ │ -204 template │ │ │ │ -205 typename std::enable_if::type │ │ │ │ -_2_0_6 _u_n_f_i_l_t_e_r_e_d () │ │ │ │ -207 { │ │ │ │ -208 return *_node; │ │ │ │ -209 } │ │ │ │ -210 │ │ │ │ -212 │ │ │ │ -_2_1_5 const Node& _u_n_f_i_l_t_e_r_e_d () const │ │ │ │ -216 { │ │ │ │ -217 return *_node; │ │ │ │ -218 } │ │ │ │ -219 │ │ │ │ -221 │ │ │ │ -224 template │ │ │ │ -225 typename std::enable_if >::type │ │ │ │ -_2_2_6 _u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e () │ │ │ │ -227 { │ │ │ │ -228 return _node; │ │ │ │ -229 } │ │ │ │ -230 │ │ │ │ +173 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ +174 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ +freestanding version child(node,treePath) instead." │ │ │ │ +175 ); │ │ │ │ +176 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ +177 } │ │ │ │ +178 │ │ │ │ +180 │ │ │ │ +184#ifdef DOXYGEN │ │ │ │ +185 template │ │ │ │ +_1_8_6 const ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ +187#else │ │ │ │ +188 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ +190 decltype(auto) _c_h_i_l_d (I0 i0, I... i) const │ │ │ │ +191#endif │ │ │ │ +192 { │ │ │ │ +193 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ +194 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ +freestanding version child(node,treePath) instead." │ │ │ │ +195 ); │ │ │ │ +196 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ +197 } │ │ │ │ +198 │ │ │ │ +200 │ │ │ │ +201 protected: │ │ │ │ +202 │ │ │ │ +205 │ │ │ │ +207 │ │ │ │ +_2_1_4 _C_o_m_p_o_s_i_t_e_N_o_d_e () │ │ │ │ +215 {} │ │ │ │ +216 │ │ │ │ +218 template::type> │ │ │ │ +_2_1_9 _C_o_m_p_o_s_i_t_e_N_o_d_e (Args&&... args) │ │ │ │ +220 : _children(convert_arg(std::forward(args))...) │ │ │ │ +221 {} │ │ │ │ +222 │ │ │ │ +_2_2_4 _C_o_m_p_o_s_i_t_e_N_o_d_e (std::shared_ptr... children) │ │ │ │ +225 : _children(std::move(children)...) │ │ │ │ +226 {} │ │ │ │ +227 │ │ │ │ +_2_2_9 _C_o_m_p_o_s_i_t_e_N_o_d_e (const _N_o_d_e_S_t_o_r_a_g_e& children) │ │ │ │ +230 : _children(children) │ │ │ │ +231 {} │ │ │ │ 232 │ │ │ │ -_2_3_5 std::shared_ptr _u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e () const │ │ │ │ -236 { │ │ │ │ -237 return _node; │ │ │ │ -238 } │ │ │ │ -239 │ │ │ │ -241 │ │ │ │ -242 public: │ │ │ │ +234 │ │ │ │ +235 private: │ │ │ │ +236 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ +237 }; │ │ │ │ +238 │ │ │ │ +240 │ │ │ │ +241 } // namespace TypeTree │ │ │ │ +242} //namespace Dune │ │ │ │ 243 │ │ │ │ -246 │ │ │ │ -_2_4_8 _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e (std::shared_ptr node) │ │ │ │ -249 : _node(std::move(node)) │ │ │ │ -250 {} │ │ │ │ -251 │ │ │ │ -_2_5_3 _F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e (Node& node) │ │ │ │ -254 : _node(stackobject_to_shared_ptr(node)) │ │ │ │ -255 {} │ │ │ │ -256 │ │ │ │ -258 │ │ │ │ -259 private: │ │ │ │ -260 std::shared_ptr _node; │ │ │ │ -261 }; │ │ │ │ -262 │ │ │ │ -264 │ │ │ │ -265 } // namespace TypeTree │ │ │ │ -266} //namespace Dune │ │ │ │ -267 │ │ │ │ -268#endif // DUNE_TYPETREE_FILTEREDCOMPOSITENODE_HH │ │ │ │ +244#endif // DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ _n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_f_i_l_t_e_r_s_._h_h │ │ │ │ +_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ +_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(Node &&node, Indices... indices) │ │ │ │ -DDeeffiinniittiioonn childextraction.hh:75 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(index_constant< k >={}) const │ │ │ │ -Returns the storage of the k-th child (const version). │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:181 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -static constexpr auto degree() │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:117 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -mapped_children::NodeStorage NodeStorage │ │ │ │ -The type used for storing the children. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:103 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(ChildType &&child, typename std::enable_if< lazy_enable< k >:: │ │ │ │ -value, void * >::type=0) │ │ │ │ -Sets the k-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:188 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ static const bool isLeaf │ │ │ │ Mark this class as non leaf in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:109 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d │ │ │ │ -const Node & unfiltered() const │ │ │ │ -Returns the unfiltered node (const version). │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:215 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:42 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +ImplementationDefined & child(Indices... indices) │ │ │ │ +Returns the child given by the list of indices. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:166 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ static const bool isComposite │ │ │ │ Mark this class as a composite in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:115 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e │ │ │ │ -std::enable_if< enabled, std::shared_ptr< Node > >::type unfilteredStorage() │ │ │ │ -Returns the storage object of the unfiltered node. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:226 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:48 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +CompositeNode() │ │ │ │ +Default constructor. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:214 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ +CompositeNodeTag NodeTag │ │ │ │ +The type tag that describes a CompositeNode. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:33 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(typename Child< k >::Type &child, index_constant< k >={}) │ │ │ │ +Sets the k-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:113 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(typename Child< k >::Type &&child, index_constant< k >={}) │ │ │ │ +Store the passed value in k-th child. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:120 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ +static constexpr auto degree() │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ +const NodeStorage & nodeStorage() const │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:132 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +CompositeNode(std::shared_ptr< Children >... children) │ │ │ │ +Initialize the CompositeNode with copies of the passed in Storage objects. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:224 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< typename Child< k >::Type > childStorage(index_constant< k >= │ │ │ │ +{}) │ │ │ │ +Returns the storage of the k-th child. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:96 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ +std::tuple< Children... > ChildTypes │ │ │ │ +A tuple storing the types of all children. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:39 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ +void setChild(std::shared_ptr< typename Child< k >::Type > child, │ │ │ │ +index_constant< k >={}) │ │ │ │ +Sets the storage of the k-th child to the passed-in value. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:127 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const ImplementationDefined & child(Indices... indices) │ │ │ │ +Returns the child given by the list of indices. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:186 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ static const bool isPower │ │ │ │ Mark this class as a non power in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:112 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -FilteredCompositeNode(Node &node) │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:45 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +std::shared_ptr< const typename Child< k >::Type > childStorage(index_constant< │ │ │ │ +k >={}) const │ │ │ │ +Returns the storage of the k-th child (const version). │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:106 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +Child< k >::Type & child(index_constant< k >={}) │ │ │ │ +Returns the k-th child. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:76 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ +CompositeNode(const NodeStorage &children) │ │ │ │ Initialize the CompositeNode with a copy of the passed-in storage type. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:253 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -FilteredCompositeNode(std::shared_ptr< Node > node) │ │ │ │ -Initialize the CompositeNode with copies of the passed in Storage objects. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:248 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(index_constant< k >={}) │ │ │ │ -Returns the storage of the k-th child. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:171 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const auto & child(index_constant< k >={}) const │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:229 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ +std::tuple< std::shared_ptr< Children >... > NodeStorage │ │ │ │ +The type used for storing the children. │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:36 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ +const Child< k >::Type & child(index_constant< k >={}) const │ │ │ │ Returns the k-th child (const version). │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:160 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -auto & child(index_constant< k >={}) │ │ │ │ -Returns the k-th child. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:150 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ -CompositeNodeTag NodeTag │ │ │ │ -The type tag that describes a CompositeNode. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:100 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ -mapped_children::ChildTypes ChildTypes │ │ │ │ -A tuple storing the types of all children. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:106 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d │ │ │ │ -std::enable_if< enabled, Node & >::type unfiltered() │ │ │ │ -Returns the unfiltered node. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:206 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_u_n_f_i_l_t_e_r_e_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< const Node > unfilteredStorage() const │ │ │ │ -Returns the storage object of the unfiltered node (const version). │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:235 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:86 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ Access to the type and storage type of the i-th child. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:124 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ -OriginalChild::type type │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:57 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ +std::tuple_element< k, ChildTypes >::type Type │ │ │ │ The type of the child. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:138 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_F_i_l_t_e_r_e_d_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ -OriginalChild::Type Type │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:62 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ +std::tuple_element< k, ChildTypes >::type type │ │ │ │ The type of the child. │ │ │ │ -DDeeffiinniittiioonn filteredcompositenode.hh:135 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_i_m_p_l_e_F_i_l_t_e_r_T_a_g │ │ │ │ -Tag describing a simple filter that can only decide whether or not to include a │ │ │ │ -single given child. │ │ │ │ -DDeeffiinniittiioonn filters.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_d_v_a_n_c_e_d_F_i_l_t_e_r_T_a_g │ │ │ │ -Tag describing an advanced filter that has full control over the construction │ │ │ │ -of the list of FilterEn... │ │ │ │ -DDeeffiinniittiioonn filters.hh:61 │ │ │ │ +DDeeffiinniittiioonn compositenode.hh:65 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ Tag designating a composite node. │ │ │ │ DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ +Check if type represents a tree path. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00077.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: dynamicpowernode.hh File Reference │ │ │ +dune-typetree: childextraction.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,40 +72,49 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
dynamicpowernode.hh File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
childextraction.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <cassert>
│ │ │ -#include <vector>
│ │ │ -#include <memory>
│ │ │ -#include <type_traits>
│ │ │ +
#include <type_traits>
│ │ │ +#include <utility>
│ │ │ +#include <tuple>
│ │ │ +#include <dune/common/documentation.hh>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ #include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/std/type_traits.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/utility.hh>
│ │ │ -#include <dune/typetree/typetraits.hh>
│ │ │ +#include <dune/common/shared_ptr.hh>
│ │ │ +#include <dune/common/typetree/childaccess.hh>
│ │ │ +#include <dune/typetree/treepath.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  Dune::TypeTree::DynamicPowerNode< T >
 Collect multiple instances of type T within a dune-typetree. More...
│ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

template<typename T>
using Dune::TypeTree::is_flat_index = typename impl::_is_flat_index<std::decay_t<T>>::type
 Type trait that determines whether T is a flat index in the context of child extraction.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<typename Node, typename... Indices>
auto Dune::TypeTree::childStorage (Node &&node, Indices... indices)
template<typename Node, typename... Indices>
auto Dune::TypeTree::childStorage (Node &&node, HybridTreePath< Indices... > treePath)
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,26 +1,35 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -dynamicpowernode.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +childextraction.hh File Reference │ │ │ │ #include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_<_ _T_ _> │ │ │ │ -  Collect multiple instances of type T within a _d_u_n_e_-_t_y_p_e_t_r_e_e. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x = typename impl::_is_flat_index>::type │ │ │ │ +  Type trait that determines whether T is a flat index in the context of │ │ │ │ + child extraction. │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template │ │ │ │ +auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e (Node &&node, Indices... indices) │ │ │ │ +template │ │ │ │ +auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e (Node &&node, _H_y_b_r_i_d_T_r_e_e_P_a_t_h< Indices... > │ │ │ │ + treePath) │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00077_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: dynamicpowernode.hh Source File │ │ │ +dune-typetree: childextraction.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,222 +71,183 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -
dynamicpowernode.hh
│ │ │ +
childextraction.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=8 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │ -
7#define DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │ +
7#define DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │
8
│ │ │ -
9#include <cassert>
│ │ │ -
10#include <vector>
│ │ │ -
11#include <memory>
│ │ │ -
12#include <type_traits>
│ │ │ -
13
│ │ │ -
14#include <dune/common/typetraits.hh>
│ │ │ -
15#include <dune/common/std/type_traits.hh>
│ │ │ -
16
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
20
│ │ │ -
21namespace Dune {
│ │ │ -
22 namespace TypeTree {
│ │ │ -
23
│ │ │ -
28
│ │ │ -
33 template<typename T>
│ │ │ -
│ │ │ - │ │ │ -
35 {
│ │ │ -
36
│ │ │ -
37 public:
│ │ │ -
38
│ │ │ -
40 static const bool isLeaf = false;
│ │ │ -
41
│ │ │ -
43 static const bool isPower = true;
│ │ │ -
44
│ │ │ -
46 static const bool isComposite = false;
│ │ │ -
47
│ │ │ -
│ │ │ -
49 std::size_t degree() const
│ │ │ -
50 {
│ │ │ -
51 return _children.size();
│ │ │ -
52 }
│ │ │ -
│ │ │ -
53
│ │ │ - │ │ │ -
56
│ │ │ -
58 typedef T ChildType;
│ │ │ -
59
│ │ │ -
61 typedef std::shared_ptr<T> ChildStorageType;
│ │ │ -
62
│ │ │ -
64 typedef std::shared_ptr<const T> ChildConstStorageType;
│ │ │ -
65
│ │ │ -
67 typedef std::vector<ChildStorageType> NodeStorage;
│ │ │ -
68
│ │ │ -
69
│ │ │ -
72
│ │ │ -
74
│ │ │ -
│ │ │ -
77 ChildType& child (std::size_t i)
│ │ │ -
78 {
│ │ │ -
79 assert(i < degree() && "child index out of range");
│ │ │ -
80 return *_children[i];
│ │ │ -
81 }
│ │ │ -
│ │ │ -
82
│ │ │ -
84
│ │ │ -
│ │ │ -
87 const ChildType& child (std::size_t i) const
│ │ │ -
88 {
│ │ │ -
89 assert(i < degree() && "child index out of range");
│ │ │ -
90 return *_children[i];
│ │ │ -
91 }
│ │ │ -
│ │ │ -
92
│ │ │ -
94
│ │ │ -
│ │ │ - │ │ │ -
98 {
│ │ │ -
99 assert(i < degree() && "child index out of range");
│ │ │ -
100 return _children[i];
│ │ │ -
101 }
│ │ │ -
│ │ │ -
102
│ │ │ -
104
│ │ │ -
│ │ │ - │ │ │ -
111 {
│ │ │ -
112 assert(i < degree() && "child index out of range");
│ │ │ -
113 return _children[i];
│ │ │ -
114 }
│ │ │ -
│ │ │ -
115
│ │ │ -
│ │ │ -
117 void setChild (std::size_t i, ChildType& t)
│ │ │ -
118 {
│ │ │ -
119 assert(i < degree() && "child index out of range");
│ │ │ -
120 _children[i] = stackobject_to_shared_ptr(t);
│ │ │ -
121 }
│ │ │ -
│ │ │ -
122
│ │ │ -
│ │ │ -
124 void setChild (std::size_t i, ChildType&& t)
│ │ │ -
125 {
│ │ │ -
126 assert(i < degree() && "child index out of range");
│ │ │ -
127 _children[i] = convert_arg(std::move(t));
│ │ │ -
128 }
│ │ │ -
│ │ │ -
129
│ │ │ -
│ │ │ -
131 void setChild (std::size_t i, ChildStorageType st)
│ │ │ +
9#include <type_traits>
│ │ │ +
10#include <utility>
│ │ │ +
11#include <tuple>
│ │ │ +
12
│ │ │ +
13#include <dune/common/documentation.hh>
│ │ │ +
14#include <dune/common/indices.hh>
│ │ │ +
15#include <dune/common/typetraits.hh>
│ │ │ +
16#include <dune/common/shared_ptr.hh>
│ │ │ +
17
│ │ │ +
18#include <dune/common/typetree/childaccess.hh>
│ │ │ +
19
│ │ │ + │ │ │ +
21
│ │ │ +
22
│ │ │ +
23namespace Dune {
│ │ │ +
24 namespace TypeTree {
│ │ │ +
25
│ │ │ +
26#ifndef DOXYGEN
│ │ │ +
27
│ │ │ +
28 namespace Impl {
│ │ │ +
29
│ │ │ +
30 // check at run time whether index is a valid child index
│ │ │ +
31 template <class Node, class Index>
│ │ │ +
32 std::true_type checkChildIndex (Node const& node, Index i)
│ │ │ +
33 {
│ │ │ +
34 assert(std::size_t(i) < node.degree() && "Child index out of range");
│ │ │ +
35 return {};
│ │ │ +
36 }
│ │ │ +
37
│ │ │ +
38 // check at compile time whether index is a valid index
│ │ │ +
39 template <class Node, std::size_t i>
│ │ │ +
40 std::bool_constant<(i < Node::degree())> checkChildIndex (Node const& node, index_constant<i>)
│ │ │ +
41 {
│ │ │ +
42 static_assert(i < Node::degree(), "Child index out of range");
│ │ │ +
43 return {};
│ │ │ +
44 }
│ │ │ +
45
│ │ │ +
46 template<class NodePtr>
│ │ │ +
47 auto childStorageImpl (NodePtr&& nodePtr)
│ │ │ +
48 {
│ │ │ +
49 return std::forward<NodePtr>(nodePtr);
│ │ │ +
50 }
│ │ │ +
51
│ │ │ +
52 // recursively call `node.childStorage(...)` with the given indices
│ │ │ +
53 template<class NodePtr, class I0, class... I>
│ │ │ +
54 decltype(auto) childStorageImpl (NodePtr&& nodePtr, I0 i0, [[maybe_unused]] I... i)
│ │ │ +
55 {
│ │ │ +
56 auto valid = checkChildIndex(*nodePtr,i0);
│ │ │ +
57 if constexpr (valid)
│ │ │ +
58 return childStorageImpl(nodePtr->childStorage(i0),i...);
│ │ │ +
59 else
│ │ │ +
60 return;
│ │ │ +
61 }
│ │ │ +
62
│ │ │ +
63 // forward to the impl methods by extracting the indices from the treepath
│ │ │ +
64 template<class NodePtr, class... Indices, std::size_t... i>
│ │ │ +
65 decltype(auto) childStorage (NodePtr&& nodePtr, [[maybe_unused]] HybridTreePath<Indices...> tp, std::index_sequence<i...>)
│ │ │ +
66 {
│ │ │ +
67 return childStorageImpl(std::forward<NodePtr>(nodePtr),treePathEntry<i>(tp)...);
│ │ │ +
68 }
│ │ │ +
69
│ │ │ +
70 } // end namespace Impl
│ │ │ +
71
│ │ │ +
72#endif // DOXYGEN
│ │ │ +
73
│ │ │ +
74 template<typename Node, typename... Indices>
│ │ │ +
│ │ │ +
75 auto childStorage (Node&& node, Indices... indices)
│ │ │ +
76 {
│ │ │ +
77 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with an empty list of child indices");
│ │ │ +
78 return Impl::childStorageImpl(&node,indices...);
│ │ │ +
79 }
│ │ │ +
│ │ │ +
80
│ │ │ +
81 template<typename Node, typename... Indices>
│ │ │ +
│ │ │ +
82 auto childStorage (Node&& node, HybridTreePath<Indices...> treePath)
│ │ │ +
83 {
│ │ │ +
84 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with an empty TreePath");
│ │ │ +
85 return Impl::childStorage(&node, treePath, std::index_sequence_for<Indices...>{});
│ │ │ +
86 }
│ │ │ +
│ │ │ +
87
│ │ │ +
88#ifndef DOXYGEN
│ │ │ +
89
│ │ │ +
90 namespace impl {
│ │ │ +
91
│ │ │ +
92 // By default, types are flat indices if they are integral
│ │ │ +
93 template<typename T>
│ │ │ +
94 struct _is_flat_index
│ │ │ +
95 {
│ │ │ +
96 using type = std::is_integral<T>;
│ │ │ +
97 };
│ │ │ +
98
│ │ │ +
99 // And so is any index_constant
│ │ │ +
100 template<std::size_t i>
│ │ │ +
101 struct _is_flat_index<index_constant<i>>
│ │ │ +
102 {
│ │ │ +
103 using type = std::true_type;
│ │ │ +
104 };
│ │ │ +
105
│ │ │ +
106 }
│ │ │ +
107
│ │ │ +
108#endif // DOXYGEN
│ │ │ +
109
│ │ │ +
111 /*
│ │ │ +
112 * This type trait can be used to check whether T is a flat index (i.e. either `std::size_t`
│ │ │ +
113 * or `index_constant`). The type trait normalizes T before doing the check, so it will also
│ │ │ +
114 * work correctly for references and cv-qualified types.
│ │ │ +
115 */
│ │ │ +
116 template<typename T>
│ │ │ +
117 using is_flat_index = typename impl::_is_flat_index<std::decay_t<T>>::type;
│ │ │ +
118
│ │ │ +
119#ifndef DOXYGEN
│ │ │ +
120
│ │ │ +
121 namespace impl {
│ │ │ +
122
│ │ │ +
123 // helper function for check in member child() functions that tolerates being passed something that
│ │ │ +
124 // isn't a TreePath. It will just return 0 in that case
│ │ │ +
125
│ │ │ +
126 template<typename T>
│ │ │ +
127 constexpr typename std::enable_if<
│ │ │ + │ │ │ +
129 bool
│ │ │ +
130 >::type
│ │ │ +
131 _non_empty_tree_path (T)
│ │ │
132 {
│ │ │ -
133 assert(i < degree() && "child index out of range");
│ │ │ -
134 _children[i] = std::move(st);
│ │ │ -
135 }
│ │ │ -
│ │ │ -
136
│ │ │ -
│ │ │ -
137 const NodeStorage& nodeStorage () const
│ │ │ -
138 {
│ │ │ -
139 return _children;
│ │ │ -
140 }
│ │ │ -
│ │ │ -
141
│ │ │ -
143
│ │ │ -
146
│ │ │ -
147 protected:
│ │ │ -
148
│ │ │ -
151 DynamicPowerNode () = delete;
│ │ │ -
152
│ │ │ -
154
│ │ │ -
│ │ │ -
162 explicit DynamicPowerNode (std::size_t size)
│ │ │ -
163 : _children(size)
│ │ │ -
164 {}
│ │ │ -
│ │ │ -
165
│ │ │ -
│ │ │ -
167 explicit DynamicPowerNode (NodeStorage children)
│ │ │ -
168 : _children(std::move(children))
│ │ │ -
169 {}
│ │ │ -
│ │ │ -
170
│ │ │ -
171#ifdef DOXYGEN
│ │ │ -
172
│ │ │ -
│ │ │ -
174 DynamicPowerNode (T& t1, T& t2, ...)
│ │ │ -
175 {}
│ │ │ -
│ │ │ -
176
│ │ │ -
177#else
│ │ │ -
178
│ │ │ -
179 template<typename... Children,
│ │ │ -
180 std::enable_if_t<(std::is_same_v<ChildType, std::decay_t<Children>> &&...), bool> = true>
│ │ │ -
181 DynamicPowerNode (Children&&... children)
│ │ │ -
182 {
│ │ │ -
183 _children = NodeStorage{convert_arg(std::forward<Children>(children))...};
│ │ │ -
184 }
│ │ │ -
185
│ │ │ -
186 template<typename... Children,
│ │ │ -
187 std::enable_if_t<(std::is_same_v<ChildType, std::decay_t<Children>> &&...), bool> = true>
│ │ │ -
188 DynamicPowerNode (std::shared_ptr<Children>... children)
│ │ │ -
189 {
│ │ │ -
190 _children = NodeStorage{std::move(children)...};
│ │ │ -
191 }
│ │ │ -
192
│ │ │ -
193#endif // DOXYGEN
│ │ │ -
194
│ │ │ -
196
│ │ │ -
197 private:
│ │ │ -
198 NodeStorage _children;
│ │ │ -
199 };
│ │ │ -
│ │ │ -
200
│ │ │ -
202
│ │ │ -
203 } // namespace TypeTree
│ │ │ -
204} //namespace Dune
│ │ │ -
205
│ │ │ -
206#endif // DUNE_TYPETREE_DYNAMICPOWERNODE_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
133 return false;
│ │ │ +
134 }
│ │ │ +
135
│ │ │ +
136 template<typename T>
│ │ │ +
137 constexpr typename std::enable_if<
│ │ │ + │ │ │ +
139 bool
│ │ │ +
140 >::type
│ │ │ +
141 _non_empty_tree_path (T t)
│ │ │ +
142 {
│ │ │ +
143 return treePathSize(t) > 0;
│ │ │ +
144 }
│ │ │ +
145
│ │ │ +
146 }
│ │ │ +
147
│ │ │ +
148#endif // DOXYGEN
│ │ │ +
149
│ │ │ +
151
│ │ │ +
152 } // namespace TypeTree
│ │ │ +
153} //namespace Dune
│ │ │ +
154
│ │ │ +
155#endif // DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │ + │ │ │ +
constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns a copy of the i-th element of the HybridTreePath.
Definition treepath.hh:214
│ │ │ +
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │ +
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
static const bool isPower
Mark this class as a power in the dune-typetree.
Definition dynamicpowernode.hh:43
│ │ │ -
std::vector< ChildStorageType > NodeStorage
The type used for storing the children.
Definition dynamicpowernode.hh:67
│ │ │ -
const NodeStorage & nodeStorage() const
Definition dynamicpowernode.hh:137
│ │ │ -
ChildConstStorageType childStorage(std::size_t i) const
Returns the storage of the i-th child (const version).
Definition dynamicpowernode.hh:110
│ │ │ -
const ChildType & child(std::size_t i) const
Returns the i-th child (const version).
Definition dynamicpowernode.hh:87
│ │ │ -
std::shared_ptr< T > ChildStorageType
The storage type of each child.
Definition dynamicpowernode.hh:61
│ │ │ -
DynamicPowerNode(T &t1, T &t2,...)
Initialize all children with the passed-in objects.
Definition dynamicpowernode.hh:174
│ │ │ -
std::shared_ptr< const T > ChildConstStorageType
The const version of the storage type of each child.
Definition dynamicpowernode.hh:64
│ │ │ -
DynamicPowerNode(NodeStorage children)
Initialize the DynamicPowerNode with a copy of the passed-in storage type.
Definition dynamicpowernode.hh:167
│ │ │ -
DynamicPowerNodeTag NodeTag
The type tag that describes the node.
Definition dynamicpowernode.hh:55
│ │ │ -
T ChildType
The type of each child.
Definition dynamicpowernode.hh:58
│ │ │ -
void setChild(std::size_t i, ChildType &t)
Sets the i-th child to the passed-in value.
Definition dynamicpowernode.hh:117
│ │ │ -
void setChild(std::size_t i, ChildStorageType st)
Sets the stored value representing the i-th child to the passed-in value.
Definition dynamicpowernode.hh:131
│ │ │ -
DynamicPowerNode(std::size_t size)
Construct a node with the given number of children.
Definition dynamicpowernode.hh:162
│ │ │ -
static const bool isComposite
Mark this class as a non composite in the dune-typetree.
Definition dynamicpowernode.hh:46
│ │ │ -
void setChild(std::size_t i, ChildType &&t)
Store the passed value in i-th child.
Definition dynamicpowernode.hh:124
│ │ │ -
ChildType & child(std::size_t i)
Returns the i-th child.
Definition dynamicpowernode.hh:77
│ │ │ -
std::size_t degree() const
The number of children.
Definition dynamicpowernode.hh:49
│ │ │ -
ChildStorageType childStorage(std::size_t i)
Returns the storage of the i-th child.
Definition dynamicpowernode.hh:97
│ │ │ -
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition dynamicpowernode.hh:40
│ │ │ - │ │ │ -
Tag designating a power node with runtime degree.
Definition nodetags.hh:24
│ │ │ +
typename impl::_is_flat_index< std::decay_t< T > >::type is_flat_index
Type trait that determines whether T is a flat index in the context of child extraction.
Definition childextraction.hh:117
│ │ │ +
auto childStorage(Node &&node, Indices... indices)
Definition childextraction.hh:75
│ │ │ +
Definition typetraits.hh:150
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,257 +1,204 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -dynamicpowernode.hh │ │ │ │ +childextraction.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ -7#define DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ +7#define DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12#include │ │ │ │ -13 │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16 │ │ │ │ -17#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -18#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ -20 │ │ │ │ -21namespace _D_u_n_e { │ │ │ │ -22 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -23 │ │ │ │ -28 │ │ │ │ -33 template │ │ │ │ -_3_4 class _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ -35 { │ │ │ │ -36 │ │ │ │ -37 public: │ │ │ │ -38 │ │ │ │ -_4_0 static const bool _i_s_L_e_a_f = false; │ │ │ │ -41 │ │ │ │ -_4_3 static const bool _i_s_P_o_w_e_r = true; │ │ │ │ -44 │ │ │ │ -_4_6 static const bool _i_s_C_o_m_p_o_s_i_t_e = false; │ │ │ │ -47 │ │ │ │ -_4_9 std::size_t _d_e_g_r_e_e() const │ │ │ │ -50 { │ │ │ │ -51 return _children.size(); │ │ │ │ -52 } │ │ │ │ -53 │ │ │ │ -_5_5 typedef _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ -56 │ │ │ │ -_5_8 typedef T _C_h_i_l_d_T_y_p_e; │ │ │ │ -59 │ │ │ │ -_6_1 typedef std::shared_ptr _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e; │ │ │ │ +9#include │ │ │ │ +10#include │ │ │ │ +11#include │ │ │ │ +12 │ │ │ │ +13#include │ │ │ │ +14#include │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17 │ │ │ │ +18#include │ │ │ │ +19 │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +21 │ │ │ │ +22 │ │ │ │ +23namespace _D_u_n_e { │ │ │ │ +24 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +25 │ │ │ │ +26#ifndef DOXYGEN │ │ │ │ +27 │ │ │ │ +28 namespace Impl { │ │ │ │ +29 │ │ │ │ +30 // check at run time whether index is a valid child index │ │ │ │ +31 template │ │ │ │ +32 std::true_type checkChildIndex (Node const& node, Index i) │ │ │ │ +33 { │ │ │ │ +34 assert(std::size_t(i) < node.degree() && "Child index out of range"); │ │ │ │ +35 return {}; │ │ │ │ +36 } │ │ │ │ +37 │ │ │ │ +38 // check at compile time whether index is a valid index │ │ │ │ +39 template │ │ │ │ +40 std::bool_constant<(i < Node::degree())> checkChildIndex (Node const& node, │ │ │ │ +index_constant) │ │ │ │ +41 { │ │ │ │ +42 static_assert(i < Node::degree(), "Child index out of range"); │ │ │ │ +43 return {}; │ │ │ │ +44 } │ │ │ │ +45 │ │ │ │ +46 template │ │ │ │ +47 auto childStorageImpl (NodePtr&& nodePtr) │ │ │ │ +48 { │ │ │ │ +49 return std::forward(nodePtr); │ │ │ │ +50 } │ │ │ │ +51 │ │ │ │ +52 // recursively call `node.childStorage(...)` with the given indices │ │ │ │ +53 template │ │ │ │ +54 decltype(auto) childStorageImpl (NodePtr&& nodePtr, I0 i0, [[maybe_unused]] │ │ │ │ +I... i) │ │ │ │ +55 { │ │ │ │ +56 auto valid = checkChildIndex(*nodePtr,i0); │ │ │ │ +57 if constexpr (valid) │ │ │ │ +58 return childStorageImpl(nodePtr->childStorage(i0),i...); │ │ │ │ +59 else │ │ │ │ +60 return; │ │ │ │ +61 } │ │ │ │ 62 │ │ │ │ -_6_4 typedef std::shared_ptr _C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e; │ │ │ │ -65 │ │ │ │ -_6_7 typedef std::vector _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -68 │ │ │ │ +63 // forward to the impl methods by extracting the indices from the treepath │ │ │ │ +64 template │ │ │ │ +65 decltype(auto) _c_h_i_l_d_S_t_o_r_a_g_e (NodePtr&& nodePtr, [[maybe_unused]] │ │ │ │ +_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_n_d_i_c_e_s_._._._> tp, std::index_sequence) │ │ │ │ +66 { │ │ │ │ +67 return childStorageImpl(std::forward(nodePtr),_t_r_e_e_P_a_t_h_E_n_t_r_y_<_i_> │ │ │ │ +(tp)...); │ │ │ │ +68 } │ │ │ │ 69 │ │ │ │ -72 │ │ │ │ -74 │ │ │ │ -_7_7 _C_h_i_l_d_T_y_p_e& _c_h_i_l_d (std::size_t i) │ │ │ │ -78 { │ │ │ │ -79 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -80 return *_children[i]; │ │ │ │ -81 } │ │ │ │ -82 │ │ │ │ -84 │ │ │ │ -_8_7 const _C_h_i_l_d_T_y_p_e& _c_h_i_l_d (std::size_t i) const │ │ │ │ -88 { │ │ │ │ -89 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -90 return *_children[i]; │ │ │ │ -91 } │ │ │ │ -92 │ │ │ │ -94 │ │ │ │ -_9_7 _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) │ │ │ │ -98 { │ │ │ │ -99 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -100 return _children[i]; │ │ │ │ -101 } │ │ │ │ -102 │ │ │ │ -104 │ │ │ │ -_1_1_0 _C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e _c_h_i_l_d_S_t_o_r_a_g_e (std::size_t i) const │ │ │ │ -111 { │ │ │ │ -112 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -113 return _children[i]; │ │ │ │ -114 } │ │ │ │ -115 │ │ │ │ -_1_1_7 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_T_y_p_e& t) │ │ │ │ -118 { │ │ │ │ -119 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -120 _children[i] = stackobject_to_shared_ptr(t); │ │ │ │ -121 } │ │ │ │ +70 } // end namespace Impl │ │ │ │ +71 │ │ │ │ +72#endif // DOXYGEN │ │ │ │ +73 │ │ │ │ +74 template │ │ │ │ +_7_5 auto _c_h_i_l_d_S_t_o_r_a_g_e (Node&& node, Indices... indices) │ │ │ │ +76 { │ │ │ │ +77 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with │ │ │ │ +an empty list of child indices"); │ │ │ │ +78 return Impl::childStorageImpl(&node,indices...); │ │ │ │ +79 } │ │ │ │ +80 │ │ │ │ +81 template │ │ │ │ +_8_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (Node&& node, _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_n_d_i_c_e_s_._._._> treePath) │ │ │ │ +83 { │ │ │ │ +84 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with │ │ │ │ +an empty TreePath"); │ │ │ │ +85 return Impl::childStorage(&node, treePath, std:: │ │ │ │ +index_sequence_for{}); │ │ │ │ +86 } │ │ │ │ +87 │ │ │ │ +88#ifndef DOXYGEN │ │ │ │ +89 │ │ │ │ +90 namespace impl { │ │ │ │ +91 │ │ │ │ +92 // By default, types are flat indices if they are integral │ │ │ │ +93 template │ │ │ │ +94 struct _is_flat_index │ │ │ │ +95 { │ │ │ │ +96 using type = std::is_integral; │ │ │ │ +97 }; │ │ │ │ +98 │ │ │ │ +99 // And so is any index_constant │ │ │ │ +100 template │ │ │ │ +101 struct _is_flat_index> │ │ │ │ +102 { │ │ │ │ +103 using type = std::true_type; │ │ │ │ +104 }; │ │ │ │ +105 │ │ │ │ +106 } │ │ │ │ +107 │ │ │ │ +108#endif // DOXYGEN │ │ │ │ +109 │ │ │ │ +111 /* │ │ │ │ +112 * This type trait can be used to check whether T is a flat index (i.e. │ │ │ │ +either `std::size_t` │ │ │ │ +113 * or `index_constant`). The type trait normalizes T before doing the check, │ │ │ │ +so it will also │ │ │ │ +114 * work correctly for references and cv-qualified types. │ │ │ │ +115 */ │ │ │ │ +116 template │ │ │ │ +_1_1_7 using _i_s___f_l_a_t___i_n_d_e_x = typename impl::_is_flat_index>::type; │ │ │ │ +118 │ │ │ │ +119#ifndef DOXYGEN │ │ │ │ +120 │ │ │ │ +121 namespace _i_m_p_l { │ │ │ │ 122 │ │ │ │ -_1_2_4 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_T_y_p_e&& t) │ │ │ │ -125 { │ │ │ │ -126 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -127 _children[i] = convert_arg(std::move(t)); │ │ │ │ -128 } │ │ │ │ -129 │ │ │ │ -_1_3_1 void _s_e_t_C_h_i_l_d (std::size_t i, _C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e st) │ │ │ │ +123 // helper function for check in member child() functions that tolerates │ │ │ │ +being passed something that │ │ │ │ +124 // isn't a TreePath. It will just return 0 in that case │ │ │ │ +125 │ │ │ │ +126 template │ │ │ │ +127 constexpr typename std::enable_if< │ │ │ │ +128 _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x_<_T_>_:_:_v_a_l_u_e, │ │ │ │ +129 bool │ │ │ │ +130 >::type │ │ │ │ +131 _non_empty_tree_path (T) │ │ │ │ 132 { │ │ │ │ -133 assert(i < _d_e_g_r_e_e() && "child index out of range"); │ │ │ │ -134 _children[i] = std::move(st); │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -_1_3_7 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ -138 { │ │ │ │ -139 return _children; │ │ │ │ -140 } │ │ │ │ -141 │ │ │ │ -143 │ │ │ │ -146 │ │ │ │ -147 protected: │ │ │ │ -148 │ │ │ │ -_1_5_1 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e () = delete; │ │ │ │ -152 │ │ │ │ +133 return false; │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +136 template │ │ │ │ +137 constexpr typename std::enable_if< │ │ │ │ +138 !_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x_<_T_>_:_:_v_a_l_u_e, │ │ │ │ +139 bool │ │ │ │ +140 >::type │ │ │ │ +141 _non_empty_tree_path (T t) │ │ │ │ +142 { │ │ │ │ +143 return _t_r_e_e_P_a_t_h_S_i_z_e(t) > 0; │ │ │ │ +144 } │ │ │ │ +145 │ │ │ │ +146 } │ │ │ │ +147 │ │ │ │ +148#endif // DOXYGEN │ │ │ │ +149 │ │ │ │ +151 │ │ │ │ +152 } // namespace TypeTree │ │ │ │ +153} //namespace Dune │ │ │ │ 154 │ │ │ │ -_1_6_2 explicit _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (std::size_t size) │ │ │ │ -163 : _children(size) │ │ │ │ -164 {} │ │ │ │ -165 │ │ │ │ -_1_6_7 explicit _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (_N_o_d_e_S_t_o_r_a_g_e children) │ │ │ │ -168 : _children(std::move(children)) │ │ │ │ -169 {} │ │ │ │ -170 │ │ │ │ -171#ifdef DOXYGEN │ │ │ │ -172 │ │ │ │ -_1_7_4 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (T& t1, T& t2, ...) │ │ │ │ -175 {} │ │ │ │ -176 │ │ │ │ -177#else │ │ │ │ -178 │ │ │ │ -179 template> &&...), │ │ │ │ -bool> = true> │ │ │ │ -181 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (Children&&... children) │ │ │ │ -182 { │ │ │ │ -183 _children = _N_o_d_e_S_t_o_r_a_g_e{convert_arg(std::forward(children))...}; │ │ │ │ -184 } │ │ │ │ -185 │ │ │ │ -186 template> &&...), │ │ │ │ -bool> = true> │ │ │ │ -188 _D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e (std::shared_ptr... children) │ │ │ │ -189 { │ │ │ │ -190 _children = _N_o_d_e_S_t_o_r_a_g_e{std::move(children)...}; │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -193#endif // DOXYGEN │ │ │ │ -194 │ │ │ │ -196 │ │ │ │ -197 private: │ │ │ │ -198 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ -199 }; │ │ │ │ -200 │ │ │ │ -202 │ │ │ │ -203 } // namespace TypeTree │ │ │ │ -204} //namespace Dune │ │ │ │ -205 │ │ │ │ -206#endif // DUNE_TYPETREE_DYNAMICPOWERNODE_HH │ │ │ │ -_u_t_i_l_i_t_y_._h_h │ │ │ │ -_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ +155#endif // DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ +_t_r_e_e_p_a_t_h_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y │ │ │ │ +constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< │ │ │ │ +i >={}) │ │ │ │ +Returns a copy of the i-th element of the HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:214 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ +constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ +Returns the size (number of components) of the given HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ +Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ +A type for representing tree paths that supports both compile time and run time │ │ │ │ +indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -Mark this class as a power in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:43 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::vector< ChildStorageType > NodeStorage │ │ │ │ -The type used for storing the children. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:67 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ -const NodeStorage & nodeStorage() const │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:137 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -ChildConstStorageType childStorage(std::size_t i) const │ │ │ │ -Returns the storage of the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:110 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const ChildType & child(std::size_t i) const │ │ │ │ -Returns the i-th child (const version). │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:87 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_S_t_o_r_a_g_e_T_y_p_e │ │ │ │ -std::shared_ptr< T > ChildStorageType │ │ │ │ -The storage type of each child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:61 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ -DynamicPowerNode(T &t1, T &t2,...) │ │ │ │ -Initialize all children with the passed-in objects. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:174 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_C_o_n_s_t_S_t_o_r_a_g_e_T_y_p_e │ │ │ │ -std::shared_ptr< const T > ChildConstStorageType │ │ │ │ -The const version of the storage type of each child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:64 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ -DynamicPowerNode(NodeStorage children) │ │ │ │ -Initialize the DynamicPowerNode with a copy of the passed-in storage type. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:167 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ -DynamicPowerNodeTag NodeTag │ │ │ │ -The type tag that describes the node. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:55 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e │ │ │ │ -T ChildType │ │ │ │ -The type of each child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:58 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, ChildType &t) │ │ │ │ -Sets the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:117 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, ChildStorageType st) │ │ │ │ -Sets the stored value representing the i-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:131 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ -DynamicPowerNode(std::size_t size) │ │ │ │ -Construct a node with the given number of children. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:162 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ -static const bool isComposite │ │ │ │ -Mark this class as a non composite in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:46 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::size_t i, ChildType &&t) │ │ │ │ -Store the passed value in i-th child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:124 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -ChildType & child(std::size_t i) │ │ │ │ -Returns the i-th child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:77 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -std::size_t degree() const │ │ │ │ -The number of children. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:49 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -ChildStorageType childStorage(std::size_t i) │ │ │ │ -Returns the storage of the i-th child. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:97 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -Mark this class as non leaf in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn dynamicpowernode.hh:40 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e │ │ │ │ -DynamicPowerNode()=delete │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_P_o_w_e_r_N_o_d_e_T_a_g │ │ │ │ -Tag designating a power node with runtime degree. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:24 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x │ │ │ │ +typename impl::_is_flat_index< std::decay_t< T > >::type is_flat_index │ │ │ │ +Type trait that determines whether T is a flat index in the context of child │ │ │ │ +extraction. │ │ │ │ +DDeeffiinniittiioonn childextraction.hh:117 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ +auto childStorage(Node &&node, Indices... indices) │ │ │ │ +DDeeffiinniittiioonn childextraction.hh:75 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:150 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00080.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: compositenode.hh File Reference │ │ │ +dune-typetree: traversal.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,39 +72,65 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
compositenode.hh File Reference
│ │ │ +Namespaces | │ │ │ +Typedefs | │ │ │ +Functions
│ │ │ +
traversal.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <tuple>
│ │ │ -#include <memory>
│ │ │ -#include <type_traits>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/childextraction.hh>
│ │ │ -#include <dune/typetree/typetraits.hh>
│ │ │ +
#include <utility>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │ +#include <dune/common/indices.hh>
│ │ │ +#include <dune/common/std/type_traits.hh>
│ │ │ +#include <dune/common/typetree/childaccess.hh>
│ │ │ +#include <dune/common/typetree/nodeconcepts.hh>
│ │ │ +#include <dune/common/typetree/traversal.hh>
│ │ │ +#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/typetree/visitor.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Classes

class  Dune::TypeTree::CompositeNode< Children >
 Base class for composite nodes based on variadic templates. More...
struct  Dune::TypeTree::CompositeNode< Children >::Child< k >
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ +

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Detail
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Typedefs

template<class Tree>
using Dune::TypeTree::Detail::DynamicTraversalConcept
template<class Tree>
using Dune::TypeTree::Detail::StaticTraversalConcept
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Functions

template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::enable_if_t< not Tree::isLeaf, int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isComposite or(Tree::isPower and(pathType!=TreePathType::dynamic))), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices, std::enable_if_t<(Tree::isPower and(pathType==TreePathType::dynamic)), int > = 0>
constexpr auto Dune::TypeTree::Detail::leafTreePathTuple (Prefix prefix, std::index_sequence< indices... >)
template<class T, class TreePath, class V, std::enable_if_t< std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class T, class TreePath, class V, std::enable_if_t< not std::decay_t< T >::isLeaf, int > = 0>
void Dune::TypeTree::Detail::applyToTree (T &&tree, TreePath treePath, V &&visitor)
template<class Tree, TreePathType::Type pathType = TreePathType::dynamic>
constexpr auto Dune::TypeTree::leafTreePathTuple ()
 Create tuple of tree paths to leafs.
template<Concept::TreeNode Tree, typename Visitor>
void Dune::TypeTree::applyToTree (Tree &&tree, Visitor &&visitor)
 Apply visitor to TypeTree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,60 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -compositenode.hh File Reference │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +traversal.hh File Reference │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ - class   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _C_h_i_l_d_r_e_n_ _> │ │ │ │ -  Base class for composite nodes based on variadic templates. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_<_ _C_h_i_l_d_r_e_n_ _>_:_:_C_h_i_l_d_<_ _k_ _> │ │ │ │ -  Access to the type and storage type of the i-th child. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ +TTyyppeeddeeffss │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ +template │ │ │ │ +using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template = 0> │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix) │ │ │ │ +template = 0> │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix) │ │ │ │ +template = 0> │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix, std:: │ │ │ │ + index_sequence< indices... >) │ │ │ │ +template = 0> │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e (Prefix prefix, std:: │ │ │ │ + index_sequence< indices... >) │ │ │ │ +template::isLeaf, int > = 0> │ │ │ │ + void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e (T &&tree, TreePath │ │ │ │ + treePath, V &&visitor) │ │ │ │ +template::isLeaf, int > = 0> │ │ │ │ + void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e (T &&tree, TreePath │ │ │ │ + treePath, V &&visitor) │ │ │ │ +template │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e () │ │ │ │ +  Create tuple of tree paths to leafs. │ │ │ │ +template │ │ │ │ + void  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e (Tree &&tree, Visitor &&visitor) │ │ │ │ +  Apply visitor to _T_y_p_e_T_r_e_e. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00080_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: compositenode.hh Source File │ │ │ +dune-typetree: traversal.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,268 +71,209 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
compositenode.hh
│ │ │ +
traversal.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │ -
7#define DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TRAVERSAL_HH
│ │ │ +
7#define DUNE_TYPETREE_TRAVERSAL_HH
│ │ │
8
│ │ │ -
9#include <tuple>
│ │ │ -
10#include <memory>
│ │ │ -
11#include <type_traits>
│ │ │ -
12
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
16
│ │ │ -
17namespace Dune {
│ │ │ -
18 namespace TypeTree {
│ │ │ -
19
│ │ │ +
9#include <utility>
│ │ │ +
10
│ │ │ +
11#include <dune/common/hybridutilities.hh>
│ │ │ +
12#include <dune/common/indices.hh>
│ │ │ +
13#include <dune/common/std/type_traits.hh>
│ │ │ +
14
│ │ │ +
15#include <dune/common/typetree/childaccess.hh>
│ │ │ +
16#include <dune/common/typetree/nodeconcepts.hh>
│ │ │ +
17#include <dune/common/typetree/traversal.hh>
│ │ │ +
18
│ │ │ + │ │ │ + │ │ │ +
21
│ │ │ +
22namespace Dune {
│ │ │ +
23 namespace TypeTree {
│ │ │
24
│ │ │ -
26 template<typename... Children>
│ │ │ -
│ │ │ - │ │ │ -
28 {
│ │ │
29
│ │ │ -
30 public:
│ │ │ -
31
│ │ │ - │ │ │ -
34
│ │ │ -
36 typedef std::tuple<std::shared_ptr<Children>... > NodeStorage;
│ │ │ -
37
│ │ │ -
39 typedef std::tuple<Children...> ChildTypes;
│ │ │ -
40
│ │ │ -
42 static const bool isLeaf = false;
│ │ │ -
43
│ │ │ -
45 static const bool isPower = false;
│ │ │ -
46
│ │ │ -
48 static const bool isComposite = true;
│ │ │ -
49
│ │ │ -
│ │ │ -
50 static constexpr auto degree ()
│ │ │ -
51 {
│ │ │ -
52 return std::integral_constant<std::size_t,sizeof...(Children)>{};
│ │ │ -
53 }
│ │ │ -
│ │ │ -
54
│ │ │ -
56 template<std::size_t k>
│ │ │ -
│ │ │ -
57 struct Child {
│ │ │ -
58
│ │ │ -
59 static_assert((k < degree()), "child index out of range");
│ │ │ -
60
│ │ │ -
62 typedef typename std::tuple_element<k,ChildTypes>::type Type;
│ │ │ -
63
│ │ │ -
65 typedef typename std::tuple_element<k,ChildTypes>::type type;
│ │ │ -
66 };
│ │ │ -
│ │ │ -
67
│ │ │ -
70
│ │ │ -
72
│ │ │ -
75 template<std::size_t k>
│ │ │ -
│ │ │ -
76 typename Child<k>::Type& child (index_constant<k> = {})
│ │ │ -
77 {
│ │ │ -
78 return *std::get<k>(_children);
│ │ │ -
79 }
│ │ │ -
│ │ │ -
80
│ │ │ -
82
│ │ │ -
85 template<std::size_t k>
│ │ │ -
│ │ │ -
86 const typename Child<k>::Type& child (index_constant<k> = {}) const
│ │ │ -
87 {
│ │ │ -
88 return *std::get<k>(_children);
│ │ │ -
89 }
│ │ │ -
│ │ │ -
90
│ │ │ -
92
│ │ │ -
95 template<std::size_t k>
│ │ │ -
│ │ │ -
96 std::shared_ptr<typename Child<k>::Type> childStorage (index_constant<k> = {})
│ │ │ -
97 {
│ │ │ -
98 return std::get<k>(_children);
│ │ │ -
99 }
│ │ │ -
│ │ │ -
100
│ │ │ -
102
│ │ │ -
105 template<std::size_t k>
│ │ │ -
│ │ │ -
106 std::shared_ptr<const typename Child<k>::Type> childStorage (index_constant<k> = {}) const
│ │ │ -
107 {
│ │ │ -
108 return std::get<k>(_children);
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
112 template<std::size_t k>
│ │ │ -
│ │ │ -
113 void setChild (typename Child<k>::Type& child, index_constant<k> = {})
│ │ │ -
114 {
│ │ │ -
115 std::get<k>(_children) = stackobject_to_shared_ptr(child);
│ │ │ -
116 }
│ │ │ -
│ │ │ -
117
│ │ │ -
119 template<std::size_t k>
│ │ │ -
│ │ │ -
120 void setChild (typename Child<k>::Type&& child, index_constant<k> = {})
│ │ │ -
121 {
│ │ │ -
122 std::get<k>(_children) = convert_arg(std::move(child));
│ │ │ -
123 }
│ │ │ -
│ │ │ -
124
│ │ │ -
126 template<std::size_t k>
│ │ │ -
│ │ │ -
127 void setChild (std::shared_ptr<typename Child<k>::Type> child, index_constant<k> = {})
│ │ │ -
128 {
│ │ │ -
129 std::get<k>(_children) = std::move(child);
│ │ │ -
130 }
│ │ │ -
│ │ │ -
131
│ │ │ -
│ │ │ -
132 const NodeStorage& nodeStorage () const
│ │ │ -
133 {
│ │ │ -
134 return _children;
│ │ │ -
135 }
│ │ │ +
30 namespace Detail {
│ │ │ +
31
│ │ │ +
32 // SFINAE template check that Tree has a degree() function and a child() function accepting integer indices
│ │ │ +
33 template<class Tree>
│ │ │ +
34 using DynamicTraversalConcept = decltype((
│ │ │ +
35 std::declval<Tree>().degree(),
│ │ │ +
36 std::declval<Tree>().child(0u)
│ │ │ +
37 ));
│ │ │ +
38
│ │ │ +
39 // SFINAE template check that Tree has static (constexpr) function Tree::degree()
│ │ │ +
40 template<class Tree>
│ │ │ +
41 using StaticTraversalConcept = decltype((
│ │ │ +
42 std::integral_constant<std::size_t, Tree::degree()>{}
│ │ │ +
43 ));
│ │ │ +
44
│ │ │ +
45
│ │ │ +
46 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ +
47 std::enable_if_t<Tree::isLeaf, int> = 0>
│ │ │ +
│ │ │ +
48 constexpr auto leafTreePathTuple(Prefix prefix)
│ │ │ +
49 {
│ │ │ +
50 return std::make_tuple(prefix);
│ │ │ +
51 }
│ │ │ +
│ │ │ +
52
│ │ │ +
53 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ +
54 std::enable_if_t<not Tree::isLeaf, int> = 0>
│ │ │ +
55 constexpr auto leafTreePathTuple(Prefix prefix);
│ │ │ +
56
│ │ │ +
57 template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices,
│ │ │ +
58 std::enable_if_t<(Tree::isComposite or (Tree::isPower and (pathType!=TreePathType::dynamic))), int> = 0>
│ │ │ +
│ │ │ +
59 constexpr auto leafTreePathTuple(Prefix prefix, std::index_sequence<indices...>)
│ │ │ +
60 {
│ │ │ +
61 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, Dune::index_constant<indices>{}))...);
│ │ │ +
62 }
│ │ │ +
│ │ │ +
63
│ │ │ +
64 template<class Tree, TreePathType::Type pathType, class Prefix, std::size_t... indices,
│ │ │ +
65 std::enable_if_t<(Tree::isPower and (pathType==TreePathType::dynamic)), int> = 0>
│ │ │ +
│ │ │ +
66 constexpr auto leafTreePathTuple(Prefix prefix, std::index_sequence<indices...>)
│ │ │ +
67 {
│ │ │ +
68 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, indices))...);
│ │ │ +
69 }
│ │ │ +
│ │ │ +
70
│ │ │ +
71 template<class Tree, TreePathType::Type pathType, class Prefix,
│ │ │ +
72 std::enable_if_t<not Tree::isLeaf, int>>
│ │ │ +
│ │ │ +
73 constexpr auto leafTreePathTuple(Prefix prefix)
│ │ │ +
74 {
│ │ │ +
75 return Detail::leafTreePathTuple<Tree, pathType>(prefix, std::make_index_sequence<Tree::degree()>{});
│ │ │ +
76 }
│ │ │ +
│ │ │ +
77
│ │ │ +
78 /* The signature is the same as for the public applyToTree
│ │ │ +
79 * function in Dune::Typetree, despite the additionally passed
│ │ │ +
80 * treePath argument. The path passed here is associated to
│ │ │ +
81 * the tree and the relative paths of the children (wrt. to tree)
│ │ │ +
82 * are appended to this. Hence the behavior of the public function
│ │ │ +
83 * is resembled by passing an empty treePath.
│ │ │ +
84 */
│ │ │ +
85
│ │ │ +
86 /*
│ │ │ +
87 * This is the overload for leaf traversal
│ │ │ +
88 */
│ │ │ +
89 template<class T, class TreePath, class V,
│ │ │ +
90 std::enable_if_t<std::decay_t<T>::isLeaf, int> = 0>
│ │ │ +
│ │ │ +
91 void applyToTree(T&& tree, TreePath treePath, V&& visitor)
│ │ │ +
92 {
│ │ │ +
93 visitor.leaf(tree, treePath);
│ │ │ +
94 }
│ │ │ +
│ │ │ +
95
│ │ │ +
96 /*
│ │ │ +
97 * This is the general overload doing child traversal.
│ │ │ +
98 */
│ │ │ +
99 template<class T, class TreePath, class V,
│ │ │ +
100 std::enable_if_t<not std::decay_t<T>::isLeaf, int> = 0>
│ │ │ +
│ │ │ +
101 void applyToTree(T&& tree, TreePath treePath, V&& visitor)
│ │ │ +
102 {
│ │ │ +
103 using Tree = std::remove_reference_t<T>;
│ │ │ +
104 using Visitor = std::remove_reference_t<V>;
│ │ │ +
105 visitor.pre(tree, treePath);
│ │ │ +
106
│ │ │ +
107 // the visitor may specify preferred dynamic traversal
│ │ │ +
108 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │ +
109
│ │ │ +
110 // create a dynamic or static index range
│ │ │ +
111 auto indices = [&]{
│ │ │ +
112 if constexpr(preferDynamicTraversal::value && Concept::UniformInnerTreeNode<Tree>)
│ │ │ +
113 return Dune::range(std::size_t(tree.degree()));
│ │ │ +
114 else
│ │ │ +
115 return Dune::range(tree.degree());
│ │ │ +
116 }();
│ │ │ +
117
│ │ │ +
118 if constexpr(Concept::InnerTreeNode<Tree>) {
│ │ │ +
119 Hybrid::forEach(indices, [&](auto i) {
│ │ │ +
120 auto&& child = tree.child(i);
│ │ │ +
121 using Child = std::decay_t<decltype(child)>;
│ │ │ +
122
│ │ │ +
123 visitor.beforeChild(tree, child, treePath, i);
│ │ │ +
124
│ │ │ +
125 // This requires that visitor.in(...) can always be instantiated,
│ │ │ +
126 // even if there's a single child only.
│ │ │ +
127 if (i>0)
│ │ │ +
128 visitor.in(tree, treePath);
│ │ │ +
129
│ │ │ +
130 constexpr bool visitChild = Visitor::template VisitChild<Tree,Child,TreePath>::value;
│ │ │ +
131 if constexpr(visitChild) {
│ │ │ +
132 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ +
133 applyToTree(child, childTreePath, visitor);
│ │ │ +
134 }
│ │ │ +
135
│ │ │ +
136 visitor.afterChild(tree, child, treePath, i);
│ │ │ +
137 });
│ │ │ +
138 }
│ │ │ +
139 visitor.post(tree, treePath);
│ │ │ +
140 }
│ │ │
│ │ │ -
136
│ │ │ -
138
│ │ │
141
│ │ │ -
142 // The following two methods require a little bit of SFINAE trickery to work correctly:
│ │ │ -
143 // We have to make sure that they don't shadow the methods for direct child access because
│ │ │ -
144 // those get called by the generic child() machinery. If that machinery picks up the methods
│ │ │ -
145 // defined below, we have an infinite recursion.
│ │ │ -
146 // So the methods make sure that either
│ │ │ -
147 //
│ │ │ -
148 // * there are more than one argument. In that case, we got multiple indices and can forward
│ │ │ -
149 // to the general machine.
│ │ │ -
150 //
│ │ │ -
151 // * the first argument is not a valid flat index, i.e. either a std::size_t or an index_constant.
│ │ │ -
152 // The argument thus has to be some kind of TreePath instance that we can also pass to the
│ │ │ -
153 // generic machine.
│ │ │ -
154 //
│ │ │ -
155 // The above SFINAE logic works, but there is still a problem with the return type deduction.
│ │ │ -
156 // We have to do a lazy lookup of the return type after SFINAE has succeeded, otherwise the return
│ │ │ -
157 // type deduction will trigger the infinite recursion.
│ │ │ -
158
│ │ │ -
160
│ │ │ -
164#ifdef DOXYGEN
│ │ │ -
165 template<typename... Indices>
│ │ │ -
│ │ │ -
166 ImplementationDefined& child (Indices... indices)
│ │ │ -
167#else
│ │ │ -
168 template<typename I0, typename... I,
│ │ │ -
169 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ -
170 decltype(auto) child (I0 i0, I... i)
│ │ │ -
171#endif
│ │ │ -
172 {
│ │ │ -
173 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ -
174 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ -
175 );
│ │ │ -
176 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ -
177 }
│ │ │ -
│ │ │ -
178
│ │ │ -
180
│ │ │ -
184#ifdef DOXYGEN
│ │ │ -
185 template<typename... Indices>
│ │ │ -
│ │ │ -
186 const ImplementationDefined& child (Indices... indices)
│ │ │ -
187#else
│ │ │ -
188 template<typename I0, typename... I,
│ │ │ -
189 std::enable_if_t<(sizeof...(I) > 0) || IsTreePath<I0>::value, int > = 0>
│ │ │ -
190 decltype(auto) child (I0 i0, I... i) const
│ │ │ -
191#endif
│ │ │ -
192 {
│ │ │ -
193 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}),
│ │ │ -
194 "You cannot use the member function child() with an empty TreePath, use the freestanding version child(node,treePath) instead."
│ │ │ -
195 );
│ │ │ -
196 return Dune::TypeTree::child(*this,i0,i...);
│ │ │ -
197 }
│ │ │ -
│ │ │ -
198
│ │ │ -
200
│ │ │ -
201 protected:
│ │ │ -
202
│ │ │ -
205
│ │ │ -
207
│ │ │ -
│ │ │ - │ │ │ -
215 {}
│ │ │ -
│ │ │ -
216
│ │ │ -
218 template<typename... Args, typename = typename std::enable_if<(sizeof...(Args) == degree())>::type>
│ │ │ -
│ │ │ -
219 CompositeNode (Args&&... args)
│ │ │ -
220 : _children(convert_arg(std::forward<Args>(args))...)
│ │ │ -
221 {}
│ │ │ -
│ │ │ -
222
│ │ │ -
│ │ │ -
224 CompositeNode (std::shared_ptr<Children>... children)
│ │ │ -
225 : _children(std::move(children)...)
│ │ │ -
226 {}
│ │ │ -
│ │ │ -
227
│ │ │ -
│ │ │ -
229 CompositeNode (const NodeStorage& children)
│ │ │ -
230 : _children(children)
│ │ │ -
231 {}
│ │ │ -
│ │ │ -
232
│ │ │ -
234
│ │ │ -
235 private:
│ │ │ -
236 NodeStorage _children;
│ │ │ -
237 };
│ │ │ -
│ │ │ -
238
│ │ │ -
240
│ │ │ -
241 } // namespace TypeTree
│ │ │ -
242} //namespace Dune
│ │ │ -
243
│ │ │ -
244#endif // DUNE_TYPETREE_COMPOSITENODE_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ +
142 } // namespace Detail
│ │ │ +
143
│ │ │ +
144
│ │ │ +
145 // ********************************************************************************
│ │ │ +
146 // Public Interface
│ │ │ +
147 // ********************************************************************************
│ │ │ +
148
│ │ │ +
162 template<class Tree, TreePathType::Type pathType=TreePathType::dynamic>
│ │ │ +
│ │ │ +
163 constexpr auto leafTreePathTuple()
│ │ │ +
164 {
│ │ │ + │ │ │ +
166 }
│ │ │ +
│ │ │ +
167
│ │ │ +
169
│ │ │ +
183 template<Concept::TreeNode Tree, typename Visitor>
│ │ │ +
│ │ │ +
184 void applyToTree(Tree&& tree, Visitor&& visitor)
│ │ │ +
185 {
│ │ │ +
186 Detail::applyToTree(tree, hybridTreePath(), visitor);
│ │ │ +
187 }
│ │ │ +
│ │ │ +
188
│ │ │ +
190
│ │ │ +
191 } // namespace TypeTree
│ │ │ +
192} //namespace Dune
│ │ │ +
193
│ │ │ +
194#endif // DUNE_TYPETREE_TRAVERSAL_HH
│ │ │ + │ │ │ + │ │ │ +
constexpr auto leafTreePathTuple()
Create tuple of tree paths to leafs.
Definition traversal.hh:163
│ │ │ +
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:184
│ │ │ +
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
static const bool isLeaf
Mark this class as non leaf in the dune-typetree.
Definition compositenode.hh:42
│ │ │ -
ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:166
│ │ │ -
static const bool isComposite
Mark this class as a composite in the dune-typetree.
Definition compositenode.hh:48
│ │ │ -
CompositeNode()
Default constructor.
Definition compositenode.hh:214
│ │ │ -
CompositeNodeTag NodeTag
The type tag that describes a CompositeNode.
Definition compositenode.hh:33
│ │ │ -
void setChild(typename Child< k >::Type &child, index_constant< k >={})
Sets the k-th child to the passed-in value.
Definition compositenode.hh:113
│ │ │ -
void setChild(typename Child< k >::Type &&child, index_constant< k >={})
Store the passed value in k-th child.
Definition compositenode.hh:120
│ │ │ -
static constexpr auto degree()
Definition compositenode.hh:50
│ │ │ -
const NodeStorage & nodeStorage() const
Definition compositenode.hh:132
│ │ │ -
CompositeNode(std::shared_ptr< Children >... children)
Initialize the CompositeNode with copies of the passed in Storage objects.
Definition compositenode.hh:224
│ │ │ -
std::shared_ptr< typename Child< k >::Type > childStorage(index_constant< k >={})
Returns the storage of the k-th child.
Definition compositenode.hh:96
│ │ │ -
std::tuple< Children... > ChildTypes
A tuple storing the types of all children.
Definition compositenode.hh:39
│ │ │ -
void setChild(std::shared_ptr< typename Child< k >::Type > child, index_constant< k >={})
Sets the storage of the k-th child to the passed-in value.
Definition compositenode.hh:127
│ │ │ -
const ImplementationDefined & child(Indices... indices)
Returns the child given by the list of indices.
Definition compositenode.hh:186
│ │ │ -
static const bool isPower
Mark this class as a non power in the dune-typetree.
Definition compositenode.hh:45
│ │ │ -
std::shared_ptr< const typename Child< k >::Type > childStorage(index_constant< k >={}) const
Returns the storage of the k-th child (const version).
Definition compositenode.hh:106
│ │ │ -
Child< k >::Type & child(index_constant< k >={})
Returns the k-th child.
Definition compositenode.hh:76
│ │ │ -
CompositeNode(const NodeStorage &children)
Initialize the CompositeNode with a copy of the passed-in storage type.
Definition compositenode.hh:229
│ │ │ -
std::tuple< std::shared_ptr< Children >... > NodeStorage
The type used for storing the children.
Definition compositenode.hh:36
│ │ │ -
const Child< k >::Type & child(index_constant< k >={}) const
Returns the k-th child (const version).
Definition compositenode.hh:86
│ │ │ -
Access to the type and storage type of the i-th child.
Definition compositenode.hh:57
│ │ │ -
std::tuple_element< k, ChildTypes >::type Type
The type of the child.
Definition compositenode.hh:62
│ │ │ -
std::tuple_element< k, ChildTypes >::type type
The type of the child.
Definition compositenode.hh:65
│ │ │ -
Tag designating a composite node.
Definition nodetags.hh:27
│ │ │ -
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │ +
Definition pairtraversal.hh:25
│ │ │ +
void applyToTree(T &&tree, TreePath treePath, V &&visitor)
Definition traversal.hh:91
│ │ │ +
decltype(( std::integral_constant< std::size_t, Tree::degree()>{})) StaticTraversalConcept
Definition traversal.hh:41
│ │ │ +
constexpr auto leafTreePathTuple(Prefix prefix)
Definition traversal.hh:48
│ │ │ +
decltype(( std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) DynamicTraversalConcept
Definition traversal.hh:34
│ │ │ +
Type
Definition treepath.hh:108
│ │ │ +
@ dynamic
Definition treepath.hh:108
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,318 +1,234 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -compositenode.hh │ │ │ │ +traversal.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ -7#define DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ +7#define DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12 │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h> │ │ │ │ -15#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_y_p_e_t_r_a_i_t_s_._h_h> │ │ │ │ -16 │ │ │ │ -17namespace _D_u_n_e { │ │ │ │ -18 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -19 │ │ │ │ +9#include │ │ │ │ +10 │ │ │ │ +11#include │ │ │ │ +12#include │ │ │ │ +13#include │ │ │ │ +14 │ │ │ │ +15#include │ │ │ │ +16#include │ │ │ │ +17#include │ │ │ │ +18 │ │ │ │ +19#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_v_i_s_i_t_o_r_._h_h> │ │ │ │ +21 │ │ │ │ +22namespace _D_u_n_e { │ │ │ │ +23 namespace _T_y_p_e_T_r_e_e { │ │ │ │ 24 │ │ │ │ -26 template │ │ │ │ -_2_7 class _C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -28 { │ │ │ │ 29 │ │ │ │ -30 public: │ │ │ │ +30 namespace _D_e_t_a_i_l { │ │ │ │ 31 │ │ │ │ -_3_3 typedef _C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g _N_o_d_e_T_a_g; │ │ │ │ -34 │ │ │ │ -_3_6 typedef std::tuple... > _N_o_d_e_S_t_o_r_a_g_e; │ │ │ │ -37 │ │ │ │ -_3_9 typedef std::tuple _C_h_i_l_d_T_y_p_e_s; │ │ │ │ -40 │ │ │ │ -_4_2 static const bool _i_s_L_e_a_f = false; │ │ │ │ -43 │ │ │ │ -_4_5 static const bool _i_s_P_o_w_e_r = false; │ │ │ │ -46 │ │ │ │ -_4_8 static const bool _i_s_C_o_m_p_o_s_i_t_e = true; │ │ │ │ -49 │ │ │ │ -_5_0 static constexpr auto _d_e_g_r_e_e () │ │ │ │ -51 { │ │ │ │ -52 return std::integral_constant{}; │ │ │ │ -53 } │ │ │ │ -54 │ │ │ │ -56 template │ │ │ │ -_5_7 struct _C_h_i_l_d { │ │ │ │ -58 │ │ │ │ -59 static_assert((k < _d_e_g_r_e_e()), "child index out of range"); │ │ │ │ -60 │ │ │ │ -_6_2 typedef typename std::tuple_element::type _T_y_p_e; │ │ │ │ +32 // SFINAE template check that Tree has a degree() function and a child() │ │ │ │ +function accepting integer indices │ │ │ │ +33 template │ │ │ │ +_3_4 using _D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t = decltype(( │ │ │ │ +35 std::declval().degree(), │ │ │ │ +36 std::declval().child(0u) │ │ │ │ +37 )); │ │ │ │ +38 │ │ │ │ +39 // SFINAE template check that Tree has static (constexpr) function Tree:: │ │ │ │ +degree() │ │ │ │ +40 template │ │ │ │ +_4_1 using _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t = decltype(( │ │ │ │ +42 std::integral_constant{} │ │ │ │ +43 )); │ │ │ │ +44 │ │ │ │ +45 │ │ │ │ +46 template = 0> │ │ │ │ +_4_8 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix) │ │ │ │ +49 { │ │ │ │ +50 return std::make_tuple(prefix); │ │ │ │ +51 } │ │ │ │ +52 │ │ │ │ +53 template = 0> │ │ │ │ +55 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix); │ │ │ │ +56 │ │ │ │ +57 template = 0> │ │ │ │ +_5_9 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix, std:: │ │ │ │ +index_sequence) │ │ │ │ +60 { │ │ │ │ +61 return std::tuple_cat(_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e, pathType>(Dune::TypeTree::push_back(prefix, Dune:: │ │ │ │ +index_constant{}))...); │ │ │ │ +62 } │ │ │ │ 63 │ │ │ │ -_6_5 typedef typename std::tuple_element::type _t_y_p_e; │ │ │ │ -66 }; │ │ │ │ -67 │ │ │ │ +64 template │ │ │ │ += 0> │ │ │ │ +_6_6 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix, std:: │ │ │ │ +index_sequence) │ │ │ │ +67 { │ │ │ │ +68 return std::tuple_cat(_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e, pathType>(Dune::TypeTree::push_back(prefix, indices))...); │ │ │ │ +69 } │ │ │ │ 70 │ │ │ │ -72 │ │ │ │ -75 template │ │ │ │ -_7_6 typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d (index_constant = {}) │ │ │ │ -77 { │ │ │ │ -78 return *std::get(_children); │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -82 │ │ │ │ -85 template │ │ │ │ -_8_6 const typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d (index_constant = {}) const │ │ │ │ -87 { │ │ │ │ -88 return *std::get(_children); │ │ │ │ -89 } │ │ │ │ -90 │ │ │ │ -92 │ │ │ │ -95 template │ │ │ │ -_9_6 std::shared_ptr::Type> _c_h_i_l_d_S_t_o_r_a_g_e (index_constant = │ │ │ │ -{}) │ │ │ │ -97 { │ │ │ │ -98 return std::get(_children); │ │ │ │ -99 } │ │ │ │ -100 │ │ │ │ -102 │ │ │ │ -105 template │ │ │ │ -_1_0_6 std::shared_ptr::Type> _c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -(index_constant = {}) const │ │ │ │ -107 { │ │ │ │ -108 return std::get(_children); │ │ │ │ -109 } │ │ │ │ -110 │ │ │ │ -112 template │ │ │ │ -_1_1_3 void _s_e_t_C_h_i_l_d (typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e& _c_h_i_l_d, index_constant = {}) │ │ │ │ -114 { │ │ │ │ -115 std::get(_children) = stackobject_to_shared_ptr(_c_h_i_l_d); │ │ │ │ -116 } │ │ │ │ +71 template> │ │ │ │ +_7_3 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e(Prefix prefix) │ │ │ │ +74 { │ │ │ │ +75 return _D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e_<_T_r_e_e_,_ _p_a_t_h_T_y_p_e_>(prefix, std:: │ │ │ │ +make_index_sequence{}); │ │ │ │ +76 } │ │ │ │ +77 │ │ │ │ +78 /* The signature is the same as for the public applyToTree │ │ │ │ +79 * function in Dune::Typetree, despite the additionally passed │ │ │ │ +80 * treePath argument. The path passed here is associated to │ │ │ │ +81 * the tree and the relative paths of the children (wrt. to tree) │ │ │ │ +82 * are appended to this. Hence the behavior of the public function │ │ │ │ +83 * is resembled by passing an empty treePath. │ │ │ │ +84 */ │ │ │ │ +85 │ │ │ │ +86 /* │ │ │ │ +87 * This is the overload for leaf traversal │ │ │ │ +88 */ │ │ │ │ +89 template::isLeaf, int> = 0> │ │ │ │ +_9_1 void _a_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor) │ │ │ │ +92 { │ │ │ │ +93 visitor.leaf(tree, treePath); │ │ │ │ +94 } │ │ │ │ +95 │ │ │ │ +96 /* │ │ │ │ +97 * This is the general overload doing child traversal. │ │ │ │ +98 */ │ │ │ │ +99 template::isLeaf, int> = 0> │ │ │ │ +_1_0_1 void _a_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor) │ │ │ │ +102 { │ │ │ │ +103 using Tree = std::remove_reference_t; │ │ │ │ +104 using Visitor = std::remove_reference_t; │ │ │ │ +105 visitor.pre(tree, treePath); │ │ │ │ +106 │ │ │ │ +107 // the visitor may specify preferred dynamic traversal │ │ │ │ +108 using preferDynamicTraversal = std::bool_constant; │ │ │ │ +109 │ │ │ │ +110 // create a dynamic or static index range │ │ │ │ +111 auto indices = [&]{ │ │ │ │ +112 if constexpr(preferDynamicTraversal::value && Concept:: │ │ │ │ +UniformInnerTreeNode) │ │ │ │ +113 return Dune::range(std::size_t(tree.degree())); │ │ │ │ +114 else │ │ │ │ +115 return Dune::range(tree.degree()); │ │ │ │ +116 }(); │ │ │ │ 117 │ │ │ │ -119 template │ │ │ │ -_1_2_0 void _s_e_t_C_h_i_l_d (typename _C_h_i_l_d_<_k_>_:_:_T_y_p_e&& _c_h_i_l_d, index_constant = {}) │ │ │ │ -121 { │ │ │ │ -122 std::get(_children) = convert_arg(std::move(_c_h_i_l_d)); │ │ │ │ -123 } │ │ │ │ +118 if constexpr(Concept::InnerTreeNode) { │ │ │ │ +119 Hybrid::forEach(indices, [&](auto i) { │ │ │ │ +120 auto&& child = tree.child(i); │ │ │ │ +121 using Child = std::decay_t; │ │ │ │ +122 │ │ │ │ +123 visitor.beforeChild(tree, child, treePath, i); │ │ │ │ 124 │ │ │ │ -126 template │ │ │ │ -_1_2_7 void _s_e_t_C_h_i_l_d (std::shared_ptr_:_:_T_y_p_e> _c_h_i_l_d, │ │ │ │ -index_constant = {}) │ │ │ │ -128 { │ │ │ │ -129 std::get(_children) = std::move(_c_h_i_l_d); │ │ │ │ -130 } │ │ │ │ -131 │ │ │ │ -_1_3_2 const _N_o_d_e_S_t_o_r_a_g_e& _n_o_d_e_S_t_o_r_a_g_e () const │ │ │ │ -133 { │ │ │ │ -134 return _children; │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -138 │ │ │ │ +125 // This requires that visitor.in(...) can always be instantiated, │ │ │ │ +126 // even if there's a single child only. │ │ │ │ +127 if (i>0) │ │ │ │ +128 visitor.in(tree, treePath); │ │ │ │ +129 │ │ │ │ +130 constexpr bool visitChild = Visitor::template │ │ │ │ +VisitChild::value; │ │ │ │ +131 if constexpr(visitChild) { │ │ │ │ +132 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ +133 _a_p_p_l_y_T_o_T_r_e_e(child, childTreePath, visitor); │ │ │ │ +134 } │ │ │ │ +135 │ │ │ │ +136 visitor.afterChild(tree, child, treePath, i); │ │ │ │ +137 }); │ │ │ │ +138 } │ │ │ │ +139 visitor.post(tree, treePath); │ │ │ │ +140 } │ │ │ │ 141 │ │ │ │ -142 // The following two methods require a little bit of SFINAE trickery to │ │ │ │ -work correctly: │ │ │ │ -143 // We have to make sure that they don't shadow the methods for direct child │ │ │ │ -access because │ │ │ │ -144 // those get called by the generic child() machinery. If that machinery │ │ │ │ -picks up the methods │ │ │ │ -145 // defined below, we have an infinite recursion. │ │ │ │ -146 // So the methods make sure that either │ │ │ │ -147 // │ │ │ │ -148 // * there are more than one argument. In that case, we got multiple │ │ │ │ -indices and can forward │ │ │ │ -149 // to the general machine. │ │ │ │ -150 // │ │ │ │ -151 // * the first argument is not a valid flat index, i.e. either a std:: │ │ │ │ -size_t or an index_constant. │ │ │ │ -152 // The argument thus has to be some kind of TreePath instance that we can │ │ │ │ -also pass to the │ │ │ │ -153 // generic machine. │ │ │ │ -154 // │ │ │ │ -155 // The above SFINAE logic works, but there is still a problem with the │ │ │ │ -return type deduction. │ │ │ │ -156 // We have to do a lazy lookup of the return type after SFINAE has │ │ │ │ -succeeded, otherwise the return │ │ │ │ -157 // type deduction will trigger the infinite recursion. │ │ │ │ -158 │ │ │ │ -160 │ │ │ │ -164#ifdef DOXYGEN │ │ │ │ -165 template │ │ │ │ -_1_6_6 ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ -167#else │ │ │ │ -168 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ -170 decltype(auto) _c_h_i_l_d (I0 i0, I... i) │ │ │ │ -171#endif │ │ │ │ -172 { │ │ │ │ -173 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ -174 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ -freestanding version child(node,treePath) instead." │ │ │ │ -175 ); │ │ │ │ -176 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ -177 } │ │ │ │ -178 │ │ │ │ -180 │ │ │ │ -184#ifdef DOXYGEN │ │ │ │ -185 template │ │ │ │ -_1_8_6 const ImplementationDefined& _c_h_i_l_d (Indices... indices) │ │ │ │ -187#else │ │ │ │ -188 template 0) || _I_s_T_r_e_e_P_a_t_h_<_I_0_>_:_:_v_a_l_u_e, int > = 0> │ │ │ │ -190 decltype(auto) _c_h_i_l_d (I0 i0, I... i) const │ │ │ │ -191#endif │ │ │ │ -192 { │ │ │ │ -193 static_assert(sizeof...(I) > 0 || impl::_non_empty_tree_path(I0{}), │ │ │ │ -194 "You cannot use the member function child() with an empty TreePath, use the │ │ │ │ -freestanding version child(node,treePath) instead." │ │ │ │ -195 ); │ │ │ │ -196 return Dune::TypeTree::child(*this,i0,i...); │ │ │ │ -197 } │ │ │ │ -198 │ │ │ │ -200 │ │ │ │ -201 protected: │ │ │ │ -202 │ │ │ │ -205 │ │ │ │ -207 │ │ │ │ -_2_1_4 _C_o_m_p_o_s_i_t_e_N_o_d_e () │ │ │ │ -215 {} │ │ │ │ -216 │ │ │ │ -218 template::type> │ │ │ │ -_2_1_9 _C_o_m_p_o_s_i_t_e_N_o_d_e (Args&&... args) │ │ │ │ -220 : _children(convert_arg(std::forward(args))...) │ │ │ │ -221 {} │ │ │ │ -222 │ │ │ │ -_2_2_4 _C_o_m_p_o_s_i_t_e_N_o_d_e (std::shared_ptr... children) │ │ │ │ -225 : _children(std::move(children)...) │ │ │ │ -226 {} │ │ │ │ -227 │ │ │ │ -_2_2_9 _C_o_m_p_o_s_i_t_e_N_o_d_e (const _N_o_d_e_S_t_o_r_a_g_e& children) │ │ │ │ -230 : _children(children) │ │ │ │ -231 {} │ │ │ │ -232 │ │ │ │ -234 │ │ │ │ -235 private: │ │ │ │ -236 _N_o_d_e_S_t_o_r_a_g_e _children; │ │ │ │ -237 }; │ │ │ │ -238 │ │ │ │ -240 │ │ │ │ -241 } // namespace TypeTree │ │ │ │ -242} //namespace Dune │ │ │ │ -243 │ │ │ │ -244#endif // DUNE_TYPETREE_COMPOSITENODE_HH │ │ │ │ -_t_y_p_e_t_r_a_i_t_s_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_c_h_i_l_d_e_x_t_r_a_c_t_i_o_n_._h_h │ │ │ │ +142 } // namespace Detail │ │ │ │ +143 │ │ │ │ +144 │ │ │ │ +145 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +146 // Public Interface │ │ │ │ +147 / │ │ │ │ +/ │ │ │ │ +******************************************************************************** │ │ │ │ +148 │ │ │ │ +162 template │ │ │ │ +_1_6_3 constexpr auto _l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e() │ │ │ │ +164 { │ │ │ │ +165 return _D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e_<_s_t_d_:_:_d_e_c_a_y___t_<_T_r_e_e_>, pathType> │ │ │ │ +(_h_y_b_r_i_d_T_r_e_e_P_a_t_h()); │ │ │ │ +166 } │ │ │ │ +167 │ │ │ │ +169 │ │ │ │ +183 template │ │ │ │ +_1_8_4 void _a_p_p_l_y_T_o_T_r_e_e(Tree&& tree, Visitor&& visitor) │ │ │ │ +185 { │ │ │ │ +186 _D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e(tree, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor); │ │ │ │ +187 } │ │ │ │ +188 │ │ │ │ +190 │ │ │ │ +191 } // namespace TypeTree │ │ │ │ +192} //namespace Dune │ │ │ │ +193 │ │ │ │ +194#endif // DUNE_TYPETREE_TRAVERSAL_HH │ │ │ │ +_t_r_e_e_p_a_t_h_._h_h │ │ │ │ +_v_i_s_i_t_o_r_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e │ │ │ │ +constexpr auto leafTreePathTuple() │ │ │ │ +Create tuple of tree paths to leafs. │ │ │ │ +DDeeffiinniittiioonn traversal.hh:163 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ +void applyToTree(Tree &&tree, Visitor &&visitor) │ │ │ │ +Apply visitor to TypeTree. │ │ │ │ +DDeeffiinniittiioonn traversal.hh:184 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto hybridTreePath(const T &... t) │ │ │ │ +Constructs a new HybridTreePath from the given indices. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_L_e_a_f │ │ │ │ -static const bool isLeaf │ │ │ │ -Mark this class as non leaf in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:42 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -ImplementationDefined & child(Indices... indices) │ │ │ │ -Returns the child given by the list of indices. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:166 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_C_o_m_p_o_s_i_t_e │ │ │ │ -static const bool isComposite │ │ │ │ -Mark this class as a composite in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:48 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -CompositeNode() │ │ │ │ -Default constructor. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:214 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_T_a_g │ │ │ │ -CompositeNodeTag NodeTag │ │ │ │ -The type tag that describes a CompositeNode. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:33 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(typename Child< k >::Type &child, index_constant< k >={}) │ │ │ │ -Sets the k-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:113 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(typename Child< k >::Type &&child, index_constant< k >={}) │ │ │ │ -Store the passed value in k-th child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:120 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_d_e_g_r_e_e │ │ │ │ -static constexpr auto degree() │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_n_o_d_e_S_t_o_r_a_g_e │ │ │ │ -const NodeStorage & nodeStorage() const │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:132 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -CompositeNode(std::shared_ptr< Children >... children) │ │ │ │ -Initialize the CompositeNode with copies of the passed in Storage objects. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:224 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< typename Child< k >::Type > childStorage(index_constant< k >= │ │ │ │ -{}) │ │ │ │ -Returns the storage of the k-th child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:96 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_T_y_p_e_s │ │ │ │ -std::tuple< Children... > ChildTypes │ │ │ │ -A tuple storing the types of all children. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:39 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_s_e_t_C_h_i_l_d │ │ │ │ -void setChild(std::shared_ptr< typename Child< k >::Type > child, │ │ │ │ -index_constant< k >={}) │ │ │ │ -Sets the storage of the k-th child to the passed-in value. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:127 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const ImplementationDefined & child(Indices... indices) │ │ │ │ -Returns the child given by the list of indices. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:186 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_i_s_P_o_w_e_r │ │ │ │ -static const bool isPower │ │ │ │ -Mark this class as a non power in the dune-typetree. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:45 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -std::shared_ptr< const typename Child< k >::Type > childStorage(index_constant< │ │ │ │ -k >={}) const │ │ │ │ -Returns the storage of the k-th child (const version). │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:106 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -Child< k >::Type & child(index_constant< k >={}) │ │ │ │ -Returns the k-th child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:76 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e │ │ │ │ -CompositeNode(const NodeStorage &children) │ │ │ │ -Initialize the CompositeNode with a copy of the passed-in storage type. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:229 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_N_o_d_e_S_t_o_r_a_g_e │ │ │ │ -std::tuple< std::shared_ptr< Children >... > NodeStorage │ │ │ │ -The type used for storing the children. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:36 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_c_h_i_l_d │ │ │ │ -const Child< k >::Type & child(index_constant< k >={}) const │ │ │ │ -Returns the k-th child (const version). │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:86 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d │ │ │ │ -Access to the type and storage type of the i-th child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:57 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_T_y_p_e │ │ │ │ -std::tuple_element< k, ChildTypes >::type Type │ │ │ │ -The type of the child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:62 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_:_:_C_h_i_l_d_:_:_t_y_p_e │ │ │ │ -std::tuple_element< k, ChildTypes >::type type │ │ │ │ -The type of the child. │ │ │ │ -DDeeffiinniittiioonn compositenode.hh:65 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_C_o_m_p_o_s_i_t_e_N_o_d_e_T_a_g │ │ │ │ -Tag designating a composite node. │ │ │ │ -DDeeffiinniittiioonn nodetags.hh:27 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ -Check if type represents a tree path. │ │ │ │ -DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l │ │ │ │ +DDeeffiinniittiioonn pairtraversal.hh:25 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_a_p_p_l_y_T_o_T_r_e_e │ │ │ │ +void applyToTree(T &&tree, TreePath treePath, V &&visitor) │ │ │ │ +DDeeffiinniittiioonn traversal.hh:91 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ +decltype(( std::integral_constant< std::size_t, Tree::degree()>{})) │ │ │ │ +StaticTraversalConcept │ │ │ │ +DDeeffiinniittiioonn traversal.hh:41 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_l_e_a_f_T_r_e_e_P_a_t_h_T_u_p_l_e │ │ │ │ +constexpr auto leafTreePathTuple(Prefix prefix) │ │ │ │ +DDeeffiinniittiioonn traversal.hh:48 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_t_a_i_l_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_C_o_n_c_e_p_t │ │ │ │ +decltype(( std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) │ │ │ │ +DynamicTraversalConcept │ │ │ │ +DDeeffiinniittiioonn traversal.hh:34 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ +Type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ +@ dynamic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00083.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: childextraction.hh File Reference │ │ │ +dune-typetree: typetraits.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -72,49 +72,73 @@ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
childextraction.hh File Reference
│ │ │ +
typetraits.hh File Reference
│ │ │
│ │ │
│ │ │
#include <type_traits>
│ │ │ -#include <utility>
│ │ │ -#include <tuple>
│ │ │ -#include <dune/common/documentation.hh>
│ │ │ -#include <dune/common/indices.hh>
│ │ │ #include <dune/common/typetraits.hh>
│ │ │ -#include <dune/common/shared_ptr.hh>
│ │ │ -#include <dune/common/typetree/childaccess.hh>
│ │ │ -#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/typetree/nodeinterface.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ +Classes

struct  Dune::first_type< T0, T... >
struct  Dune::TypeTree::has_node_tag< T >
struct  Dune::TypeTree::has_node_tag< T >::yes
struct  Dune::TypeTree::has_node_tag< T >::no
struct  Dune::TypeTree::has_node_tag_value< T, V >
struct  Dune::TypeTree::has_node_tag_value< T, V >::maybe< N >
struct  Dune::TypeTree::has_node_tag_value< T, V >::yes
struct  Dune::TypeTree::has_node_tag_value< T, V >::no
struct  Dune::TypeTree::has_implementation_tag< T >
struct  Dune::TypeTree::has_implementation_tag< T >::yes
struct  Dune::TypeTree::has_implementation_tag< T >::no
struct  Dune::TypeTree::has_implementation_tag_value< T, V >
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::maybe< N >
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::yes
struct  Dune::TypeTree::has_implementation_tag_value< T, V >::no
struct  Dune::TypeTree::AlwaysVoid< typename >
struct  Dune::TypeTree::meta_function
 Marker tag declaring a meta function. More...
struct  Dune::TypeTree::lazy_evaluate< F >
 Helper meta function to delay evaluation of F. More...
struct  Dune::TypeTree::lazy_identity< F >
 Identity function. More...
struct  Dune::TypeTree::evaluate_if_meta_function< F >
 Meta function that evaluates its argument iff it inherits from meta_function. More...
struct  Dune::TypeTree::IsTreePath< T >
 Check if type represents a tree path. More...
│ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │

│ │ │ -Typedefs

template<typename T>
using Dune::TypeTree::is_flat_index = typename impl::_is_flat_index<std::decay_t<T>>::type
 Type trait that determines whether T is a flat index in the context of child extraction.
namespace  Dune::TypeTree::impl
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

template<typename Node, typename... Indices>
auto Dune::TypeTree::childStorage (Node &&node, Indices... indices)
template<typename Node, typename... Indices>
auto Dune::TypeTree::childStorage (Node &&node, HybridTreePath< Indices... > treePath)
template<typename T>
T * Dune::TypeTree::declptr ()
 Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
constexpr auto Dune::TypeTree::impl::isTreePath (void *) -> std::false_type
template<class... I>
constexpr auto Dune::TypeTree::impl::isTreePath (const HybridTreePath< I... > *) -> std::true_type
template<class T>
constexpr auto Dune::TypeTree::isTreePath (const T &) -> IsTreePath< T >
 Check if given object represents a tree path.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,35 +1,59 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -childextraction.hh File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +typetraits.hh File Reference │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ #include │ │ │ │ -#include │ │ │ │ -#include │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +struct   _D_u_n_e_:_:_f_i_r_s_t___t_y_p_e_<_ _T_0_,_ _T_._._._ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _>_:_:_y_e_s │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_<_ _T_ _>_:_:_n_o │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_m_a_y_b_e_<_ _N_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_y_e_s │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_n_o │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _>_:_:_y_e_s │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_<_ _T_ _>_:_:_n_o │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_m_a_y_b_e_<_ _N_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_y_e_s │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_<_ _T_,_ _V_ _>_:_:_n_o │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d_<_ _t_y_p_e_n_a_m_e_ _> │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ +  Marker tag declaring a meta function. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e_<_ _F_ _> │ │ │ │ +  Helper meta function to delay evaluation of F. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y_<_ _F_ _> │ │ │ │ +  Identity function. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n_<_ _F_ _> │ │ │ │ +  Meta function that evaluates its argument iff it inherits from │ │ │ │ + _m_e_t_a___f_u_n_c_t_i_o_n. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h_<_ _T_ _> │ │ │ │ +  Check if type represents a tree path. _M_o_r_e_._._. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template │ │ │ │ -using  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x = typename impl::_is_flat_index>::type │ │ │ │ -  Type trait that determines whether T is a flat index in the context of │ │ │ │ - child extraction. │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e (Node &&node, Indices... indices) │ │ │ │ -template │ │ │ │ -auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e (Node &&node, _H_y_b_r_i_d_T_r_e_e_P_a_t_h< Indices... > │ │ │ │ - treePath) │ │ │ │ +template │ │ │ │ + T *  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r () │ │ │ │ +  Helper function for generating a pointer to a value of type T │ │ │ │ + in an unevaluated operand setting. │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h (void *) -> std::false_type │ │ │ │ +template │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h (const _H_y_b_r_i_d_T_r_e_e_P_a_t_h< I... > │ │ │ │ + *) -> std::true_type │ │ │ │ +template │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s_T_r_e_e_P_a_t_h (const T &) -> _I_s_T_r_e_e_P_a_t_h< T > │ │ │ │ +  Check if given object represents a tree path. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00083_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: childextraction.hh Source File │ │ │ +dune-typetree: typetraits.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,183 +71,280 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
childextraction.hh
│ │ │ +
typetraits.hh
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ -
2// vi: set et ts=8 sw=2 sts=2:
│ │ │ +Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ +
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │ -
7#define DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_TYPETRAITS_HH
│ │ │ +
7#define DUNE_TYPETREE_TYPETRAITS_HH
│ │ │
8
│ │ │
9#include <type_traits>
│ │ │ -
10#include <utility>
│ │ │ -
11#include <tuple>
│ │ │ -
12
│ │ │ -
13#include <dune/common/documentation.hh>
│ │ │ -
14#include <dune/common/indices.hh>
│ │ │ -
15#include <dune/common/typetraits.hh>
│ │ │ -
16#include <dune/common/shared_ptr.hh>
│ │ │ -
17
│ │ │ -
18#include <dune/common/typetree/childaccess.hh>
│ │ │ +
10#include <dune/common/typetraits.hh>
│ │ │ +
11
│ │ │ + │ │ │ + │ │ │ +
14
│ │ │ +
15namespace Dune {
│ │ │ +
16
│ │ │ +
17 // Provide some more C++11 TMP helpers.
│ │ │ +
18 // These should be upstreamed to dune-common ASAP.
│ │ │
19
│ │ │ - │ │ │ -
21
│ │ │ +
20 template<typename... T>
│ │ │ +
21 struct first_type;
│ │ │
22
│ │ │ -
23namespace Dune {
│ │ │ -
24 namespace TypeTree {
│ │ │ -
25
│ │ │ -
26#ifndef DOXYGEN
│ │ │ -
27
│ │ │ -
28 namespace Impl {
│ │ │ -
29
│ │ │ -
30 // check at run time whether index is a valid child index
│ │ │ -
31 template <class Node, class Index>
│ │ │ -
32 std::true_type checkChildIndex (Node const& node, Index i)
│ │ │ -
33 {
│ │ │ -
34 assert(std::size_t(i) < node.degree() && "Child index out of range");
│ │ │ -
35 return {};
│ │ │ -
36 }
│ │ │ -
37
│ │ │ -
38 // check at compile time whether index is a valid index
│ │ │ -
39 template <class Node, std::size_t i>
│ │ │ -
40 std::bool_constant<(i < Node::degree())> checkChildIndex (Node const& node, index_constant<i>)
│ │ │ -
41 {
│ │ │ -
42 static_assert(i < Node::degree(), "Child index out of range");
│ │ │ -
43 return {};
│ │ │ -
44 }
│ │ │ +
23 template<typename T0, typename... T>
│ │ │ +
│ │ │ +
24 struct first_type<T0,T...>
│ │ │ +
25 {
│ │ │ +
26 typedef T0 type;
│ │ │ +
27 };
│ │ │ +
│ │ │ +
28
│ │ │ +
29 namespace TypeTree {
│ │ │ +
30
│ │ │ +
31 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
33 {
│ │ │ +
34 struct yes { char dummy[1]; };
│ │ │ +
35 struct no { char dummy[2]; };
│ │ │ +
36
│ │ │ +
37 template<typename X>
│ │ │ +
38 static yes test(NodeTag<X> *);
│ │ │ +
39 template<typename X>
│ │ │ +
40 static no test(...);
│ │ │ +
41
│ │ │ +
43 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ +
44 };
│ │ │ +
│ │ │
45
│ │ │ -
46 template<class NodePtr>
│ │ │ -
47 auto childStorageImpl (NodePtr&& nodePtr)
│ │ │ -
48 {
│ │ │ -
49 return std::forward<NodePtr>(nodePtr);
│ │ │ -
50 }
│ │ │ -
51
│ │ │ -
52 // recursively call `node.childStorage(...)` with the given indices
│ │ │ -
53 template<class NodePtr, class I0, class... I>
│ │ │ -
54 decltype(auto) childStorageImpl (NodePtr&& nodePtr, I0 i0, [[maybe_unused]] I... i)
│ │ │ -
55 {
│ │ │ -
56 auto valid = checkChildIndex(*nodePtr,i0);
│ │ │ -
57 if constexpr (valid)
│ │ │ -
58 return childStorageImpl(nodePtr->childStorage(i0),i...);
│ │ │ -
59 else
│ │ │ -
60 return;
│ │ │ -
61 }
│ │ │ -
62
│ │ │ -
63 // forward to the impl methods by extracting the indices from the treepath
│ │ │ -
64 template<class NodePtr, class... Indices, std::size_t... i>
│ │ │ -
65 decltype(auto) childStorage (NodePtr&& nodePtr, [[maybe_unused]] HybridTreePath<Indices...> tp, std::index_sequence<i...>)
│ │ │ -
66 {
│ │ │ -
67 return childStorageImpl(std::forward<NodePtr>(nodePtr),treePathEntry<i>(tp)...);
│ │ │ -
68 }
│ │ │ +
46 template<typename T, typename V>
│ │ │ +
│ │ │ + │ │ │ +
48 {
│ │ │ +
49 template<int N>
│ │ │ +
50 struct maybe { char dummy[N+1]; };
│ │ │ +
51 struct yes { char dummy[2]; };
│ │ │ +
52 struct no { char dummy[1]; };
│ │ │ +
53
│ │ │ +
54 template<typename X>
│ │ │ + │ │ │ + │ │ │ +
57 template<typename X>
│ │ │ +
58 static no test(...);
│ │ │ +
59
│ │ │ +
61 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ +
62 };
│ │ │ +
│ │ │ +
63
│ │ │ +
64 template<typename T>
│ │ │ +
│ │ │ + │ │ │ +
66 {
│ │ │ +
67 struct yes { char dummy[1]; };
│ │ │ +
68 struct no { char dummy[2]; };
│ │ │
69
│ │ │ -
70 } // end namespace Impl
│ │ │ -
71
│ │ │ -
72#endif // DOXYGEN
│ │ │ -
73
│ │ │ -
74 template<typename Node, typename... Indices>
│ │ │ -
│ │ │ -
75 auto childStorage (Node&& node, Indices... indices)
│ │ │ -
76 {
│ │ │ -
77 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with an empty list of child indices");
│ │ │ -
78 return Impl::childStorageImpl(&node,indices...);
│ │ │ -
79 }
│ │ │ -
│ │ │ -
80
│ │ │ -
81 template<typename Node, typename... Indices>
│ │ │ -
│ │ │ -
82 auto childStorage (Node&& node, HybridTreePath<Indices...> treePath)
│ │ │ -
83 {
│ │ │ -
84 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with an empty TreePath");
│ │ │ -
85 return Impl::childStorage(&node, treePath, std::index_sequence_for<Indices...>{});
│ │ │ -
86 }
│ │ │ -
│ │ │ -
87
│ │ │ -
88#ifndef DOXYGEN
│ │ │ -
89
│ │ │ -
90 namespace impl {
│ │ │ -
91
│ │ │ -
92 // By default, types are flat indices if they are integral
│ │ │ -
93 template<typename T>
│ │ │ -
94 struct _is_flat_index
│ │ │ -
95 {
│ │ │ -
96 using type = std::is_integral<T>;
│ │ │ -
97 };
│ │ │ -
98
│ │ │ -
99 // And so is any index_constant
│ │ │ -
100 template<std::size_t i>
│ │ │ -
101 struct _is_flat_index<index_constant<i>>
│ │ │ -
102 {
│ │ │ -
103 using type = std::true_type;
│ │ │ -
104 };
│ │ │ -
105
│ │ │ -
106 }
│ │ │ +
70 template<typename X>
│ │ │ + │ │ │ +
72 template<typename X>
│ │ │ +
73 static no test(...);
│ │ │ +
74
│ │ │ +
76 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ +
77 };
│ │ │ +
│ │ │ +
78
│ │ │ +
79 template<typename T, typename V>
│ │ │ +
│ │ │ + │ │ │ +
81 {
│ │ │ +
82 template<int N>
│ │ │ +
83 struct maybe { char dummy[N+1]; };
│ │ │ +
84 struct yes { char dummy[2]; };
│ │ │ +
85 struct no { char dummy[1]; };
│ │ │ +
86
│ │ │ +
87 template<typename X>
│ │ │ + │ │ │ + │ │ │ +
90 template<typename X>
│ │ │ +
91 static no test(...);
│ │ │ +
92
│ │ │ +
94 constexpr static bool value = sizeof(test<T>(0)) == sizeof(yes);
│ │ │ +
95 };
│ │ │ +
│ │ │ +
96
│ │ │ +
97 template<typename>
│ │ │ +
│ │ │ + │ │ │ +
99 {
│ │ │ +
100 typedef void type;
│ │ │ +
101 };
│ │ │ +
│ │ │ +
102
│ │ │ +
103
│ │ │ +
105 template<typename T>
│ │ │ + │ │ │
107
│ │ │ -
108#endif // DOXYGEN
│ │ │ -
109
│ │ │ -
111 /*
│ │ │ -
112 * This type trait can be used to check whether T is a flat index (i.e. either `std::size_t`
│ │ │ -
113 * or `index_constant`). The type trait normalizes T before doing the check, so it will also
│ │ │ -
114 * work correctly for references and cv-qualified types.
│ │ │ -
115 */
│ │ │ -
116 template<typename T>
│ │ │ -
117 using is_flat_index = typename impl::_is_flat_index<std::decay_t<T>>::type;
│ │ │ -
118
│ │ │ -
119#ifndef DOXYGEN
│ │ │ -
120
│ │ │ -
121 namespace impl {
│ │ │ -
122
│ │ │ -
123 // helper function for check in member child() functions that tolerates being passed something that
│ │ │ -
124 // isn't a TreePath. It will just return 0 in that case
│ │ │ -
125
│ │ │ -
126 template<typename T>
│ │ │ -
127 constexpr typename std::enable_if<
│ │ │ - │ │ │ -
129 bool
│ │ │ -
130 >::type
│ │ │ -
131 _non_empty_tree_path (T)
│ │ │ -
132 {
│ │ │ -
133 return false;
│ │ │ -
134 }
│ │ │ -
135
│ │ │ -
136 template<typename T>
│ │ │ -
137 constexpr typename std::enable_if<
│ │ │ - │ │ │ -
139 bool
│ │ │ -
140 >::type
│ │ │ -
141 _non_empty_tree_path (T t)
│ │ │ -
142 {
│ │ │ -
143 return treePathSize(t) > 0;
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 }
│ │ │ -
147
│ │ │ -
148#endif // DOXYGEN
│ │ │ -
149
│ │ │ +
108
│ │ │ +
109 // Support for lazy evaluation of meta functions. This is required when doing
│ │ │ +
110 // nested tag dispatch without C++11-style typedefs (based on using syntax).
│ │ │ +
111 // The standard struct-based meta functions cause premature evaluation in a
│ │ │ +
112 // context that is not SFINAE-compatible. We thus have to return the meta function
│ │ │ +
113 // without evaluating it, placing that burden on the caller. On the other hand,
│ │ │ +
114 // the lookup will often directly be the target type, so here is some helper code
│ │ │ +
115 // to automatically do the additional evaluation if necessary.
│ │ │ +
116 // Too bad that the new syntax is GCC 4.6+...
│ │ │ +
117
│ │ │ +
118
│ │ │ +
120
│ │ │ +
123 struct meta_function {};
│ │ │ +
124
│ │ │ +
126 template<typename F>
│ │ │ +
│ │ │ + │ │ │ +
128 {
│ │ │ +
129 typedef typename F::type type;
│ │ │ +
130 };
│ │ │ +
│ │ │ +
131
│ │ │ +
133 template<typename F>
│ │ │ +
│ │ │ + │ │ │ +
135 {
│ │ │ +
136 typedef F type;
│ │ │ +
137 };
│ │ │ +
│ │ │ +
138
│ │ │ +
140 template<typename F>
│ │ │ +
│ │ │ + │ │ │ +
142 {
│ │ │ +
143 typedef typename std::conditional<
│ │ │ +
144 std::is_base_of<meta_function,F>::value,
│ │ │ + │ │ │ + │ │ │ +
147 >::type::type type;
│ │ │ +
148 };
│ │ │ +
│ │ │ +
149
│ │ │ +
│ │ │ +
150 namespace impl {
│ │ │
151
│ │ │ -
152 } // namespace TypeTree
│ │ │ -
153} //namespace Dune
│ │ │ -
154
│ │ │ -
155#endif // DUNE_TYPETREE_CHILDEXTRACTION_HH
│ │ │ - │ │ │ -
constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< i >={})
Returns a copy of the i-th element of the HybridTreePath.
Definition treepath.hh:214
│ │ │ -
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │ +
152 // Check if type is a or is derived from one of the tree path types
│ │ │ +
153
│ │ │ +
154 // Default overload for types not representing a tree path
│ │ │ +
│ │ │ +
155 constexpr auto isTreePath(void*)
│ │ │ +
156 -> std::false_type
│ │ │ +
157 {
│ │ │ +
158 return std::false_type();
│ │ │ +
159 }
│ │ │ +
│ │ │ +
160
│ │ │ +
161 // Overload for instances of HybridTreePath<...>
│ │ │ +
162 template<class... I>
│ │ │ +
│ │ │ +
163 constexpr auto isTreePath(const HybridTreePath<I...>*)
│ │ │ +
164 -> std::true_type
│ │ │ +
165 {
│ │ │ +
166 return std::true_type();
│ │ │ +
167 }
│ │ │ +
│ │ │ +
168
│ │ │ +
169 }
│ │ │ +
│ │ │ +
170
│ │ │ +
181 template<class T>
│ │ │ +
│ │ │ +
182 struct IsTreePath :
│ │ │ +
183 public decltype(impl::isTreePath((typename std::decay<T>::type*)(nullptr)))
│ │ │ +
184 {};
│ │ │ +
│ │ │ +
185
│ │ │ +
192 template<class T>
│ │ │ +
│ │ │ +
193 constexpr auto isTreePath(const T&)
│ │ │ + │ │ │ +
195 {
│ │ │ +
196 return IsTreePath<T>();
│ │ │ +
197 }
│ │ │ +
│ │ │ +
198
│ │ │ +
199
│ │ │ +
200 } // end namespace TypeTree
│ │ │ +
201} // end namespace Dune
│ │ │ +
202
│ │ │ +
203#endif // DUNE_TYPETREE_TYPETRAITS_HH
│ │ │ + │ │ │ + │ │ │ +
typename std::decay_t< T >::ImplementationTag ImplementationTag
Returns the implementation tag of the given Node.
Definition nodeinterface.hh:74
│ │ │ +
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
typename impl::_is_flat_index< std::decay_t< T > >::type is_flat_index
Type trait that determines whether T is a flat index in the context of child extraction.
Definition childextraction.hh:117
│ │ │ -
auto childStorage(Node &&node, Indices... indices)
Definition childextraction.hh:75
│ │ │ +
constexpr auto isTreePath(const T &) -> IsTreePath< T >
Check if given object represents a tree path.
Definition typetraits.hh:193
│ │ │ +
T * declptr()
Helper function for generating a pointer to a value of type T in an unevaluated operand setting.
│ │ │
Definition typetraits.hh:150
│ │ │ +
constexpr auto isTreePath(void *) -> std::false_type
Definition typetraits.hh:155
│ │ │ +
Definition typetraits.hh:21
│ │ │ +
T0 type
Definition typetraits.hh:26
│ │ │ +
Definition typetraits.hh:33
│ │ │ +
static constexpr bool value
True if class T defines a NodeTag.
Definition typetraits.hh:43
│ │ │ +
static yes test(NodeTag< X > *)
│ │ │ + │ │ │ +
Definition typetraits.hh:34
│ │ │ +
char dummy[1]
Definition typetraits.hh:34
│ │ │ +
Definition typetraits.hh:35
│ │ │ +
char dummy[2]
Definition typetraits.hh:35
│ │ │ +
Definition typetraits.hh:48
│ │ │ +
static maybe< std::is_base_of< V, NodeTag< X > >::value > test(NodeTag< X > *a)
│ │ │ +
static constexpr bool value
True if class T defines a NodeTag of type V.
Definition typetraits.hh:61
│ │ │ + │ │ │ + │ │ │ +
char dummy[N+1]
Definition typetraits.hh:50
│ │ │ +
Definition typetraits.hh:51
│ │ │ +
char dummy[2]
Definition typetraits.hh:51
│ │ │ +
Definition typetraits.hh:52
│ │ │ +
char dummy[1]
Definition typetraits.hh:52
│ │ │ +
Definition typetraits.hh:66
│ │ │ +
static yes test(ImplementationTag< X > *)
│ │ │ + │ │ │ +
static constexpr bool value
True if class T defines an ImplementationTag.
Definition typetraits.hh:76
│ │ │ + │ │ │ +
char dummy[1]
Definition typetraits.hh:67
│ │ │ + │ │ │ +
char dummy[2]
Definition typetraits.hh:68
│ │ │ + │ │ │ +
static maybe< std::is_base_of< V, ImplementationTag< X > >::value > test(ImplementationTag< X > *a)
│ │ │ + │ │ │ +
static constexpr bool value
True if class T defines an ImplementationTag of type V.
Definition typetraits.hh:94
│ │ │ + │ │ │ +
char dummy[N+1]
Definition typetraits.hh:83
│ │ │ + │ │ │ +
char dummy[2]
Definition typetraits.hh:84
│ │ │ + │ │ │ +
char dummy[1]
Definition typetraits.hh:85
│ │ │ +
Definition typetraits.hh:99
│ │ │ +
void type
Definition typetraits.hh:100
│ │ │ +
Marker tag declaring a meta function.
Definition typetraits.hh:123
│ │ │ +
Helper meta function to delay evaluation of F.
Definition typetraits.hh:128
│ │ │ +
F::type type
Definition typetraits.hh:129
│ │ │ +
Identity function.
Definition typetraits.hh:135
│ │ │ +
F type
Definition typetraits.hh:136
│ │ │ +
Meta function that evaluates its argument iff it inherits from meta_function.
Definition typetraits.hh:142
│ │ │ +
std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
Definition typetraits.hh:147
│ │ │ +
Check if type represents a tree path.
Definition typetraits.hh:184
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,204 +1,351 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -childextraction.hh │ │ │ │ +typetraits.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ -2// vi: set et ts=8 sw=2 sts=2: │ │ │ │ +1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ +2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ -7#define DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ +7#define DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ 8 │ │ │ │ 9#include │ │ │ │ -10#include │ │ │ │ -11#include │ │ │ │ -12 │ │ │ │ -13#include │ │ │ │ -14#include │ │ │ │ -15#include │ │ │ │ -16#include │ │ │ │ -17 │ │ │ │ -18#include │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ +14 │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ +16 │ │ │ │ +17 // Provide some more C++11 TMP helpers. │ │ │ │ +18 // These should be upstreamed to dune-common ASAP. │ │ │ │ 19 │ │ │ │ -20#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -21 │ │ │ │ +20 template │ │ │ │ +_2_1 struct _f_i_r_s_t___t_y_p_e; │ │ │ │ 22 │ │ │ │ -23namespace _D_u_n_e { │ │ │ │ -24 namespace _T_y_p_e_T_r_e_e { │ │ │ │ -25 │ │ │ │ -26#ifndef DOXYGEN │ │ │ │ -27 │ │ │ │ -28 namespace Impl { │ │ │ │ -29 │ │ │ │ -30 // check at run time whether index is a valid child index │ │ │ │ -31 template │ │ │ │ -32 std::true_type checkChildIndex (Node const& node, Index i) │ │ │ │ +23 template │ │ │ │ +_2_4 struct _f_i_r_s_t___t_y_p_e │ │ │ │ +25 { │ │ │ │ +_2_6 typedef T0 _t_y_p_e; │ │ │ │ +27 }; │ │ │ │ +28 │ │ │ │ +29 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +30 │ │ │ │ +31 template │ │ │ │ +_3_2 struct _h_a_s___n_o_d_e___t_a_g │ │ │ │ 33 { │ │ │ │ -34 assert(std::size_t(i) < node.degree() && "Child index out of range"); │ │ │ │ -35 return {}; │ │ │ │ -36 } │ │ │ │ -37 │ │ │ │ -38 // check at compile time whether index is a valid index │ │ │ │ -39 template │ │ │ │ -40 std::bool_constant<(i < Node::degree())> checkChildIndex (Node const& node, │ │ │ │ -index_constant) │ │ │ │ -41 { │ │ │ │ -42 static_assert(i < Node::degree(), "Child index out of range"); │ │ │ │ -43 return {}; │ │ │ │ -44 } │ │ │ │ +_3_4 struct _y_e_s { char _d_u_m_m_y[1]; }; │ │ │ │ +_3_5 struct _n_o { char _d_u_m_m_y[2]; }; │ │ │ │ +36 │ │ │ │ +37 template │ │ │ │ +_3_8 static _y_e_s _t_e_s_t(_N_o_d_e_T_a_g_<_X_> *); │ │ │ │ +39 template │ │ │ │ +_4_0 static _n_o _t_e_s_t(...); │ │ │ │ +41 │ │ │ │ +_4_3 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ +44 }; │ │ │ │ 45 │ │ │ │ -46 template │ │ │ │ -47 auto childStorageImpl (NodePtr&& nodePtr) │ │ │ │ +46 template │ │ │ │ +_4_7 struct _h_a_s___n_o_d_e___t_a_g___v_a_l_u_e │ │ │ │ 48 { │ │ │ │ -49 return std::forward(nodePtr); │ │ │ │ -50 } │ │ │ │ -51 │ │ │ │ -52 // recursively call `node.childStorage(...)` with the given indices │ │ │ │ -53 template │ │ │ │ -54 decltype(auto) childStorageImpl (NodePtr&& nodePtr, I0 i0, [[maybe_unused]] │ │ │ │ -I... i) │ │ │ │ -55 { │ │ │ │ -56 auto valid = checkChildIndex(*nodePtr,i0); │ │ │ │ -57 if constexpr (valid) │ │ │ │ -58 return childStorageImpl(nodePtr->childStorage(i0),i...); │ │ │ │ -59 else │ │ │ │ -60 return; │ │ │ │ -61 } │ │ │ │ -62 │ │ │ │ -63 // forward to the impl methods by extracting the indices from the treepath │ │ │ │ -64 template │ │ │ │ -65 decltype(auto) _c_h_i_l_d_S_t_o_r_a_g_e (NodePtr&& nodePtr, [[maybe_unused]] │ │ │ │ -_H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_n_d_i_c_e_s_._._._> tp, std::index_sequence) │ │ │ │ +49 template │ │ │ │ +_5_0 struct _m_a_y_b_e { char _d_u_m_m_y[N+1]; }; │ │ │ │ +_5_1 struct _y_e_s { char _d_u_m_m_y[2]; }; │ │ │ │ +_5_2 struct _n_o { char _d_u_m_m_y[1]; }; │ │ │ │ +53 │ │ │ │ +54 template │ │ │ │ +55 static _m_a_y_b_e_<_s_t_d_:_:_i_s___b_a_s_e___o_f_<_V_,_ _N_o_d_e_T_a_g_<_X_>>_:_:_v_a_l_u_e> │ │ │ │ +_5_6 _t_e_s_t(_N_o_d_e_T_a_g_<_X_> * a); │ │ │ │ +57 template │ │ │ │ +_5_8 static _n_o _t_e_s_t(...); │ │ │ │ +59 │ │ │ │ +_6_1 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ +62 }; │ │ │ │ +63 │ │ │ │ +64 template │ │ │ │ +_6_5 struct _h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g │ │ │ │ 66 { │ │ │ │ -67 return childStorageImpl(std::forward(nodePtr),_t_r_e_e_P_a_t_h_E_n_t_r_y_<_i_> │ │ │ │ -(tp)...); │ │ │ │ -68 } │ │ │ │ +_6_7 struct _y_e_s { char _d_u_m_m_y[1]; }; │ │ │ │ +_6_8 struct _n_o { char _d_u_m_m_y[2]; }; │ │ │ │ 69 │ │ │ │ -70 } // end namespace Impl │ │ │ │ -71 │ │ │ │ -72#endif // DOXYGEN │ │ │ │ -73 │ │ │ │ -74 template │ │ │ │ -_7_5 auto _c_h_i_l_d_S_t_o_r_a_g_e (Node&& node, Indices... indices) │ │ │ │ -76 { │ │ │ │ -77 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with │ │ │ │ -an empty list of child indices"); │ │ │ │ -78 return Impl::childStorageImpl(&node,indices...); │ │ │ │ -79 } │ │ │ │ -80 │ │ │ │ -81 template │ │ │ │ -_8_2 auto _c_h_i_l_d_S_t_o_r_a_g_e (Node&& node, _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_n_d_i_c_e_s_._._._> treePath) │ │ │ │ -83 { │ │ │ │ -84 static_assert(sizeof...(Indices) > 0, "childStorage() cannot be called with │ │ │ │ -an empty TreePath"); │ │ │ │ -85 return Impl::childStorage(&node, treePath, std:: │ │ │ │ -index_sequence_for{}); │ │ │ │ -86 } │ │ │ │ -87 │ │ │ │ -88#ifndef DOXYGEN │ │ │ │ -89 │ │ │ │ -90 namespace impl { │ │ │ │ -91 │ │ │ │ -92 // By default, types are flat indices if they are integral │ │ │ │ -93 template │ │ │ │ -94 struct _is_flat_index │ │ │ │ -95 { │ │ │ │ -96 using type = std::is_integral; │ │ │ │ -97 }; │ │ │ │ -98 │ │ │ │ -99 // And so is any index_constant │ │ │ │ -100 template │ │ │ │ -101 struct _is_flat_index> │ │ │ │ -102 { │ │ │ │ -103 using type = std::true_type; │ │ │ │ -104 }; │ │ │ │ -105 │ │ │ │ -106 } │ │ │ │ +70 template │ │ │ │ +_7_1 static _y_e_s _t_e_s_t(_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_> *); │ │ │ │ +72 template │ │ │ │ +_7_3 static _n_o _t_e_s_t(...); │ │ │ │ +74 │ │ │ │ +_7_6 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ +77 }; │ │ │ │ +78 │ │ │ │ +79 template │ │ │ │ +_8_0 struct _h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e │ │ │ │ +81 { │ │ │ │ +82 template │ │ │ │ +_8_3 struct _m_a_y_b_e { char _d_u_m_m_y[N+1]; }; │ │ │ │ +_8_4 struct _y_e_s { char _d_u_m_m_y[2]; }; │ │ │ │ +_8_5 struct _n_o { char _d_u_m_m_y[1]; }; │ │ │ │ +86 │ │ │ │ +87 template │ │ │ │ +88 static _m_a_y_b_e_<_s_t_d_:_:_i_s___b_a_s_e___o_f_<_V_,_ _I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_>>_:_:_v_a_l_u_e> │ │ │ │ +_8_9 _t_e_s_t(_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g_<_X_> * a); │ │ │ │ +90 template │ │ │ │ +_9_1 static _n_o _t_e_s_t(...); │ │ │ │ +92 │ │ │ │ +_9_4 constexpr static bool _v_a_l_u_e = sizeof(_t_e_s_t_<_T_>(0)) == sizeof(_y_e_s); │ │ │ │ +95 }; │ │ │ │ +96 │ │ │ │ +97 template │ │ │ │ +_9_8 struct _A_l_w_a_y_s_V_o_i_d │ │ │ │ +99 { │ │ │ │ +_1_0_0 typedef void _t_y_p_e; │ │ │ │ +101 }; │ │ │ │ +102 │ │ │ │ +103 │ │ │ │ +105 template │ │ │ │ +_1_0_6 T* _d_e_c_l_p_t_r(); │ │ │ │ 107 │ │ │ │ -108#endif // DOXYGEN │ │ │ │ -109 │ │ │ │ -111 /* │ │ │ │ -112 * This type trait can be used to check whether T is a flat index (i.e. │ │ │ │ -either `std::size_t` │ │ │ │ -113 * or `index_constant`). The type trait normalizes T before doing the check, │ │ │ │ -so it will also │ │ │ │ -114 * work correctly for references and cv-qualified types. │ │ │ │ -115 */ │ │ │ │ -116 template │ │ │ │ -_1_1_7 using _i_s___f_l_a_t___i_n_d_e_x = typename impl::_is_flat_index>::type; │ │ │ │ +108 │ │ │ │ +109 // Support for lazy evaluation of meta functions. This is required when │ │ │ │ +doing │ │ │ │ +110 // nested tag dispatch without C++11-style typedefs (based on using │ │ │ │ +syntax). │ │ │ │ +111 // The standard struct-based meta functions cause premature evaluation in a │ │ │ │ +112 // context that is not SFINAE-compatible. We thus have to return the meta │ │ │ │ +function │ │ │ │ +113 // without evaluating it, placing that burden on the caller. On the other │ │ │ │ +hand, │ │ │ │ +114 // the lookup will often directly be the target type, so here is some │ │ │ │ +helper code │ │ │ │ +115 // to automatically do the additional evaluation if necessary. │ │ │ │ +116 // Too bad that the new syntax is GCC 4.6+... │ │ │ │ +117 │ │ │ │ 118 │ │ │ │ -119#ifndef DOXYGEN │ │ │ │ 120 │ │ │ │ -121 namespace _i_m_p_l { │ │ │ │ -122 │ │ │ │ -123 // helper function for check in member child() functions that tolerates │ │ │ │ -being passed something that │ │ │ │ -124 // isn't a TreePath. It will just return 0 in that case │ │ │ │ -125 │ │ │ │ -126 template │ │ │ │ -127 constexpr typename std::enable_if< │ │ │ │ -128 _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x_<_T_>_:_:_v_a_l_u_e, │ │ │ │ -129 bool │ │ │ │ -130 >::type │ │ │ │ -131 _non_empty_tree_path (T) │ │ │ │ -132 { │ │ │ │ -133 return false; │ │ │ │ -134 } │ │ │ │ -135 │ │ │ │ -136 template │ │ │ │ -137 constexpr typename std::enable_if< │ │ │ │ -138 !_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x_<_T_>_:_:_v_a_l_u_e, │ │ │ │ -139 bool │ │ │ │ -140 >::type │ │ │ │ -141 _non_empty_tree_path (T t) │ │ │ │ +_1_2_3 struct _m_e_t_a___f_u_n_c_t_i_o_n {}; │ │ │ │ +124 │ │ │ │ +126 template │ │ │ │ +_1_2_7 struct _l_a_z_y___e_v_a_l_u_a_t_e │ │ │ │ +128 { │ │ │ │ +_1_2_9 typedef typename F::type _t_y_p_e; │ │ │ │ +130 }; │ │ │ │ +131 │ │ │ │ +133 template │ │ │ │ +_1_3_4 struct _l_a_z_y___i_d_e_n_t_i_t_y │ │ │ │ +135 { │ │ │ │ +_1_3_6 typedef F _t_y_p_e; │ │ │ │ +137 }; │ │ │ │ +138 │ │ │ │ +140 template │ │ │ │ +_1_4_1 struct _e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ 142 { │ │ │ │ -143 return _t_r_e_e_P_a_t_h_S_i_z_e(t) > 0; │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 } │ │ │ │ -147 │ │ │ │ -148#endif // DOXYGEN │ │ │ │ +143 typedef typename std::conditional< │ │ │ │ +144 std::is_base_of::value, │ │ │ │ +145 _l_a_z_y___e_v_a_l_u_a_t_e_<_F_>, │ │ │ │ +146 _l_a_z_y___i_d_e_n_t_i_t_y_<_F_> │ │ │ │ +_1_4_7 >::type::type _t_y_p_e; │ │ │ │ +148 }; │ │ │ │ 149 │ │ │ │ +_1_5_0 namespace _i_m_p_l { │ │ │ │ 151 │ │ │ │ -152 } // namespace TypeTree │ │ │ │ -153} //namespace Dune │ │ │ │ -154 │ │ │ │ -155#endif // DUNE_TYPETREE_CHILDEXTRACTION_HH │ │ │ │ +152 // Check if type is a or is derived from one of the tree path types │ │ │ │ +153 │ │ │ │ +154 // Default overload for types not representing a tree path │ │ │ │ +_1_5_5 constexpr auto _i_s_T_r_e_e_P_a_t_h(void*) │ │ │ │ +156 -> std::false_type │ │ │ │ +157 { │ │ │ │ +158 return std::false_type(); │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +161 // Overload for instances of HybridTreePath<...> │ │ │ │ +162 template │ │ │ │ +_1_6_3 constexpr auto _i_s_T_r_e_e_P_a_t_h(const _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_I_._._._>*) │ │ │ │ +164 -> std::true_type │ │ │ │ +165 { │ │ │ │ +166 return std::true_type(); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +169 } │ │ │ │ +170 │ │ │ │ +181 template │ │ │ │ +_1_8_2 struct _I_s_T_r_e_e_P_a_t_h : │ │ │ │ +183 public decltype(impl::isTreePath((typename std::decay::type*)(nullptr))) │ │ │ │ +184 {}; │ │ │ │ +185 │ │ │ │ +192 template │ │ │ │ +_1_9_3 constexpr auto _i_s_T_r_e_e_P_a_t_h(const T&) │ │ │ │ +194 -> _I_s_T_r_e_e_P_a_t_h_<_T_> │ │ │ │ +195 { │ │ │ │ +196 return _I_s_T_r_e_e_P_a_t_h_<_T_>(); │ │ │ │ +197 } │ │ │ │ +198 │ │ │ │ +199 │ │ │ │ +200 } // end namespace TypeTree │ │ │ │ +201} // end namespace Dune │ │ │ │ +202 │ │ │ │ +203#endif // DUNE_TYPETREE_TYPETRAITS_HH │ │ │ │ _t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_E_n_t_r_y │ │ │ │ -constexpr auto treePathEntry(const HybridTreePath< T... > &tp, index_constant< │ │ │ │ -i >={}) │ │ │ │ -Returns a copy of the i-th element of the HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:214 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ -constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ -Returns the size (number of components) of the given HybridTreePath. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ +_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_m_p_l_e_m_e_n_t_a_t_i_o_n_T_a_g │ │ │ │ +typename std::decay_t< T >::ImplementationTag ImplementationTag │ │ │ │ +Returns the implementation tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:74 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ +typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ +Returns the node tag of the given Node. │ │ │ │ +DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ A type for representing tree paths that supports both compile time and run time │ │ │ │ indices. │ │ │ │ DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s___f_l_a_t___i_n_d_e_x │ │ │ │ -typename impl::_is_flat_index< std::decay_t< T > >::type is_flat_index │ │ │ │ -Type trait that determines whether T is a flat index in the context of child │ │ │ │ -extraction. │ │ │ │ -DDeeffiinniittiioonn childextraction.hh:117 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_c_h_i_l_d_S_t_o_r_a_g_e │ │ │ │ -auto childStorage(Node &&node, Indices... indices) │ │ │ │ -DDeeffiinniittiioonn childextraction.hh:75 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_s_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto isTreePath(const T &) -> IsTreePath< T > │ │ │ │ +Check if given object represents a tree path. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:193 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_d_e_c_l_p_t_r │ │ │ │ +T * declptr() │ │ │ │ +Helper function for generating a pointer to a value of type T in an unevaluated │ │ │ │ +operand setting. │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l │ │ │ │ DDeeffiinniittiioonn typetraits.hh:150 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_i_m_p_l_:_:_i_s_T_r_e_e_P_a_t_h │ │ │ │ +constexpr auto isTreePath(void *) -> std::false_type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:155 │ │ │ │ +_D_u_n_e_:_:_f_i_r_s_t___t_y_p_e │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:21 │ │ │ │ +_D_u_n_e_:_:_f_i_r_s_t___t_y_p_e_<_ _T_0_,_ _T_._._._ _>_:_:_t_y_p_e │ │ │ │ +T0 type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:26 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:33 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_v_a_l_u_e │ │ │ │ +static constexpr bool value │ │ │ │ +True if class T defines a NodeTag. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:43 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_t_e_s_t │ │ │ │ +static yes test(NodeTag< X > *) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_t_e_s_t │ │ │ │ +static no test(...) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_y_e_s │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:34 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ +char dummy[1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:34 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_n_o │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:35 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ +char dummy[2] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:35 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:48 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ +static maybe< std::is_base_of< V, NodeTag< X > >::value > test(NodeTag< X > *a) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ +static constexpr bool value │ │ │ │ +True if class T defines a NodeTag of type V. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:61 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ +static no test(...) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e_:_:_d_u_m_m_y │ │ │ │ +char dummy[N+1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:50 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_y_e_s │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:51 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ +char dummy[2] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:51 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_n_o │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:52 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___n_o_d_e___t_a_g___v_a_l_u_e_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ +char dummy[1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:52 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:66 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_t_e_s_t │ │ │ │ +static yes test(ImplementationTag< X > *) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_t_e_s_t │ │ │ │ +static no test(...) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_v_a_l_u_e │ │ │ │ +static constexpr bool value │ │ │ │ +True if class T defines an ImplementationTag. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:76 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_y_e_s │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:67 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ +char dummy[1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:67 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_n_o │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:68 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ +char dummy[2] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:68 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:81 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ +static maybe< std::is_base_of< V, ImplementationTag< X > >::value > test │ │ │ │ +(ImplementationTag< X > *a) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_t_e_s_t │ │ │ │ +static no test(...) │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_v_a_l_u_e │ │ │ │ +static constexpr bool value │ │ │ │ +True if class T defines an ImplementationTag of type V. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:94 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_m_a_y_b_e_:_:_d_u_m_m_y │ │ │ │ +char dummy[N+1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_y_e_s │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:84 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_y_e_s_:_:_d_u_m_m_y │ │ │ │ +char dummy[2] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:84 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_n_o │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_a_s___i_m_p_l_e_m_e_n_t_a_t_i_o_n___t_a_g___v_a_l_u_e_:_:_n_o_:_:_d_u_m_m_y │ │ │ │ +char dummy[1] │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:99 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_l_w_a_y_s_V_o_i_d_:_:_t_y_p_e │ │ │ │ +void type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:100 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ +Marker tag declaring a meta function. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:123 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e │ │ │ │ +Helper meta function to delay evaluation of F. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:128 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___e_v_a_l_u_a_t_e_:_:_t_y_p_e │ │ │ │ +F::type type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:129 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y │ │ │ │ +Identity function. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:135 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_l_a_z_y___i_d_e_n_t_i_t_y_:_:_t_y_p_e │ │ │ │ +F type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:136 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n │ │ │ │ +Meta function that evaluates its argument iff it inherits from meta_function. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:142 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_e_v_a_l_u_a_t_e___i_f___m_e_t_a___f_u_n_c_t_i_o_n_:_:_t_y_p_e │ │ │ │ +std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F │ │ │ │ +>, lazy_identity< F > >::type::type type │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:147 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_I_s_T_r_e_e_P_a_t_h │ │ │ │ +Check if type represents a tree path. │ │ │ │ +DDeeffiinniittiioonn typetraits.hh:184 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00086.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: accumulate_static.hh File Reference │ │ │ +dune-typetree: visitor.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -74,67 +74,83 @@ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
accumulate_static.hh File Reference
│ │ │ +Functions | │ │ │ +Variables
│ │ │ +
visitor.hh File Reference
│ │ │
│ │ │
│ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ -#include <dune/typetree/nodeinterface.hh>
│ │ │ -#include <dune/typetree/nodetags.hh>
│ │ │ -#include <dune/typetree/traversal.hh>
│ │ │ -#include <dune/typetree/treepath.hh>
│ │ │ -#include <dune/typetree/utility.hh>
│ │ │ +
#include <dune/typetree/treepath.hh>
│ │ │ +#include <dune/common/hybridutilities.hh>
│ │ │
│ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Classes

struct  Dune::TypeTree::or_< result_type >
 Statically combine two values of type result_type using ||. More...
struct  Dune::TypeTree::or_< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::and_< result_type >
 Statically combine two values of type result_type using &&. More...
struct  Dune::TypeTree::and_< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::plus< result_type >
 Statically combine two values of type result_type using +. More...
struct  Dune::TypeTree::plus< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::minus< result_type >
 Statically combine two values of type result_type using -. More...
struct  Dune::TypeTree::minus< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::multiply< result_type >
 Statically combine two values of type result_type using *. More...
struct  Dune::TypeTree::multiply< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::min< result_type >
 Statically combine two values of type result_type by returning their minimum. More...
struct  Dune::TypeTree::min< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::max< result_type >
 Statically combine two values of type result_type by returning their maximum. More...
struct  Dune::TypeTree::max< result_type >::reduce< r1, r2 >
struct  Dune::TypeTree::AccumulateValue< Tree, Functor, Reduction, startValue, ParentChildReduction >
 Statically accumulate a value over the nodes of a TypeTree. More...
struct  Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >
struct  Dune::TypeTree::AccumulateType< Tree, Policy >
 Statically accumulate a type over the nodes of a TypeTree. More...
struct  Dune::TypeTree::DefaultVisitor
 Visitor interface and base class for TypeTree visitors. More...
struct  Dune::TypeTree::DefaultPairVisitor
 Visitor interface and base class for visitors of pairs of TypeTrees. More...
struct  Dune::TypeTree::Experimental::DefaultHybridVisitor
 Hybrid visitor interface and base class for TypeTree hybrid visitors. More...
struct  Dune::TypeTree::VisitDirectChildren
 Mixin base class for visitors that only want to visit the direct children of a node. More...
struct  Dune::TypeTree::VisitDirectChildren::VisitChild< Node1, Child1, Node2, Child2, TreePath >
 Template struct for determining whether or not to visit a given child. More...
struct  Dune::TypeTree::VisitTree
 Mixin base class for visitors that want to visit the complete tree. More...
struct  Dune::TypeTree::VisitTree::VisitChild< Node1, Child1, Node2, Child2, TreePath >
 Template struct for determining whether or not to visit a given child. More...
struct  Dune::TypeTree::StaticTraversal
 Mixin base class for visitors that require a static TreePath during traversal. More...
struct  Dune::TypeTree::DynamicTraversal
 Mixin base class for visitors that only need a dynamic TreePath during traversal. More...
struct  Dune::TypeTree::TreeVisitor
 Convenience base class for visiting the entire tree. More...
struct  Dune::TypeTree::DirectChildrenVisitor
 Convenience base class for visiting the direct children of a node. More...
struct  Dune::TypeTree::TreePairVisitor
 Convenience base class for visiting an entire tree pair. More...
struct  Dune::TypeTree::DirectChildrenPairVisitor
 Convenience base class for visiting the direct children of a node pair. More...
struct  Dune::TypeTree::Experimental::Info::LeafCounterVisitor
struct  Dune::TypeTree::Experimental::Info::NodeCounterVisitor
struct  Dune::TypeTree::Experimental::Info::DepthVisitor
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │

│ │ │ Namespaces

namespace  Dune
namespace  Dune::TypeTree
namespace  Dune::TypeTree::Experimental
namespace  Dune::TypeTree::Experimental::Info
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +

│ │ │ Functions

template<typename Tree, typename Visitor, typename Init>
auto Dune::TypeTree::Experimental::hybridApplyToTree (Tree &&tree, Visitor &&visitor, Init &&init)
 Apply hybrid visitor to TypeTree.
template<typename Tree>
auto Dune::TypeTree::Experimental::Info::depth (const Tree &tree)
 The depth of the TypeTree.
template<typename Tree>
constexpr auto Dune::TypeTree::Experimental::Info::depth ()
 The depth of the Tree.
template<typename Tree>
auto Dune::TypeTree::Experimental::Info::nodeCount (const Tree &tree)
 The total number of nodes in the Tree.
template<typename Tree>
auto Dune::TypeTree::Experimental::Info::leafCount (const Tree &tree)
 The number of leaf nodes in the Tree.
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

template<typename Tree>
constexpr bool Dune::TypeTree::Experimental::Info::isDynamic = std::is_same<std::size_t, decltype(leafCount(std::declval<Tree>()))>{}
 true if any of the nodes in the tree only has dynamic degree.
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -1,57 +1,81 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -accumulate_static.hh File Reference │ │ │ │ -#include │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +visitor.hh File Reference │ │ │ │ #include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ +#include │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type using ||. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type using &&. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type using +. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type using -. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type using *. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type by returning their │ │ │ │ - minimum. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_<_ _r_e_s_u_l_t___t_y_p_e_ _> │ │ │ │ -  Statically combine two values of type result_type by returning their │ │ │ │ - maximum. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_<_ _r_e_s_u_l_t___t_y_p_e_ _>_:_:_r_e_d_u_c_e_<_ _r_1_,_ _r_2_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_<_ _T_r_e_e_,_ _F_u_n_c_t_o_r_,_ _R_e_d_u_c_t_i_o_n_,_ _s_t_a_r_t_V_a_l_u_e_, │ │ │ │ - _P_a_r_e_n_t_C_h_i_l_d_R_e_d_u_c_t_i_o_n_ _> │ │ │ │ -  Statically accumulate a value over the nodes of a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_<_ _F_u_n_c_t_o_r_,_ _R_e_d_u_c_t_i_o_n_,_ _S_t_a_r_t_T_y_p_e_, │ │ │ │ - _P_a_r_e_n_t_C_h_i_l_d_R_e_d_u_c_t_i_o_n_,_ _R_e_d_u_c_t_i_o_n_A_l_g_o_r_i_t_h_m_ _> │ │ │ │ -struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e_<_ _T_r_e_e_,_ _P_o_l_i_c_y_ _> │ │ │ │ -  Statically accumulate a type over the nodes of a _T_y_p_e_T_r_e_e. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ +  Visitor interface and base class for _T_y_p_e_T_r_e_e visitors. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +  Visitor interface and base class for visitors of pairs of TypeTrees. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ +  Hybrid visitor interface and base class for _T_y_p_e_T_r_e_e hybrid visitors. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ +  Mixin base class for visitors that only want to visit the direct │ │ │ │ + children of a node. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d_<_ _N_o_d_e_1_,_ _C_h_i_l_d_1_,_ _N_o_d_e_2_, │ │ │ │ + _C_h_i_l_d_2_,_ _T_r_e_e_P_a_t_h_ _> │ │ │ │ +  Template struct for determining whether or not to visit a given child. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e │ │ │ │ +  Mixin base class for visitors that want to visit the complete tree. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d_<_ _N_o_d_e_1_,_ _C_h_i_l_d_1_,_ _N_o_d_e_2_,_ _C_h_i_l_d_2_, │ │ │ │ + _T_r_e_e_P_a_t_h_ _> │ │ │ │ +  Template struct for determining whether or not to visit a given child. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +  Mixin base class for visitors that require a static TreePath during │ │ │ │ + traversal. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +  Mixin base class for visitors that only need a dynamic TreePath during │ │ │ │ + traversal. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_V_i_s_i_t_o_r │ │ │ │ +  Convenience base class for visiting the entire tree. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ +  Convenience base class for visiting the direct children of a node. │ │ │ │ + _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +  Convenience base class for visiting an entire tree pair. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +  Convenience base class for visiting the direct children of a node │ │ │ │ + pair. _M_o_r_e_._._. │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +struct   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _D_u_n_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ +namespace   _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template │ │ │ │ -auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e (Tree &&tree, Visitor │ │ │ │ - &&visitor, Init &&init) │ │ │ │ -  Apply hybrid visitor to _T_y_p_e_T_r_e_e. │ │ │ │ +template │ │ │ │ + auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h (const Tree &tree) │ │ │ │ +  The depth of the _T_y_p_e_T_r_e_e. │ │ │ │ +template │ │ │ │ +constexpr auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h () │ │ │ │ +  The depth of the Tree. │ │ │ │ +template │ │ │ │ + auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t (const Tree │ │ │ │ + &tree) │ │ │ │ +  The total number of nodes in the Tree. │ │ │ │ +template │ │ │ │ + auto  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t (const Tree │ │ │ │ + &tree) │ │ │ │ +  The number of leaf nodes in the Tree. │ │ │ │ +VVaarriiaabblleess │ │ │ │ +template │ │ │ │ +constexpr bool  _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_i_s_D_y_n_a_m_i_c = std:: │ │ │ │ + is_same()))> │ │ │ │ + {} │ │ │ │ +  true if any of the nodes in the tree only has dynamic degree. │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00086_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-typetree: accumulate_static.hh Source File │ │ │ +dune-typetree: visitor.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -71,595 +71,388 @@ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -
accumulate_static.hh
│ │ │ +
visitor.hh
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
│ │ │
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-PDELab-exception
│ │ │
5
│ │ │ -
6#ifndef DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │ -
7#define DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │ +
6#ifndef DUNE_TYPETREE_VISITOR_HH
│ │ │ +
7#define DUNE_TYPETREE_VISITOR_HH
│ │ │
8
│ │ │ -
9#include <dune/common/typetraits.hh>
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
15
│ │ │ -
16
│ │ │ -
│ │ │ -
17namespace Dune {
│ │ │ -
│ │ │ -
18 namespace TypeTree {
│ │ │ + │ │ │ +
10#include <dune/common/hybridutilities.hh>
│ │ │ +
11
│ │ │ +
12namespace Dune {
│ │ │ +
13 namespace TypeTree {
│ │ │ +
14
│ │ │
19
│ │ │ -
24
│ │ │ -
26 template<typename result_type>
│ │ │ -
│ │ │ -
27 struct or_
│ │ │ -
28 {
│ │ │ -
29 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
30 struct reduce
│ │ │ -
31 {
│ │ │ -
32 static const result_type result = r1 || r2;
│ │ │ -
33 };
│ │ │ -
│ │ │ -
34 };
│ │ │ -
│ │ │ -
35
│ │ │ -
37 template<typename result_type>
│ │ │ -
│ │ │ -
38 struct and_
│ │ │ -
39 {
│ │ │ -
40 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
41 struct reduce
│ │ │ -
42 {
│ │ │ -
43 static const result_type result = r1 && r2;
│ │ │ -
44 };
│ │ │ -
│ │ │ -
45 };
│ │ │ -
│ │ │ -
46
│ │ │ -
48 template<typename result_type>
│ │ │ -
│ │ │ -
49 struct plus
│ │ │ -
50 {
│ │ │ -
51 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
52 struct reduce
│ │ │ -
53 {
│ │ │ -
54 static const result_type result = r1 + r2;
│ │ │ -
55 };
│ │ │ -
│ │ │ -
56 };
│ │ │ -
│ │ │ -
57
│ │ │ -
59 template<typename result_type>
│ │ │ -
│ │ │ -
60 struct minus
│ │ │ -
61 {
│ │ │ -
62 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
63 struct reduce
│ │ │ -
64 {
│ │ │ -
65 static const result_type result = r1 - r2;
│ │ │ -
66 };
│ │ │ -
│ │ │ -
67 };
│ │ │ -
│ │ │ -
68
│ │ │ -
70 template<typename result_type>
│ │ │ -
│ │ │ -
71 struct multiply
│ │ │ -
72 {
│ │ │ -
73 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
74 struct reduce
│ │ │ -
75 {
│ │ │ -
76 static const result_type result = r1 * r2;
│ │ │ -
77 };
│ │ │ -
│ │ │ -
78 };
│ │ │ -
│ │ │ -
79
│ │ │ -
81 template<typename result_type>
│ │ │ -
│ │ │ -
82 struct min
│ │ │ -
83 {
│ │ │ -
84 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
85 struct reduce
│ │ │ -
86 {
│ │ │ -
87 static const result_type result = r1 < r2 ? r1 : r2;
│ │ │ -
88 };
│ │ │ -
│ │ │ -
89 };
│ │ │ -
│ │ │ -
90
│ │ │ -
92 template<typename result_type>
│ │ │ -
│ │ │ -
93 struct max
│ │ │ -
94 {
│ │ │ -
95 template<result_type r1, result_type r2>
│ │ │ -
│ │ │ -
96 struct reduce
│ │ │ -
97 {
│ │ │ -
98 static const result_type result = r1 > r2 ? r1 : r2;
│ │ │ -
99 };
│ │ │ -
│ │ │ -
100 };
│ │ │ -
│ │ │ -
101
│ │ │ -
102
│ │ │ -
103 namespace {
│ │ │ -
104
│ │ │ -
105 // implementation of the traversal algorithm
│ │ │ -
106
│ │ │ -
108 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath, bool doVisit>
│ │ │ -
109 struct accumulate_node_helper
│ │ │ -
110 {
│ │ │ -
111
│ │ │ -
112 typedef typename Functor::result_type result_type;
│ │ │ -
113
│ │ │ -
114 static const result_type result = current_value;
│ │ │ -
115
│ │ │ -
116 };
│ │ │ -
117
│ │ │ -
119 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ -
120 struct accumulate_node_helper<Node,Functor,Reduction,current_value,TreePath,true>
│ │ │ -
121 {
│ │ │ -
122
│ │ │ -
123 typedef typename Functor::result_type result_type;
│ │ │ -
124
│ │ │ -
125 static const result_type result = Reduction::template reduce<current_value,Functor::template visit<Node,TreePath>::result>::result;
│ │ │ -
126
│ │ │ -
127 };
│ │ │ +
21
│ │ │ +
│ │ │ + │ │ │ +
49 {
│ │ │ +
50
│ │ │ +
52
│ │ │ +
59 template<typename T, typename TreePath>
│ │ │ +
60 void pre(T&&, TreePath) const {}
│ │ │ +
61
│ │ │ +
63
│ │ │ +
71 template<typename T, typename TreePath>
│ │ │ +
72 void in(T&&, TreePath) const {}
│ │ │ +
73
│ │ │ +
75
│ │ │ +
82 template<typename T, typename TreePath>
│ │ │ +
83 void post(T&&, TreePath) const {}
│ │ │ +
84
│ │ │ +
86
│ │ │ +
92 template<typename T, typename TreePath>
│ │ │ +
93 void leaf(T&&, TreePath) const {}
│ │ │ +
94
│ │ │ +
96
│ │ │ +
106 template<typename T, typename Child, typename TreePath, typename ChildIndex>
│ │ │ +
107 void beforeChild(T&&, Child&&, TreePath, ChildIndex) const {}
│ │ │ +
108
│ │ │ +
110
│ │ │ +
121 template<typename T, typename Child, typename TreePath, typename ChildIndex>
│ │ │ +
122 void afterChild(T&&, Child&&, TreePath, ChildIndex) const {}
│ │ │ +
123
│ │ │ +
124 };
│ │ │ +
│ │ │ +
125
│ │ │ +
126
│ │ │
128
│ │ │ -
130 template<typename Tree, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, typename Tag>
│ │ │ -
131 struct accumulate_value;
│ │ │ -
132
│ │ │ -
134 template<typename LeafNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ -
135 struct accumulate_value<LeafNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,LeafNodeTag>
│ │ │ -
136 {
│ │ │ -
137
│ │ │ -
138 typedef typename Functor::result_type result_type;
│ │ │ -
139
│ │ │ -
140 static const result_type result =
│ │ │ -
141
│ │ │ -
142 accumulate_node_helper<LeafNode,Functor,Reduction,current_value,TreePath,Functor::template doVisit<LeafNode,TreePath>::value>::result;
│ │ │ -
143
│ │ │ -
144 };
│ │ │ -
145
│ │ │ -
147 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t i, std::size_t n>
│ │ │ -
148 struct accumulate_over_children
│ │ │ -
149 {
│ │ │ -
150
│ │ │ -
151 typedef typename Functor::result_type result_type;
│ │ │ -
152
│ │ │ -
153 typedef decltype(push_back(TreePath{},index_constant<i>{})) child_tree_path;
│ │ │ -
154
│ │ │ -
155 typedef typename Node::template Child<i>::Type child;
│ │ │ -
156
│ │ │ -
157 static const result_type child_result = accumulate_value<child,Functor,Reduction,ParentChildReduction,current_value,child_tree_path,NodeTag<child>>::result;
│ │ │ -
158
│ │ │ -
159 static const result_type result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,child_result,TreePath,i+1,n>::result;
│ │ │ -
160
│ │ │ -
161 };
│ │ │ -
162
│ │ │ -
164 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t n>
│ │ │ -
165 struct accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,n,n>
│ │ │ -
166 {
│ │ │ -
167
│ │ │ -
168 typedef typename Functor::result_type result_type;
│ │ │ -
169
│ │ │ -
170 static const result_type result = current_value;
│ │ │ -
171
│ │ │ -
172 };
│ │ │ -
173
│ │ │ -
176 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ -
177 struct accumulate_value_generic_composite_node
│ │ │ -
178 {
│ │ │ -
179
│ │ │ -
180 typedef typename Functor::result_type result_type;
│ │ │ -
181
│ │ │ -
182 static const result_type child_result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,0,StaticDegree<Node>::value>::result;
│ │ │ -
183
│ │ │ -
184 static const result_type result =
│ │ │ -
185 accumulate_node_helper<Node,Functor,ParentChildReduction,child_result,TreePath,Functor::template doVisit<Node,TreePath>::value>::result;
│ │ │ -
186
│ │ │ -
187
│ │ │ -
188 };
│ │ │ -
189
│ │ │ -
191 template<typename PowerNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ -
192 struct accumulate_value<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,PowerNodeTag>
│ │ │ -
193 : public accumulate_value_generic_composite_node<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
│ │ │ -
194 {};
│ │ │ -
195
│ │ │ -
197 template<typename CompositeNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
│ │ │ -
198 struct accumulate_value<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,CompositeNodeTag>
│ │ │ -
199 : public accumulate_value_generic_composite_node<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
│ │ │ -
200 {};
│ │ │ -
201
│ │ │ -
202 } // anonymous namespace
│ │ │ -
203
│ │ │ -
205
│ │ │ -
261 template<typename Tree, typename Functor, typename Reduction, typename Functor::result_type startValue, typename ParentChildReduction = Reduction>
│ │ │ -
│ │ │ - │ │ │ -
263 {
│ │ │ -
264
│ │ │ -
266 typedef typename Functor::result_type result_type;
│ │ │ -
267
│ │ │ -
269 static const result_type result = accumulate_value<Tree,Functor,Reduction,ParentChildReduction,startValue,HybridTreePath<>,NodeTag<Tree>>::result;
│ │ │ -
270
│ │ │ -
271 };
│ │ │ -
│ │ │ -
272
│ │ │ -
275 struct flattened_reduction;
│ │ │ -
276
│ │ │ -
279 struct bottom_up_reduction;
│ │ │ -
280
│ │ │ -
281 namespace {
│ │ │ -
282
│ │ │ -
283 // implementation of the traversal algorithm
│ │ │ -
284
│ │ │ -
287 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath, bool doVisit>
│ │ │ -
288 struct accumulate_type_node_helper
│ │ │ -
289 {
│ │ │ -
290
│ │ │ -
291 typedef current_type type;
│ │ │ -
292
│ │ │ -
293 };
│ │ │ -
294
│ │ │ -
296 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath>
│ │ │ -
297 struct accumulate_type_node_helper<Node,Functor,Reduction,current_type,TreePath,true>
│ │ │ -
298 {
│ │ │ -
299
│ │ │ -
300 typedef typename Reduction::template reduce<
│ │ │ -
301 current_type,
│ │ │ -
302 typename Functor::template visit<
│ │ │ -
303 Node,
│ │ │ -
304 TreePath
│ │ │ -
305 >::type
│ │ │ -
306 >::type type;
│ │ │ -
307
│ │ │ -
308 };
│ │ │ -
309
│ │ │ -
311 template<typename Tree, typename Policy, typename current_type, typename TreePath, typename Tag>
│ │ │ -
312 struct accumulate_type;
│ │ │ -
313
│ │ │ -
315 template<typename LeafNode, typename Policy, typename current_type, typename TreePath>
│ │ │ -
316 struct accumulate_type<LeafNode,Policy,current_type,TreePath,LeafNodeTag>
│ │ │ -
317 {
│ │ │ -
318
│ │ │ -
319 typedef typename accumulate_type_node_helper<
│ │ │ -
320 LeafNode,
│ │ │ -
321 typename Policy::functor,
│ │ │ -
322 typename Policy::sibling_reduction,
│ │ │ -
323 current_type,
│ │ │ -
324 TreePath,
│ │ │ -
325 Policy::functor::template doVisit<
│ │ │ -
326 LeafNode,
│ │ │ -
327 TreePath>::value
│ │ │ -
328 >::type type;
│ │ │ -
329
│ │ │ -
330 };
│ │ │ -
331
│ │ │ -
332
│ │ │ -
335 template<typename current_type, typename tree_path, typename start_type, typename reduction_strategy>
│ │ │ -
336 struct propagate_type_down_tree;
│ │ │ +
│ │ │ + │ │ │ +
164 {
│ │ │ +
165
│ │ │ +
167
│ │ │ +
175 template<typename T1, typename T2, typename TreePath>
│ │ │ +
176 void pre(T1&&, T2&&, TreePath) const {}
│ │ │ +
177
│ │ │ +
179
│ │ │ +
188 template<typename T1, typename T2, typename TreePath>
│ │ │ +
189 void in(T1&&, T2&&, TreePath) const {}
│ │ │ +
190
│ │ │ +
192
│ │ │ +
200 template<typename T1, typename T2, typename TreePath>
│ │ │ +
201 void post(T1&&, T2&&, TreePath) const {}
│ │ │ +
202
│ │ │ +
204
│ │ │ +
215 template<typename T1, typename T2, typename TreePath>
│ │ │ +
216 void leaf(T1&&, T2&&, TreePath) const {}
│ │ │ +
217
│ │ │ +
219
│ │ │ +
231 template<typename T1, typename Child1, typename T2, typename Child2, typename TreePath, typename ChildIndex>
│ │ │ +
232 void beforeChild(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const {}
│ │ │ +
233
│ │ │ +
235
│ │ │ +
247 template<typename T1, typename Child1, typename T2, typename Child2, typename TreePath, typename ChildIndex>
│ │ │ +
248 void afterChild(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const {}
│ │ │ +
249
│ │ │ +
250 };
│ │ │ +
│ │ │ +
251
│ │ │ +
252
│ │ │ +
253 namespace Experimental {
│ │ │ +
254
│ │ │ +
│ │ │ + │ │ │ +
286 {
│ │ │ +
287
│ │ │ +
295 template<typename T, typename TreePath, typename U>
│ │ │ +
296 auto pre(T&&, TreePath, const U& u) const { return u;}
│ │ │ +
297
│ │ │ +
305 template<typename T, typename TreePath, typename U>
│ │ │ +
306 auto in(T&&, TreePath, const U& u) const {return u;}
│ │ │ +
307
│ │ │ +
315 template<typename T, typename TreePath, typename U>
│ │ │ +
316 auto post(T&&, TreePath, const U& u) const {return u;}
│ │ │ +
317
│ │ │ +
325 template<typename T, typename TreePath, typename U>
│ │ │ +
326 auto leaf(T&&, TreePath, const U& u) const { return u;}
│ │ │ +
327
│ │ │ +
335 template<typename T, typename Child, typename TreePath, typename ChildIndex, typename U>
│ │ │ +
336 auto beforeChild(T&&, Child&&, TreePath, ChildIndex, const U& u) const {return u;}
│ │ │
337
│ │ │ -
339 template<typename current_type, typename tree_path, typename start_type>
│ │ │ -
340 struct propagate_type_down_tree<
│ │ │ -
341 current_type,
│ │ │ -
342 tree_path,
│ │ │ -
343 start_type,
│ │ │ -
344 bottom_up_reduction
│ │ │ -
345 >
│ │ │ -
346 {
│ │ │ -
347 typedef current_type type;
│ │ │ +
345 template<typename T, typename Child, typename TreePath, typename ChildIndex, typename U>
│ │ │ +
346 auto afterChild(T&&, Child&&, TreePath, ChildIndex, const U& u) const {return u;}
│ │ │ +
347
│ │ │
348 };
│ │ │ -
349
│ │ │ -
351 template<typename current_type, typename tree_path, typename start_type>
│ │ │ -
352 struct propagate_type_down_tree<
│ │ │ -
353 current_type,
│ │ │ -
354 tree_path,
│ │ │ -
355 start_type,
│ │ │ -
356 flattened_reduction
│ │ │ -
357 >
│ │ │ -
358 {
│ │ │ -
359 typedef typename std::conditional<
│ │ │ -
360 tree_path().back() == 0,
│ │ │ -
361 start_type,
│ │ │ -
362 current_type
│ │ │ -
363 >::type type;
│ │ │ -
364 };
│ │ │ -
365
│ │ │ -
366
│ │ │ -
368 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t i, std::size_t n>
│ │ │ -
369 struct accumulate_type_over_children
│ │ │ +
│ │ │ +
349 } // namespace Experimental
│ │ │ +
350
│ │ │ +
352
│ │ │ +
│ │ │ + │ │ │ +
358 {
│ │ │ +
359
│ │ │ +
360 // the little trick with the default template arguments
│ │ │ +
361 // makes the class usable for both single-tree visitors
│ │ │ +
362 // and visitors for pairs of trees
│ │ │ +
364 template<typename Node1,
│ │ │ +
365 typename Child1,
│ │ │ +
366 typename Node2,
│ │ │ +
367 typename Child2 = void,
│ │ │ +
368 typename TreePath = void>
│ │ │ +
│ │ │ + │ │ │
370 {
│ │ │ -
371
│ │ │ -
372 typedef decltype(push_back(TreePath{},index_constant<i>{})) child_tree_path;
│ │ │ -
373
│ │ │ -
374 typedef typename Node::template Child<i>::Type child;
│ │ │ -
375
│ │ │ -
376 typedef typename accumulate_type<
│ │ │ -
377 child,
│ │ │ -
378 Policy,
│ │ │ -
379 // apply reduction choice (flat / hierarchic)
│ │ │ -
380 typename propagate_type_down_tree<
│ │ │ -
381 current_type,
│ │ │ -
382 child_tree_path,
│ │ │ -
383 typename Policy::start_type,
│ │ │ -
384 typename Policy::reduction_strategy
│ │ │ -
385 >::type,
│ │ │ -
386 child_tree_path,
│ │ │ -
387 NodeTag<child>
│ │ │ -
388 >::type child_result_type;
│ │ │ -
389
│ │ │ -
390 typedef typename accumulate_type_over_children<
│ │ │ -
391 Node,
│ │ │ -
392 Policy,
│ │ │ -
393 child_result_type,
│ │ │ -
394 TreePath,
│ │ │ -
395 i+1,
│ │ │ -
396 n
│ │ │ -
397 >::type type;
│ │ │ -
398
│ │ │ +
372 static const bool value = false;
│ │ │ +
373 };
│ │ │ +
│ │ │ +
374
│ │ │ +
375 };
│ │ │ +
│ │ │ +
376
│ │ │ +
377
│ │ │ +
379
│ │ │ +
│ │ │ + │ │ │ +
384 {
│ │ │ +
385
│ │ │ +
386 // the little trick with the default template arguments
│ │ │ +
387 // makes the class usable for both single-tree visitors
│ │ │ +
388 // and visitors for pairs of trees
│ │ │ +
390 template<typename Node1,
│ │ │ +
391 typename Child1,
│ │ │ +
392 typename Node2,
│ │ │ +
393 typename Child2 = void,
│ │ │ +
394 typename TreePath = void>
│ │ │ +
│ │ │ + │ │ │ +
396 {
│ │ │ +
398 static const bool value = true;
│ │ │
399 };
│ │ │ -
400
│ │ │ -
402 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t n>
│ │ │ -
403 struct accumulate_type_over_children<Node,Policy,current_type,TreePath,n,n>
│ │ │ -
404 {
│ │ │ -
405
│ │ │ -
406 typedef current_type type;
│ │ │ -
407
│ │ │ -
408 };
│ │ │ -
409
│ │ │ -
410
│ │ │ -
413 template<typename Node, typename Policy, typename current_type, typename TreePath>
│ │ │ -
414 struct accumulate_type_generic_composite_node
│ │ │ -
415 {
│ │ │ -
416
│ │ │ -
417 typedef typename accumulate_type_over_children<
│ │ │ -
418 Node,
│ │ │ -
419 Policy,
│ │ │ -
420 current_type,
│ │ │ -
421 TreePath,
│ │ │ -
422 0,
│ │ │ -
423 StaticDegree<Node>::value
│ │ │ -
424 >::type children_result_type;
│ │ │ -
425
│ │ │ -
426 typedef typename accumulate_type_node_helper<
│ │ │ -
427 Node,
│ │ │ -
428 typename Policy::functor,
│ │ │ -
429 typename Policy::parent_child_reduction,
│ │ │ -
430 children_result_type,
│ │ │ -
431 TreePath,
│ │ │ -
432 Policy::functor::template doVisit<
│ │ │ -
433 Node,
│ │ │ -
434 TreePath
│ │ │ -
435 >::value
│ │ │ -
436 >::type type;
│ │ │ -
437
│ │ │ -
438 };
│ │ │ -
439
│ │ │ -
441 template<typename PowerNode, typename Policy, typename current_type, typename TreePath>
│ │ │ -
442 struct accumulate_type<PowerNode,Policy,current_type,TreePath,PowerNodeTag>
│ │ │ -
443 : public accumulate_type_generic_composite_node<PowerNode,Policy,current_type,TreePath>
│ │ │ -
444 {};
│ │ │ -
445
│ │ │ -
447 template<typename CompositeNode, typename Policy, typename current_type, typename TreePath>
│ │ │ -
448 struct accumulate_type<CompositeNode,Policy,current_type,TreePath,CompositeNodeTag>
│ │ │ -
449 : public accumulate_type_generic_composite_node<CompositeNode,Policy,current_type,TreePath>
│ │ │ -
450 {};
│ │ │ -
451
│ │ │ -
452 } // anonymous namespace
│ │ │ -
453
│ │ │ -
454
│ │ │ -
462 template<
│ │ │ -
463 typename Functor,
│ │ │ -
464 typename Reduction,
│ │ │ -
465 typename StartType,
│ │ │ -
466 typename ParentChildReduction = Reduction,
│ │ │ -
467 typename ReductionAlgorithm = flattened_reduction
│ │ │ -
468 >
│ │ │ -
│ │ │ - │ │ │ -
470 {
│ │ │ -
471
│ │ │ -
499 typedef Functor functor;
│ │ │ -
500
│ │ │ -
520 typedef Reduction sibling_reduction;
│ │ │ -
521
│ │ │ -
528 typedef ParentChildReduction parent_child_reduction;
│ │ │ -
529
│ │ │ -
536 typedef StartType start_type;
│ │ │ -
537
│ │ │ -
542 typedef ReductionAlgorithm reduction_strategy;
│ │ │ -
543 };
│ │ │
│ │ │ +
400
│ │ │ +
401 };
│ │ │ +
│ │ │ +
402
│ │ │ +
404
│ │ │ +
│ │ │ + │ │ │ +
412 {
│ │ │ + │ │ │ +
415 };
│ │ │ +
│ │ │ +
416
│ │ │ +
418
│ │ │ +
│ │ │ + │ │ │ +
426 {
│ │ │ + │ │ │ +
429 };
│ │ │ +
│ │ │ +
430
│ │ │ +
│ │ │ + │ │ │ +
433 : public DefaultVisitor
│ │ │ +
434 , public VisitTree
│ │ │ +
435 {};
│ │ │ +
│ │ │ +
436
│ │ │ +
│ │ │ + │ │ │ +
439 : public DefaultVisitor
│ │ │ +
440 , public VisitDirectChildren
│ │ │ +
441 {};
│ │ │ +
│ │ │ +
442
│ │ │ +
│ │ │ + │ │ │ +
445 : public DefaultPairVisitor
│ │ │ +
446 , public VisitTree
│ │ │ +
447 {};
│ │ │ +
│ │ │ +
448
│ │ │ +
│ │ │ + │ │ │ +
451 : public DefaultPairVisitor
│ │ │ +
452 , public VisitDirectChildren
│ │ │ +
453 {};
│ │ │ +
│ │ │ +
454
│ │ │ +
│ │ │ + │ │ │ +
456
│ │ │ +
│ │ │ + │ │ │ +
458 : public DefaultHybridVisitor
│ │ │ +
459 , public StaticTraversal
│ │ │ +
460 , public VisitTree
│ │ │ +
461 {
│ │ │ +
462 template<class Tree, class Child, class TreePath, class ChildIndex, class U>
│ │ │ +
│ │ │ +
463 auto beforeChild(Tree&&, Child&&, TreePath, ChildIndex, U u) const {
│ │ │ +
464 // in this case child index is an integral constant: forward u
│ │ │ +
465 return u;
│ │ │ +
466 }
│ │ │ +
│ │ │ +
467
│ │ │ +
468 template<class Tree, class Child, class TreePath, class U>
│ │ │ +
│ │ │ +
469 std::size_t beforeChild(Tree&&, Child&&, TreePath, std::size_t /*childIndex*/, U u) const {
│ │ │ +
470 // in this case child index is a run-time index: cast accumulated u to std::size_t
│ │ │ +
471 return std::size_t{u};
│ │ │ +
472 }
│ │ │ +
│ │ │ +
473
│ │ │ +
474 template<class Tree, class TreePath, class U>
│ │ │ +
│ │ │ +
475 auto leaf(Tree&&, TreePath, U u) const
│ │ │ +
476 {
│ │ │ +
477 return Hybrid::plus(u,Dune::Indices::_1);
│ │ │ +
478 }
│ │ │ +
│ │ │ +
479
│ │ │ +
480 };
│ │ │ +
│ │ │ +
481
│ │ │ +
│ │ │ + │ │ │ +
483 : public LeafCounterVisitor
│ │ │ +
484 {
│ │ │ +
485 template<typename Tree, typename TreePath, typename U>
│ │ │ +
│ │ │ +
486 auto pre(Tree&&, TreePath, U u) const {
│ │ │ +
487 return Hybrid::plus(u,Indices::_1);
│ │ │ +
488 }
│ │ │ +
│ │ │ +
489 };
│ │ │ +
│ │ │ +
490
│ │ │ +
│ │ │ + │ │ │ +
492 : public DefaultHybridVisitor
│ │ │ +
493 , public StaticTraversal
│ │ │ +
494 , public VisitTree
│ │ │ +
495 {
│ │ │ +
496 template<class Tree, class TreePath, class U>
│ │ │ +
│ │ │ +
497 auto leaf(Tree&&, TreePath, U u) const
│ │ │ +
498 {
│ │ │ +
499 auto path_size = index_constant<treePathSize(TreePath{})>{};
│ │ │ +
500 auto depth = Hybrid::plus(path_size,Indices::_1);
│ │ │ +
501 return Hybrid::max(depth,u);
│ │ │ +
502 }
│ │ │ +
│ │ │ +
503 };
│ │ │ +
│ │ │ +
504
│ │ │ +
506 // result is alwayas an integral constant
│ │ │ +
507 template<typename Tree>
│ │ │ +
│ │ │ +
508 auto depth(const Tree& tree)
│ │ │ +
509 {
│ │ │ +
510 return hybridApplyToTree(tree,DepthVisitor{},Indices::_0);
│ │ │ +
511 }
│ │ │ +
│ │ │ +
512
│ │ │ +
514 // return types is std::integral_constant.
│ │ │ +
515 template<typename Tree>
│ │ │ +
│ │ │ +
516 constexpr auto depth()
│ │ │ +
517 {
│ │ │ +
518 return decltype(hybridApplyToTree(std::declval<Tree>(),DepthVisitor{},Indices::_0)){};
│ │ │ +
519 }
│ │ │ +
│ │ │ +
520
│ │ │ +
522 // if Tree is dynamic, return type is std::size_t, otherwise std::integral_constant.
│ │ │ +
523 template<typename Tree>
│ │ │ +
│ │ │ +
524 auto nodeCount(const Tree& tree)
│ │ │ +
525 {
│ │ │ +
526 return hybridApplyToTree(tree,NodeCounterVisitor{},Indices::_0);
│ │ │ +
527 }
│ │ │ +
│ │ │ +
528
│ │ │ +
530 // if Tree is dynamic, return type is std::size_t, otherwise std::integral_constant.
│ │ │ +
531 template<typename Tree>
│ │ │ +
│ │ │ +
532 auto leafCount(const Tree& tree)
│ │ │ +
533 {
│ │ │ +
534 return hybridApplyToTree(tree,LeafCounterVisitor{},Dune::Indices::_0);
│ │ │ +
535 }
│ │ │ +
│ │ │ +
536
│ │ │ +
538 template<typename Tree>
│ │ │ +
539 constexpr bool isDynamic = std::is_same<std::size_t, decltype(leafCount(std::declval<Tree>()))>{};
│ │ │ +
540
│ │ │ +
541 } // namespace Experimental::Info
│ │ │ +
│ │ │ +
542
│ │ │
544
│ │ │ -
545
│ │ │ -
547
│ │ │ -
555 template<typename Tree, typename Policy>
│ │ │ -
│ │ │ - │ │ │ -
557 {
│ │ │ -
558
│ │ │ -
560 typedef typename accumulate_type<
│ │ │ -
561 Tree,
│ │ │ -
562 Policy,
│ │ │ -
563 typename Policy::start_type,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
567
│ │ │ -
568 };
│ │ │ -
│ │ │ -
569
│ │ │ -
570
│ │ │ -
571
│ │ │ -
572
│ │ │ -
573
│ │ │ -
574 /***************************************************/
│ │ │ -
575
│ │ │ -
│ │ │ -
576 namespace Experimental {
│ │ │ -
577 namespace Impl {
│ │ │ -
578
│ │ │ -
580 template<class T, class TreePath, class V, class U,
│ │ │ -
581 std::enable_if_t<std::decay_t<T>::isLeaf, int> = 0>
│ │ │ -
582 auto hybridApplyToTree(T&& tree, TreePath treePath, V&& visitor, U&& current_val)
│ │ │ -
583 {
│ │ │ -
584 return visitor.leaf(tree, treePath, std::forward<U>(current_val));
│ │ │ -
585 }
│ │ │ -
586
│ │ │ -
588 template<class T, class TreePath, class V, class U,
│ │ │ -
589 std::enable_if_t<not std::decay_t<T>::isLeaf, int> = 0>
│ │ │ -
590 auto hybridApplyToTree(T&& tree, TreePath treePath, V&& visitor, U&& current_val)
│ │ │ -
591 {
│ │ │ -
592 using Tree = std::remove_reference_t<T>;
│ │ │ -
593 using Visitor = std::remove_reference_t<V>;
│ │ │ -
594 auto pre_val = visitor.pre(tree, treePath, std::forward<U>(current_val));
│ │ │ -
595
│ │ │ -
596 // check which type of traversal is supported by the tree
│ │ │ -
597 using allowDynamicTraversal = Dune::Std::is_detected<Detail::DynamicTraversalConcept,Tree>;
│ │ │ -
598 using allowStaticTraversal = Dune::Std::is_detected<Detail::StaticTraversalConcept,Tree>;
│ │ │ -
599
│ │ │ -
600 // the tree must support either dynamic or static traversal
│ │ │ -
601 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value);
│ │ │ -
602
│ │ │ -
603 // the visitor may specify preferred dynamic traversal
│ │ │ -
604 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
│ │ │ -
605
│ │ │ -
606 // declare rule that applies visitor and current value to a child i. Returns next value
│ │ │ -
607 auto apply_i = [&](auto&& value, const auto& i){
│ │ │ -
608 auto&& child = tree.child(i);
│ │ │ -
609 using Child = std::decay_t<decltype(child)>;
│ │ │ -
610
│ │ │ -
611 auto val_before = visitor.beforeChild(tree, child, treePath, i, std::move(value));
│ │ │ -
612
│ │ │ -
613 // visits between children
│ │ │ -
614 auto val_in = Hybrid::ifElse(
│ │ │ -
615 Hybrid::equal_to(i,Indices::_0),
│ │ │ -
616 [&](auto id){return std::move(val_before);},
│ │ │ -
617 [&](auto id){return visitor.in(tree, treePath, std::move(val_before));}
│ │ │ -
618 );
│ │ │ -
619
│ │ │ -
620 constexpr bool visitChild = Visitor::template VisitChild<Tree,Child,TreePath>::value;
│ │ │ -
621 auto val_visit = [&](){
│ │ │ -
622 if constexpr (visitChild) {
│ │ │ -
623 auto childTreePath = Dune::TypeTree::push_back(treePath, i);
│ │ │ -
624 return hybridApplyToTree(child, childTreePath, visitor, std::move(val_in));
│ │ │ -
625 }
│ │ │ -
626 else
│ │ │ -
627 return std::move(val_in);
│ │ │ -
628 }();
│ │ │ -
629
│ │ │ -
630 return visitor.afterChild(tree, child, treePath, i, std::move(val_visit));
│ │ │ -
631 };
│ │ │ -
632
│ │ │ -
633 // apply visitor to children
│ │ │ -
634 auto in_val = [&](){
│ │ │ -
635 if constexpr (allowStaticTraversal::value && not preferDynamicTraversal::value) {
│ │ │ -
636 // get list of static indices
│ │ │ -
637 auto indices = std::make_index_sequence<Tree::degree()>{};
│ │ │ -
638
│ │ │ -
639 // unfold apply_i left to right
│ │ │ -
640 return unpackIntegerSequence([&](auto... i) {
│ │ │ -
660 return left_fold(std::move(apply_i),std::move(pre_val), i...);
│ │ │ -
661 }, indices);
│ │ │ -
662
│ │ │ -
663 } else {
│ │ │ -
664 // unfold first child to get type
│ │ │ -
665 auto i_val = apply_i(std::move(pre_val),std::size_t{0});
│ │ │ -
666 // dynamically loop rest of the children to accumulate remindng values
│ │ │ -
667 for(std::size_t i = 1; i < tree.degree(); i++)
│ │ │ -
668 i_val = apply_i(i_val,i);
│ │ │ -
669 return i_val;
│ │ │ -
670 }
│ │ │ -
671 }();
│ │ │ -
672
│ │ │ -
673 return visitor.post(tree, treePath, in_val);
│ │ │ -
674 }
│ │ │ -
675
│ │ │ -
676 }
│ │ │ -
677
│ │ │ -
701 template<typename Tree, typename Visitor, typename Init>
│ │ │ -
│ │ │ -
702 auto hybridApplyToTree(Tree&& tree, Visitor&& visitor, Init&& init)
│ │ │ -
703 {
│ │ │ -
704 return Impl::hybridApplyToTree(tree, hybridTreePath(), visitor, init);
│ │ │ -
705 }
│ │ │ -
│ │ │ -
706
│ │ │ -
707 } // namespace Experimental
│ │ │ -
│ │ │ -
708
│ │ │ -
710 } // namespace TypeTree
│ │ │ -
│ │ │ -
711} //namespace Dune
│ │ │ -
│ │ │ -
712
│ │ │ -
713#endif // DUNE_TYPETREE_ACCUMULATE_STATIC_HH
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
│ │ │ -
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:102
│ │ │ -
Dune::HybridMultiIndex< T... > HybridTreePath
A type for representing tree paths that supports both compile time and run time indices.
Definition treepath.hh:85
│ │ │ +
545 } // namespace TypeTree
│ │ │ +
546} //namespace Dune
│ │ │ +
547
│ │ │ +
548#endif // DUNE_TYPETREE_VISITOR_HH
│ │ │ + │ │ │ +
constexpr std::size_t treePathSize(const HybridTreePath< T... > &)
Returns the size (number of components) of the given HybridTreePath.
Definition treepath.hh:191
│ │ │
Definition accumulate_static.hh:17
│ │ │
Definition accumulate_static.hh:18
│ │ │ -
Definition accumulate_static.hh:576
│ │ │
auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init)
Apply hybrid visitor to TypeTree.
Definition accumulate_static.hh:702
│ │ │ -
Statically combine two values of type result_type using ||.
Definition accumulate_static.hh:28
│ │ │ -
Definition accumulate_static.hh:31
│ │ │ -
static const result_type result
Definition accumulate_static.hh:32
│ │ │ -
Statically combine two values of type result_type using &&.
Definition accumulate_static.hh:39
│ │ │ -
Definition accumulate_static.hh:42
│ │ │ -
static const result_type result
Definition accumulate_static.hh:43
│ │ │ -
Statically combine two values of type result_type using +.
Definition accumulate_static.hh:50
│ │ │ -
Definition accumulate_static.hh:53
│ │ │ -
static const result_type result
Definition accumulate_static.hh:54
│ │ │ -
Statically combine two values of type result_type using -.
Definition accumulate_static.hh:61
│ │ │ -
Definition accumulate_static.hh:64
│ │ │ -
static const result_type result
Definition accumulate_static.hh:65
│ │ │ -
Statically combine two values of type result_type using *.
Definition accumulate_static.hh:72
│ │ │ -
Definition accumulate_static.hh:75
│ │ │ -
static const result_type result
Definition accumulate_static.hh:76
│ │ │ -
Statically combine two values of type result_type by returning their minimum.
Definition accumulate_static.hh:83
│ │ │ -
Definition accumulate_static.hh:86
│ │ │ -
static const result_type result
Definition accumulate_static.hh:87
│ │ │ -
Statically combine two values of type result_type by returning their maximum.
Definition accumulate_static.hh:94
│ │ │ -
Definition accumulate_static.hh:97
│ │ │ -
static const result_type result
Definition accumulate_static.hh:98
│ │ │ -
Statically accumulate a value over the nodes of a TypeTree.
Definition accumulate_static.hh:263
│ │ │ -
Functor::result_type result_type
The result type of the computation.
Definition accumulate_static.hh:266
│ │ │ -
static const result_type result
The accumulated result of the computation.
Definition accumulate_static.hh:269
│ │ │ -
Definition accumulate_static.hh:470
│ │ │ -
ParentChildReduction parent_child_reduction
Definition accumulate_static.hh:528
│ │ │ -
Functor functor
Definition accumulate_static.hh:499
│ │ │ -
StartType start_type
Definition accumulate_static.hh:536
│ │ │ -
ReductionAlgorithm reduction_strategy
Definition accumulate_static.hh:542
│ │ │ -
Reduction sibling_reduction
Definition accumulate_static.hh:520
│ │ │ -
Statically accumulate a type over the nodes of a TypeTree.
Definition accumulate_static.hh:557
│ │ │ -
accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, NodeTag< Tree > >::type type
The accumulated result of the computation.
Definition accumulate_static.hh:566
│ │ │ +
Type
Definition treepath.hh:108
│ │ │ +
@ fullyStatic
Definition treepath.hh:108
│ │ │ +
@ dynamic
Definition treepath.hh:108
│ │ │ +
Definition visitor.hh:455
│ │ │ +
constexpr bool isDynamic
true if any of the nodes in the tree only has dynamic degree.
Definition visitor.hh:539
│ │ │ +
auto leafCount(const Tree &tree)
The number of leaf nodes in the Tree.
Definition visitor.hh:532
│ │ │ +
auto nodeCount(const Tree &tree)
The total number of nodes in the Tree.
Definition visitor.hh:524
│ │ │ +
constexpr auto depth()
The depth of the Tree.
Definition visitor.hh:516
│ │ │ +
auto depth(const Tree &tree)
The depth of the TypeTree.
Definition visitor.hh:508
│ │ │ +
Visitor interface and base class for TypeTree visitors.
Definition visitor.hh:49
│ │ │ +
void in(T &&, TreePath) const
Method for infix tree traversal.
Definition visitor.hh:72
│ │ │ +
void afterChild(T &&, Child &&, TreePath, ChildIndex) const
Method for child-parent traversal.
Definition visitor.hh:122
│ │ │ +
void beforeChild(T &&, Child &&, TreePath, ChildIndex) const
Method for parent-child traversal.
Definition visitor.hh:107
│ │ │ +
void post(T &&, TreePath) const
Method for postfix tree traversal.
Definition visitor.hh:83
│ │ │ +
void leaf(T &&, TreePath) const
Method for leaf traversal.
Definition visitor.hh:93
│ │ │ +
void pre(T &&, TreePath) const
Method for prefix tree traversal.
Definition visitor.hh:60
│ │ │ +
Visitor interface and base class for visitors of pairs of TypeTrees.
Definition visitor.hh:164
│ │ │ +
void leaf(T1 &&, T2 &&, TreePath) const
Method for leaf traversal.
Definition visitor.hh:216
│ │ │ +
void beforeChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const
Method for parent-child traversal.
Definition visitor.hh:232
│ │ │ +
void pre(T1 &&, T2 &&, TreePath) const
Method for prefix tree traversal.
Definition visitor.hh:176
│ │ │ +
void post(T1 &&, T2 &&, TreePath) const
Method for postfix traversal.
Definition visitor.hh:201
│ │ │ +
void in(T1 &&, T2 &&, TreePath) const
Method for infix tree traversal.
Definition visitor.hh:189
│ │ │ +
void afterChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const
Method for child-parent traversal.
Definition visitor.hh:248
│ │ │ +
Hybrid visitor interface and base class for TypeTree hybrid visitors.
Definition visitor.hh:286
│ │ │ +
auto post(T &&, TreePath, const U &u) const
Method for postfix tree traversal.
Definition visitor.hh:316
│ │ │ +
auto pre(T &&, TreePath, const U &u) const
Method for prefix tree traversal.
Definition visitor.hh:296
│ │ │ +
auto leaf(T &&, TreePath, const U &u) const
Method for leaf traversal.
Definition visitor.hh:326
│ │ │ +
auto afterChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const
Method for child-parent traversal.
Definition visitor.hh:346
│ │ │ +
auto in(T &&, TreePath, const U &u) const
Method for infix tree traversal.
Definition visitor.hh:306
│ │ │ +
auto beforeChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const
Method for parent-child traversal.
Definition visitor.hh:336
│ │ │ +
Mixin base class for visitors that only want to visit the direct children of a node.
Definition visitor.hh:358
│ │ │ +
Template struct for determining whether or not to visit a given child.
Definition visitor.hh:370
│ │ │ +
static const bool value
Do not visit any child.
Definition visitor.hh:372
│ │ │ +
Mixin base class for visitors that want to visit the complete tree.
Definition visitor.hh:384
│ │ │ +
Template struct for determining whether or not to visit a given child.
Definition visitor.hh:396
│ │ │ +
static const bool value
Visit any child.
Definition visitor.hh:398
│ │ │ +
Mixin base class for visitors that require a static TreePath during traversal.
Definition visitor.hh:412
│ │ │ +
static const TreePathType::Type treePathType
Use the static tree traversal algorithm.
Definition visitor.hh:414
│ │ │ +
Mixin base class for visitors that only need a dynamic TreePath during traversal.
Definition visitor.hh:426
│ │ │ +
static const TreePathType::Type treePathType
Use the dynamic tree traversal algorithm.
Definition visitor.hh:428
│ │ │ +
Convenience base class for visiting the entire tree.
Definition visitor.hh:435
│ │ │ +
Convenience base class for visiting the direct children of a node.
Definition visitor.hh:441
│ │ │ +
Convenience base class for visiting an entire tree pair.
Definition visitor.hh:447
│ │ │ +
Convenience base class for visiting the direct children of a node pair.
Definition visitor.hh:453
│ │ │ + │ │ │ +
auto leaf(Tree &&, TreePath, U u) const
Definition visitor.hh:475
│ │ │ +
auto beforeChild(Tree &&, Child &&, TreePath, ChildIndex, U u) const
Definition visitor.hh:463
│ │ │ +
std::size_t beforeChild(Tree &&, Child &&, TreePath, std::size_t, U u) const
Definition visitor.hh:469
│ │ │ + │ │ │ +
auto pre(Tree &&, TreePath, U u) const
Definition visitor.hh:486
│ │ │ + │ │ │ +
auto leaf(Tree &&, TreePath, U u) const
Definition visitor.hh:497
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,686 +1,486 @@ │ │ │ │ dune-typetree 2.11 │ │ │ │ Loading... │ │ │ │ Searching... │ │ │ │ No Matches │ │ │ │ * _d_u_n_e │ │ │ │ * _t_y_p_e_t_r_e_e │ │ │ │ -accumulate_static.hh │ │ │ │ +visitor.hh │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file │ │ │ │ LICENSE.md in module root │ │ │ │ 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with- │ │ │ │ PDELab-exception │ │ │ │ 5 │ │ │ │ -6#ifndef DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ -7#define DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ +6#ifndef DUNE_TYPETREE_VISITOR_HH │ │ │ │ +7#define DUNE_TYPETREE_VISITOR_HH │ │ │ │ 8 │ │ │ │ -9#include │ │ │ │ -10#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ -11#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_n_o_d_e_t_a_g_s_._h_h> │ │ │ │ -12#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_a_v_e_r_s_a_l_._h_h> │ │ │ │ -13#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ -14#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_u_t_i_l_i_t_y_._h_h> │ │ │ │ -15 │ │ │ │ -16 │ │ │ │ -_1_7namespace _D_u_n_e { │ │ │ │ -_1_8 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +9#include <_d_u_n_e_/_t_y_p_e_t_r_e_e_/_t_r_e_e_p_a_t_h_._h_h> │ │ │ │ +10#include │ │ │ │ +11 │ │ │ │ +12namespace _D_u_n_e { │ │ │ │ +13 namespace _T_y_p_e_T_r_e_e { │ │ │ │ +14 │ │ │ │ 19 │ │ │ │ -24 │ │ │ │ -26 template │ │ │ │ -_2_7 struct _o_r__ │ │ │ │ -28 { │ │ │ │ -29 template │ │ │ │ -_3_0 struct _r_e_d_u_c_e │ │ │ │ -31 { │ │ │ │ -_3_2 static const result_type _r_e_s_u_l_t = r1 || r2; │ │ │ │ -33 }; │ │ │ │ -34 }; │ │ │ │ -35 │ │ │ │ -37 template │ │ │ │ -_3_8 struct _a_n_d__ │ │ │ │ -39 { │ │ │ │ -40 template │ │ │ │ -_4_1 struct _r_e_d_u_c_e │ │ │ │ -42 { │ │ │ │ -_4_3 static const result_type _r_e_s_u_l_t = r1 && r2; │ │ │ │ -44 }; │ │ │ │ -45 }; │ │ │ │ -46 │ │ │ │ -48 template │ │ │ │ -_4_9 struct _p_l_u_s │ │ │ │ -50 { │ │ │ │ -51 template │ │ │ │ -_5_2 struct _r_e_d_u_c_e │ │ │ │ -53 { │ │ │ │ -_5_4 static const result_type _r_e_s_u_l_t = r1 + r2; │ │ │ │ -55 }; │ │ │ │ -56 }; │ │ │ │ -57 │ │ │ │ -59 template │ │ │ │ -_6_0 struct _m_i_n_u_s │ │ │ │ -61 { │ │ │ │ -62 template │ │ │ │ -_6_3 struct _r_e_d_u_c_e │ │ │ │ -64 { │ │ │ │ -_6_5 static const result_type _r_e_s_u_l_t = r1 - r2; │ │ │ │ -66 }; │ │ │ │ -67 }; │ │ │ │ -68 │ │ │ │ -70 template │ │ │ │ -_7_1 struct _m_u_l_t_i_p_l_y │ │ │ │ -72 { │ │ │ │ -73 template │ │ │ │ -_7_4 struct _r_e_d_u_c_e │ │ │ │ -75 { │ │ │ │ -_7_6 static const result_type _r_e_s_u_l_t = r1 * r2; │ │ │ │ -77 }; │ │ │ │ -78 }; │ │ │ │ -79 │ │ │ │ -81 template │ │ │ │ -_8_2 struct _m_i_n │ │ │ │ -83 { │ │ │ │ -84 template │ │ │ │ -_8_5 struct _r_e_d_u_c_e │ │ │ │ -86 { │ │ │ │ -_8_7 static const result_type _r_e_s_u_l_t = r1 < r2 ? r1 : r2; │ │ │ │ -88 }; │ │ │ │ -89 }; │ │ │ │ -90 │ │ │ │ -92 template │ │ │ │ -_9_3 struct _m_a_x │ │ │ │ -94 { │ │ │ │ -95 template │ │ │ │ -_9_6 struct _r_e_d_u_c_e │ │ │ │ -97 { │ │ │ │ -_9_8 static const result_type _r_e_s_u_l_t = r1 > r2 ? r1 : r2; │ │ │ │ -99 }; │ │ │ │ -100 }; │ │ │ │ -101 │ │ │ │ -102 │ │ │ │ -103 namespace { │ │ │ │ -104 │ │ │ │ -105 // implementation of the traversal algorithm │ │ │ │ -106 │ │ │ │ -108 template │ │ │ │ -109 struct accumulate_node_helper │ │ │ │ -110 { │ │ │ │ -111 │ │ │ │ -112 typedef typename Functor::result_type result_type; │ │ │ │ -113 │ │ │ │ -114 static const result_type result = current_value; │ │ │ │ -115 │ │ │ │ -116 }; │ │ │ │ -117 │ │ │ │ -119 template │ │ │ │ -120 struct │ │ │ │ -accumulate_node_helper │ │ │ │ -121 { │ │ │ │ -122 │ │ │ │ -123 typedef typename Functor::result_type result_type; │ │ │ │ -124 │ │ │ │ -125 static const result_type result = Reduction::template │ │ │ │ -reduce::result>::result; │ │ │ │ +21 │ │ │ │ +_4_8 struct _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ +49 { │ │ │ │ +50 │ │ │ │ +52 │ │ │ │ +59 template │ │ │ │ +_6_0 void _p_r_e(T&&, TreePath) const {} │ │ │ │ +61 │ │ │ │ +63 │ │ │ │ +71 template │ │ │ │ +_7_2 void _i_n(T&&, TreePath) const {} │ │ │ │ +73 │ │ │ │ +75 │ │ │ │ +82 template │ │ │ │ +_8_3 void _p_o_s_t(T&&, TreePath) const {} │ │ │ │ +84 │ │ │ │ +86 │ │ │ │ +92 template │ │ │ │ +_9_3 void _l_e_a_f(T&&, TreePath) const {} │ │ │ │ +94 │ │ │ │ +96 │ │ │ │ +106 template │ │ │ │ +_1_0_7 void _b_e_f_o_r_e_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex) const {} │ │ │ │ +108 │ │ │ │ +110 │ │ │ │ +121 template │ │ │ │ +_1_2_2 void _a_f_t_e_r_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex) const {} │ │ │ │ +123 │ │ │ │ +124 }; │ │ │ │ +125 │ │ │ │ 126 │ │ │ │ -127 }; │ │ │ │ 128 │ │ │ │ -130 template │ │ │ │ -131 struct accumulate_value; │ │ │ │ -132 │ │ │ │ -134 template │ │ │ │ -135 struct │ │ │ │ -accumulate_value │ │ │ │ -136 { │ │ │ │ -137 │ │ │ │ -138 typedef typename Functor::result_type result_type; │ │ │ │ -139 │ │ │ │ -140 static const result_type result = │ │ │ │ -141 │ │ │ │ -142 │ │ │ │ -accumulate_node_helper::value>::result; │ │ │ │ -143 │ │ │ │ -144 }; │ │ │ │ -145 │ │ │ │ -147 template │ │ │ │ -148 struct accumulate_over_children │ │ │ │ -149 { │ │ │ │ -150 │ │ │ │ -151 typedef typename Functor::result_type result_type; │ │ │ │ -152 │ │ │ │ -153 typedef decltype(push_back(TreePath{},index_constant{})) │ │ │ │ -child_tree_path; │ │ │ │ -154 │ │ │ │ -155 typedef typename Node::template Child::Type child; │ │ │ │ -156 │ │ │ │ -157 static const result_type child_result = │ │ │ │ -accumulate_value>:: │ │ │ │ -result; │ │ │ │ -158 │ │ │ │ -159 static const result_type result = │ │ │ │ -accumulate_over_children:: │ │ │ │ -result; │ │ │ │ -160 │ │ │ │ -161 }; │ │ │ │ -162 │ │ │ │ -164 template │ │ │ │ -165 struct │ │ │ │ -accumulate_over_children │ │ │ │ -166 { │ │ │ │ +_1_6_3 struct _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +164 { │ │ │ │ +165 │ │ │ │ 167 │ │ │ │ -168 typedef typename Functor::result_type result_type; │ │ │ │ -169 │ │ │ │ -170 static const result_type result = current_value; │ │ │ │ -171 │ │ │ │ -172 }; │ │ │ │ -173 │ │ │ │ -176 template │ │ │ │ -177 struct accumulate_value_generic_composite_node │ │ │ │ -178 { │ │ │ │ +175 template │ │ │ │ +_1_7_6 void _p_r_e(T1&&, T2&&, TreePath) const {} │ │ │ │ +177 │ │ │ │ 179 │ │ │ │ -180 typedef typename Functor::result_type result_type; │ │ │ │ -181 │ │ │ │ -182 static const result_type child_result = │ │ │ │ -accumulate_over_children:: │ │ │ │ -value>::result; │ │ │ │ -183 │ │ │ │ -184 static const result_type result = │ │ │ │ -185 │ │ │ │ -accumulate_node_helper::value>::result; │ │ │ │ -186 │ │ │ │ -187 │ │ │ │ -188 }; │ │ │ │ -189 │ │ │ │ -191 template │ │ │ │ -192 struct │ │ │ │ -accumulate_value │ │ │ │ -193 : public │ │ │ │ -accumulate_value_generic_composite_node │ │ │ │ -194 {}; │ │ │ │ -195 │ │ │ │ -197 template │ │ │ │ -198 struct │ │ │ │ -accumulate_value │ │ │ │ -199 : public │ │ │ │ -accumulate_value_generic_composite_node │ │ │ │ -200 {}; │ │ │ │ -201 │ │ │ │ -202 } // anonymous namespace │ │ │ │ -203 │ │ │ │ -205 │ │ │ │ -261 template │ │ │ │ -_2_6_2 struct _A_c_c_u_m_u_l_a_t_e_V_a_l_u_e │ │ │ │ -263 { │ │ │ │ -264 │ │ │ │ -_2_6_6 typedef typename Functor::result_type _r_e_s_u_l_t___t_y_p_e; │ │ │ │ -267 │ │ │ │ -_2_6_9 static const _r_e_s_u_l_t___t_y_p_e _r_e_s_u_l_t = │ │ │ │ -accumulate_value,_N_o_d_e_T_a_g_<_T_r_e_e_>>_:_: │ │ │ │ -_r_e_s_u_l_t; │ │ │ │ -270 │ │ │ │ -271 }; │ │ │ │ -272 │ │ │ │ -275 struct flattened_reduction; │ │ │ │ -276 │ │ │ │ -279 struct bottom_up_reduction; │ │ │ │ -280 │ │ │ │ -281 namespace { │ │ │ │ -282 │ │ │ │ -283 // implementation of the traversal algorithm │ │ │ │ -284 │ │ │ │ -287 template │ │ │ │ -288 struct accumulate_type_node_helper │ │ │ │ -289 { │ │ │ │ -290 │ │ │ │ -291 typedef current_type type; │ │ │ │ -292 │ │ │ │ -293 }; │ │ │ │ -294 │ │ │ │ -296 template │ │ │ │ -297 struct │ │ │ │ -accumulate_type_node_helper │ │ │ │ -298 { │ │ │ │ -299 │ │ │ │ -300 typedef typename Reduction::template reduce< │ │ │ │ -301 current_type, │ │ │ │ -302 typename Functor::template visit< │ │ │ │ -303 Node, │ │ │ │ -304 TreePath │ │ │ │ -305 >::type │ │ │ │ -306 >::type type; │ │ │ │ +188 template │ │ │ │ +_1_8_9 void _i_n(T1&&, T2&&, TreePath) const {} │ │ │ │ +190 │ │ │ │ +192 │ │ │ │ +200 template │ │ │ │ +_2_0_1 void _p_o_s_t(T1&&, T2&&, TreePath) const {} │ │ │ │ +202 │ │ │ │ +204 │ │ │ │ +215 template │ │ │ │ +_2_1_6 void _l_e_a_f(T1&&, T2&&, TreePath) const {} │ │ │ │ +217 │ │ │ │ +219 │ │ │ │ +231 template │ │ │ │ +_2_3_2 void _b_e_f_o_r_e_C_h_i_l_d(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) │ │ │ │ +const {} │ │ │ │ +233 │ │ │ │ +235 │ │ │ │ +247 template │ │ │ │ +_2_4_8 void _a_f_t_e_r_C_h_i_l_d(T1&&, Child1&&, T2&&, Child2&&, TreePath, ChildIndex) const │ │ │ │ +{} │ │ │ │ +249 │ │ │ │ +250 }; │ │ │ │ +251 │ │ │ │ +252 │ │ │ │ +253 namespace Experimental { │ │ │ │ +254 │ │ │ │ +_2_8_5 struct _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ +286 { │ │ │ │ +287 │ │ │ │ +295 template │ │ │ │ +_2_9_6 auto _p_r_e(T&&, TreePath, const U& u) const { return u;} │ │ │ │ +297 │ │ │ │ +305 template │ │ │ │ +_3_0_6 auto _i_n(T&&, TreePath, const U& u) const {return u;} │ │ │ │ 307 │ │ │ │ -308 }; │ │ │ │ -309 │ │ │ │ -311 template │ │ │ │ -312 struct accumulate_type; │ │ │ │ -313 │ │ │ │ -315 template │ │ │ │ -316 struct accumulate_type │ │ │ │ -317 { │ │ │ │ -318 │ │ │ │ -319 typedef typename accumulate_type_node_helper< │ │ │ │ -320 LeafNode, │ │ │ │ -321 typename Policy::functor, │ │ │ │ -322 typename Policy::sibling_reduction, │ │ │ │ -323 current_type, │ │ │ │ -324 TreePath, │ │ │ │ -325 Policy::functor::template doVisit< │ │ │ │ -326 LeafNode, │ │ │ │ -327 TreePath>::value │ │ │ │ -328 >::type type; │ │ │ │ -329 │ │ │ │ -330 }; │ │ │ │ -331 │ │ │ │ -332 │ │ │ │ -335 template │ │ │ │ -336 struct propagate_type_down_tree; │ │ │ │ +315 template │ │ │ │ +_3_1_6 auto _p_o_s_t(T&&, TreePath, const U& u) const {return u;} │ │ │ │ +317 │ │ │ │ +325 template │ │ │ │ +_3_2_6 auto _l_e_a_f(T&&, TreePath, const U& u) const { return u;} │ │ │ │ +327 │ │ │ │ +335 template │ │ │ │ +_3_3_6 auto _b_e_f_o_r_e_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex, const U& u) const │ │ │ │ +{return u;} │ │ │ │ 337 │ │ │ │ -339 template │ │ │ │ -340 struct propagate_type_down_tree< │ │ │ │ -341 current_type, │ │ │ │ -342 tree_path, │ │ │ │ -343 start_type, │ │ │ │ -344 bottom_up_reduction │ │ │ │ -345 > │ │ │ │ -346 { │ │ │ │ -347 typedef current_type type; │ │ │ │ +345 template │ │ │ │ +_3_4_6 auto _a_f_t_e_r_C_h_i_l_d(T&&, Child&&, TreePath, ChildIndex, const U& u) const │ │ │ │ +{return u;} │ │ │ │ +347 │ │ │ │ 348 }; │ │ │ │ -349 │ │ │ │ -351 template │ │ │ │ -352 struct propagate_type_down_tree< │ │ │ │ -353 current_type, │ │ │ │ -354 tree_path, │ │ │ │ -355 start_type, │ │ │ │ -356 flattened_reduction │ │ │ │ -357 > │ │ │ │ +349 } // namespace Experimental │ │ │ │ +350 │ │ │ │ +352 │ │ │ │ +_3_5_7 struct _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ 358 { │ │ │ │ -359 typedef typename std::conditional< │ │ │ │ -360 tree_path().back() == 0, │ │ │ │ -361 start_type, │ │ │ │ -362 current_type │ │ │ │ -363 >::type type; │ │ │ │ -364 }; │ │ │ │ -365 │ │ │ │ -366 │ │ │ │ -368 template │ │ │ │ -369 struct accumulate_type_over_children │ │ │ │ +359 │ │ │ │ +360 // the little trick with the default template arguments │ │ │ │ +361 // makes the class usable for both single-tree visitors │ │ │ │ +362 // and visitors for pairs of trees │ │ │ │ +364 template │ │ │ │ +_3_6_9 struct _V_i_s_i_t_C_h_i_l_d │ │ │ │ 370 { │ │ │ │ -371 │ │ │ │ -372 typedef decltype(push_back(TreePath{},index_constant{})) │ │ │ │ -child_tree_path; │ │ │ │ -373 │ │ │ │ -374 typedef typename Node::template Child::Type child; │ │ │ │ -375 │ │ │ │ -376 typedef typename accumulate_type< │ │ │ │ -377 child, │ │ │ │ -378 Policy, │ │ │ │ -379 // apply reduction choice (flat / hierarchic) │ │ │ │ -380 typename propagate_type_down_tree< │ │ │ │ -381 current_type, │ │ │ │ -382 child_tree_path, │ │ │ │ -383 typename Policy::start_type, │ │ │ │ -384 typename Policy::reduction_strategy │ │ │ │ -385 >::type, │ │ │ │ -386 child_tree_path, │ │ │ │ -387 NodeTag │ │ │ │ -388 >::type child_result_type; │ │ │ │ -389 │ │ │ │ -390 typedef typename accumulate_type_over_children< │ │ │ │ -391 Node, │ │ │ │ -392 Policy, │ │ │ │ -393 child_result_type, │ │ │ │ -394 TreePath, │ │ │ │ -395 i+1, │ │ │ │ -396 n │ │ │ │ -397 >::type type; │ │ │ │ -398 │ │ │ │ +_3_7_2 static const bool _v_a_l_u_e = false; │ │ │ │ +373 }; │ │ │ │ +374 │ │ │ │ +375 }; │ │ │ │ +376 │ │ │ │ +377 │ │ │ │ +379 │ │ │ │ +_3_8_3 struct _V_i_s_i_t_T_r_e_e │ │ │ │ +384 { │ │ │ │ +385 │ │ │ │ +386 // the little trick with the default template arguments │ │ │ │ +387 // makes the class usable for both single-tree visitors │ │ │ │ +388 // and visitors for pairs of trees │ │ │ │ +390 template │ │ │ │ +_3_9_5 struct _V_i_s_i_t_C_h_i_l_d │ │ │ │ +396 { │ │ │ │ +_3_9_8 static const bool _v_a_l_u_e = true; │ │ │ │ 399 }; │ │ │ │ 400 │ │ │ │ -402 template │ │ │ │ -403 struct accumulate_type_over_children │ │ │ │ -404 { │ │ │ │ -405 │ │ │ │ -406 typedef current_type type; │ │ │ │ -407 │ │ │ │ -408 }; │ │ │ │ -409 │ │ │ │ -410 │ │ │ │ -413 template │ │ │ │ -414 struct accumulate_type_generic_composite_node │ │ │ │ -415 { │ │ │ │ +401 }; │ │ │ │ +402 │ │ │ │ +404 │ │ │ │ +_4_1_1 struct _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +412 { │ │ │ │ +_4_1_4 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e _t_r_e_e_P_a_t_h_T_y_p_e = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c; │ │ │ │ +415 }; │ │ │ │ 416 │ │ │ │ -417 typedef typename accumulate_type_over_children< │ │ │ │ -418 Node, │ │ │ │ -419 Policy, │ │ │ │ -420 current_type, │ │ │ │ -421 TreePath, │ │ │ │ -422 0, │ │ │ │ -423 StaticDegree::value │ │ │ │ -424 >::type children_result_type; │ │ │ │ -425 │ │ │ │ -426 typedef typename accumulate_type_node_helper< │ │ │ │ -427 Node, │ │ │ │ -428 typename Policy::functor, │ │ │ │ -429 typename Policy::parent_child_reduction, │ │ │ │ -430 children_result_type, │ │ │ │ -431 TreePath, │ │ │ │ -432 Policy::functor::template doVisit< │ │ │ │ -433 Node, │ │ │ │ -434 TreePath │ │ │ │ -435 >::value │ │ │ │ -436 >::type type; │ │ │ │ -437 │ │ │ │ -438 }; │ │ │ │ -439 │ │ │ │ -441 template │ │ │ │ -442 struct accumulate_type │ │ │ │ -443 : public │ │ │ │ -accumulate_type_generic_composite_node │ │ │ │ -444 {}; │ │ │ │ -445 │ │ │ │ -447 template │ │ │ │ -448 struct │ │ │ │ -accumulate_type │ │ │ │ -449 : public │ │ │ │ -accumulate_type_generic_composite_node │ │ │ │ -450 {}; │ │ │ │ -451 │ │ │ │ -452 } // anonymous namespace │ │ │ │ -453 │ │ │ │ +418 │ │ │ │ +_4_2_5 struct _D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +426 { │ │ │ │ +_4_2_8 static const _T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e _t_r_e_e_P_a_t_h_T_y_p_e = _T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c; │ │ │ │ +429 }; │ │ │ │ +430 │ │ │ │ +_4_3_2 struct _T_r_e_e_V_i_s_i_t_o_r │ │ │ │ +433 : public _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ +434 , public _V_i_s_i_t_T_r_e_e │ │ │ │ +435 {}; │ │ │ │ +436 │ │ │ │ +_4_3_8 struct _D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ +439 : public _D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ +440 , public _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ +441 {}; │ │ │ │ +442 │ │ │ │ +_4_4_4 struct _T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +445 : public _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +446 , public _V_i_s_i_t_T_r_e_e │ │ │ │ +447 {}; │ │ │ │ +448 │ │ │ │ +_4_5_0 struct _D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +451 : public _D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +452 , public _V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ +453 {}; │ │ │ │ 454 │ │ │ │ -462 template< │ │ │ │ -463 typename Functor, │ │ │ │ -464 typename Reduction, │ │ │ │ -465 typename StartType, │ │ │ │ -466 typename ParentChildReduction = Reduction, │ │ │ │ -467 typename ReductionAlgorithm = flattened_reduction │ │ │ │ -468 > │ │ │ │ -_4_6_9 struct _T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y │ │ │ │ -470 { │ │ │ │ -471 │ │ │ │ -_4_9_9 typedef Functor _f_u_n_c_t_o_r; │ │ │ │ -500 │ │ │ │ -_5_2_0 typedef Reduction _s_i_b_l_i_n_g___r_e_d_u_c_t_i_o_n; │ │ │ │ -521 │ │ │ │ -_5_2_8 typedef ParentChildReduction _p_a_r_e_n_t___c_h_i_l_d___r_e_d_u_c_t_i_o_n; │ │ │ │ -529 │ │ │ │ -_5_3_6 typedef StartType _s_t_a_r_t___t_y_p_e; │ │ │ │ -537 │ │ │ │ -_5_4_2 typedef ReductionAlgorithm _r_e_d_u_c_t_i_o_n___s_t_r_a_t_e_g_y; │ │ │ │ -543 }; │ │ │ │ +_4_5_5 namespace _E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o { │ │ │ │ +456 │ │ │ │ +_4_5_7 struct _L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +458 : public _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ +459 , public _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +460 , public _V_i_s_i_t_T_r_e_e │ │ │ │ +461 { │ │ │ │ +462 template │ │ │ │ +_4_6_3 auto _b_e_f_o_r_e_C_h_i_l_d(Tree&&, Child&&, TreePath, ChildIndex, U u) const { │ │ │ │ +464 // in this case child index is an integral constant: forward u │ │ │ │ +465 return u; │ │ │ │ +466 } │ │ │ │ +467 │ │ │ │ +468 template │ │ │ │ +_4_6_9 std::size_t _b_e_f_o_r_e_C_h_i_l_d(Tree&&, Child&&, TreePath, std::size_t / │ │ │ │ +*childIndex*/, U u) const { │ │ │ │ +470 // in this case child index is a run-time index: cast accumulated u to │ │ │ │ +std::size_t │ │ │ │ +471 return std::size_t{u}; │ │ │ │ +472 } │ │ │ │ +473 │ │ │ │ +474 template │ │ │ │ +_4_7_5 auto _l_e_a_f(Tree&&, TreePath, U u) const │ │ │ │ +476 { │ │ │ │ +477 return Hybrid::plus(u,Dune::Indices::_1); │ │ │ │ +478 } │ │ │ │ +479 │ │ │ │ +480 }; │ │ │ │ +481 │ │ │ │ +_4_8_2 struct _N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +483 : public _L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +484 { │ │ │ │ +485 template │ │ │ │ +_4_8_6 auto _p_r_e(Tree&&, TreePath, U u) const { │ │ │ │ +487 return Hybrid::plus(u,Indices::_1); │ │ │ │ +488 } │ │ │ │ +489 }; │ │ │ │ +490 │ │ │ │ +_4_9_1 struct _D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ +492 : public _D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ +493 , public _S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +494 , public _V_i_s_i_t_T_r_e_e │ │ │ │ +495 { │ │ │ │ +496 template │ │ │ │ +_4_9_7 auto _l_e_a_f(Tree&&, TreePath, U u) const │ │ │ │ +498 { │ │ │ │ +499 auto path_size = index_constant<_t_r_e_e_P_a_t_h_S_i_z_e(TreePath{})>{}; │ │ │ │ +500 auto _d_e_p_t_h = Hybrid::plus(path_size,Indices::_1); │ │ │ │ +501 return Hybrid::max(_d_e_p_t_h,u); │ │ │ │ +502 } │ │ │ │ +503 }; │ │ │ │ +504 │ │ │ │ +506 // result is alwayas an integral constant │ │ │ │ +507 template │ │ │ │ +_5_0_8 auto _d_e_p_t_h(const Tree& tree) │ │ │ │ +509 { │ │ │ │ +510 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_D_e_p_t_h_V_i_s_i_t_o_r{},Indices::_0); │ │ │ │ +511 } │ │ │ │ +512 │ │ │ │ +514 // return types is std::integral_constant. │ │ │ │ +515 template │ │ │ │ +_5_1_6 constexpr auto _d_e_p_t_h() │ │ │ │ +517 { │ │ │ │ +518 return decltype(_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(std::declval(),_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ +{},Indices::_0)){}; │ │ │ │ +519 } │ │ │ │ +520 │ │ │ │ +522 // if Tree is dynamic, return type is std::size_t, otherwise std:: │ │ │ │ +integral_constant. │ │ │ │ +523 template │ │ │ │ +_5_2_4 auto _n_o_d_e_C_o_u_n_t(const Tree& tree) │ │ │ │ +525 { │ │ │ │ +526 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r{},Indices::_0); │ │ │ │ +527 } │ │ │ │ +528 │ │ │ │ +530 // if Tree is dynamic, return type is std::size_t, otherwise std:: │ │ │ │ +integral_constant. │ │ │ │ +531 template │ │ │ │ +_5_3_2 auto _l_e_a_f_C_o_u_n_t(const Tree& tree) │ │ │ │ +533 { │ │ │ │ +534 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(tree,_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r{},Dune::Indices::_0); │ │ │ │ +535 } │ │ │ │ +536 │ │ │ │ +538 template │ │ │ │ +_5_3_9 constexpr bool _i_s_D_y_n_a_m_i_c = std::is_same()))>{}; │ │ │ │ +540 │ │ │ │ +541 } // namespace Experimental::Info │ │ │ │ +542 │ │ │ │ 544 │ │ │ │ -545 │ │ │ │ +545 } // namespace TypeTree │ │ │ │ +546} //namespace Dune │ │ │ │ 547 │ │ │ │ -555 template │ │ │ │ -_5_5_6 struct _A_c_c_u_m_u_l_a_t_e_T_y_p_e │ │ │ │ -557 { │ │ │ │ -558 │ │ │ │ -560 typedef typename accumulate_type< │ │ │ │ -561 Tree, │ │ │ │ -562 Policy, │ │ │ │ -563 typename Policy::start_type, │ │ │ │ -564 _H_y_b_r_i_d_T_r_e_e_P_a_t_h_<_>, │ │ │ │ -565 _N_o_d_e_T_a_g_<_T_r_e_e_> │ │ │ │ -_5_6_6 >_:_:_t_y_p_e _t_y_p_e; │ │ │ │ -567 │ │ │ │ -568 }; │ │ │ │ -569 │ │ │ │ -570 │ │ │ │ -571 │ │ │ │ -572 │ │ │ │ -573 │ │ │ │ -574 /***************************************************/ │ │ │ │ -575 │ │ │ │ -_5_7_6 namespace _E_x_p_e_r_i_m_e_n_t_a_l { │ │ │ │ -577 namespace Impl { │ │ │ │ -578 │ │ │ │ -580 template::isLeaf, int> = 0> │ │ │ │ -582 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor, U&& │ │ │ │ -current_val) │ │ │ │ -583 { │ │ │ │ -584 return visitor.leaf(tree, treePath, std::forward(current_val)); │ │ │ │ -585 } │ │ │ │ -586 │ │ │ │ -588 template::isLeaf, int> = 0> │ │ │ │ -590 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(T&& tree, TreePath treePath, V&& visitor, U&& │ │ │ │ -current_val) │ │ │ │ -591 { │ │ │ │ -592 using Tree = std::remove_reference_t; │ │ │ │ -593 using Visitor = std::remove_reference_t; │ │ │ │ -594 auto pre_val = visitor.pre(tree, treePath, std::forward(current_val)); │ │ │ │ -595 │ │ │ │ -596 // check which type of traversal is supported by the tree │ │ │ │ -597 using allowDynamicTraversal = Dune::Std::is_detected; │ │ │ │ -598 using allowStaticTraversal = Dune::Std::is_detected; │ │ │ │ -599 │ │ │ │ -600 // the tree must support either dynamic or static traversal │ │ │ │ -601 static_assert(allowDynamicTraversal::value || allowStaticTraversal::value); │ │ │ │ -602 │ │ │ │ -603 // the visitor may specify preferred dynamic traversal │ │ │ │ -604 using preferDynamicTraversal = std::bool_constant; │ │ │ │ -605 │ │ │ │ -606 // declare rule that applies visitor and current value to a child i. │ │ │ │ -Returns next value │ │ │ │ -607 auto apply_i = [&](auto&& value, const auto& i){ │ │ │ │ -608 auto&& child = tree.child(i); │ │ │ │ -609 using Child = std::decay_t; │ │ │ │ -610 │ │ │ │ -611 auto val_before = visitor.beforeChild(tree, child, treePath, i, std::move │ │ │ │ -(value)); │ │ │ │ -612 │ │ │ │ -613 // visits between children │ │ │ │ -614 auto val_in = Hybrid::ifElse( │ │ │ │ -615 Hybrid::equal_to(i,Indices::_0), │ │ │ │ -616 [&](auto id){return std::move(val_before);}, │ │ │ │ -617 [&](auto id){return visitor.in(tree, treePath, std::move(val_before));} │ │ │ │ -618 ); │ │ │ │ -619 │ │ │ │ -620 constexpr bool visitChild = Visitor::template │ │ │ │ -VisitChild::value; │ │ │ │ -621 auto val_visit = [&](){ │ │ │ │ -622 if constexpr (visitChild) { │ │ │ │ -623 auto childTreePath = Dune::TypeTree::push_back(treePath, i); │ │ │ │ -624 return _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(child, childTreePath, visitor, std::move(val_in)); │ │ │ │ -625 } │ │ │ │ -626 else │ │ │ │ -627 return std::move(val_in); │ │ │ │ -628 }(); │ │ │ │ -629 │ │ │ │ -630 return visitor.afterChild(tree, child, treePath, i, std::move(val_visit)); │ │ │ │ -631 }; │ │ │ │ -632 │ │ │ │ -633 // apply visitor to children │ │ │ │ -634 auto in_val = [&](){ │ │ │ │ -635 if constexpr (allowStaticTraversal::value && not preferDynamicTraversal:: │ │ │ │ -value) { │ │ │ │ -636 // get list of static indices │ │ │ │ -637 auto indices = std::make_index_sequence{}; │ │ │ │ -638 │ │ │ │ -639 // unfold apply_i left to right │ │ │ │ -640 return unpackIntegerSequence([&](auto... i) { │ │ │ │ -660 return left_fold(std::move(apply_i),std::move(pre_val), i...); │ │ │ │ -661 }, indices); │ │ │ │ -662 │ │ │ │ -663 } else { │ │ │ │ -664 // unfold first child to get type │ │ │ │ -665 auto i_val = apply_i(std::move(pre_val),std::size_t{0}); │ │ │ │ -666 // dynamically loop rest of the children to accumulate remindng values │ │ │ │ -667 for(std::size_t i = 1; i < tree.degree(); i++) │ │ │ │ -668 i_val = apply_i(i_val,i); │ │ │ │ -669 return i_val; │ │ │ │ -670 } │ │ │ │ -671 }(); │ │ │ │ -672 │ │ │ │ -673 return visitor.post(tree, treePath, in_val); │ │ │ │ -674 } │ │ │ │ -675 │ │ │ │ -676 } │ │ │ │ -677 │ │ │ │ -701 template │ │ │ │ -_7_0_2 auto _h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e(Tree&& tree, Visitor&& visitor, Init&& init) │ │ │ │ -703 { │ │ │ │ -704 return Impl::hybridApplyToTree(tree, _h_y_b_r_i_d_T_r_e_e_P_a_t_h(), visitor, init); │ │ │ │ -705 } │ │ │ │ -706 │ │ │ │ -707 } // namespace Experimental │ │ │ │ -708 │ │ │ │ -710 } // namespace TypeTree │ │ │ │ -711} //namespace Dune │ │ │ │ -712 │ │ │ │ -713#endif // DUNE_TYPETREE_ACCUMULATE_STATIC_HH │ │ │ │ -_u_t_i_l_i_t_y_._h_h │ │ │ │ +548#endif // DUNE_TYPETREE_VISITOR_HH │ │ │ │ _t_r_e_e_p_a_t_h_._h_h │ │ │ │ -_t_r_a_v_e_r_s_a_l_._h_h │ │ │ │ -_n_o_d_e_t_a_g_s_._h_h │ │ │ │ -_n_o_d_e_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_N_o_d_e_T_a_g │ │ │ │ -typename std::decay_t< Node >::NodeTag NodeTag │ │ │ │ -Returns the node tag of the given Node. │ │ │ │ -DDeeffiinniittiioonn nodeinterface.hh:70 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_h_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ -constexpr auto hybridTreePath(const T &... t) │ │ │ │ -Constructs a new HybridTreePath from the given indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:102 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_H_y_b_r_i_d_T_r_e_e_P_a_t_h │ │ │ │ -Dune::HybridMultiIndex< T... > HybridTreePath │ │ │ │ -A type for representing tree paths that supports both compile time and run time │ │ │ │ -indices. │ │ │ │ -DDeeffiinniittiioonn treepath.hh:85 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_t_r_e_e_P_a_t_h_S_i_z_e │ │ │ │ +constexpr std::size_t treePathSize(const HybridTreePath< T... > &) │ │ │ │ +Returns the size (number of components) of the given HybridTreePath. │ │ │ │ +DDeeffiinniittiioonn treepath.hh:191 │ │ │ │ _D_u_n_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:17 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:18 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:576 │ │ │ │ _D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_h_y_b_r_i_d_A_p_p_l_y_T_o_T_r_e_e │ │ │ │ auto hybridApplyToTree(Tree &&tree, Visitor &&visitor, Init &&init) │ │ │ │ Apply hybrid visitor to TypeTree. │ │ │ │ DDeeffiinniittiioonn accumulate_static.hh:702 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r__ │ │ │ │ -Statically combine two values of type result_type using ||. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:28 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:31 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_o_r___:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:32 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d__ │ │ │ │ -Statically combine two values of type result_type using &&. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:39 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:42 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_a_n_d___:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:43 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s │ │ │ │ -Statically combine two values of type result_type using +. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:50 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:53 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_p_l_u_s_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:54 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s │ │ │ │ -Statically combine two values of type result_type using -. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:61 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:64 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_u_s_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:65 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y │ │ │ │ -Statically combine two values of type result_type using *. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:72 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:75 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_u_l_t_i_p_l_y_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:76 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n │ │ │ │ -Statically combine two values of type result_type by returning their minimum. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:83 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:86 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_i_n_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:87 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x │ │ │ │ -Statically combine two values of type result_type by returning their maximum. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:94 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_:_:_r_e_d_u_c_e │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:97 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_m_a_x_:_:_r_e_d_u_c_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:98 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e │ │ │ │ -Statically accumulate a value over the nodes of a TypeTree. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:263 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_:_:_r_e_s_u_l_t___t_y_p_e │ │ │ │ -Functor::result_type result_type │ │ │ │ -The result type of the computation. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:266 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_V_a_l_u_e_:_:_r_e_s_u_l_t │ │ │ │ -static const result_type result │ │ │ │ -The accumulated result of the computation. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:269 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:470 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_p_a_r_e_n_t___c_h_i_l_d___r_e_d_u_c_t_i_o_n │ │ │ │ -ParentChildReduction parent_child_reduction │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:528 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_f_u_n_c_t_o_r │ │ │ │ -Functor functor │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:499 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_s_t_a_r_t___t_y_p_e │ │ │ │ -StartType start_type │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:536 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_r_e_d_u_c_t_i_o_n___s_t_r_a_t_e_g_y │ │ │ │ -ReductionAlgorithm reduction_strategy │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:542 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_y_p_e_A_c_c_u_m_u_l_a_t_i_o_n_P_o_l_i_c_y_:_:_s_i_b_l_i_n_g___r_e_d_u_c_t_i_o_n │ │ │ │ -Reduction sibling_reduction │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:520 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e │ │ │ │ -Statically accumulate a type over the nodes of a TypeTree. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:557 │ │ │ │ -_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_A_c_c_u_m_u_l_a_t_e_T_y_p_e_:_:_t_y_p_e │ │ │ │ -accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, │ │ │ │ -NodeTag< Tree > >::type type │ │ │ │ -The accumulated result of the computation. │ │ │ │ -DDeeffiinniittiioonn accumulate_static.hh:566 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_T_y_p_e │ │ │ │ +Type │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_f_u_l_l_y_S_t_a_t_i_c │ │ │ │ +@ fullyStatic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_t_h_T_y_p_e_:_:_d_y_n_a_m_i_c │ │ │ │ +@ dynamic │ │ │ │ +DDeeffiinniittiioonn treepath.hh:108 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o │ │ │ │ +DDeeffiinniittiioonn visitor.hh:455 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_i_s_D_y_n_a_m_i_c │ │ │ │ +constexpr bool isDynamic │ │ │ │ +true if any of the nodes in the tree only has dynamic degree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:539 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_l_e_a_f_C_o_u_n_t │ │ │ │ +auto leafCount(const Tree &tree) │ │ │ │ +The number of leaf nodes in the Tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:532 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_n_o_d_e_C_o_u_n_t │ │ │ │ +auto nodeCount(const Tree &tree) │ │ │ │ +The total number of nodes in the Tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:524 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ +constexpr auto depth() │ │ │ │ +The depth of the Tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:516 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_d_e_p_t_h │ │ │ │ +auto depth(const Tree &tree) │ │ │ │ +The depth of the TypeTree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:508 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r │ │ │ │ +Visitor interface and base class for TypeTree visitors. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:49 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ +void in(T &&, TreePath) const │ │ │ │ +Method for infix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:72 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ +void afterChild(T &&, Child &&, TreePath, ChildIndex) const │ │ │ │ +Method for child-parent traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:122 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ +void beforeChild(T &&, Child &&, TreePath, ChildIndex) const │ │ │ │ +Method for parent-child traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:107 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ +void post(T &&, TreePath) const │ │ │ │ +Method for postfix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:83 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ +void leaf(T &&, TreePath) const │ │ │ │ +Method for leaf traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:93 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ +void pre(T &&, TreePath) const │ │ │ │ +Method for prefix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:60 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +Visitor interface and base class for visitors of pairs of TypeTrees. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:164 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ +void leaf(T1 &&, T2 &&, TreePath) const │ │ │ │ +Method for leaf traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:216 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ +void beforeChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) │ │ │ │ +const │ │ │ │ +Method for parent-child traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:232 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ +void pre(T1 &&, T2 &&, TreePath) const │ │ │ │ +Method for prefix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:176 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ +void post(T1 &&, T2 &&, TreePath) const │ │ │ │ +Method for postfix traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:201 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ +void in(T1 &&, T2 &&, TreePath) const │ │ │ │ +Method for infix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:189 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_e_f_a_u_l_t_P_a_i_r_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ +void afterChild(T1 &&, Child1 &&, T2 &&, Child2 &&, TreePath, ChildIndex) const │ │ │ │ +Method for child-parent traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:248 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r │ │ │ │ +Hybrid visitor interface and base class for TypeTree hybrid visitors. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:286 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_p_o_s_t │ │ │ │ +auto post(T &&, TreePath, const U &u) const │ │ │ │ +Method for postfix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:316 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ +auto pre(T &&, TreePath, const U &u) const │ │ │ │ +Method for prefix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:296 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ +auto leaf(T &&, TreePath, const U &u) const │ │ │ │ +Method for leaf traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:326 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_a_f_t_e_r_C_h_i_l_d │ │ │ │ +auto afterChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const │ │ │ │ +Method for child-parent traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:346 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_i_n │ │ │ │ +auto in(T &&, TreePath, const U &u) const │ │ │ │ +Method for infix tree traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:306 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_D_e_f_a_u_l_t_H_y_b_r_i_d_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ +auto beforeChild(T &&, Child &&, TreePath, ChildIndex, const U &u) const │ │ │ │ +Method for parent-child traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:336 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n │ │ │ │ +Mixin base class for visitors that only want to visit the direct children of a │ │ │ │ +node. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:358 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d │ │ │ │ +Template struct for determining whether or not to visit a given child. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:370 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_D_i_r_e_c_t_C_h_i_l_d_r_e_n_:_:_V_i_s_i_t_C_h_i_l_d_:_:_v_a_l_u_e │ │ │ │ +static const bool value │ │ │ │ +Do not visit any child. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:372 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e │ │ │ │ +Mixin base class for visitors that want to visit the complete tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:384 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d │ │ │ │ +Template struct for determining whether or not to visit a given child. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:396 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_V_i_s_i_t_T_r_e_e_:_:_V_i_s_i_t_C_h_i_l_d_:_:_v_a_l_u_e │ │ │ │ +static const bool value │ │ │ │ +Visit any child. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:398 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +Mixin base class for visitors that require a static TreePath during traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:412 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_S_t_a_t_i_c_T_r_a_v_e_r_s_a_l_:_:_t_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ +static const TreePathType::Type treePathType │ │ │ │ +Use the static tree traversal algorithm. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:414 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l │ │ │ │ +Mixin base class for visitors that only need a dynamic TreePath during │ │ │ │ +traversal. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:426 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_y_n_a_m_i_c_T_r_a_v_e_r_s_a_l_:_:_t_r_e_e_P_a_t_h_T_y_p_e │ │ │ │ +static const TreePathType::Type treePathType │ │ │ │ +Use the dynamic tree traversal algorithm. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:428 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_V_i_s_i_t_o_r │ │ │ │ +Convenience base class for visiting the entire tree. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:435 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_V_i_s_i_t_o_r │ │ │ │ +Convenience base class for visiting the direct children of a node. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:441 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_T_r_e_e_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +Convenience base class for visiting an entire tree pair. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:447 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_D_i_r_e_c_t_C_h_i_l_d_r_e_n_P_a_i_r_V_i_s_i_t_o_r │ │ │ │ +Convenience base class for visiting the direct children of a node pair. │ │ │ │ +DDeeffiinniittiioonn visitor.hh:453 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +DDeeffiinniittiioonn visitor.hh:461 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ +auto leaf(Tree &&, TreePath, U u) const │ │ │ │ +DDeeffiinniittiioonn visitor.hh:475 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ +auto beforeChild(Tree &&, Child &&, TreePath, ChildIndex, U u) const │ │ │ │ +DDeeffiinniittiioonn visitor.hh:463 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_L_e_a_f_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_b_e_f_o_r_e_C_h_i_l_d │ │ │ │ +std::size_t beforeChild(Tree &&, Child &&, TreePath, std::size_t, U u) const │ │ │ │ +DDeeffiinniittiioonn visitor.hh:469 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r │ │ │ │ +DDeeffiinniittiioonn visitor.hh:484 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_N_o_d_e_C_o_u_n_t_e_r_V_i_s_i_t_o_r_:_:_p_r_e │ │ │ │ +auto pre(Tree &&, TreePath, U u) const │ │ │ │ +DDeeffiinniittiioonn visitor.hh:486 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r │ │ │ │ +DDeeffiinniittiioonn visitor.hh:495 │ │ │ │ +_D_u_n_e_:_:_T_y_p_e_T_r_e_e_:_:_E_x_p_e_r_i_m_e_n_t_a_l_:_:_I_n_f_o_:_:_D_e_p_t_h_V_i_s_i_t_o_r_:_:_l_e_a_f │ │ │ │ +auto leaf(Tree &&, TreePath, U u) const │ │ │ │ +DDeeffiinniittiioonn visitor.hh:497 │ │ │ │ =============================================================================== │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.15.0 │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00091.html │ │ │ @@ -173,16 +173,16 @@ │ │ │ │ │ │ Visitor && visitor ) │ │ │ │ │ │ │ │ │
│ │ │ │ │ │

Apply visitor to TypeTree.

│ │ │ -
│ │ │ - │ │ │ +
│ │ │ + │ │ │

This function applies the given visitor to the given tree. Both visitor and tree may be const or non-const (if the compiler supports rvalue references, they may even be a non-const temporary).

│ │ │
Note
The visitor must implement the interface laid out by DefaultVisitor (most easily achieved by inheriting from it) and specify the required type of tree traversal (static or dynamic) by inheriting from either StaticTraversal or DynamicTraversal.
│ │ │
Parameters
│ │ │ │ │ │ │ │ │ │ │ │
treeThe tree the visitor will be applied to.
visitorThe visitor to apply to the tree.
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00927.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::or_< result_type > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │

Statically combine two values of type result_type using ||. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::or_< result_type >

Statically combine two values of type result_type using ||.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00931.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::or_< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 || r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00935.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::and_< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type using &&. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::and_< result_type >

Statically combine two values of type result_type using &&.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00939.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::and_< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 && r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00943.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::plus< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type using +. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::plus< result_type >

Statically combine two values of type result_type using +.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00947.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::plus< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 + r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00951.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::minus< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type using -. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::minus< result_type >

Statically combine two values of type result_type using -.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00955.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::minus< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 - r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00959.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::multiply< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type using *. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::multiply< result_type >

Statically combine two values of type result_type using *.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00963.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::multiply< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 * r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00967.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::min< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type by returning their minimum. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::min< result_type >

Statically combine two values of type result_type by returning their minimum.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00971.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::min< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 < r2 ? r1 : r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00975.html │ │ │ @@ -80,25 +80,25 @@ │ │ │
Dune::TypeTree::max< result_type > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically combine two values of type result_type by returning their maximum. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  reduce
│ │ │

Detailed Description

│ │ │
template<typename result_type>
│ │ │ struct Dune::TypeTree::max< result_type >

Statically combine two values of type result_type by returning their maximum.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a00979.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Static Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::max< result_type >::reduce< r1, r2 > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const result_type result = r1 > r2 ? r1 : r2
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01019.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
Dune::TypeTree::AccumulateValue< Tree, Functor, Reduction, startValue, ParentChildReduction > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically accumulate a value over the nodes of a TypeTree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef Functor::result_type result_type
 The result type of the computation.
│ │ │ │ │ │

│ │ │ @@ -202,15 +202,15 @@ │ │ │
│ │ │ │ │ │

The accumulated result of the computation.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01071.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -217,15 +217,15 @@ │ │ │

│ │ │ Public Types

typedef Functor functor
typedef Reduction sibling_reduction
typedef ParentChildReduction parent_child_reduction
typedef StartType start_type
│ │ │
│ │ │

The initial result type. This type will be feed as first operand to the reduction operators when doing the first accumulation (and there is no calculated result to accumulate with yet).

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01075.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::AccumulateType< Tree, Policy > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Statically accumulate a type over the nodes of a TypeTree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/accumulate_static.hh>

│ │ │ +

#include <dune/typetree/accumulate_static.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, NodeTag< Tree > >::type type
 The accumulated result of the computation.
│ │ │

Detailed Description

│ │ │ @@ -119,15 +119,15 @@ │ │ │
│ │ │ │ │ │

The accumulated result of the computation.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01079.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
Dune::TypeTree::CompositeNode< Children > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Base class for composite nodes based on variadic templates. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/compositenode.hh>

│ │ │ +

#include <dune/typetree/compositenode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  Child
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │

│ │ │ @@ -769,15 +769,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a non power in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01083.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::CompositeNode< Children >::Child< k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Access to the type and storage type of the i-th child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/compositenode.hh>

│ │ │ +

#include <dune/typetree/compositenode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -136,15 +136,15 @@ │ │ │
│ │ │ │ │ │

The type of the child.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01087.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
Dune::TypeTree::DynamicPowerNode< T > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Collect multiple instances of type T within a dune-typetree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/dynamicpowernode.hh>

│ │ │ +

#include <dune/typetree/dynamicpowernode.hh>

│ │ │

│ │ │ Public Types

typedef std::tuple_element< k, ChildTypes >::type Type
 The type of the child.
typedef std::tuple_element< k, ChildTypes >::type type
 The type of the child.
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -722,15 +722,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a power in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01095.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
Dune::TypeTree::FilteredCompositeNode< Node, Filter > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Base class for composite nodes representing a filtered view on an underlying composite node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filteredcompositenode.hh>

│ │ │ +

#include <dune/typetree/filteredcompositenode.hh>

│ │ │

│ │ │ Public Types

typedef DynamicPowerNodeTag NodeTag
 The type tag that describes the node.
typedef T ChildType
 The type of each child.
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  Child
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │

│ │ │ @@ -663,15 +663,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a non power in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01103.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::FilteredCompositeNode< Node, Filter >::Child< k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Access to the type and storage type of the i-th child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filteredcompositenode.hh>

│ │ │ +

#include <dune/typetree/filteredcompositenode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -136,15 +136,15 @@ │ │ │
│ │ │ │ │ │

The type of the child.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01107.html │ │ │ @@ -78,20 +78,20 @@ │ │ │
Dune::TypeTree::FilterEntry< new_k, old_k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

A filter entry describing the mapping of one child in the filtered node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │

Detailed Description

│ │ │
template<std::size_t new_k, std::size_t old_k>
│ │ │ struct Dune::TypeTree::FilterEntry< new_k, old_k >

A filter entry describing the mapping of one child in the filtered node.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01111.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
Dune::TypeTree::FilterResult< FilterEntries > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

The result of a filter. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::FilterResult< FilterEntries >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -155,15 +155,15 @@ │ │ │ │ │ │

│ │ │ Public Types

typedef OriginalChild::Type Type
 The type of the child.
typedef OriginalChild::type type
 The type of the child.
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01115.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::FilterResult< FilterEntries >::apply< Node > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef std::tuple< typename Node::template Child< FilterEntries::original_index >... > Children
typedef std::tuple< typename Node::template Child< FilterEntries::original_index >::Type... > ChildTypes
typedef std::tuple< std::shared_ptr< typename Node::template Child< FilterEntries::original_index >::Type >... > NodeStorage
│ │ │ @@ -142,15 +142,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01119.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::SimpleFilterTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag describing a simple filter that can only decide whether or not to include a single given child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │

Detailed Description

│ │ │

Tag describing a simple filter that can only decide whether or not to include a single given child.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01123.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::AdvancedFilterTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag describing an advanced filter that has full control over the construction of the list of FilterEntries. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │

Detailed Description

│ │ │

Tag describing an advanced filter that has full control over the construction of the list of FilterEntries.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01127.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
Dune::TypeTree::AdvancedFilter Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Base class for advanced filters. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::AdvancedFilter:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -124,15 +124,15 @@ │ │ │
│ │ │ │ │ │

Filter tag for deciding on filter application mechanism.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01131.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::AdvancedFilter::apply< Node, Children > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Apply this filter to the given node and children. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef implementation defined type
 The result of the filtering process.
│ │ │

Detailed Description

│ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │

The result of the filtering process.

│ │ │

This type must be a model of FilterResult.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01135.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
Dune::TypeTree::SimpleFilter Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Default simple filter that accepts any node and leaves its child structure unchanged. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -117,15 +117,15 @@ │ │ │
│ │ │ │ │ │

Filter tag for deciding on filter application mechanism.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01139.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::SimpleFilter::validate< Node > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Validates the combination of filter and node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │

│ │ │ Classes

struct  validate
 Validates the combination of filter and node. More...
struct  apply
 Applies the filter to the given child node. More...
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const bool value = true
 True if the combination of filter and node is valid.
│ │ │

Detailed Description

│ │ │ @@ -119,15 +119,15 @@ │ │ │
│ │ │ │ │ │

True if the combination of filter and node is valid.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01143.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::SimpleFilter::apply< Child, new_index, old_index > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Applies the filter to the given child node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const bool value = true
 True if the child will be included in the filtered node.
│ │ │

Detailed Description

│ │ │ @@ -128,15 +128,15 @@ │ │ │
│ │ │ │ │ │

True if the child will be included in the filtered node.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01163.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::IndexFilter< indices > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Filter class for FilteredCompositeNode that selects the children with the given indices. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::IndexFilter< indices >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -127,15 +127,15 @@ │ │ │
│ │ │ │ │ │

Filter tag for deciding on filter application mechanism.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01183.html │ │ │ @@ -80,26 +80,26 @@ │ │ │
Dune::TypeTree::filter< Filter > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  apply
 Apply the filter. More...
│ │ │

Detailed Description

│ │ │
template<typename Filter>
│ │ │ struct Dune::TypeTree::filter< Filter >

Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01187.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::filter< Filter >::apply< Node, Children > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Apply the filter. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/filters.hh>

│ │ │ +

#include <dune/typetree/filters.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef filter_helper< Filter, 0, 0, Children... >::template apply ::type type
│ │ │

Detailed Description

│ │ │
template<typename Filter>
│ │ │ @@ -111,15 +111,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01191.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Classes | │ │ │ Public Member Functions | │ │ │ List of all members │ │ │
Dune::TypeTree::FixedCapacityStackView< T > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/fixedcapacitystack.hh>

│ │ │ +

#include <dune/typetree/fixedcapacitystack.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::FixedCapacityStackView< T >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -465,15 +465,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01199.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Member Functions | │ │ │ List of all members
│ │ │
Dune::TypeTree::FixedCapacityStack< T, capacity > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/fixedcapacitystack.hh>

│ │ │ +

#include <dune/typetree/fixedcapacitystack.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::FixedCapacityStack< T, capacity >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -464,15 +464,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01203.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::GenericLeafNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode transformed_type
typedef std::shared_ptr< transformed_typetransformed_storage_type
│ │ │ │ │ │

│ │ │ @@ -250,15 +250,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01207.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01211.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Public Types | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::TemplatizedGenericPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNodeTemplate< TC >::type type
typedef std::shared_ptr< typestorage_type
│ │ │ │ │ │

│ │ │ @@ -155,15 +155,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01215.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::GenericPowerNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::GenericPowerNodeTransformation< SourceNode, Transformation, TransformedNode >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01219.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01223.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNodeTemplate< TC >::type type
typedef std::shared_ptr< typestorage_type
│ │ │

Member Typedef Documentation

│ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01227.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::GenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::GenericDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01231.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -252,15 +252,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01235.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TemplatizedGenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNodeTemplate >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNodeTemplate< TC... >::type type
typedef std::shared_ptr< typestorage_type
│ │ │

Member Typedef Documentation

│ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01239.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::GenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/generictransformationdescriptors.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::GenericCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -195,15 +195,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01243.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
Dune::TypeTree::LeafNode Class Reference
│ │ │ │ │ │
│ │ │ │ │ │

Base class for leaf nodes in a dune-typetree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/leafnode.hh>

│ │ │ +

#include <dune/typetree/leafnode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef LeafNodeTag NodeTag
 The type tag that describes a LeafNode.
│ │ │ │ │ │

│ │ │ @@ -258,15 +258,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a non power in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01247.html │ │ │ @@ -83,15 +83,15 @@ │ │ │
Dune::TypeTree::NodeInterface Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Interface for nodes in a dune-typetree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/nodeinterface.hh>

│ │ │ +

#include <dune/typetree/nodeinterface.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -251,15 +251,15 @@ │ │ │
│ │ │ │ │ │

Whether this is a power node in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01251.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::LeafNodeTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag designating a leaf node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/nodetags.hh>

│ │ │ +

#include <dune/typetree/nodetags.hh>

│ │ │

Detailed Description

│ │ │

Tag designating a leaf node.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01255.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::PowerNodeTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag designating a power node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/nodetags.hh>

│ │ │ +

#include <dune/typetree/nodetags.hh>

│ │ │

Detailed Description

│ │ │

Tag designating a power node.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01259.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::DynamicPowerNodeTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag designating a power node with runtime degree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/nodetags.hh>

│ │ │ +

#include <dune/typetree/nodetags.hh>

│ │ │

Detailed Description

│ │ │

Tag designating a power node with runtime degree.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01263.html │ │ │ @@ -78,19 +78,19 @@ │ │ │
Dune::TypeTree::CompositeNodeTag Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Tag designating a composite node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/nodetags.hh>

│ │ │ +

#include <dune/typetree/nodetags.hh>

│ │ │

Detailed Description

│ │ │

Tag designating a composite node.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01267.html │ │ │ @@ -77,22 +77,22 @@ │ │ │
│ │ │
│ │ │ Classes
│ │ │
Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │
│ │ │

│ │ │ Public Types

typedef ImplementationDefined NodeTag
 The type tag that describes what kind of node this is.
typedef ImplementationDefined NodeStorage
 container type to pass around a collection of children
│ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01271.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::GenericPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ +

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< SourceNode, TC, StaticDegree< SourceNode >::value > type
│ │ │

Member Typedef Documentation

│ │ │ │ │ │ @@ -104,15 +104,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01275.html │ │ │ @@ -77,22 +77,22 @@ │ │ │
│ │ │
│ │ │ Classes
│ │ │
Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ +

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01279.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ +

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< SourceNode, TC > type
│ │ │

Member Typedef Documentation

│ │ │ │ │ │ @@ -104,15 +104,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01283.html │ │ │ @@ -77,22 +77,22 @@ │ │ │
│ │ │
│ │ │ Classes
│ │ │
Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ +

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01287.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::GenericCompositeNodeTransformationTemplate< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ +

#include <dune/typetree/powercompositenodetransformationtemplates.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< SourceNode, TC... > type
│ │ │

Member Typedef Documentation

│ │ │ │ │ │ @@ -104,15 +104,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01291.html │ │ │ @@ -84,15 +84,15 @@ │ │ │
Dune::TypeTree::PowerNode< T, k > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Collect k instances of type T within a dune-typetree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/powernode.hh>

│ │ │ +

#include <dune/typetree/powernode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  Child
 Access to the type and storage type of the i-th child. More...
│ │ │ │ │ │

│ │ │ @@ -1021,15 +1021,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a power in the dune-typetree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01295.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::PowerNode< T, k >::Child< i > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Access to the type and storage type of the i-th child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/powernode.hh>

│ │ │ +

#include <dune/typetree/powernode.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -136,15 +136,15 @@ │ │ │
│ │ │ │ │ │

The type of the child.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01299.html │ │ │ @@ -85,15 +85,15 @@ │ │ │
Dune::TypeTree::ProxyNode< Node > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Base class for nodes acting as a proxy for an existing node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::ProxyNode< Node >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -547,15 +547,15 @@ │ │ │
│ │ │ │ │ │

Mark this class as a non power in the dune-typetree.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01303.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::StaticChildAccessors< ProxiedNode > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin class providing methods for child access with compile-time parameter. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::StaticChildAccessors< ProxiedNode >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -324,15 +324,15 @@ │ │ │
│ │ │ │ │ │

Sets the i-th child to the passed-in value.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01311.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
Dune::TypeTree::StaticChildAccessors< ProxiedNode >::Child< k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Access to the type and storage type of the i-th child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::StaticChildAccessors< ProxiedNode >::Child< k >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -94,15 +94,15 @@ │ │ │ │ │ │
│ │ │

Detailed Description

│ │ │
template<typename ProxiedNode>
│ │ │ template<std::size_t k>
│ │ │ struct Dune::TypeTree::StaticChildAccessors< ProxiedNode >::Child< k >

Access to the type and storage type of the i-th child.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01315.html │ │ │ @@ -80,15 +80,15 @@ │ │ │
Dune::TypeTree::DynamicChildAccessors< ProxiedNode > Class Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin class providing methods for child access with run-time parameter. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::DynamicChildAccessors< ProxiedNode >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -492,15 +492,15 @@ │ │ │
│ │ │ │ │ │

Sets the i-th child to the passed-in value.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this class was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01319.html │ │ │ @@ -104,15 +104,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename Node, typename NodeTag>
│ │ │ struct Dune::TypeTree::ProxyNodeBase< Node, NodeTag >

Tag-based dispatch to appropriate base class that provides necessary functionality.

│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01323.html │ │ │ @@ -78,30 +78,30 @@ │ │ │
Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

ProxyNode base class for LeafNode. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │

Detailed Description

│ │ │
template<typename Node>
│ │ │ struct Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag >

ProxyNode base class for LeafNode.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01327.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::ProxyNodeBase< Node, CompositeNodeTag > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

ProxyNode base class for CompositeNode. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::ProxyNodeBase< Node, CompositeNodeTag >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -263,15 +263,15 @@ │ │ │
│ │ │ │ │ │

Sets the i-th child to the passed-in value.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01331.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::ProxyNodeBase< Node, PowerNodeTag > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

ProxyNode base class for PowerNode. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::ProxyNodeBase< Node, PowerNodeTag >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │
│ │ │ │ │ │

Sets the i-th child to the passed-in value.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01335.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::ProxyNodeBase< Node, DynamicPowerNodeTag > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

ProxyNode base class for DynamicPowerNode. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/proxynode.hh>

│ │ │ +

#include <dune/typetree/proxynode.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::ProxyNodeBase< Node, DynamicPowerNodeTag >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -428,15 +428,15 @@ │ │ │
│ │ │ │ │ │

Sets the i-th child to the passed-in value.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01339.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::SimpleLeafNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │

│ │ │ Public Types

typedef T Type
 The type of the child.
typedef T type
 The type of the child.
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode transformed_type
typedef std::shared_ptr< transformed_typetransformed_storage_type
│ │ │ │ │ │

│ │ │ @@ -218,15 +218,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01343.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │

│ │ │ Static Public Member Functions

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01347.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Public Types | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::SimplePowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< TC, StaticDegree< SourceNode >::value > type
typedef std::shared_ptr< typestorage_type
│ │ │ │ │ │

│ │ │ @@ -155,15 +155,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01351.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │

│ │ │ Static Public Member Functions

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01355.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::SimpleDynamicPowerNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< TC > type
typedef std::shared_ptr< typestorage_type
│ │ │

Member Typedef Documentation

│ │ │ @@ -123,15 +123,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01359.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  result
│ │ │ │ │ │ @@ -200,15 +200,15 @@ │ │ │ │ │ │

│ │ │ Static Public Member Functions

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01363.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::SimpleCompositeNodeTransformation< SourceNode, Transformation, TransformedNode >::result< TC > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ +

#include <dune/typetree/simpletransformationdescriptors.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef TransformedNode< TC... > type
typedef std::shared_ptr< typestorage_type
│ │ │

Member Typedef Documentation

│ │ │ @@ -123,15 +123,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01367.html │ │ │ @@ -82,15 +82,15 @@ │ │ │
Dune::TypeTree::TransformTree< SourceTree, Transformation, Tag, recursive > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Transform a TypeTree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/transformation.hh>

│ │ │ +

#include <dune/typetree/transformation.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef transformed_type type
 The type of the transformed tree.
typedef type Type
│ │ │ @@ -349,15 +349,15 @@ │ │ │
│ │ │
│ │ │

Apply transformation to storage type of an existing tree, returning a heap-allocated storage type instance of the transformed tree.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01375.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename>
│ │ │ struct Dune::TypeTree::TreePathSize< typename >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01379.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename, std::size_t>
│ │ │ struct Dune::TypeTree::TreePathPushBack< typename, size_t >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01383.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename, std::size_t>
│ │ │ struct Dune::TypeTree::TreePathPushFront< typename, size_t >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01387.html │ │ │ @@ -93,15 +93,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename>
│ │ │ struct Dune::TypeTree::TreePathBack< typename >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01391.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename>
│ │ │ struct Dune::TypeTree::TreePathFront< typename >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01395.html │ │ │ @@ -93,15 +93,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename, std::size_t...>
│ │ │ struct Dune::TypeTree::TreePathPopBack< typename,... >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01399.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename>
│ │ │ struct Dune::TypeTree::TreePathPopFront< typename >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01403.html │ │ │ @@ -88,15 +88,15 @@ │ │ │ │ │ │ │ │ │ │ │ │

Detailed Description

│ │ │
template<typename, typename>
│ │ │ struct Dune::TypeTree::TreePathConcat< typename, typename >
Deprecated
This class template will be removed after Dune 2.11
│ │ │

The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01407.html │ │ │ @@ -75,29 +75,29 @@ │ │ │ │ │ │
│ │ │
│ │ │
Dune::TypeTree::TreePathSize< HybridTreePath< index_constant< i >... > > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathSize< HybridTreePath< index_constant< i >... > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01411.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TreePathPushBack< HybridTreePath< index_constant< i >... >, k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathPushBack< HybridTreePath< index_constant< i >... >, k >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01415.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TreePathPushFront< HybridTreePath< index_constant< i >... >, k > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathPushFront< HybridTreePath< index_constant< i >... >, k >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01419.html │ │ │ @@ -75,29 +75,29 @@ │ │ │ │ │ │
│ │ │
│ │ │
Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< k > > > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< k > > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01423.html │ │ │ @@ -75,30 +75,30 @@ │ │ │ │ │ │
│ │ │
│ │ │
Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... > > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01427.html │ │ │ @@ -75,29 +75,29 @@ │ │ │ │ │ │
│ │ │
│ │ │
Dune::TypeTree::TreePathFront< HybridTreePath< index_constant< k >, index_constant< i >... > > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathFront< HybridTreePath< index_constant< k >, index_constant< i >... > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01431.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< k > >, i... > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< k > >, i... >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01435.html │ │ │ @@ -75,30 +75,30 @@ │ │ │ │ │ │
│ │ │
│ │ │
Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... >, i... > Struct Template Reference
│ │ │
│ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... >, i... >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01439.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TreePathPopFront< HybridTreePath< index_constant< k >, index_constant< i >... > > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathPopFront< HybridTreePath< index_constant< k >, index_constant< i >... > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01443.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::TreePathConcat< HybridTreePath< index_constant< i >... >, HybridTreePath< index_constant< k >... > > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/treepath.hh>

│ │ │ +

#include <dune/typetree/treepath.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePathConcat< HybridTreePath< index_constant< i >... >, HybridTreePath< index_constant< k >... > >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01447.html │ │ │ @@ -85,15 +85,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01451.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::first_type< T0, T... > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::first_type< T0, T... >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -112,15 +112,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01455.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::has_node_tag< T > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  yes
struct  no
│ │ │ │ │ │

│ │ │ @@ -186,15 +186,15 @@ │ │ │
│ │ │ │ │ │

True if class T defines a NodeTag.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01459.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_node_tag< T >::yes Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01463.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_node_tag< T >::no Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [2]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01467.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::has_node_tag_value< T, V > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  maybe
struct  yes
struct  no
│ │ │ @@ -187,15 +187,15 @@ │ │ │
│ │ │ │ │ │

True if class T defines a NodeTag of type V.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01471.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_node_tag_value< T, V >::maybe< N > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │
│ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [N+1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -104,15 +104,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01475.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_node_tag_value< T, V >::yes Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [2]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01479.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_node_tag_value< T, V >::no Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01483.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::has_implementation_tag< T > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  yes
struct  no
│ │ │ │ │ │

│ │ │ @@ -186,15 +186,15 @@ │ │ │
│ │ │ │ │ │

True if class T defines an ImplementationTag.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01487.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_implementation_tag< T >::yes Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01491.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_implementation_tag< T >::no Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [2]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01495.html │ │ │ @@ -80,15 +80,15 @@ │ │ │ Static Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::has_implementation_tag_value< T, V > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Classes

struct  maybe
struct  yes
struct  no
│ │ │ @@ -187,15 +187,15 @@ │ │ │
│ │ │ │ │ │

True if class T defines an ImplementationTag of type V.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01499.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_implementation_tag_value< T, V >::maybe< N > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │
│ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [N+1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -104,15 +104,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01503.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_implementation_tag_value< T, V >::yes Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [2]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01507.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Attributes | │ │ │ List of all members
│ │ │
Dune::TypeTree::has_implementation_tag_value< T, V >::no Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Attributes

char dummy [1]
│ │ │

Member Data Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01511.html │ │ │ @@ -78,15 +78,15 @@ │ │ │
│ │ │ Public Types | │ │ │ List of all members
│ │ │
Dune::TypeTree::AlwaysVoid< typename > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef void type
│ │ │

Member Typedef Documentation

│ │ │ │ │ │ @@ -102,15 +102,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01515.html │ │ │ @@ -78,20 +78,20 @@ │ │ │
Dune::TypeTree::meta_function Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Marker tag declaring a meta function. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │

Detailed Description

│ │ │

Marker tag declaring a meta function.

│ │ │

Just inherit from this type to cause lazy evaluation

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01519.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::lazy_evaluate< F > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Helper meta function to delay evaluation of F. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef F::type type
│ │ │

Detailed Description

│ │ │
template<typename F>
│ │ │ @@ -108,15 +108,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01523.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::lazy_identity< F > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Identity function. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef F type
│ │ │

Detailed Description

│ │ │
template<typename F>
│ │ │ @@ -108,15 +108,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01527.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::evaluate_if_meta_function< F > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Meta function that evaluates its argument iff it inherits from meta_function. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Public Types

typedef std::conditional< std::is_base_of< meta_function, F >::value, lazy_evaluate< F >, lazy_identity< F > >::type::type type
│ │ │

Detailed Description

│ │ │
template<typename F>
│ │ │ @@ -108,15 +108,15 @@ │ │ │ │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01531.html │ │ │ @@ -78,27 +78,27 @@ │ │ │
Dune::TypeTree::IsTreePath< T > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Check if type represents a tree path. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/typetraits.hh>

│ │ │ +

#include <dune/typetree/typetraits.hh>

│ │ │

Detailed Description

│ │ │
template<class T>
│ │ │ struct Dune::TypeTree::IsTreePath< T >

Check if type represents a tree path.

│ │ │

If T is a or derived from one of the tree path types this struct derives from std::true_type, otherwise from std::false_type. Hence the result of the check is available via ::value, cast to bool, or operator().

│ │ │
Template Parameters
│ │ │ │ │ │ │ │ │
TCheck if this type represents a tree path
│ │ │
│ │ │
│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01535.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::TreeInfo< Tree, Tag > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Struct for obtaining some basic structural information about a TypeTree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/utility.hh>

│ │ │ +

#include <dune/typetree/utility.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreeInfo< Tree, Tag >:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -193,15 +193,15 @@ │ │ │
│ │ │ │ │ │

The total number of nodes in the TypeTree.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01539.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::DefaultVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Visitor interface and base class for TypeTree visitors. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::DefaultVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -401,15 +401,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01543.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::DefaultPairVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Visitor interface and base class for visitors of pairs of TypeTrees. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::DefaultPairVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -456,15 +456,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01547.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::Experimental::DefaultHybridVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Hybrid visitor interface and base class for TypeTree hybrid visitors. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::Experimental::DefaultHybridVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -445,15 +445,15 @@ │ │ │ │ │ │ │ │ │
Returns
The result of applying this visitor to u.
│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01551.html │ │ │ @@ -80,15 +80,15 @@ │ │ │
Dune::TypeTree::VisitDirectChildren Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin base class for visitors that only want to visit the direct children of a node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::VisitDirectChildren:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ struct  VisitChild │ │ │  Template struct for determining whether or not to visit a given child. More...
│ │ │ │ │ │

Detailed Description

│ │ │

Mixin base class for visitors that only want to visit the direct children of a node.

│ │ │

This mixin class will reject all children presented to it, causing the algorithm to only visit the root node and call DefaultVisitor::beforeChild() and DefaultVisitor::afterChild() for its direct children.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01555.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::VisitDirectChildren::VisitChild< Node1, Child1, Node2, Child2, TreePath > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Template struct for determining whether or not to visit a given child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const bool value = false
 Do not visit any child.
│ │ │

Detailed Description

│ │ │ @@ -119,15 +119,15 @@ │ │ │
│ │ │ │ │ │

Do not visit any child.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01559.html │ │ │ @@ -80,15 +80,15 @@ │ │ │
Dune::TypeTree::VisitTree Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin base class for visitors that want to visit the complete tree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::VisitTree:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -109,15 +109,15 @@ │ │ │ struct  VisitChild │ │ │  Template struct for determining whether or not to visit a given child. More...
│ │ │ │ │ │

Detailed Description

│ │ │

Mixin base class for visitors that want to visit the complete tree.

│ │ │

This mixin class will accept all children presented to it and thus make the iterator traverse the entire tree.

│ │ │

The documentation for this struct was generated from the following file: │ │ │
│ │ │ │ │ │ │ │ │
│ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01563.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::VisitTree::VisitChild< Node1, Child1, Node2, Child2, TreePath > Struct Template Reference
│ │ │ │ │ │
│ │ │ │ │ │

Template struct for determining whether or not to visit a given child. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const bool value = true
 Visit any child.
│ │ │

Detailed Description

│ │ │ @@ -119,15 +119,15 @@ │ │ │
│ │ │ │ │ │

Visit any child.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01567.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::StaticTraversal Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin base class for visitors that require a static TreePath during traversal. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::StaticTraversal:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -132,15 +132,15 @@ │ │ │
│ │ │ │ │ │

Use the static tree traversal algorithm.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01571.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::DynamicTraversal Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Mixin base class for visitors that only need a dynamic TreePath during traversal. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Static Public Attributes

static const TreePathType::Type treePathType = TreePathType::dynamic
 Use the dynamic tree traversal algorithm.
│ │ │

Detailed Description

│ │ │ @@ -118,15 +118,15 @@ │ │ │
│ │ │ │ │ │

Use the dynamic tree traversal algorithm.

│ │ │ │ │ │
│ │ │ │ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01575.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::TreeVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Convenience base class for visiting the entire tree. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreeVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -392,15 +392,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01579.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::DirectChildrenVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Convenience base class for visiting the direct children of a node. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::DirectChildrenVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -392,15 +392,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01583.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::TreePairVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Convenience base class for visiting an entire tree pair. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::TreePairVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -441,15 +441,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01587.html │ │ │ @@ -81,15 +81,15 @@ │ │ │
Dune::TypeTree::DirectChildrenPairVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │

Convenience base class for visiting the direct children of a node pair. │ │ │ More...

│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::DirectChildrenPairVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -441,15 +441,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01591.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::Experimental::Info::LeafCounterVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::Experimental::Info::LeafCounterVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -598,15 +598,15 @@ │ │ │
│ │ │ │ │ │

Use the static tree traversal algorithm.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01595.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::Experimental::Info::NodeCounterVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::Experimental::Info::NodeCounterVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -636,15 +636,15 @@ │ │ │
│ │ │ │ │ │

Use the static tree traversal algorithm.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/a01599.html │ │ │ @@ -79,15 +79,15 @@ │ │ │ Public Member Functions | │ │ │ Static Public Attributes | │ │ │ List of all members │ │ │
Dune::TypeTree::Experimental::Info::DepthVisitor Struct Reference
│ │ │ │ │ │
│ │ │ │ │ │ -

#include <dune/typetree/visitor.hh>

│ │ │ +

#include <dune/typetree/visitor.hh>

│ │ │
│ │ │ Inheritance diagram for Dune::TypeTree::Experimental::Info::DepthVisitor:
│ │ │
│ │ │
Inheritance graph
│ │ │ │ │ │ │ │ │ │ │ │ @@ -500,15 +500,15 @@ │ │ │
│ │ │ │ │ │

Use the static tree traversal algorithm.

│ │ │ │ │ │
│ │ │
│ │ │
The documentation for this struct was generated from the following file: │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/dir_5e74c06688912037f4b476b8dc05fab9.html │ │ │ @@ -86,42 +86,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Files

 
accumulate_static.hh
 
childextraction.hh
 
compositenode.hh
 
dynamicpowernode.hh
 
accumulate_static.hh
 
childextraction.hh
 
compositenode.hh
 
dynamicpowernode.hh
 
exceptions.hh
 TypeTree-specific exceptions.
 
filteredcompositenode.hh
 
filters.hh
 
fixedcapacitystack.hh
 
generictransformationdescriptors.hh
 
leafnode.hh
 
nodeinterface.hh
 
nodetags.hh
 
pairtraversal.hh
 
powercompositenodetransformationtemplates.hh
 
powernode.hh
 
proxynode.hh
 
simpletransformationdescriptors.hh
 
transformation.hh
 
transformationutilities.hh
 
traversal.hh
 
traversalutilities.hh
 
treecontainer.hh
 
treepath.hh
 
typetraits.hh
 
typetree.hh
 
utility.hh
 
visitor.hh
 
filteredcompositenode.hh
 
filters.hh
 
fixedcapacitystack.hh
 
generictransformationdescriptors.hh
 
leafnode.hh
 
nodeinterface.hh
 
nodetags.hh
 
pairtraversal.hh
 
powercompositenodetransformationtemplates.hh
 
powernode.hh
 
proxynode.hh
 
simpletransformationdescriptors.hh
 
transformation.hh
 
transformationutilities.hh
 
traversal.hh
 
traversalutilities.hh
 
treecontainer.hh
 
treepath.hh
 
typetraits.hh
 
typetree.hh
 
utility.hh
 
visitor.hh
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/dune-typetree.tag.gz │ │ │ ├── dune-typetree.tag │ │ │ │ ├── dune-typetree.tag │ │ │ │ │ @@ -9,20 +9,20 @@ │ │ │ │ │ modules.txt │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/doc/doxygen/ │ │ │ │ │ a00005.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ accumulate_static.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00086.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/traversal.hh │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ - dune/typetree/utility.hh │ │ │ │ │ + a00029.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/traversal.hh │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ + dune/typetree/utility.hh │ │ │ │ │ Dune::TypeTree::or_ │ │ │ │ │ Dune::TypeTree::or_::reduce │ │ │ │ │ Dune::TypeTree::and_ │ │ │ │ │ Dune::TypeTree::and_::reduce │ │ │ │ │ Dune::TypeTree::plus │ │ │ │ │ Dune::TypeTree::plus::reduce │ │ │ │ │ Dune::TypeTree::minus │ │ │ │ │ @@ -39,38 +39,38 @@ │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ Dune::TypeTree::Experimental │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ childextraction.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00083.html │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ + a00077.html │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ compositenode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00080.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/childextraction.hh │ │ │ │ │ - dune/typetree/typetraits.hh │ │ │ │ │ + a00071.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/childextraction.hh │ │ │ │ │ + dune/typetree/typetraits.hh │ │ │ │ │ Dune::TypeTree::CompositeNode │ │ │ │ │ Dune::TypeTree::CompositeNode::Child │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ dynamicpowernode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00077.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/utility.hh │ │ │ │ │ - dune/typetree/typetraits.hh │ │ │ │ │ + a00044.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/utility.hh │ │ │ │ │ + dune/typetree/typetraits.hh │ │ │ │ │ Dune::TypeTree::DynamicPowerNode │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ exceptions.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ @@ -78,26 +78,26 @@ │ │ │ │ │ Dune::TypeTree::Exception │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ filteredcompositenode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00071.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/filters.hh │ │ │ │ │ + a00041.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/filters.hh │ │ │ │ │ Dune::TypeTree::FilteredCompositeNode │ │ │ │ │ Dune::TypeTree::FilteredCompositeNode::Child │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ filters.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00068.html │ │ │ │ │ + a00053.html │ │ │ │ │ Dune::TypeTree::FilterEntry │ │ │ │ │ Dune::TypeTree::FilterResult │ │ │ │ │ Dune::TypeTree::FilterResult::apply │ │ │ │ │ Dune::TypeTree::SimpleFilterTag │ │ │ │ │ Dune::TypeTree::AdvancedFilterTag │ │ │ │ │ Dune::TypeTree::AdvancedFilter │ │ │ │ │ Dune::TypeTree::AdvancedFilter::apply │ │ │ │ │ @@ -109,27 +109,27 @@ │ │ │ │ │ Dune::TypeTree::filter::apply │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ fixedcapacitystack.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00065.html │ │ │ │ │ + a00062.html │ │ │ │ │ Dune::TypeTree::FixedCapacityStackView │ │ │ │ │ Dune::TypeTree::FixedCapacityStack │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ generictransformationdescriptors.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00062.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/powercompositenodetransformationtemplates.hh │ │ │ │ │ + a00047.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/powercompositenodetransformationtemplates.hh │ │ │ │ │ Dune::TypeTree::GenericLeafNodeTransformation │ │ │ │ │ Dune::TypeTree::TemplatizedGenericPowerNodeTransformation │ │ │ │ │ Dune::TypeTree::TemplatizedGenericPowerNodeTransformation::result │ │ │ │ │ Dune::TypeTree::GenericPowerNodeTransformation │ │ │ │ │ Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation │ │ │ │ │ Dune::TypeTree::TemplatizedGenericDynamicPowerNodeTransformation::result │ │ │ │ │ Dune::TypeTree::GenericDynamicPowerNodeTransformation │ │ │ │ │ @@ -138,158 +138,158 @@ │ │ │ │ │ Dune::TypeTree::GenericCompositeNodeTransformation │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ leafnode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00059.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ + a00026.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ Dune::TypeTree::LeafNode │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ nodeinterface.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00056.html │ │ │ │ │ + a00020.html │ │ │ │ │ Dune::TypeTree::NodeInterface │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ nodetags.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00053.html │ │ │ │ │ + a00011.html │ │ │ │ │ Dune::TypeTree::LeafNodeTag │ │ │ │ │ Dune::TypeTree::PowerNodeTag │ │ │ │ │ Dune::TypeTree::DynamicPowerNodeTag │ │ │ │ │ Dune::TypeTree::CompositeNodeTag │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ pairtraversal.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00050.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ - dune/typetree/visitor.hh │ │ │ │ │ - dune/typetree/traversal.hh │ │ │ │ │ + a00056.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ + dune/typetree/visitor.hh │ │ │ │ │ + dune/typetree/traversal.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ Dune::TypeTree::Detail │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ powercompositenodetransformationtemplates.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00047.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ + a00008.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ Dune::TypeTree::GenericPowerNodeTransformationTemplate │ │ │ │ │ Dune::TypeTree::GenericPowerNodeTransformationTemplate::result │ │ │ │ │ Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate │ │ │ │ │ Dune::TypeTree::GenericDynamicPowerNodeTransformationTemplate::result │ │ │ │ │ Dune::TypeTree::GenericCompositeNodeTransformationTemplate │ │ │ │ │ Dune::TypeTree::GenericCompositeNodeTransformationTemplate::result │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ powernode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00044.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/utility.hh │ │ │ │ │ - dune/typetree/childextraction.hh │ │ │ │ │ - dune/typetree/typetraits.hh │ │ │ │ │ + a00032.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/utility.hh │ │ │ │ │ + dune/typetree/childextraction.hh │ │ │ │ │ + dune/typetree/typetraits.hh │ │ │ │ │ Dune::TypeTree::PowerNode │ │ │ │ │ Dune::TypeTree::PowerNode::Child │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ proxynode.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00041.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ + a00050.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ Dune::TypeTree::StaticChildAccessors │ │ │ │ │ Dune::TypeTree::StaticChildAccessors::Child │ │ │ │ │ Dune::TypeTree::DynamicChildAccessors │ │ │ │ │ Dune::TypeTree::ProxyNodeBase< Node, LeafNodeTag > │ │ │ │ │ Dune::TypeTree::ProxyNodeBase< Node, CompositeNodeTag > │ │ │ │ │ Dune::TypeTree::ProxyNodeBase< Node, PowerNodeTag > │ │ │ │ │ Dune::TypeTree::ProxyNodeBase< Node, DynamicPowerNodeTag > │ │ │ │ │ Dune::TypeTree::ProxyNode │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ simpletransformationdescriptors.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00038.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ + a00068.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ Dune::TypeTree::SimpleLeafNodeTransformation │ │ │ │ │ Dune::TypeTree::SimplePowerNodeTransformation │ │ │ │ │ Dune::TypeTree::SimplePowerNodeTransformation::result │ │ │ │ │ Dune::TypeTree::SimpleDynamicPowerNodeTransformation │ │ │ │ │ Dune::TypeTree::SimpleDynamicPowerNodeTransformation::result │ │ │ │ │ Dune::TypeTree::SimpleCompositeNodeTransformation │ │ │ │ │ Dune::TypeTree::SimpleCompositeNodeTransformation::result │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ transformation.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00035.html │ │ │ │ │ - dune/typetree/typetraits.hh │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/utility.hh │ │ │ │ │ + a00059.html │ │ │ │ │ + dune/typetree/typetraits.hh │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/utility.hh │ │ │ │ │ Dune::TypeTree::TransformTree │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ transformationutilities.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00032.html │ │ │ │ │ - dune/typetree/simpletransformationdescriptors.hh │ │ │ │ │ - dune/typetree/generictransformationdescriptors.hh │ │ │ │ │ + a00038.html │ │ │ │ │ + dune/typetree/simpletransformationdescriptors.hh │ │ │ │ │ + dune/typetree/generictransformationdescriptors.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ traversal.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00029.html │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ - dune/typetree/visitor.hh │ │ │ │ │ + a00080.html │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ + dune/typetree/visitor.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ Dune::TypeTree::Detail │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ traversalutilities.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00026.html │ │ │ │ │ - dune/typetree/traversal.hh │ │ │ │ │ + a00065.html │ │ │ │ │ + dune/typetree/traversal.hh │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ treecontainer.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00023.html │ │ │ │ │ + a00014.html │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ treepath.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00020.html │ │ │ │ │ + a00017.html │ │ │ │ │ Dune::TypeTree::TreePathSize< HybridTreePath< index_constant< i >... > > │ │ │ │ │ Dune::TypeTree::TreePathPushBack< HybridTreePath< index_constant< i >... >, k > │ │ │ │ │ Dune::TypeTree::TreePathPushFront< HybridTreePath< index_constant< i >... >, k > │ │ │ │ │ Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< k > > > │ │ │ │ │ Dune::TypeTree::TreePathBack< HybridTreePath< index_constant< j >, index_constant< k >, index_constant< l >... > > │ │ │ │ │ Dune::TypeTree::TreePathFront< HybridTreePath< index_constant< k >, index_constant< i >... > > │ │ │ │ │ Dune::TypeTree::TreePathPopBack< HybridTreePath< index_constant< k > >, i... > │ │ │ │ │ @@ -299,17 +299,17 @@ │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ Dune::TypeTree::TreePathType │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typetraits.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00017.html │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ + a00083.html │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ Dune::first_type< T0, T... > │ │ │ │ │ Dune::TypeTree::has_node_tag │ │ │ │ │ Dune::TypeTree::has_node_tag::yes │ │ │ │ │ Dune::TypeTree::has_node_tag::no │ │ │ │ │ Dune::TypeTree::has_node_tag_value │ │ │ │ │ Dune::TypeTree::has_node_tag_value::maybe │ │ │ │ │ Dune::TypeTree::has_node_tag_value::yes │ │ │ │ │ @@ -330,44 +330,44 @@ │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ Dune::TypeTree::impl │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ typetree.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00014.html │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ - dune/typetree/utility.hh │ │ │ │ │ - dune/typetree/leafnode.hh │ │ │ │ │ - dune/typetree/powernode.hh │ │ │ │ │ - dune/typetree/dynamicpowernode.hh │ │ │ │ │ - dune/typetree/compositenode.hh │ │ │ │ │ - dune/typetree/traversal.hh │ │ │ │ │ - dune/typetree/pairtraversal.hh │ │ │ │ │ - dune/typetree/traversalutilities.hh │ │ │ │ │ - dune/typetree/transformation.hh │ │ │ │ │ - dune/typetree/transformationutilities.hh │ │ │ │ │ - dune/typetree/accumulate_static.hh │ │ │ │ │ - dune/typetree/childextraction.hh │ │ │ │ │ + a00035.html │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ + dune/typetree/utility.hh │ │ │ │ │ + dune/typetree/leafnode.hh │ │ │ │ │ + dune/typetree/powernode.hh │ │ │ │ │ + dune/typetree/dynamicpowernode.hh │ │ │ │ │ + dune/typetree/compositenode.hh │ │ │ │ │ + dune/typetree/traversal.hh │ │ │ │ │ + dune/typetree/pairtraversal.hh │ │ │ │ │ + dune/typetree/traversalutilities.hh │ │ │ │ │ + dune/typetree/transformation.hh │ │ │ │ │ + dune/typetree/transformationutilities.hh │ │ │ │ │ + dune/typetree/accumulate_static.hh │ │ │ │ │ + dune/typetree/childextraction.hh │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ utility.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00011.html │ │ │ │ │ - dune/typetree/nodeinterface.hh │ │ │ │ │ - dune/typetree/nodetags.hh │ │ │ │ │ + a00023.html │ │ │ │ │ + dune/typetree/nodeinterface.hh │ │ │ │ │ + dune/typetree/nodetags.hh │ │ │ │ │ Dune::TypeTree::TreeInfo │ │ │ │ │ Dune │ │ │ │ │ Dune::TypeTree │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ visitor.hh │ │ │ │ │ /build/reproducible-path/dune-typetree-2.11.0/dune/typetree/ │ │ │ │ │ - a00008.html │ │ │ │ │ - dune/typetree/treepath.hh │ │ │ │ │ + a00086.html │ │ │ │ │ + dune/typetree/treepath.hh │ │ │ │ │ Dune::TypeTree::DefaultVisitor │ │ │ │ │ Dune::TypeTree::DefaultPairVisitor │ │ │ │ │ Dune::TypeTree::Experimental::DefaultHybridVisitor │ │ │ │ │ Dune::TypeTree::VisitDirectChildren │ │ │ │ │ Dune::TypeTree::VisitDirectChildren::VisitChild │ │ │ │ │ Dune::TypeTree::VisitTree │ │ │ │ │ Dune::TypeTree::VisitTree::VisitChild │ │ ├── ./usr/share/doc/libdune-typetree-doc/doxygen/files.html │ │ │ @@ -76,41 +76,41 @@ │ │ │
│ │ │
Here is a list of all files with brief descriptions:
│ │ │
[detail level 123]
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
 
doc
 
doxygen
 
dune
 
typetree
 
accumulate_static.hh
 
childextraction.hh
 
compositenode.hh
 
dynamicpowernode.hh
 
accumulate_static.hh
 
childextraction.hh
 
compositenode.hh
 
dynamicpowernode.hh
 
exceptions.hh
TypeTree-specific exceptions
 
filteredcompositenode.hh
 
filters.hh
 
fixedcapacitystack.hh
 
generictransformationdescriptors.hh
 
leafnode.hh
 
nodeinterface.hh
 
nodetags.hh
 
pairtraversal.hh
 
powercompositenodetransformationtemplates.hh
 
powernode.hh
 
proxynode.hh
 
simpletransformationdescriptors.hh
 
transformation.hh
 
transformationutilities.hh
 
traversal.hh
 
traversalutilities.hh
 
treecontainer.hh
 
treepath.hh
 
typetraits.hh
 
typetree.hh
 
utility.hh
 
visitor.hh
 
filteredcompositenode.hh
 
filters.hh
 
fixedcapacitystack.hh
 
generictransformationdescriptors.hh
 
leafnode.hh
 
nodeinterface.hh
 
nodetags.hh
 
pairtraversal.hh
 
powercompositenodetransformationtemplates.hh
 
powernode.hh
 
proxynode.hh
 
simpletransformationdescriptors.hh
 
transformation.hh
 
transformationutilities.hh
 
traversal.hh
 
traversalutilities.hh
 
treecontainer.hh
 
treepath.hh
 
typetraits.hh
 
typetree.hh
 
utility.hh
 
visitor.hh
│ │ │
│ │ │
│ │ │ │ │ │