carl  24.04
Computer ARithmetic Library
settings_utils.h File Reference
#include <array>
#include <chrono>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for settings_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  carl::settings::duration
 Helper type to parse duration as std::chrono values with boost::program_options. More...
 
struct  carl::settings::binary_quantity
 Helper type to parse quantities with binary SI-style suffixes. More...
 
struct  carl::settings::metric_quantity
 Helper type to parse quantities with SI-style suffixes. More...
 

Namespaces

 carl
 carl is the main namespace for the library.
 
 carl::settings
 

Functions

template<typename Array >
std::pair< std::intmax_t, std::size_t > carl::settings::get_proper_suffix (std::intmax_t value, const Array &a)
 Helper method to obtain proper (unit) suffix entry from a value and a given set of possible suffixes. More...
 
std::ostream & carl::settings::operator<< (std::ostream &os, const duration &d)
 Streaming operator for duration. Auto-detects proper time suffix. More...
 
void carl::settings::validate (boost::any &v, const std::vector< std::string > &values, carl::settings::duration *, int)
 Custom validator for duration that wraps some std::chrono::duration. More...
 
constexpr bool carl::settings::operator== (binary_quantity lhs, binary_quantity rhs)
 Compare two binary quantities for equality. More...
 
constexpr bool carl::settings::operator< (binary_quantity lhs, binary_quantity rhs)
 Compare two binary quantities. More...
 
std::ostream & carl::settings::operator<< (std::ostream &os, const binary_quantity &q)
 Streaming operator for binary quantity. Auto-detects proper suffix. More...
 
void carl::settings::validate (boost::any &v, const std::vector< std::string > &values, carl::settings::binary_quantity *, int)
 Custom validator for binary quantities. More...
 
constexpr bool carl::settings::operator== (metric_quantity lhs, metric_quantity rhs)
 Compare two metric quantities for equality. More...
 
constexpr bool carl::settings::operator< (metric_quantity lhs, metric_quantity rhs)
 Compare two metric quantities. More...
 
std::ostream & carl::settings::operator<< (std::ostream &os, const metric_quantity &q)
 Streaming operator for metric quantity. Auto-detects proper suffix. More...
 
void carl::settings::validate (boost::any &v, const std::vector< std::string > &values, carl::settings::metric_quantity *, int)
 Custom validator for metric quantities. More...