MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
pascal::BuiltinFunctionRegistry Class Reference

Registry of BuiltinFunctionHandler instances. More...

#include <icode.hpp>

Public Member Functions

void registerHandler (std::unique_ptr< BuiltinFunctionHandler > handler)
 Register a new handler.
BuiltinFunctionHandlerfindHandler (const std::string &funcName)
 Find the handler for a given function name.

Private Attributes

std::vector< std::unique_ptr< BuiltinFunctionHandler > > handlers
 registered handlers

Detailed Description

Registry of BuiltinFunctionHandler instances.

Holds all built-in function group handlers and dispatches to the first handler that can handle a given function name.

Definition at line 111 of file icode.hpp.

Member Function Documentation

◆ findHandler()

BuiltinFunctionHandler * pascal::BuiltinFunctionRegistry::findHandler ( const std::string & funcName)
inline

Find the handler for a given function name.

Returns
Pointer to the matching handler, or nullptr

Definition at line 122 of file icode.hpp.

References handlers.

◆ registerHandler()

void pascal::BuiltinFunctionRegistry::registerHandler ( std::unique_ptr< BuiltinFunctionHandler > handler)
inline

Register a new handler.

Definition at line 117 of file icode.hpp.

References handlers.

Member Data Documentation

◆ handlers

std::vector<std::unique_ptr<BuiltinFunctionHandler> > pascal::BuiltinFunctionRegistry::handlers
private

registered handlers

Definition at line 113 of file icode.hpp.

Referenced by findHandler(), and registerHandler().


The documentation for this class was generated from the following file: