mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
The mxlib c++ namespace. More...
The mxlib c++ namespace.
Namespaces | |
namespace | internal |
Namespace for the internal error reporting functions. | |
namespace | verbose |
Namespace for the error reporting verbosity levels. | |
Functions | |
template<class verboseT > | |
std::string | error_message (const error_t &code, const std::string &expl, const std::source_location &loc=std::source_location::current()) |
Format a report given an mxlib error_t code and explanation. | |
template<> | |
std::string | error_message< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::o. | |
template<> | |
std::string | error_message< verbose::v > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::v. | |
template<> | |
std::string | error_message< verbose::vv > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::vv. | |
template<> | |
std::string | error_message< verbose::vvv > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::vvv. | |
template<class verboseT > | |
std::string | error_message (const error_t &code, const std::source_location &loc=std::source_location::current()) |
Format a report given an mxlib error_t code . | |
template<> | |
std::string | error_message< verbose::o > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::o. | |
template<> | |
std::string | error_message< verbose::v > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::v. | |
template<> | |
std::string | error_message< verbose::vv > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::vv. | |
template<> | |
std::string | error_message< verbose::vvv > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::vvv. | |
template<class verboseT > | |
error_t | error_report (const error_t &code, const std::string &expl, const std::source_location &loc=std::source_location::current()) |
Print a report to stderr given an mxlib error_t code and explanation and return the code . | |
template<> | |
error_t | error_report< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_report for verbose::o. | |
template<class verboseT > | |
error_t | error_report (const error_t &code, const std::source_location &loc=std::source_location::current()) |
Print a report to stderr given an mxlib error_t code and return the code . | |
template<> | |
error_t | error_report< verbose::o > (const error_t &code, const std::source_location &loc) |
Specialization of error_report for verbose::o. | |
template<typename iosT , char comment = '#'> | |
iosT & | dumpGitStatus (iosT &ios, const std::string &repoName, const std::string &branch, const std::string &sha1, const bool &modified, const std::string §ion="") |
Dump the git status of a repository to a stream. | |
template<typename iosT , char comment = '#'> | |
iosT & | dumpGitStatus (iosT &ios) |
Dump the current git status of the mxlib library to a stream. | |
static constexpr const char * | errorName (const error_t &errc) |
Convert an error_t code to its name. | |
static constexpr const char * | errorMessage (const error_t &errc) |
Get the descriptive message for an error_t code. | |
static constexpr error_t | errno2error_t (const int &err) |
Convert an errno code to error_t. | |
std::string | MXE_CodeToName (int ec) |
Return the name for an mxlib error code. | |
std::string | MXE_CodeToDescription (int ec) |
Return the description for an mxlib error code. | |
std::string | errno_CodeToName (int ec) |
Return the macro name and a message for a standard errno code. | |
std::string | error_report (const std::string &source, const int &code, const std::string &file, const int &line, const std::string &expl="") |
Construct a rich error report given an mxlib error code. | |
std::string | errno_report (const std::string &source, int ec, const std::string &file, const int &line, const std::string &expl="") |
Construct a rich error report given a standard errno error code. | |
template<> | |
std::string | error_message< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::o. | |
template<> | |
std::string | error_message< verbose::v > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::v. | |
template<> | |
std::string | error_message< verbose::vv > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::vv. | |
template<> | |
std::string | error_message< verbose::vvv > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_message for verbose::vvv. | |
template<> | |
std::string | error_message< verbose::o > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::o. | |
template<> | |
std::string | error_message< verbose::v > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::v. | |
template<> | |
std::string | error_message< verbose::vv > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::vv. | |
template<> | |
std::string | error_message< verbose::vvv > (const error_t &code, const std::source_location &loc) |
Specialization of error_message for verbose::vvv. | |
template<> | |
error_t | error_report< verbose::o > (const error_t &code, const std::string &expl, const std::source_location &loc) |
Specialization of error_report for verbose::o. | |
template<> | |
error_t | error_report< verbose::o > (const error_t &code, const std::source_location &loc) |
Specialization of error_report for verbose::o. | |
iosT & mx::dumpGitStatus | ( | iosT & | ios | ) |
Dump the current git status of the mxlib library to a stream.
Prints the current SHA1 hash and whether or not the library has been modified since that commit.
iosT | a std::ostream-like type |
comment | a character to print at the beginning of each line. Default is '#'. |
[in] | ios | a std::ostream-like stream. |
Definition at line 89 of file mxlib.hpp.
References dumpGitStatus().
iosT & mx::dumpGitStatus | ( | iosT & | ios, |
const std::string & | repoName, | ||
const std::string & | branch, | ||
const std::string & | sha1, | ||
const bool & | modified, | ||
const std::string & | section = "" |
||
) |
Dump the git status of a repository to a stream.
Prints the provided SHA1 hash and whether or not the library has been modified since that commit.
iosT | a std::ostream-like type |
comment | a character to print at the beginning of each line. Default is '#'. |
[in] | ios | a std::ostream-like stream. |
[in] | repoName | The name of the repository |
[in] | branch | The name of the branch |
[in] | sha1 | The sha1 hash for the current commit |
[in] | modified | Whether or not the repository is currently modified |
[in] | section | [optional] Descriptive sub-section name (e.g. headers vs. compiled) |
Definition at line 52 of file mxlib.hpp.
Referenced by mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::dumpAOSystem(), and dumpGitStatus().