mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx Namespace Reference

The mxlib c++ namespace. More...

The mxlib c++ namespace.

Functions

std::string MXE_CodeToName (int ec)
 Return the name for an mxlib error code. More...
 
std::string MXE_CodeToDescription (int ec)
 Return the description for an mxlib error code. More...
 
std::string errno_CodeToName (int ec)
 Return the macro name and a message for a standard errno code. More...
 
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. More...
 
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. More...
 
template<typename iosT , char comment = '#'>
iosT & dumpGitStatus (iosT &ios)
 Dump the current git status of the library to a stream. More...
 
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 &section="")
 Dump the git status of a repository to a stream. More...
 

Function Documentation

◆ dumpGitStatus() [1/2]

template<typename iosT , char comment = '#'>
iosT& mx::dumpGitStatus ( iosT &  ios)

Dump the current git status of the library to a stream.

Prints the current SHA1 hash and whether or not the library has been modified since that commit.

Template Parameters
iosTa std::ostream-like type
commenta character to print at the beginning of each line. Default is '#'.
Parameters
[in]iosa std::ostream-like stream.

Definition at line 50 of file mxlib.hpp.

References mx::astro::constants::c().

Referenced by mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::dumpAOSystem().

◆ dumpGitStatus() [2/2]

template<typename iosT , char comment = '#'>
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.

Template Parameters
iosTa std::ostream-like type
commenta character to print at the beginning of each line. Default is '#'.
Parameters
[in]iosa std::ostream-like stream.
[in]repoNameThe name of the repository
[in]branchThe name of the branch
[in]sha1The sha1 hash for the current commit
[in]modifiedWhether or not the repository is currently modified
[in]section[optional] Descriptive sub-section name (e.g. headers vs. compiled)

Definition at line 78 of file mxlib.hpp.

References mx::astro::constants::c().