powerd++  0.4.4
Namespaces | Functions
clas.hpp File Reference

Provides functions to process command line arguments. More...

#include "types.hpp"
#include "errors.hpp"
#include "utility.hpp"
#include <string>
#include <utility>
Include dependency graph for clas.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 clas
 A collection of functions to process command line arguments.
 

Functions

types::cptime_t clas::load (char const *const str)
 Convert string to load in the range [0, 1024]. More...
 
types::mhz_t clas::freq (char const *const str)
 Convert string to frequency in MHz. More...
 
types::ms clas::ival (char const *const str)
 Convert string to time interval in milliseconds. More...
 
size_t clas::samples (char const *const str)
 A string encoded number of samples. More...
 
types::decikelvin_t clas::temperature (char const *const str)
 Convert string to temperature in dK. More...
 
int clas::celsius (types::decikelvin_t const val)
 Converts dK into °C for display purposes. More...
 
template<typename T >
std::pair< T, T > clas::range (T(&func)(char const *const), char const *const str)
 Takes a string encoded range of values and returns them. More...
 
const char * clas::sysctlname (char const *const str)
 Verify that the given string only contains characters allowed in sysctl names. More...
 
template<typename ... CharTs>
const char * clas::formatfields (char const *const fmt, CharTs const ... fields)
 Sanitise user-provided formatting strings. More...
 

Detailed Description

Provides functions to process command line arguments.