aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/vespa/vespalib/objects/serializer.cpp
blob: 3c1e22e52ac2d7ad32cef6ec25ff4308597f3b18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright Yahoo. 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 Identifiable & value)
{
    return value.serializeDirect(*this);
}

Serializer & Serializer::put(int8_t value) { return put(static_cast< uint8_t>(value)); }
Serializer & Serializer::put(int16_t value) { return put(static_cast<uint16_t>(value)); }
Serializer & Serializer::put(int32_t value) { return put(static_cast<uint32_t>(value)); }
Serializer & Serializer::put(int64_t value) { return put(static_cast<uint64_t>(value)); }

}