aboutsummaryrefslogtreecommitdiffstats
path: root/config/src/vespa/config/common/vespa_version.h
blob: 0ed9233f677153a7d55e070d5cfba1250e7e3449 (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
24
25
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/stllike/string.h>

namespace config {

/**
 * Represents a version used in config protocol
 **/
struct VespaVersion
{
public:
    static VespaVersion fromString(const vespalib::string & versionString);
    static const VespaVersion & getCurrentVersion();
    VespaVersion(const VespaVersion & version);
    VespaVersion &operator=(const VespaVersion &rhs);
    const vespalib::string & toString() const;
private:
    VespaVersion(const vespalib::string & versionString);
    vespalib::string _versionString;
};

} // namespace config