mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
utils.h File Reference

Defines various general utility functions. More...

#include <iterator>
#include <vector>
#include <sstream>
#include <atomic>
+ Include dependency graph for utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mrs_lib::AtomicScopeFlag
 Convenience class for automatically setting and unsetting an atomic boolean based on the object's scope. Useful e.g. for indicating whether a thread is running or not. More...
 

Namespaces

 mrs_lib
 All mrs_lib functions, classes, variables and definitions are contained in this namespace.
 

Functions

template<typename Iterator >
std::string mrs_lib::containerToString (const Iterator begin, const Iterator end, const std::string &delimiter=", ")
 Convenience function for converting container ranges to strings (e.g. for printing). More...
 
template<typename Iterator >
std::string mrs_lib::containerToString (const Iterator begin, const Iterator end, const char *delimiter)
 Convenience function for converting container ranges to strings (e.g. for printing). More...
 
template<typename Container >
std::string mrs_lib::containerToString (const Container &cont, const std::string &delimiter=", ")
 Convenience function for converting containers to strings (e.g. for printing). More...
 
template<typename Container >
std::string mrs_lib::containerToString (const Container &cont, const char *delimiter=", ")
 Convenience function for converting containers to strings (e.g. for printing). More...
 
template<typename T >
T::iterator mrs_lib::remove_const (const typename T::const_iterator &it, T &cont)
 Convenience class for removing const-ness from a container iterator. More...
 
template<typename T >
int mrs_lib::signum (T val)
 

Detailed Description