|
Click
|
Parser class for integers with saturating overflow. More...
#include <args.hh>
Public Member Functions | |
| SaturatingIntArg (int b=0) | |
| template<typename V > | |
| bool | parse (const String &str, V &result, const ArgContext &args=blank_args) |
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) |
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 } |
Public Attributes inherited from IntArg | |
| int | base |
| int | status |
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 saturating overflow.
SaturatingIntArg(base) is like IntArg(base), but integer overflow is not an error; instead, the closest representable value is returned.