1.3.64
 
Loading...
Searching...
No Matches
IndexTypes.h File Reference
#include <cstddef>
#include <vector>
#include <stdexcept>
#include <algorithm>
#include <iostream>

Go to the source code of this file.

Data Structures

struct  helios::PrimitiveUUID
 Primitive UUID - sparse identifier from Helios Context. More...
 
struct  helios::ArrayPosition
 Array position - dense buffer index (0, 1, 2, ...) More...
 
class  helios::UUIDPositionMapper
 Bidirectional mapper between UUIDs and array positions. More...
 
class  helios::IndexValidator
 Runtime validation for indexing operations (debug builds only) More...
 

Macros

#define VALIDATE_POSITION(mapper, pos, ctx)   IndexValidator(mapper).validatePosition(pos, ctx)
 Validate position is in bounds (debug only)
 
#define WARN_UUID_MIXUP(mapper, val, ctx)   IndexValidator(mapper).warnPossibleMixup(val, ctx)
 Warn if value might be UUID used as position (debug only)
 

Variables

constexpr ArrayPosition helios::INVALID_POSITION {SIZE_MAX}
 Special value indicating an invalid or not-found array position.
 

Detailed Description

Type-safe indexing utilities for UUID ↔ Position conversion.

Copyright (C) 2016-2026 Brian Bailey

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Definition in file IndexTypes.h.

Macro Definition Documentation

◆ VALIDATE_POSITION

#define VALIDATE_POSITION (   mapper,
  pos,
  ctx 
)    IndexValidator(mapper).validatePosition(pos, ctx)

Validate position is in bounds (debug only)

Definition at line 319 of file IndexTypes.h.

◆ WARN_UUID_MIXUP

#define WARN_UUID_MIXUP (   mapper,
  val,
  ctx 
)    IndexValidator(mapper).warnPossibleMixup(val, ctx)

Warn if value might be UUID used as position (debug only)

Definition at line 322 of file IndexTypes.h.

Variable Documentation

◆ INVALID_POSITION

constexpr ArrayPosition helios::INVALID_POSITION {SIZE_MAX}
constexpr

Special value indicating an invalid or not-found array position.

Definition at line 104 of file IndexTypes.h.