Bites
A small library of miscellaneous C++ codes.
 All Classes Namespaces Functions Friends Pages
Classes | Functions
bites Namespace Reference

Classes

class  Averager
 
class  ConcurrentQueue
 
class  Config
 
class  Mutexed
 
class  MutexedCounter
 
class  RateTicker
 
class  SortedList
 
class  Thread
 

Functions

std::string time2string (const std::chrono::time_point< std::chrono::high_resolution_clock > &given_time, const std::string &format)
 
std::vector< std::string > time2levels (const std::chrono::time_point< std::chrono::high_resolution_clock > &)
 
boost::filesystem::path time2dir (const std::chrono::time_point< std::chrono::high_resolution_clock > &)
 
std::ostream & operator<< (std::ostream &out, const Config &config)
 

Detailed Description

Various "string" related functions. Conversions from Date/Time to filesystem paths.

Averager class implementation.

Config class implementation.

RateTicker class implementation.

String utilities.

Function Documentation

std::string bites::time2string ( const std::chrono::time_point< std::chrono::high_resolution_clock > &  given_time,
const std::string &  format 
)

Given the time point and format string, return a formatted string. Supports the f conversion specifier for microseconds.

std::vector< std::string > bites::time2levels ( const std::chrono::time_point< std::chrono::high_resolution_clock > &  given_time)

Given the time point, return a vector of directory levels (as strings).

For example, given "2013-09-08 13:01:44", return {'2013', '09', '08', '13', '01'}.

boost::filesystem::path bites::time2dir ( const std::chrono::time_point< std::chrono::high_resolution_clock > &  given_time)

Given the time point, return a filesystem path assembled from time2levels().

std::ostream& bites::operator<< ( std::ostream &  out,
const Config &  config 
)

Dump configuration to stream.

Parameters
outoutput destination stream.
configthe configuration whose contents are dumped.