mmcfilters
Public API documentation
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
Common.hpp File Reference

Shared scalar conventions used by the C++ API. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

using mmcfilters::NodeId = int
 Node identifier type used throughout the project.
 
using mmcfilters::PixelId = int
 Pixel identifier type used by source and active construction domains.
 

Functions

bool mmcfilters::isValidNode (NodeId id) noexcept
 Returns true when id is not the invalid-node sentinel.
 
bool mmcfilters::isInvalidNode (NodeId id) noexcept
 Returns true when id is the invalid-node sentinel.
 
bool mmcfilters::isValidPixel (PixelId id) noexcept
 Returns true when id is not the invalid-pixel sentinel.
 
bool mmcfilters::isInvalidPixel (PixelId id) noexcept
 Returns true when id is the invalid-pixel sentinel.
 

Variables

constexpr NodeId mmcfilters::InvalidNode = -1
 Sentinel value used to denote an invalid node identifier.
 
constexpr PixelId mmcfilters::InvalidPixel = -1
 Sentinel value used to denote an invalid pixel identifier.
 
constexpr bool mmcfilters::PRINT_LOG = false
 Compile-time switch for optional diagnostic logging.
 

Detailed Description

Shared scalar conventions used by the C++ API.

Definition in file Common.hpp.

Typedef Documentation

◆ NodeId

using mmcfilters::NodeId = typedef int

Node identifier type used throughout the project.

Node ids index this repository's dense internal node-slot domain. They are intentionally signed so InvalidNode can be represented without reserving a valid dense slot.

Definition at line 17 of file Common.hpp.

◆ PixelId

using mmcfilters::PixelId = typedef int

Pixel identifier type used by source and active construction domains.

Pixel ids are dense zero-based indices in the domain declared by the surrounding API. In particular, a topographic convention's infinity pixel belongs to that convention's active domain.

Definition at line 26 of file Common.hpp.

Function Documentation

◆ isInvalidNode()

bool mmcfilters::isInvalidNode ( NodeId  id)
inlinenoexcept

Returns true when id is the invalid-node sentinel.

Parameters
idNode identifier.
Returns
True when id is the invalid-node sentinel.

Definition at line 59 of file Common.hpp.

◆ isInvalidPixel()

bool mmcfilters::isInvalidPixel ( PixelId  id)
inlinenoexcept

Returns true when id is the invalid-pixel sentinel.

Parameters
idPixel identifier.
Returns
True when id is the invalid-pixel sentinel.

Definition at line 75 of file Common.hpp.

◆ isValidNode()

bool mmcfilters::isValidNode ( NodeId  id)
inlinenoexcept

Returns true when id is not the invalid-node sentinel.

Parameters
idIdentifier.
Returns
True when id is not the invalid-node sentinel.

Definition at line 51 of file Common.hpp.

◆ isValidPixel()

bool mmcfilters::isValidPixel ( PixelId  id)
inlinenoexcept

Returns true when id is not the invalid-pixel sentinel.

Parameters
idPixel identifier.
Returns
True when id is not the invalid-pixel sentinel.

Definition at line 67 of file Common.hpp.

Variable Documentation

◆ InvalidNode

constexpr NodeId mmcfilters::InvalidNode = -1
constexpr

Sentinel value used to denote an invalid node identifier.

Public APIs return or accept this value when no node exists, for example for a missing parent, failed lookup, or invalid smallest node.

Definition at line 34 of file Common.hpp.

◆ InvalidPixel

constexpr PixelId mmcfilters::InvalidPixel = -1
constexpr

Sentinel value used to denote an invalid pixel identifier.

Pixel and node identifiers currently share the same signed representation, but their sentinels remain separately named so code records the domain to which an invalid identifier belongs.

Definition at line 43 of file Common.hpp.

◆ PRINT_LOG

constexpr bool mmcfilters::PRINT_LOG = false
constexpr

Compile-time switch for optional diagnostic logging.

The default public build keeps this disabled so library code remains quiet unless a local development build changes the constant.

Definition at line 83 of file Common.hpp.