#include <operator-registry.h>
Singleton registering available operators.
◆ byBuiltinFunctionID()
| const auto& hilti::operator_::Registry::byBuiltinFunctionID |
( |
const ID & |
id | ) |
|
|
inline |
Returns all available built-on operators of kind function call matching a given function name.
◆ byKind()
| const auto& hilti::operator_::Registry::byKind |
( |
Kind |
kind | ) |
|
|
inline |
Returns all available operators of a given kind.
◆ byMethodID()
| const auto& hilti::operator_::Registry::byMethodID |
( |
const ID & |
id | ) |
|
|
inline |
Returns all available operators of kind member call matching a given method ID.
◆ byName()
| const auto& hilti::operator_::Registry::byName |
( |
const std::string_view & |
name | ) |
|
|
inline |
Returns all available operators of a given operator name.
◆ clear()
Removes all registered operators, releasing their memory.
◆ debugEnforceBuiltInsAreResolved()
| void Registry::debugEnforceBuiltInsAreResolved |
( |
Builder * |
builder | ) |
const |
Aborts with an internal error if any registered built-in operators remain uninitialized. If this happens after an AST has otherwise be fully resolved, something's wrong those operator definitions (like an unknown type).
◆ functionCallCandidates()
Returns any function call operators defining a static name matching a given unresolved operator.
- Parameters
-
| op | unresolved operator to match against |
- Returns
- tuple where the 1st element is a boolean indicating if the caller should proceed checking the candidates returned as the 2nd element; if not, a match has been found but is valid for calling, and hence the caller should abort resolution
◆ havePending()
| bool hilti::operator_::Registry::havePending |
( |
| ) |
const |
|
inline |
Returns true if any registered operators remain uninitialized.
◆ initPending()
| void Registry::initPending |
( |
Builder * |
builder | ) |
|
Attempts to initialize all pending operators. Initialization will succeed for all operators for which argument types can be fully resolved at this time; these will then be available through the registry going forward. Any operators that cannot be initialized yet will remain pending and won't be available for lookup for the time being.
- Parameters
-
| builder | builder to use for operator initialization |
◆ operators()
| const auto& hilti::operator_::Registry::operators |
( |
| ) |
const |
|
inline |
Returns all available operators.
◆ register_()
| void Registry::register_ |
( |
std::unique_ptr< Operator > |
op | ) |
|
Registers an operator with the registry. It will not immediately become available but remain pending until initialized later.
◆ singleton()
| static auto& hilti::operator_::Registry::singleton |
( |
| ) |
|
|
inlinestatic |
Returns a singleton instance of the current class.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/spicy-docs/checkouts/v1.14.0/hilti/toolchain/include/ast/operator-registry.h
- /home/docs/checkouts/readthedocs.org/user_builds/spicy-docs/checkouts/v1.14.0/hilti/toolchain/src/ast/operator-registry.cc