aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/objects/namedobject.cpp
blob: e2506a5993a5f7dd4e1550fd4eee5b58f668800b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "namedobject.h"

namespace vespalib {

IMPLEMENT_IDENTIFIABLE_NS(vespalib, NamedObject, Identifiable);

static FieldBase _G_nameField("name");

Serializer & NamedObject::onSerialize(Serializer & os) const
{
    return os.put(_G_nameField, _name);
}

Deserializer & NamedObject::onDeserialize(Deserializer & is)
{
    return is.get(_G_nameField, _name);
}

}