X-Git-Url: http://g0dil.de/git?p=senf.git;a=blobdiff_plain;f=senf%2FUtils%2FRestrictedInt.hh;fp=senf%2FUtils%2FRestrictedInt.hh;h=08714ac896dcccdbb67157a16dc1e149bfd421dd;hp=2bd50403e7bfab5320bdf44b5b4a1db8567bb457;hb=728c6fbeb525a2b48b927ebf17cc06ca943583b2;hpb=23a1bdee20b3fb19bd442efed8aa73b2bf0d585a diff --git a/senf/Utils/RestrictedInt.hh b/senf/Utils/RestrictedInt.hh index 2bd5040..08714ac 100644 --- a/senf/Utils/RestrictedInt.hh +++ b/senf/Utils/RestrictedInt.hh @@ -24,6 +24,7 @@ // // Contributor(s): // Stefan Bund +// Philipp Batroff /** \file \brief RestrictedInt public header */ @@ -104,6 +105,30 @@ namespace senf { bool boolean_test() const { return value_; } + RestrictedInt operator*(int i) const + { return RestrictedInt(value_ * i); } + + RestrictedInt operator/(int i) const + { return RestrictedInt(value_ / i); } + + bool operator>(int i) const + { return value_ > i; } + + bool operator>=(int i) const + { return value_ >= i; } + + bool operator<(int i) const + { return value_ < i; } + + bool operator<=(int i) const + { return value_ <= i; } + + bool operator==(int i) const + { return value_ == i; } + + bool operator!=(int i) const + { return value_ != i; } + private: Base value_; };