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

Class of locations in source codes. More...

#include <msgpack_rpc/logging/source_location_view.h>

Collaboration diagram for msgpack_rpc::logging::SourceLocationView:

Public Member Functions

constexpr SourceLocationView (std::string_view file_path, std::uint32_t line, std::string_view function) noexcept
 Constructor.
constexpr std::string_view file_path () const noexcept
 Get the file path.
constexpr std::string_view function () const noexcept
 Get the function name.
constexpr std::uint32_t line () const noexcept
 Get the line number.

Private Attributes

std::string_view file_path_
 File path.
std::string_view function_
 Function name.
std::uint32_t line_
 Line number.

Detailed Description

Class of locations in source codes.

Definition at line 30 of file source_location_view.h.

Constructor & Destructor Documentation

◆ SourceLocationView()

msgpack_rpc::logging::SourceLocationView::SourceLocationView ( std::string_view file_path,
std::uint32_t line,
std::string_view function )
inlineconstexprnoexcept

Constructor.

Parameters
[in]file_pathFile path.
[in]lineLine number.
[in]functionFunction name.
Note
This class doesn't manage memory of file paths.

Definition at line 41 of file source_location_view.h.

Member Function Documentation

◆ file_path()

std::string_view msgpack_rpc::logging::SourceLocationView::file_path ( ) const
inlinenodiscardconstexprnoexcept

Get the file path.

Returns
File path.

Definition at line 50 of file source_location_view.h.

◆ function()

std::string_view msgpack_rpc::logging::SourceLocationView::function ( ) const
inlinenodiscardconstexprnoexcept

Get the function name.

Returns
Function name.

Definition at line 68 of file source_location_view.h.

◆ line()

std::uint32_t msgpack_rpc::logging::SourceLocationView::line ( ) const
inlinenodiscardconstexprnoexcept

Get the line number.

Returns
Line number.

Definition at line 59 of file source_location_view.h.

Member Data Documentation

◆ file_path_

std::string_view msgpack_rpc::logging::SourceLocationView::file_path_
private

File path.

Definition at line 74 of file source_location_view.h.

◆ function_

std::string_view msgpack_rpc::logging::SourceLocationView::function_
private

Function name.

Definition at line 80 of file source_location_view.h.

◆ line_

std::uint32_t msgpack_rpc::logging::SourceLocationView::line_
private

Line number.

Definition at line 77 of file source_location_view.h.


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