#include <parsnip_command.h>
◆ ContextType
template<typename DispatchReturnType , typename DispatchContextType >
◆ ExecutorType
template<typename DispatchReturnType , typename DispatchContextType >
◆ ReturnType
template<typename DispatchReturnType , typename DispatchContextType >
◆ Dispatcher()
template<typename DispatchReturnType , typename DispatchContextType >
Construct a dispatcher.
- Parameters
-
| par | A parser for evaluating command lines to be dispatched. |
◆ addHandler() [1/2]
template<typename DispatchReturnType , typename DispatchContextType >
Register handlers with the dispatcher.
If assertions aren't enabled, keeps a secondary map to ensure statements are not redefined with different handlers.
- Parameters
-
| defs | The statements handled by the handler. |
| handler | Something to call when dispatching to defined statements. |
◆ addHandler() [2/2]
template<typename DispatchReturnType , typename DispatchContextType >
Register handlers with the dispatcher.
- Parameters
-
| defs | The statements handled by the handler. |
| interpreter | An Interpreter whose interpret routine will be used as the handler. |
◆ addStatements()
template<typename DispatchReturnType , typename DispatchContextType >
Add statements to the parser and register their related handler.
- Parameters
-
| defs | The statements to add and register. |
| handler | Something to call when dispatching to defined statements. |
◆ operator()() [1/2]
template<typename DispatchReturnType , typename DispatchContextType >
Dispatch a command to the executor/handler function.
- Parameters
-
| command_id | Identifier for the requested handler. |
| parameters | Details passed to the handler. |
| context | The caller's context. |
- Returns
- Whatever value is returned by the handler.
◆ operator()() [2/2]
template<typename DispatchReturnType , typename DispatchContextType >
Parse and dispatch a command to the executor/handler function.
- Parameters
-
| command | The command line to parse & execute. |
| context | The caller's context. |
- Returns
- Whatever value is returned by the handler.
◆ handlers
template<typename DispatchReturnType , typename DispatchContextType >
◆ mapping_check
template<typename DispatchReturnType , typename DispatchContextType >
◆ parser
template<typename DispatchReturnType , typename DispatchContextType >
◆ parser_number
template<typename DispatchReturnType , typename DispatchContextType >
The documentation for this class was generated from the following file: