MarlinMT  0.1.0
marlinmt::details Namespace Reference

Classes

struct  convert
 
struct  convert< bool >
 
struct  convert< std::string >
 
struct  convert< std::vector< std::string > >
 
struct  convert< std::vector< T > >
 
struct  type_info
 
struct  type_info< bool >
 
struct  type_info< char >
 
struct  type_info< double >
 
struct  type_info< float >
 
struct  type_info< int >
 
struct  type_info< short >
 
struct  type_info< std::nullptr_t >
 
struct  type_info< std::string >
 
struct  type_info< std::vector< bool > >
 
struct  type_info< std::vector< char > >
 
struct  type_info< std::vector< double > >
 
struct  type_info< std::vector< float > >
 
struct  type_info< std::vector< int > >
 
struct  type_info< std::vector< short > >
 
struct  type_info< std::vector< std::string > >
 
struct  type_info< std::vector< unsigned int > >
 
struct  type_info< unsigned int >
 

Functions

template<typename T >
std::vector< T > split_string (const std::string &str, const std::string &delimiter, size_t maxTokens=std::numeric_limits< std::size_t >::max())
 
template<>
std::vector< std::string > split_string (const std::string &str, const std::string &delimiter, size_t maxTokens)
 
template<typename K , typename V >
std::vector< K > keys (const std::map< K, V > &m)
 
template<typename K , typename V >
std::vector< K > keys (const std::unordered_map< K, V > &m)
 
template<typename K , typename V >
std::vector< K > keys (const std::vector< std::pair< K, V >> &m)
 
bool is_number (const std::string &str)
 
unsigned int nthreads (const std::string &str)
 
void to_lower (std::string &str)
 
template<typename T >
getenv (const std::string &var)
 
template<typename T >
getenv (const std::string &var, const T &defVal)
 
void print_banner (std::ostream &out)
 

Function Documentation

◆ getenv() [1/2]

template<typename T >
T marlinmt::details::getenv ( const std::string &  var)
inline

Definition at line 599 of file Utils.h.

References marlinmt::details::convert< T >::from_string(), getenv(), and MARLINMT_THROW.

◆ getenv() [2/2]

template<typename T >
T marlinmt::details::getenv ( const std::string &  var,
const T &  defVal 
)
inline

Definition at line 610 of file Utils.h.

References marlinmt::details::convert< T >::from_string().

Referenced by getenv().

◆ is_number()

bool marlinmt::details::is_number ( const std::string &  str)
inline

Definition at line 574 of file Utils.h.

Referenced by nthreads().

◆ keys() [1/3]

template<typename K , typename V >
std::vector<K> marlinmt::details::keys ( const std::map< K, V > &  m)
inline

◆ keys() [2/3]

template<typename K , typename V >
std::vector<K> marlinmt::details::keys ( const std::unordered_map< K, V > &  m)
inline

Definition at line 551 of file Utils.h.

◆ keys() [3/3]

template<typename K , typename V >
std::vector<K> marlinmt::details::keys ( const std::vector< std::pair< K, V >> &  m)
inline

Definition at line 563 of file Utils.h.

◆ nthreads()

unsigned int marlinmt::details::nthreads ( const std::string &  str)
inline

◆ print_banner()

void marlinmt::details::print_banner ( std::ostream &  out)
inline

Definition at line 620 of file Utils.h.

References MARLINMT_RELEASE.

Referenced by marlinmt::Application::init().

◆ split_string() [1/2]

template<typename T >
std::vector<T> marlinmt::details::split_string ( const std::string &  str,
const std::string &  delimiter,
size_t  maxTokens = std::numeric_limits<std::size_t>::max() 
)
inline

Definition at line 487 of file Utils.h.

References MARLINMT_THROW.

◆ split_string() [2/2]

template<>
std::vector<std::string> marlinmt::details::split_string ( const std::string &  str,
const std::string &  delimiter,
size_t  maxTokens 
)
inline

Definition at line 513 of file Utils.h.

References MARLINMT_THROW.

◆ to_lower()

void marlinmt::details::to_lower ( std::string &  str)
inline

Definition at line 592 of file Utils.h.

Referenced by marlinmt::BookStoreManager::initialize().