Kea: d2_zone.h Source File

| Kea 2.2.0

d2_zone.h
Go to the documentation of this file.
1// Copyright (C) 2013-2021 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 D2_ZONE_H
8#define D2_ZONE_H
9
10#include <dns/name.h>
11#include <dns/rrclass.h>
12
13#include <boost/shared_ptr.hpp>
14
15namespace isc {
16namespace d2 {
17
32 class D2Zone {
33public:
38 D2Zone(const dns::Name& name, const dns::RRClass& rrclass);
39
43
44
47 const dns::Name& getName() const { return (name_); }
48
52 const dns::RRClass& getClass() const { return (rrclass_); }
54
61 std::string toText() const;
62
66
67
73 bool operator==(const D2Zone& rhs) const {
74 return ((rrclass_ == rhs.rrclass_) && (name_ == rhs.name_));
75 }
76
83 bool operator!=(const D2Zone& rhs) const {
84 return (!operator==(rhs));
85 }
87
88private:
89 dns::Name name_;
90 dns::RRClass rrclass_;
91};
92
93 typedef boost::shared_ptr<D2Zone> D2ZonePtr;
94
104std::ostream& operator<<(std::ostream& os, const D2Zone& zone);
105
106} // namespace d2
107} // namespace isc
108
109#endif // D2_ZONE_H
isc::d2::D2Zone
The D2Zone encapsulates the Zone section in DNS Update message.
Definition: d2_zone.h:32
isc::d2::D2Zone::toText
std::string toText() const
Returns text representation of the Zone.
Definition: d2_zone.cc:18
isc::d2::D2Zone::operator!=
bool operator!=(const D2Zone &rhs) const
Inequality operator to compare D2Zone objects in query and response messages.
Definition: d2_zone.h:83
isc::d2::D2Zone::getClass
const dns::RRClass & getClass() const
Returns the Zone class.
Definition: d2_zone.h:52
isc::d2::D2Zone::operator==
bool operator==(const D2Zone &rhs) const
Equality operator to compare D2Zone objects in query and response messages.
Definition: d2_zone.h:73
isc::d2::D2Zone::getName
const dns::Name & getName() const
Returns the Zone name.
Definition: d2_zone.h:47
isc::d2::D2Zone::D2Zone
D2Zone(const dns::Name &name, const dns::RRClass &rrclass)
Constructor from Name and RRClass.
Definition: d2_zone.cc:14
isc::dns::Name
The Name class encapsulates DNS names.
Definition: name.h:223
isc::dns::RRClass
The RRClass class encapsulates DNS resource record classes.
Definition: rrclass.h:98
name.h
isc::d2::D2ZonePtr
boost::shared_ptr< D2Zone > D2ZonePtr
Definition: d2_zone.h:93
isc::d2::operator<<
std::ostream & operator<<(std::ostream &os, const D2Params &config)
Dumps the contents of a D2Params as text to an output stream.
Definition: d2_config.cc:120
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143
rrclass.h