Immutable schema/route catalogue built transactionally from compiled families. @ownership Owns schema strings and tool-name keys; function pointers remain binary-owned. @lifetime Immutable until destruction; not a plugin/unload registration mechanism. @thread Construction is caller-owned; concurrent const reads are safe afterward. @reentrancy Schema callbacks run without locks and must not request this catalogue while it is building. 更多...
#include <McpToolFamilies.hpp>
Public 成员函数 | |
| McpToolFamilyCatalog (const std::vector< McpToolFamily > &families) | |
| Build and validate one complete snapshot, publishing nothing on failure. | |
| std::string_view | schemas () const noexcept |
| Borrow immutable comma-separated schemas until this catalogue is destroyed. | |
| std::optional< McpToolRoute > | find (std::string_view name) const |
| Return an owned route copy, or no route for an unknown name; safe for concurrent const reads. | |
详细描述
Immutable schema/route catalogue built transactionally from compiled families. @ownership Owns schema strings and tool-name keys; function pointers remain binary-owned. @lifetime Immutable until destruction; not a plugin/unload registration mechanism. @thread Construction is caller-owned; concurrent const reads are safe afterward. @reentrancy Schema callbacks run without locks and must not request this catalogue while it is building.
在文件 McpToolFamilies.hpp 第 40 行定义.
构造及析构函数说明
◆ McpToolFamilyCatalog()
|
explicit |
Build and validate one complete snapshot, publishing nothing on failure.
- 参数
-
families Borrowed during construction; descriptor contents are copied.
- 异常
-
std::invalid_argument On missing callbacks, malformed schemas or duplicate family/tool names. @cost Linear schema parsing and route indexing per build, amortized over all subsequent requests.
在文件 McpToolFamilies.cpp 第 11 行定义.
引用了 error, ids, eve::dev::mcpStringify() , 以及 name.
成员函数说明
◆ find()
| std::optional< McpToolRoute > eve::dev::McpToolFamilyCatalog::find | ( | std::string_view | name | ) | const |
Return an owned route copy, or no route for an unknown name; safe for concurrent const reads.
在文件 McpToolFamilies.cpp 第 41 行定义.
◆ schemas()
|
inlinenoexcept |
Borrow immutable comma-separated schemas until this catalogue is destroyed.
在文件 McpToolFamilies.hpp 第 50 行定义.
该类的文档由以下文件生成:
- src/engine/devtools/McpToolFamilies.hpp
- src/engine/devtools/McpToolFamilies.cpp