9 static const char rcsid[] __attribute__((used)) =
"$Id: Null.cpp 1702 2016-08-13 23:26:06Z sella $";
12 #include "../util/CommonMacro.h"
14 using namespace sella::variant;
16 Null::Null() throw () :
Nullable() { }
20 Null& Null::operator=(
const Null &other)
throw () {
24 Null::~Null() throw () { }
29 c = mpack.append(offset);
33 if (UNLIKELY(c == 0)) {
34 THROW(TypeCastException,
"Failed to append null at offset %d (buffer length: %d)", offset, mpack.length());
38 void Null::msgpackBufferSize(
size_t &size)
const throw () {
42 std::string Null::str(
int type)
const throw () {
52 output =
"<root null=\"true\" />";
63 bool Null::isType(
const char *value,
size_t size)
throw () {
64 return (size == 4 && strncmp(value,
"null", size) == 0);