9 #ifndef __libutilxx__sella__variant__Nullable_H__
10 #define __libutilxx__sella__variant__Nullable_H__
12 #include "../../common.h"
13 #include "TypeCastException.h"
14 #include "UnsupportedOperatorException.h"
15 #include "../util/MessagePack.h"
20 #include <boost/regex.hpp>
33 typedef std::shared_ptr<Nullable> shared;
35 static const int Type = 0x00;
37 const static int JSON = 0x00;
38 const static int CJSON = 0x01;
39 const static int MSGPACK = 0x02;
40 const static int XML = 0x03;
41 const static int CSV = 0x04;
46 Nullable(std::shared_ptr<void> &value)
throw ();
47 Nullable(std::shared_ptr<void> &&value)
throw ();
56 virtual void shrink_to_fit()
throw ();
57 virtual std::string str(
int type)
const throw () = 0;
58 virtual int getType(
void)
throw () = 0;
60 virtual void msgpackBufferSize(
size_t &size)
const throw () = 0;
62 bool isNull()
const throw ();
65 std::vector<std::string> tokenize(
const std::string &value,
const boost::regex &pattern)
const throw (TypeCastException);
67 std::shared_ptr<void> value;