aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/objects/identifiable/namedobject.h
blob: a1fe7c7ba3daa962a46f364097bfc147962daa9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/objects/identifiable.h>
#include <string>

namespace vespalib
{

class NamedObject : public Identifiable
{
public:
    DECLARE_IDENTIFIABLE_NS(vespalib, NamedObject);
    DECLARE_NBO_SERIALIZE;
    NamedObject() : _name() { }
    NamedObject(const string & name) : _name(name) { }
    const string & getName() const { return _name; }
private:
    string _name;
};

}