Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
BlockAccessor.h File Reference

Alias-aware façade for accessing and manipulating multiple parameter blocks. More...

#include <functional>
#include <unordered_map>
#include "Include.h"
#include "Block.h"
#include "DependentParameter.h"
Include dependency graph for BlockAccessor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BlockAccessor
 Alias-aware container / façade over several parameter blocks. More...
 

Detailed Description

Alias-aware façade for accessing and manipulating multiple parameter blocks.

This file defines BlockAccessor, a high-level container built on top of a map of block names to Block instances.

Compared to using raw blocks directly, BlockAccessor adds:

  • alias-aware block lookup,
  • convenience getters/setters for parameter values and Parameter objects,
  • support for dependency introspection (block sources and parameter sources),
  • utilities to detach / reattach dependent blocks and dependent parameters,
  • merge operators for combining several block collections,
  • extraction of sub-accessors on a subset of blocks.

The class publicly derives from std::unordered_map<std::string, std::shared_ptr<Block>>, but callers are expected to use the provided API instead of raw map operations because the class maintains an internal alias-resolution layer:

  • alias_to_key_ maps normalized aliases to a canonical storage key,
  • key_to_name_ maps canonical keys back to the full BlockName object.
See also
Block
DependentBlock
Parameter
DependentParameter

Definition in file BlockAccessor.h.