16#include <unordered_map>
21namespace neograph::graph {
84 std::vector<std::string>
names()
const;
88 std::unordered_map<std::string, ReducerFn> registry_;
132 std::vector<std::string>
names()
const;
136 std::unordered_map<std::string, ConditionFn> registry_;
147 const std::string& name,
207 std::unique_ptr<GraphNode>
create(
const std::string& type,
208 const std::string& name,
250 std::unordered_map<std::string, NodeFactoryFn> registry_;
251 std::unordered_map<std::string, json> schemas_;
NEOGRAPH_API export/import macro for shared-library builds.
Singleton registry for conditional edge routing functions.
ConditionFn get(const std::string &name) const
Look up a condition by name.
static ConditionRegistry & instance()
Get the singleton instance.
std::vector< std::string > names() const
List all registered condition names, sorted.
void register_condition(const std::string &name, ConditionFn fn)
Register a named condition function.
Singleton factory for creating graph nodes by type name.
void register_type(const std::string &type, NodeFactoryFn fn, json config_schema)
Register a custom node type with a declared config schema.
json export_schema() const
Export a machine-readable description of the topology JSON format this engine accepts.
void register_type(const std::string &type, NodeFactoryFn fn)
Register a custom node type.
std::unique_ptr< GraphNode > create(const std::string &type, const std::string &name, const json &config, const NodeContext &ctx) const
Create a node by type name.
std::vector< std::string > registered_types() const
List all registered node type names, sorted.
static NodeFactory & instance()
Get the singleton instance.
Singleton registry for channel reducer 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 ReducerRegistry & instance()
Get the singleton instance.
Graph engine type definitions: channels, edges, nodes, events, and control flow.
std::function< json(const json ¤t, const json &incoming)> ReducerFn
Custom reducer function signature.
std::function< std::string(const GraphState &)> ConditionFn
Condition function signature for conditional edge routing.
std::function< std::unique_ptr< GraphNode >(const std::string &name, const json &config, const NodeContext &ctx)> NodeFactoryFn
Factory function signature for creating graph nodes.
Dependency injection context passed to nodes during construction.