|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
Singleton registry for channel reducer functions. More...
#include <loader.h>
Public Member Functions | |
| ReducerFn | get (const std::string &name) const |
| Look up a reducer by name. | |
| std::vector< std::string > | names () const |
| List all registered reducer names, sorted. | |
| void | register_reducer (const std::string &name, ReducerFn fn) |
| Register a named reducer function. | |
Static Public Member Functions | |
| static ReducerRegistry & | instance () |
| Get the singleton instance. | |
Singleton registry for channel reducer functions.
Maps reducer names (used in JSON graph definitions) to ReducerFn implementations. Built-in reducers: "overwrite", "append".
ReducerRegistry, ConditionRegistry, and NodeFactory synchronize concurrent registration and lookup. Engines capture a registry snapshot at construction. Use an isolated GraphRegistry for separate engines: built-ins resolve by default, while singleton custom entries require explicit GlobalFallback.
| ReducerFn neograph::graph::ReducerRegistry::get | ( | const std::string & | name | ) | const |
Look up a reducer by name.
| name | Reducer name. |
|
static |
Get the singleton instance.
| std::vector< std::string > neograph::graph::ReducerRegistry::names | ( | ) | const |
List all registered reducer names, sorted.
Introspection accessor for external tooling (e.g. a visual topology editor) that needs to enumerate the available reducer palette without grepping engine source.
| void neograph::graph::ReducerRegistry::register_reducer | ( | const std::string & | name, |
| ReducerFn | fn | ||
| ) |
Register a named reducer function.
| name | Reducer name (referenced in JSON channel definitions). |
| fn | Reducer function that merges current and incoming values. |