9 #ifndef __libutilxx__sella__variant__Signed_H__
10 #define __libutilxx__sella__variant__Signed_H__
12 #include "../../common.h"
13 #include "TypeCastException.h"
18 #include <boost/regex.hpp>
28 static const boost::regex & Pattern(
void) {
static boost::regex regex(
"^[+-]?[0-9]+$");
return regex; }
29 static const int Type = 0x03;
33 Signed(
const std::string &value)
throw (TypeCastException);
34 Signed(int64_t value)
throw ();
37 virtual ~
Signed()
throw ();
40 bool operator==(
const Signed &other)
const throw ();
41 bool operator!=(
const Signed &other)
const throw ();
42 bool operator>(
const Signed &other)
const throw ();
43 bool operator<(
const Signed &other)
const throw ();
44 bool operator!()
throw ();
46 Signed& operator=(int64_t other)
throw ();
47 Signed& operator++()
throw ();
48 Signed& operator--()
throw ();
49 Signed& operator+=(int64_t value)
throw ();
50 Signed& operator-=(int64_t value)
throw ();
51 Signed& operator*=(int64_t value)
throw ();
52 Signed& operator/=(int64_t value)
throw ();
53 Signed& operator^=(int64_t value)
throw ();
54 Signed& operator%=(int64_t value)
throw ();
55 Signed& operator&=(int64_t value)
throw ();
56 Signed& operator|=(int64_t value)
throw ();
57 Signed& operator<<=(
int bits)
throw ();
58 Signed& operator>>=(
int bits)
throw ();
61 int64_t
get()
const throw (UnsupportedOperatorException);
64 virtual void msgpackBufferSize(
size_t &size)
const throw ();
65 virtual std::string str(
int type)
const throw ();
66 virtual int getType(
void)
throw () {
return Type; }
68 static bool isType(
const std::string &value)
throw () {
return isType(value.c_str(), value.size()); }
69 static bool isType(
const char *value,
size_t size)
throw ();