载入中...
搜索中...
未找到
eve::script::BindingContractRegistry类 参考

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()

const BindingContract * eve::script::BindingContractRegistry::find ( std::string_view  key) const
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 行定义.

引用了 found , 以及 key.

◆ findMethod() [1/2]

const BindingContract * eve::script::BindingContractRegistry::findMethod ( std::string_view  method) const
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.

被这些函数引用 eve::dev::LanguageServer::Impl::signatureHelp().

◆ findMethod() [2/2]

const BindingContract * eve::script::BindingContractRegistry::findMethod ( std::string_view  scriptClass,
std::string_view  method 
) const
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()

bool eve::script::BindingContractRegistry::hasScriptClass ( std::string_view  scriptClass) const
noexcept

True when generated contracts include this script class.

在文件 ScriptCompiler.cpp 第 403 行定义.

被这些函数引用 eve::dev::LanguageServer::Impl::complete().

◆ registerContract()

void eve::script::BindingContractRegistry::registerContract ( BindingContract  contract)

Adds or atomically replaces a binding contract by key.

在文件 ScriptCompiler.cpp 第 367 行定义.

引用了 eve::script::BindingContract::key().

◆ 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.

参数
queryCase-insensitive text; space-separated tokens must all match.
moduleFilterOptional exact module id (case-insensitive).
classFilterOptional exact script class (case-insensitive).
limitMaximum hits; 0 uses 20, values above 64 are clamped to 64.
返回
Hits sorted by score descending then key ascending.

在文件 ScriptCompiler.cpp 第 419 行定义.

引用了 a, b, limit, score , 以及 tokens.

◆ snapshot()

std::vector< BindingContract > eve::script::BindingContractRegistry::snapshot ( ) const

Returns a stable snapshot sorted by contract key.

在文件 ScriptCompiler.cpp 第 410 行定义.

引用了 a , 以及 b.

被这些函数引用 eve::dev::LanguageServer::Impl::complete().

◆ unregisterContract()

bool eve::script::BindingContractRegistry::unregisterContract ( std::string_view  key)

Removes a binding contract.

在文件 ScriptCompiler.cpp 第 372 行定义.

引用了 key.


该类的文档由以下文件生成: