#include <source/ariba/utility/vtypes/detail/vint_small.hpp>
Public Member Functions | |
finline | vint_small () |
finline | vint_small (const type &value) |
finline | vint_small (const char *text, int base=10) |
template<class T> | |
finline void | convert_to (T &v, if_integral(T)) const |
finline std::string | to_string (int base=10, int str_size=0, char str_fill= '0') const |
std::string | to_debug_string (int base=10, int str_size=0, char str_fill= '0') const |
finline bool | get_bit (size_t index) const |
finline void | set_bit (size_t index, bool v) |
finline void | set_subint (_self &v, size_t index) |
finline void | set_subint (uintmax_t v, size_t index) |
finline _self | get_subint (size_t index, size_t length) const |
finline uintmax_t | get_subint (size_t index) const |
template<typename T> | |
finline void | assign (const T &v, if_integral(T)) |
finline void | assign (const std::string &text, int base=10) |
finline int | compare_to (const _self &v) const |
template<class T> | |
finline int | compare_to (const T &v, if_integral(T)) const |
template<class T> | |
finline void | add (const T &rhs, if_integral(T)) |
finline void | add (const _self &rhs) |
template<class T> | |
finline void | sub (const T &rhs, if_integral(T)) |
finline void | sub (const _self &rhs) |
template<class T> | |
finline void | mul (const T &rhs, if_integral(T)) |
finline void | mul (const _self &rhs) |
finline void | mul (_self &res_l, _self &res_h, _self &rhs) |
template<class T> | |
finline void | mod (const T &rhs, if_integral(T)) |
finline void | mod (const _self &rhs) |
finline void | mod (_self &res, const _self &rhs) |
template<class T> | |
finline void | mod (T &res, const T &rhs, if_integral(T)) const |
template<class T> | |
finline void | div (const T &rhs, if_integral(T)) |
finline void | div (const _self &rhs) |
finline void | div (_self &res, const _self &rhs) |
template<class T> | |
finline void | divrem (_self &res_div, _self &res_rem, const T &rhs, if_integral(T)) |
finline void | divrem (_self &res_rem, const _self &rhs) |
finline void | divrem (_self &res_div, _self &res_rem, const _self &rhs) |
template<class T> | |
finline void | divrem (_self &res_div, T &res_rem, const T &rhs, if_integral(T)) |
finline uintmax_t | log2 () const |
finline void | or_ (const _self &rhs) |
finline void | and_ (const _self &rhs) |
finline void | xor_ (const _self &rhs) |
finline void | complement () |
finline void | lshift (size_t steps) |
finline void | rshift (size_t steps) |
finline size_t | length () const |
finline void | set_length (size_t length) |
finline bool | is_unspecified () |
finline _self | max () const |
finline _self | min () const |
finline _self | zero () const |
Private Types | |
typedef if_< bool_<(__length > 16 &&__length<=32)>, typename if_< bool_< __sign > , boost::int32_t, boost::uint32_t >::type, typename if_< bool_<(__length > 8 &&__length<=16)>, typename if_< bool_< __sign > , boost::int16_t, boost::uint16_t >::type, typename if_< bool_<(__length > 0 &&__length<=8)>, typename if_< bool_< __sign > , boost::int8_t, boost::uint8_t >::type, void > ::type >::type >::type | type |
typedef vint_small< __length, __sign > | _self |
Private Member Functions | |
finline void | trim () |
Private Attributes | |
type | value |
Friends | |
std::ostream & | operator (std::ostream &, const vint_small< __length, __sign > &) |
SIGNED values are currently unsupported!!!
Sebastian Mies
Definition at line 70 of file vint_small.hpp.
typedef if_< bool_<(__length> 16 && __length <= 32)>, typename if_<bool_<__sign>, boost::int32_t, boost::uint32_t>::type, typename if_< bool_<(__length> 8 && __length <= 16)>, typename if_<bool_<__sign>, boost::int16_t, boost::uint16_t>::type, typename if_< bool_<(__length> 0 && __length <= 8)>, typename if_<bool_<__sign>, boost::int8_t, boost::uint8_t>::type, void>::type>::type>::type _vint::detail::vint_small< __length, __sign >::type [private] |
Definition at line 100 of file vint_small.hpp.
typedef vint_small<__length,__sign> _vint::detail::vint_small< __length, __sign >::_self [private] |
Definition at line 111 of file vint_small.hpp.
finline _vint::detail::vint_small< __length, __sign >::vint_small | ( | ) | [inline] |
Definition at line 113 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline _vint::detail::vint_small< __length, __sign >::vint_small | ( | const type & | value | ) | [inline] |
Definition at line 117 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim().
finline _vint::detail::vint_small< __length, __sign >::vint_small | ( | const char * | text, | |
int | base = 10 | |||
) | [inline] |
Definition at line 122 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::assign().
finline void _vint::detail::vint_small< __length, __sign >::trim | ( | ) | [inline, private] |
Definition at line 106 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
Referenced by _vint::detail::vint_small< __length, __sign >::add(), _vint::detail::vint_small< __length, __sign >::complement(), _vint::detail::vint_small< __length, __sign >::div(), _vint::detail::vint_small< __length, __sign >::lshift(), _vint::detail::vint_small< __length, __sign >::mod(), _vint::detail::vint_small< __length, __sign >::mul(), _vint::detail::vint_small< __length, __sign >::rshift(), _vint::detail::vint_small< __length, __sign >::sub(), and _vint::detail::vint_small< __length, __sign >::vint_small().
finline void _vint::detail::vint_small< __length, __sign >::convert_to | ( | T & | v, | |
if_integral(T) | ||||
) | const [inline] |
Definition at line 129 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline std::string _vint::detail::vint_small< __length, __sign >::to_string | ( | int | base = 10 , |
|
int | str_size = 0 , |
|||
char | str_fill = '0' | |||
) | const [inline] |
Definition at line 133 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
Referenced by operator<<(), and _vint::detail::vint_small< __length, __sign >::to_debug_string().
std::string _vint::detail::vint_small< __length, __sign >::to_debug_string | ( | int | base = 10 , |
|
int | str_size = 0 , |
|||
char | str_fill = '0' | |||
) | const [inline] |
Definition at line 180 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::to_string().
finline bool _vint::detail::vint_small< __length, __sign >::get_bit | ( | size_t | index | ) | const [inline] |
Definition at line 192 of file vint_small.hpp.
finline void _vint::detail::vint_small< __length, __sign >::set_bit | ( | size_t | index, | |
bool | v | |||
) | [inline] |
Definition at line 196 of file vint_small.hpp.
finline void _vint::detail::vint_small< __length, __sign >::set_subint | ( | _self & | v, | |
size_t | index | |||
) | [inline] |
Definition at line 199 of file vint_small.hpp.
finline void _vint::detail::vint_small< __length, __sign >::set_subint | ( | uintmax_t | v, | |
size_t | index | |||
) | [inline] |
Definition at line 202 of file vint_small.hpp.
finline _self _vint::detail::vint_small< __length, __sign >::get_subint | ( | size_t | index, | |
size_t | length | |||
) | const [inline] |
Definition at line 205 of file vint_small.hpp.
finline uintmax_t _vint::detail::vint_small< __length, __sign >::get_subint | ( | size_t | index | ) | const [inline] |
Definition at line 208 of file vint_small.hpp.
finline void _vint::detail::vint_small< __length, __sign >::assign | ( | const T & | v, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 215 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
Referenced by _vint::detail::vint_small< __length, __sign >::vint_small().
finline void _vint::detail::vint_small< __length, __sign >::assign | ( | const std::string & | text, | |
int | base = 10 | |||
) | [inline] |
Definition at line 219 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline int _vint::detail::vint_small< __length, __sign >::compare_to | ( | const _self & | v | ) | const [inline] |
Definition at line 227 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline int _vint::detail::vint_small< __length, __sign >::compare_to | ( | const T & | v, | |
if_integral(T) | ||||
) | const [inline] |
Definition at line 232 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::add | ( | const T & | rhs, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 240 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::add | ( | const _self & | rhs | ) | [inline] |
Definition at line 244 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::sub | ( | const T & | rhs, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 250 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::sub | ( | const _self & | rhs | ) | [inline] |
Definition at line 254 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mul | ( | const T & | rhs, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 260 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mul | ( | const _self & | rhs | ) | [inline] |
Definition at line 264 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mul | ( | _self & | res_l, | |
_self & | res_h, | |||
_self & | rhs | |||
) | [inline] |
Definition at line 268 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mod | ( | const T & | rhs, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 275 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mod | ( | const _self & | rhs | ) | [inline] |
Definition at line 279 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mod | ( | _self & | res, | |
const _self & | rhs | |||
) | [inline] |
Definition at line 283 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::mod | ( | T & | res, | |
const T & | rhs, | |||
if_integral(T) | ||||
) | const [inline] |
Definition at line 289 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::div | ( | const T & | rhs, | |
if_integral(T) | ||||
) | [inline] |
Definition at line 295 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::div | ( | const _self & | rhs | ) | [inline] |
Definition at line 299 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::div | ( | _self & | res, | |
const _self & | rhs | |||
) | [inline] |
Definition at line 303 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::divrem | ( | _self & | res_div, | |
_self & | res_rem, | |||
const T & | rhs, | |||
if_integral(T) | ||||
) | [inline] |
Definition at line 309 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::divrem | ( | _self & | res_rem, | |
const _self & | rhs | |||
) | [inline] |
Definition at line 314 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::divrem | ( | _self & | res_div, | |
_self & | res_rem, | |||
const _self & | rhs | |||
) | [inline] |
Definition at line 319 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::divrem | ( | _self & | res_div, | |
T & | res_rem, | |||
const T & | rhs, | |||
if_integral(T) | ||||
) | [inline] |
Definition at line 326 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline uintmax_t _vint::detail::vint_small< __length, __sign >::log2 | ( | ) | const [inline] |
Definition at line 332 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::or_ | ( | const _self & | rhs | ) | [inline] |
Definition at line 338 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::and_ | ( | const _self & | rhs | ) | [inline] |
Definition at line 339 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::xor_ | ( | const _self & | rhs | ) | [inline] |
Definition at line 340 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::complement | ( | ) | [inline] |
Definition at line 341 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::lshift | ( | size_t | steps | ) | [inline] |
Definition at line 342 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline void _vint::detail::vint_small< __length, __sign >::rshift | ( | size_t | steps | ) | [inline] |
Definition at line 343 of file vint_small.hpp.
References _vint::detail::vint_small< __length, __sign >::trim(), and _vint::detail::vint_small< __length, __sign >::value.
finline size_t _vint::detail::vint_small< __length, __sign >::length | ( | ) | const [inline] |
Definition at line 351 of file vint_small.hpp.
finline void _vint::detail::vint_small< __length, __sign >::set_length | ( | size_t | length | ) | [inline] |
Definition at line 352 of file vint_small.hpp.
finline bool _vint::detail::vint_small< __length, __sign >::is_unspecified | ( | ) | [inline] |
Definition at line 353 of file vint_small.hpp.
finline _self _vint::detail::vint_small< __length, __sign >::max | ( | ) | const [inline] |
Definition at line 355 of file vint_small.hpp.
finline _self _vint::detail::vint_small< __length, __sign >::min | ( | ) | const [inline] |
Definition at line 356 of file vint_small.hpp.
finline _self _vint::detail::vint_small< __length, __sign >::zero | ( | ) | const [inline] |
Definition at line 357 of file vint_small.hpp.
std::ostream& operator | ( | std::ostream & | , | |
const vint_small< __length, __sign > & | ||||
) | [friend] |
type _vint::detail::vint_small< __length, __sign >::value [private] |
Definition at line 103 of file vint_small.hpp.
Referenced by _vint::detail::vint_small< __length, __sign >::add(), _vint::detail::vint_small< __length, __sign >::and_(), _vint::detail::vint_small< __length, __sign >::assign(), _vint::detail::vint_small< __length, __sign >::compare_to(), _vint::detail::vint_small< __length, __sign >::complement(), _vint::detail::vint_small< __length, __sign >::convert_to(), _vint::detail::vint_small< __length, __sign >::div(), _vint::detail::vint_small< __length, __sign >::divrem(), _vint::detail::vint_small< __length, __sign >::log2(), _vint::detail::vint_small< __length, __sign >::lshift(), _vint::detail::vint_small< __length, __sign >::mod(), _vint::detail::vint_small< __length, __sign >::mul(), _vint::detail::vint_small< __length, __sign >::or_(), _vint::detail::vint_small< __length, __sign >::rshift(), _vint::detail::vint_small< __length, __sign >::sub(), _vint::detail::vint_small< __length, __sign >::to_string(), _vint::detail::vint_small< __length, __sign >::trim(), _vint::detail::vint_small< __length, __sign >::vint_small(), and _vint::detail::vint_small< __length, __sign >::xor_().