File utils.h
Go to the source code of this file
#include <boost/format.hpp>#include <iostream>#include <sstream>#include <vector>
Public Functions
| Type | Name |
|---|---|
| void | DEBUG (std::string msg) |
| void | DEBUG (std::string msg, Params... parameters) |
| void | ERROR (std::string msg) |
| void | ERROR (std::string msg, Params... parameters) |
| void | convert_to_string (std::string & s, std::vector< T > const & v, std::string & seperator) |
| std::vector< T > | convert_to_vec (T t, std::string & s, std::string & seperator) |
| boost::format & | eval_format (boost::format & fmt) |
| boost::format & | eval_format (boost::format & fmt, T arg, Params... parameters) |
| std::string | eval_str (const std::string & str, Params... parameters) |
| bool | fileCheck (const std::string & name) fileCheck |
| uint8_t | graycode_decode (uint8_t gray) |
| uint8_t | graycode_encode (uint8_t binary) |
Public Functions Documentation
function DEBUG
inline void DEBUG (
std::string msg
)
function DEBUG
template<typename... Params>
inline void DEBUG (
std::string msg,
Params... parameters
)
function ERROR
inline void ERROR (
std::string msg
)
logging functions using iostreams and boost::format
function ERROR
template<typename... Params>
inline void ERROR (
std::string msg,
Params... parameters
)
function convert_to_string
template<typename T>
inline void convert_to_string (
std::string & s,
std::vector< T > const & v,
std::string & seperator
)
function convert_to_vec
template<typename T>
std::vector< T > convert_to_vec (
T t,
std::string & s,
std::string & seperator
)
function eval_format
inline boost::format & eval_format (
boost::format & fmt
)
utility functions / macros / definitions
Author:
Moritz Kiehn kiehn@physi.uni-heidelberg.de
Author:
Lennart Huth huth@physi.uni-heidelberg.de
Date:
date
Copyright:
"THE BEER-WARE LICENSE" (Revision 42) I wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Moritz Kiehn recursive boost::format evalatuation w/ variadic parameters
based on [https://stackoverflow.com/questions/18347957/a-convenient-logging-statement-for-c-using-boostformat].
function eval_format
template<typename T, typename... Params>
inline boost::format & eval_format (
boost::format & fmt,
T arg,
Params... parameters
)
function eval_str
template<typename... Params>
inline std::string eval_str (
const std::string & str,
Params... parameters
)
function fileCheck
fileCheck
inline bool fileCheck (
const std::string & name
)
Parameters:
stringname
Returns:
true if file is existing, false else
taken from stackoverflow.com
function graycode_decode
inline uint8_t graycode_decode (
uint8_t gray
)
encoding / decoding of a 8 bit binary reflected graycode
from [http://en.wikipedia.org/wiki/Gray_code]
function graycode_encode
inline uint8_t graycode_encode (
uint8_t binary
)
The documentation for this class was generated from the following file midas_fe/libmudaq/utils.h