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

Class of method names. More...

#include <msgpack_rpc/messages/method_name_view.h>

Collaboration diagram for msgpack_rpc::messages::MethodNameView:

Public Member Functions

 MethodNameView (const char *name)
 Constructor.
 MethodNameView (const char *name, std::size_t size)
 Constructor.
 MethodNameView (const MethodName &name) noexcept
 Constructor.
 MethodNameView (const std::string &name)
 Constructor.
 MethodNameView (std::string_view name)
 Constructor.
std::string_view name () const noexcept
 Get the method name.
 operator MethodName () const
 Convert to MethodName.

Private Attributes

std::string_view name_
 Method name.

Detailed Description

Class of method names.

Definition at line 39 of file method_name_view.h.

Constructor & Destructor Documentation

◆ MethodNameView() [1/5]

msgpack_rpc::messages::MethodNameView::MethodNameView ( const MethodName & name)
inlinenoexcept

Constructor.

Parameters
[in]nameMethod name.
Note
This class saves pointer to the give buffer, and doesn't manage memory.

Definition at line 49 of file method_name_view.h.

◆ MethodNameView() [2/5]

msgpack_rpc::messages::MethodNameView::MethodNameView ( const std::string & name)
inline

Constructor.

Parameters
[in]nameMethod name.
Note
This class saves pointer to the give buffer, and doesn't manage memory.

Definition at line 63 of file method_name_view.h.

◆ MethodNameView() [3/5]

msgpack_rpc::messages::MethodNameView::MethodNameView ( std::string_view name)
inline

Constructor.

Parameters
[in]nameMethod name.
Note
This class saves pointer to the give buffer, and doesn't manage memory.

Definition at line 77 of file method_name_view.h.

◆ MethodNameView() [4/5]

msgpack_rpc::messages::MethodNameView::MethodNameView ( const char * name,
std::size_t size )
inline

Constructor.

Parameters
[in]nameMethod name.
[in]sizeNumber of bytes in the name.
Note
This class saves pointer to the give buffer, and doesn't manage memory.

Definition at line 92 of file method_name_view.h.

◆ MethodNameView() [5/5]

msgpack_rpc::messages::MethodNameView::MethodNameView ( const char * name)
inline

Constructor.

Parameters
[in]nameMethod name.
Note
This class saves pointer to the give buffer, and doesn't manage memory.

Definition at line 104 of file method_name_view.h.

Member Function Documentation

◆ name()

std::string_view msgpack_rpc::messages::MethodNameView::name ( ) const
inlinenodiscardnoexcept

Get the method name.

Returns
Method name.

Definition at line 122 of file method_name_view.h.

◆ operator MethodName()

msgpack_rpc::messages::MethodNameView::operator MethodName ( ) const
inlineexplicit

Convert to MethodName.

Returns
MethodName object.

Definition at line 115 of file method_name_view.h.

Member Data Documentation

◆ name_

std::string_view msgpack_rpc::messages::MethodNameView::name_
private

Method name.

Definition at line 126 of file method_name_view.h.


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