MeshKernel
Public Member Functions | List of all members
meshkernel::FormatString Class Referencefinal

Manages the format string and source location. More...

#include <Exceptions.hpp>

Public Member Functions

 FormatString (const char *const format_string, std::source_location const &source_location=std::source_location::current())
 Class constructor. More...
 
 FormatString (std::string_view message, std::source_location const &source_location=std::source_location::current())
 Class constructor. More...
 
 FormatString (std::string const &message, std::source_location const &source_location=std::source_location::current())
 Class constructor. More...
 
std::string_view String () const
 Returns the format string. More...
 
std::source_location const & SourceLocation () const
 Returns the source location. More...
 

Detailed Description

Manages the format string and source location.

Constructor & Destructor Documentation

◆ FormatString() [1/3]

meshkernel::FormatString::FormatString ( const char *const  format_string,
std::source_location const &  source_location = std::source_location::current() 
)
inline

Class constructor.

Parameters
[in]format_stringThe format string
[in]source_locationThe source location

◆ FormatString() [2/3]

meshkernel::FormatString::FormatString ( std::string_view  message,
std::source_location const &  source_location = std::source_location::current() 
)
inline

Class constructor.

Parameters
[in]messageThe message as an STL string view
[in]source_locationThe source location

◆ FormatString() [3/3]

meshkernel::FormatString::FormatString ( std::string const &  message,
std::source_location const &  source_location = std::source_location::current() 
)
inline

Class constructor.

Parameters
[in]messageThe message as an STL string
[in]source_locationThe source location

Member Function Documentation

◆ SourceLocation()

std::source_location const& meshkernel::FormatString::SourceLocation ( ) const
inline

Returns the source location.

Returns
The source location

◆ String()

std::string_view meshkernel::FormatString::String ( ) const
inline

Returns the format string.

Returns
The format string

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