Provides source location information and variadic joining of source location tags.
More...
#include "timemory/general/source_location.hpp"
|
template<typename... ArgsT, enable_if_t<!is_constant_char< ArgsT... >(), int > = 0> |
| source_location (const mode &_mode, const char *_func, int _line, const char *_fname, ArgsT &&...) |
|
template<typename... ArgsT, enable_if_t< is_constant_char< ArgsT... >(), int > = 0> |
| source_location (const mode &_mode, const char *_func, int _line, const char *_fname, ArgsT &&... _args) |
|
| source_location ()=delete |
|
| ~source_location ()=default |
|
| source_location (const source_location &)=delete |
|
| source_location (source_location &&)=default |
|
source_location & | operator= (const source_location &)=delete |
|
source_location & | operator= (source_location &&)=default |
|
template<typename... ArgsT, enable_if_t<(sizeof...(ArgsT) > 0) &&!is_constant_char< ArgsT... >(), int > = 0> |
const captured & | get_captured (ArgsT &&... _args) |
|
const captured & | get_captured () const |
|
template<typename... ArgsT, enable_if_t<(sizeof...(ArgsT) > 0) &&is_constant_char< ArgsT... >(), int > = 0> |
const captured & | get_captured (ArgsT &&...) |
|
|
void | compute_data (const char *_func) |
|
void | compute_data (const char *_func, int _line, const char *_fname, bool shorten) |
|
Provides source location information and variadic joining of source location tags.
Definition at line 78 of file source_location.hpp.
◆ join_type
◆ result_type
◆ mode
◆ source_location() [1/5]
template<typename... ArgsT,
enable_if_t<!is_constant_char< ArgsT... >(), int > = 0>
tim::source_location::source_location |
( |
const mode & |
_mode, |
|
|
const char * |
_func, |
|
|
int |
_line, |
|
|
const char * |
_fname, |
|
|
ArgsT && |
... |
|
) |
| |
|
inline |
◆ source_location() [2/5]
template<typename... ArgsT,
enable_if_t< is_constant_char< ArgsT... >(), int > = 0>
tim::source_location::source_location |
( |
const mode & |
_mode, |
|
|
const char * |
_func, |
|
|
int |
_line, |
|
|
const char * |
_fname, |
|
|
ArgsT &&... |
_args |
|
) |
| |
|
inline |
Definition at line 208 of file source_location.hpp.
218 auto&& _label = _arg;
220 m_captured = captured(
result_type{ _label, _hash });
226 auto&& _label = _join(_arg.c_str());
228 m_captured = captured(
result_type{ _label, _hash });
236 auto&& _label = _join(_arg.c_str());
238 m_captured = captured(
result_type{ _label, _hash });
std::tuple< std::string, size_t > result_type
hash_value_t add_hash_id(hash_map_ptr_t &_hash_map, string_view_cref_t _prefix)
add an string to the given hash-map (if it doesn't already exist) and return the hash
auto join(const char *sep, Arg &&arg, Args &&... args)
std::array< char *, 4 > _args
References tim::_args, basic, blank, complete, compute_data(), full, and tim::plotting::operation::join().
◆ source_location() [3/5]
tim::source_location::source_location |
( |
| ) |
|
|
delete |
◆ ~source_location()
tim::source_location::~source_location |
( |
| ) |
|
|
default |
◆ source_location() [4/5]
◆ source_location() [5/5]
◆ compute_data() [1/2]
void tim::source_location::compute_data |
( |
const char * |
_func | ) |
|
|
inlineprotected |
◆ compute_data() [2/2]
void tim::source_location::compute_data |
( |
const char * |
_func, |
|
|
int |
_line, |
|
|
const char * |
_fname, |
|
|
bool |
shorten |
|
) |
| |
|
inlineprotected |
Definition at line 260 of file source_location.hpp.
262#if defined(TIMEMORY_WINDOWS)
263 static const char delim =
'\\';
265 static const char delim =
'/';
270 if(_filename.find(delim) != std::string::npos)
271 _filename = _filename.substr(_filename.find_last_of(delim) + 1);
276 if(_filename.length() > 0)
287 if(_filename.length() > 0)
tim::mpl::apply< std::string > string
References tim::plotting::operation::join().
◆ get_captured() [1/3]
const captured & tim::source_location::get_captured |
( |
| ) |
const |
|
inline |
◆ get_captured() [2/3]
template<typename... ArgsT,
enable_if_t<(sizeof...(ArgsT) > 0) &&!is_constant_char< ArgsT... >(), int > = 0>
const captured & tim::source_location::get_captured |
( |
ArgsT &&... |
_args | ) |
|
|
inline |
◆ get_captured() [3/3]
template<typename... ArgsT,
enable_if_t<(sizeof...(ArgsT) > 0) &&is_constant_char< ArgsT... >(), int > = 0>
const captured & tim::source_location::get_captured |
( |
ArgsT && |
... | ) |
|
|
inline |
◆ get_captured_inline()
template<typename... ArgsT>
static captured tim::source_location::get_captured_inline |
( |
const mode & |
_mode, |
|
|
const char * |
_func, |
|
|
int |
_line, |
|
|
const char * |
_fname, |
|
|
ArgsT &&... |
_args |
|
) |
| |
|
inlinestatic |
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: