|
Click
|
Parser class for integers with explicit bounds. More...
#include <args.hh>
Public Member Functions | |
| template<typename T > | |
| BoundedIntArg (T min_value, T max_value, int b=0) | |
| template<typename V > | |
| bool | parse (const String &str, V &result, const ArgContext &args=blank_args) |
| bool | check_min (click_int_large_t x) const |
| bool | check_min (click_uint_large_t x) const |
| bool | check_max (click_int_large_t x) const |
| bool | check_max (click_uint_large_t x) const |
Public Member Functions inherited from IntArg | |
| IntArg (int b=0) | |
| const char * | parse (const char *begin, const char *end, bool is_signed, int size, limb_type *value, int nlimb) |
| template<typename V > | |
| bool | parse_saturating (const String &str, V &result, const ArgContext &args=blank_args) |
| template<typename V > | |
| String | unparse (const V &v) |
| template<typename V > | |
| bool | parse (const String &str, V &result, const ArgContext &args=blank_args) |
Public Attributes | |
| click_intmax_t | min_value |
| click_intmax_t | max_value |
| bool | is_signed |
Public Attributes inherited from IntArg | |
| int | base |
| int | status |
Additional Inherited Members | |
Public Types inherited from IntArg | |
| typedef uint32_t | limb_type |
Public Types inherited from NumArg | |
| enum | { status_ok = 0 , status_inval = EINVAL , status_range = ERANGE , status_notsup , status_unitless } |
Protected Member Functions inherited from IntArg | |
| void | range_error (const ArgContext &args, bool is_signed, click_int_large_t value) |
Static Protected Member Functions inherited from IntArg | |
| static const char * | span (const char *begin, const char *end, bool is_signed, int &b) |
Parser class for integers with explicit bounds.
BoundedIntArg(min, max, base) is like IntArg(base), but numbers less than min or greater than max are treated as errors.