|
MorphologicalAttributeFilters
Public API documentation
|
Compile-time policy for defensive checks at untrusted API boundaries. More...

Go to the source code of this file.
Macros | |
| #define | MMCFILTERS_CONTRACT_UNCHECKED 0 |
| Compile-time value selecting a build without defensive boundary validation. | |
| #define | MMCFILTERS_CONTRACT_CHECKED 1 |
| Compile-time value selecting a build with defensive boundary validation. | |
| #define | MMCFILTERS_CONTRACT_MODE MMCFILTERS_CONTRACT_CHECKED |
| Contract mode selected for the current translation unit. | |
| #define | MMCFILTERS_CONTRACT_REQUIRE(condition, ...) |
| Evaluates a caller precondition and its failure action only in checked builds. | |
| #define | MMCFILTERS_CONTRACT_CHECKED_ONLY(...) |
| Executes validation statements only when defensive checks are enabled. | |
Enumerations | |
| enum class | mmcfilters::contract::Mode { Unchecked = MMCFILTERS_CONTRACT_UNCHECKED , Checked = MMCFILTERS_CONTRACT_CHECKED } |
| Available compile-time policies for defensive API-boundary validation. More... | |
Variables | |
| constexpr Mode | mmcfilters::contract::mode = static_cast<Mode>(MMCFILTERS_CONTRACT_MODE) |
| Contract policy selected when this translation unit was compiled. | |
| constexpr bool | mmcfilters::contract::validationsEnabled = mode == Mode::Checked |
| Whether defensive API-boundary validation is enabled in this build. | |
Compile-time policy for defensive checks at untrusted API boundaries.
Public signatures are independent of the selected mode. Checked builds reject invalid caller input; unchecked builds discard those boundary checks for controlled scientific benchmarks. Internal kernels must not use these macros: they are entered only after their caller established the required domains.
Definition in file Contract.hpp.
| #define MMCFILTERS_CONTRACT_CHECKED 1 |
Compile-time value selecting a build with defensive boundary validation.
Definition at line 18 of file Contract.hpp.
| #define MMCFILTERS_CONTRACT_CHECKED_ONLY | ( | ... | ) |
Executes validation statements only when defensive checks are enabled.
| ... | Validation statements omitted from unchecked builds. |
Definition at line 67 of file Contract.hpp.
| #define MMCFILTERS_CONTRACT_MODE MMCFILTERS_CONTRACT_CHECKED |
Contract mode selected for the current translation unit.
Definition at line 22 of file Contract.hpp.
| #define MMCFILTERS_CONTRACT_REQUIRE | ( | condition, | |
| ... | |||
| ) |
Evaluates a caller precondition and its failure action only in checked builds.
| condition | Boolean caller precondition established at the public API boundary. |
| ... | Statements that report or handle a failed precondition. |
Definition at line 53 of file Contract.hpp.
| #define MMCFILTERS_CONTRACT_UNCHECKED 0 |
Compile-time value selecting a build without defensive boundary validation.
Definition at line 15 of file Contract.hpp.
|
strong |
Available compile-time policies for defensive API-boundary validation.
| Enumerator | |
|---|---|
| Unchecked | Caller-established preconditions are trusted without defensive checks. |
| Checked | Public boundaries validate caller-provided preconditions. |
Definition at line 32 of file Contract.hpp.
|
inlineconstexpr |
Contract policy selected when this translation unit was compiled.
Definition at line 40 of file Contract.hpp.
|
inlineconstexpr |
Whether defensive API-boundary validation is enabled in this build.
Definition at line 43 of file Contract.hpp.