PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
plssvm::source_location Class Reference

The plssvm::source_location class represents certain information about the source code, such as file names, line numbers, or function names. More...

#include <source_location.hpp>

Public Member Functions

constexpr std::string_view function_name () const noexcept
 Returns the absolute path name of the file or "unknown" if no information could be retrieved. More...
 
constexpr std::string_view file_name () const noexcept
 Returns the function name without additional signature information (i.e. return type and parameters) or "unknown" if no information could be retrieved. More...
 
constexpr std::uint_least32_t line () const noexcept
 Returns the line number or 0 if no information could be retrieved. More...
 
constexpr std::uint_least32_t column () const noexcept
 Returns the column number. More...
 

Static Public Member Functions

static constexpr source_location current (const char *file_name=__builtin_FILE(), const char *function_name=__builtin_FUNCTION(), int line=__builtin_LINE(), int column=0) noexcept
 Construct new source location information about the current call side. More...
 

Private Attributes

std::uint_least32_t line_ { 0 }
 The line number as retrieved by __builtin_LINE().
 
std::uint_least32_t column_ { 0 }
 The column number (always 0).
 
const char * file_name_ { "unknown" }
 The file name as retrieved by __builtin_FILE().
 
const char * function_name_ { "unknown" }
 The function name as retrieved by __builtin_FUNCTION().
 

Detailed Description

The plssvm::source_location class represents certain information about the source code, such as file names, line numbers, or function names.

Based on std::source_location.

Member Function Documentation

◆ current()

static constexpr source_location plssvm::source_location::current ( const char *  file_name = __builtin_FILE(),
const char *  function_name = __builtin_FUNCTION(),
int  line = __builtin_LINE(),
int  column = 0 
)
inlinestaticconstexprnoexcept

Construct new source location information about the current call side.

Parameters
[in]file_namethe file name including its absolute path, as given by __builtin_FILE()
[in]function_namethe function name (without return type and parameters), as given by __builtin_FUNCTION()
[in]linethe line number, as given by __builtin_LINE()
[in]columnthe column number, always 0
Returns
the source location object holding the information about the current call side ([[nodiscard]])

◆ function_name()

constexpr std::string_view plssvm::source_location::function_name ( ) const
inlineconstexprnoexcept

Returns the absolute path name of the file or "unknown" if no information could be retrieved.

Returns
the file name ([[nodiscard]])

◆ file_name()

constexpr std::string_view plssvm::source_location::file_name ( ) const
inlineconstexprnoexcept

Returns the function name without additional signature information (i.e. return type and parameters) or "unknown" if no information could be retrieved.

Returns
the function name ([[nodiscard]])

◆ line()

constexpr std::uint_least32_t plssvm::source_location::line ( ) const
inlineconstexprnoexcept

Returns the line number or 0 if no information could be retrieved.

Returns
the line number ([[nodiscard]])

◆ column()

constexpr std::uint_least32_t plssvm::source_location::column ( ) const
inlineconstexprnoexcept

Returns the column number.

Attention
Always 0!
Returns
0 ([[nodiscard]])

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