9 #ifndef __libutilxx__sella__variant__String_H__
10 #define __libutilxx__sella__variant__String_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(
"^\".*\"$");
return regex; }
29 static const int Type = 0x06;
34 String(
const std::string &value)
throw ();
35 String(std::string &&value)
throw ();
39 virtual ~
String()
throw ();
42 bool operator==(
const String &other)
const throw ();
43 bool operator!=(
const String &other)
const throw ();
44 bool operator>(
const String &other)
const throw ();
45 bool operator<(
const String &other)
const throw ();
48 String& operator=(
const std::string &other)
throw ();
49 String& operator=(
const char *other)
throw ();
50 String& operator+=(
const std::string &value)
throw ();
53 const std::string&
get()
const throw (UnsupportedOperatorException);
54 std::string&
get()
throw (UnsupportedOperatorException);
56 size_t size()
const throw ();
57 bool empty()
const throw ();
60 virtual void shrink_to_fit()
throw ();
62 virtual void msgpackBufferSize(
size_t &size)
const throw ();
63 virtual std::string str(
int type)
const throw ();
64 virtual int getType(
void)
throw () {
return Type; }
66 static bool isType(
const std::string &value)
throw () {
return isType(value.c_str(), value.size()); }
67 static bool isType(
const char *value,
size_t size)
throw ();