src/iguana/algorithms/example/ExampleSubclassAlgorithm/Algorithm.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "iguana/algorithms/clas12/rga/FiducialFilterPass1/Algorithm.h" | ||
| 4 | |||
| 5 | namespace iguana::example { | ||
| 6 | |||
| 7 | /// @algo_brief{example demonstrating inheritance from another algorithm} | ||
| 8 | /// @algo_type_filter | ||
| 9 | /// @doc_config{example/ExampleSubclassAlgorithm} | ||
| 10 | class ExampleSubclassAlgorithm : public clas12::rga::FiducialFilterPass1 | ||
| 11 | { | ||
| 12 | // use `DEFINE_IGUANA_SUBALGORITHM` rather than the usual `DEFINE_IGUANA_ALGORITHM`; | ||
| 13 | // include the base-class algorithm as an argument | ||
| 14 |
6/14✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 6 not taken.
✗ Branch 5 → 7 not taken.
✓ Branch 5 → 8 taken 1 time.
✓ Branch 9 → 10 taken 1 time.
✗ Branch 9 → 32 not taken.
✓ Branch 10 → 11 taken 1 time.
✗ Branch 10 → 17 not taken.
✓ Branch 17 → 18 taken 1 time.
✗ Branch 17 → 40 not taken.
✓ Branch 24 → 25 taken 1 time.
✗ Branch 24 → 40 not taken.
✗ Branch 32 → 33 not taken.
✗ Branch 32 → 39 not taken.
|
8 | DEFINE_IGUANA_SUBALGORITHM(ExampleSubclassAlgorithm, example::ExampleSubclassAlgorithm, clas12::rga::FiducialFilterPass1) |
| 15 | |||
| 16 | private: // hooks | ||
| 17 | // if you don't declare a hook, the base-class algorithm's implementation will be used; | ||
| 18 | // in this example, we use all the base-class hooks | ||
| 19 | }; | ||
| 20 | |||
| 21 | } | ||
| 22 |