#include <Pt/JsonRpc/ProcedureDeclaration.h>
Maps parameter names to positional indices for named parameters. More...
Public Member Functions | |
| ProcedureDeclaration () | |
| Default constructor. | |
| void | setParamName (std::size_t index, const std::string &name) |
| Register a parameter name at a positional index. | |
| int | getParamIndex (const std::string &name) const |
| Lookup positional index by parameter name. More... | |
| const std::string & | getParamName (std::size_t index) const |
| Lookup parameter name by positional index. More... | |
| std::size_t | paramCount () const |
| Returns the number of named parameters. | |
| bool | hasNames () const |
| Returns true if any parameter names are registered. | |
JSON-RPC 2.0 allows parameters to be passed as a JSON object with named keys. The ProcedureDeclaration maps each name to its positional index so the Responder can dispatch named parameters to the correct Composer.
| int getParamIndex | ( | const std::string & | name | ) | const |
| const std::string& getParamName | ( | std::size_t | index | ) | const |