Kea  1.9.9-git
stamped_element.h
Go to the documentation of this file.
1 // Copyright (C) 2018-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 STAMPED_ELEMENT_H
8 #define STAMPED_ELEMENT_H
9 
11 #include <cc/server_tag.h>
12 #include <set>
13 
14 namespace isc {
15 namespace data {
16 
35 public:
36 
41 
46  void setServerTag(const std::string& server_tag) {
47  server_tags_.insert(ServerTag(server_tag));
48  }
49 
56  void delServerTag(const std::string& server_tag);
57 
61  std::set<ServerTag> getServerTags() const {
62  return (server_tags_);
63  }
64 
69  bool hasServerTag(const ServerTag& server_tag) const;
70 
74  bool hasAllServerTag() const;
75 
81 
82 private:
83 
85  std::set<ServerTag> server_tags_;
86 };
87 
88 } // end of namespace isc::data
89 } // end of namespace isc
90 
91 #endif
void delServerTag(const std::string &server_tag)
Deletes server tag.
This class represents configuration element which is associated with database identifier, modification timestamp and servers.
boost::shared_ptr< Element > ElementPtr
Definition: data.h:20
Represents a server tag.
Definition: server_tag.h:25
bool hasServerTag(const ServerTag &server_tag) const
Checks if the element has the given server tag.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void setServerTag(const std::string &server_tag)
Adds new server tag.
This class represents configuration element which is associated with database identifier and the modi...
std::set< ServerTag > getServerTags() const
Returns server tags.
isc::data::ElementPtr getMetadata() const
Returns an object representing metadata to be returned with objects from the configuration backend...
bool hasAllServerTag() const
Checks if the element has 'all' server tag.