cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::methods::MethodDict Class Reference

Class of dictionaries of methods. More...

#include <msgpack_rpc/methods/method_dict.h>

Collaboration diagram for msgpack_rpc::methods::MethodDict:

Public Member Functions

 MethodDict ()=default
 Constructor.
void append (std::unique_ptr< IMethod > method)
 Append a method.
IMethodget (messages::MethodNameView name) const
 Get the method with a name. Throws an exception when not found.

Private Attributes

std::unordered_map< messages::MethodNameView, std::unique_ptr< IMethod > > methods_ {}
 Dictionary of methods.

Detailed Description

Class of dictionaries of methods.

Definition at line 39 of file method_dict.h.

Member Function Documentation

◆ append()

void msgpack_rpc::methods::MethodDict::append ( std::unique_ptr< IMethod > method)
inline

Append a method.

Parameters
[in]methodMethod.

Definition at line 51 of file method_dict.h.

◆ get()

IMethod * msgpack_rpc::methods::MethodDict::get ( messages::MethodNameView name) const
inlinenodiscard

Get the method with a name. Throws an exception when not found.

Parameters
[in]nameName.
Returns
Method.

Definition at line 68 of file method_dict.h.

Member Data Documentation

◆ methods_

std::unordered_map<messages::MethodNameView, std::unique_ptr<IMethod> > msgpack_rpc::methods::MethodDict::methods_ {}
private

Dictionary of methods.

Definition at line 80 of file method_dict.h.


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