Registry consumed by compiler checks and tooling protocol adapters. 更多...
#include <ScriptCompiler.h>
Public 成员函数 | |
| void | registerContract (BindingContract contract) |
| Adds or atomically replaces a binding contract by key. | |
| bool | unregisterContract (std::string_view key) |
| Removes a binding contract. | |
| const BindingContract * | find (std::string_view key) const noexcept |
| Finds a binding contract. | |
| const BindingContract * | findMethod (std::string_view method) const noexcept |
| Finds a uniquely named method. | |
| const BindingContract * | findMethod (std::string_view scriptClass, std::string_view method) const noexcept |
| Finds a method on one script class. | |
| bool | hasScriptClass (std::string_view scriptClass) const noexcept |
| True when generated contracts include this script class. | |
| std::vector< BindingContract > | snapshot () const |
| Returns a stable snapshot sorted by contract key. | |
| std::vector< BindingSearchHit > | search (std::string_view query, std::string_view moduleFilter={}, std::string_view classFilter={}, size_t limit=20) const |
| Ranked substring/token search over keys, classes, methods and documentation ids. | |
详细描述
Registry consumed by compiler checks and tooling protocol adapters.
在文件 ScriptCompiler.h 第 158 行定义.
成员函数说明
◆ find()
|
noexcept |
Finds a binding contract.
- 返回
- Non-owning pointer, or nullptr when metadata is unavailable. @ownership Borrowed; the registry retains the contract. @lifetime Valid until the matching contract is replaced, unregistered, or this registry is destroyed. @thread Same thread as the owning ScriptCompiler / Runtime.
在文件 ScriptCompiler.cpp 第 377 行定义.
◆ findMethod() [1/2]
|
noexcept |
Finds a uniquely named method.
- 返回
- Non-owning pointer, or nullptr when absent or ambiguous. @ownership Borrowed; the registry retains the contract. @lifetime Valid until the matching contract is replaced, unregistered, or this registry is destroyed. @thread Same thread as the owning ScriptCompiler / Runtime.
在文件 ScriptCompiler.cpp 第 382 行定义.
引用了 method.
◆ findMethod() [2/2]
|
noexcept |
Finds a method on one script class.
- 返回
- Non-owning pointer, or nullptr when the class has no such method. @ownership Borrowed; the registry retains the contract. @lifetime Valid until the matching contract is replaced, unregistered, or this registry is destroyed. @thread Same thread as the owning ScriptCompiler / Runtime.
在文件 ScriptCompiler.cpp 第 392 行定义.
引用了 method.
◆ hasScriptClass()
|
noexcept |
True when generated contracts include this script class.
在文件 ScriptCompiler.cpp 第 403 行定义.
◆ registerContract()
| void eve::script::BindingContractRegistry::registerContract | ( | BindingContract | contract | ) |
Adds or atomically replaces a binding contract by key.
在文件 ScriptCompiler.cpp 第 367 行定义.
◆ search()
| std::vector< BindingSearchHit > eve::script::BindingContractRegistry::search | ( | std::string_view | query, |
| std::string_view | moduleFilter = {}, |
||
| std::string_view | classFilter = {}, |
||
| size_t | limit = 20 |
||
| ) | const |
Ranked substring/token search over keys, classes, methods and documentation ids.
- 参数
-
query Case-insensitive text; space-separated tokens must all match. moduleFilter Optional exact module id (case-insensitive). classFilter Optional exact script class (case-insensitive). limit Maximum hits; 0 uses 20, values above 64 are clamped to 64.
- 返回
- Hits sorted by score descending then key ascending.
在文件 ScriptCompiler.cpp 第 419 行定义.
◆ snapshot()
| std::vector< BindingContract > eve::script::BindingContractRegistry::snapshot | ( | ) | const |
Returns a stable snapshot sorted by contract key.
在文件 ScriptCompiler.cpp 第 410 行定义.
◆ unregisterContract()
| bool eve::script::BindingContractRegistry::unregisterContract | ( | std::string_view | key | ) |
该类的文档由以下文件生成:
- src/engine/common/ScriptCompiler.h
- src/engine/common/ScriptCompiler.cpp