Class providing system and platform info. More...
#include <tpie/sysinfo.h>
Public Member Functions | |
sysinfo () | |
Default constructor. More... | |
std::string | commit () const |
Git commit hash. More... | |
std::string | refspec () const |
Git refspec. More... | |
std::string | platform () const |
Platform description. More... | |
std::string | hostname () const |
System hostname as reported by Boost ASIO. More... | |
std::string | blocksize () const |
Block size used by tpie::ami::stream. More... | |
std::string | localtime () const |
Local date and time in a human-readable format. More... | |
template<typename V > | |
std::string | custominfo (std::string key, const V &value) |
Helper function to make a custom key-value line. More... | |
template<typename V > | |
void | printinfo (std::string key, const V &value) |
Print custom info to std::cout. More... | |
Static Public Member Functions | |
static memory_size_type | blocksize_bytes () |
|
inline |
|
inline |
Block size used by tpie::ami::stream.
Definition at line 86 of file sysinfo.h.
Referenced by tpie::operator<<().
|
inline |
Git commit hash.
Definition at line 63 of file sysinfo.h.
References tpie::git_commit.
Referenced by tpie::operator<<().
|
inline |
Helper function to make a custom key-value line.
could print out
key | Text to display in left column. Should be at most 14 characters. |
value | Text to display in right column. Should be at most 63 characters. |
Definition at line 122 of file sysinfo.h.
Referenced by printinfo().
|
inline |
System hostname as reported by Boost ASIO.
Definition at line 81 of file sysinfo.h.
Referenced by tpie::operator<<().
|
inline |
Local date and time in a human-readable format.
Definition at line 91 of file sysinfo.h.
Referenced by tpie::operator<<().
|
inline |
Platform description.
Currently "Windows"
or "Linux"
followed by "32-bit"
or "64-bit"
depending on the WIN32
compile-time define and sizeof(size_t)
.
Definition at line 76 of file sysinfo.h.
Referenced by tpie::operator<<().
|
inline |
Print custom info to std::cout.
Definition at line 134 of file sysinfo.h.
References custominfo().
|
inline |
Git refspec.
Definition at line 69 of file sysinfo.h.
References tpie::git_refspec.
Referenced by tpie::operator<<().