mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Common.hpp
Go to the documentation of this file.
1#pragma once
2
8namespace mmcfilters {
9
17using NodeId = int; // keep signed to preserve InvalidNode semantics
18
26using PixelId = int;
27
34constexpr NodeId InvalidNode = -1;
35
43constexpr PixelId InvalidPixel = -1;
44
51inline bool isValidNode(NodeId id) noexcept { return id != InvalidNode; }
52
59inline bool isInvalidNode(NodeId id) noexcept { return id == InvalidNode; }
60
67inline bool isValidPixel(PixelId id) noexcept { return id != InvalidPixel; }
68
75inline bool isInvalidPixel(PixelId id) noexcept { return id == InvalidPixel; }
76
83constexpr bool PRINT_LOG = false;
84
85} // namespace mmcfilters
bool isInvalidNode(NodeId id) noexcept
Returns true when id is the invalid-node sentinel.
Definition Common.hpp:59
bool isInvalidPixel(PixelId id) noexcept
Returns true when id is the invalid-pixel sentinel.
Definition Common.hpp:75
bool isValidNode(NodeId id) noexcept
Returns true when id is not the invalid-node sentinel.
Definition Common.hpp:51
constexpr NodeId InvalidNode
Sentinel value used to denote an invalid node identifier.
Definition Common.hpp:34
constexpr PixelId InvalidPixel
Sentinel value used to denote an invalid pixel identifier.
Definition Common.hpp:43
constexpr bool PRINT_LOG
Compile-time switch for optional diagnostic logging.
Definition Common.hpp:83
bool isValidPixel(PixelId id) noexcept
Returns true when id is not the invalid-pixel sentinel.
Definition Common.hpp:67
Owning result for one computed scalar attribute layout and buffer.