aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/common/doctypename.h
blob: f0e3efbc5a1e17d4e591115ea9ce8c2f0398e17b (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
26
27
28
29
30
31
// 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 search::engine { class Request; }
namespace document { class DocumentType; }

namespace proton {

class DocTypeName
{
    vespalib::string _name;

public:
    explicit DocTypeName(const vespalib::string &name) noexcept : _name(name) { }
    explicit DocTypeName(const search::engine::Request &request) noexcept;
    explicit DocTypeName(const document::DocumentType &docType) noexcept;

    const vespalib::string & getName() const { return _name; }

    bool operator<(const DocTypeName &rhs) const {
        return _name < rhs._name;
    }

    vespalib::string toString() const { return _name; }
};


} // namespace proton