blob: 746ecd4557d6177cba764f3feb53a5be6c137f5d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "serializer.h"
#include "identifiable.h"
namespace vespalib {
Serializer & Serializer::put(const IFieldBase & field, const Identifiable & value)
{
(void) field;
return value.serializeDirect(*this);
}
Serializer & Serializer::put(const IFieldBase & field, int8_t value) { return put(field, static_cast< uint8_t>(value)); }
Serializer & Serializer::put(const IFieldBase & field, int16_t value) { return put(field, static_cast<uint16_t>(value)); }
Serializer & Serializer::put(const IFieldBase & field, int32_t value) { return put(field, static_cast<uint32_t>(value)); }
Serializer & Serializer::put(const IFieldBase & field, int64_t value) { return put(field, static_cast<uint64_t>(value)); }
}
|