Utopia 2
Framework for studying models of complex & adaptive systems.
|
Bundles and handles file location information: file path and line number. More...
#include <utils.hh>
Public Member Functions | |
LocationInfo ()=default | |
Constructs a location object without information. | |
LocationInfo (const std::size_t line, const std::string_view file_path) | |
Constructs a location object from line and file path information. | |
std::string | string () const |
A string representation of the location, using the fstr member. | |
Public Attributes | |
std::size_t | line = 0 |
Some line, e.g. as provided by LINE macro. | |
std::filesystem::path | file_path = "" |
Some file path, e.g. as provided by FILE macro. | |
std::string_view | fstr = "@ {file_name:}::{line:d} : " |
A fmt library format string. | |
Bundles and handles file location information: file path and line number.
|
default |
Constructs a location object without information.
|
inline |
Constructs a location object from line and file path information.
|
inline |
A string representation of the location, using the fstr
member.
Will return an empty string if no location was specified.
std::filesystem::path Utopia::TestTools::LocationInfo::file_path = "" |
Some file path, e.g. as provided by FILE macro.
std::string_view Utopia::TestTools::LocationInfo::fstr = "@ {file_name:}::{line:d} : " |
A fmt library format string.
Available keys: file_name
, file_path
, line
std::size_t Utopia::TestTools::LocationInfo::line = 0 |
Some line, e.g. as provided by LINE macro.