Kea 2.5.7
server_tag.h
Go to the documentation of this file.
1// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef SERVER_TAG_H
8#define SERVER_TAG_H
9
10#include <string>
11
12namespace isc {
13namespace data {
14
25class ServerTag {
26public:
27
29 static std::string ALL;
30
34 ServerTag();
35
40 explicit ServerTag(const std::string& tag);
41
46 bool amAll() const;
47
51 std::string get() const {
52 return (tag_);
53 }
54
59 bool operator<(const ServerTag& other) const {
60 return (tag_ < other.tag_);
61 }
62
63private:
64
66 std::string tag_;
67};
68
76std::ostream&
77operator<<(std::ostream& os, const ServerTag& server_tag);
78
79} // end of namespace isc::data
80} // end of namespace isc
81
82#endif // SERVER_TAG_H
Represents a server tag.
Definition: server_tag.h:25
static std::string ALL
Server tag for all servers as text.
Definition: server_tag.h:29
bool operator<(const ServerTag &other) const
Overload of the less operator for using ServerTag in sets.
Definition: server_tag.h:59
bool amAll() const
Checks if the server tag is set to "all servers".
Definition: server_tag.cc:42
std::string get() const
Returns server tag as string.
Definition: server_tag.h:51
ServerTag()
Default constructor.
Definition: server_tag.cc:19
std::ostream & operator<<(std::ostream &out, const Element::Position &pos)
Insert Element::Position as a string into stream.
Definition: data.cc:48
Defines the logger used by the top-level component of kea-lfc.