Kea  1.9.9-git
rrcollator.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2020 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 RRCOLLATOR_H
8 #define RRCOLLATOR_H 1
9 
11 #include <dns/rrset.h>
12 
13 #include <boost/noncopyable.hpp>
14 #include <functional>
15 
16 namespace isc {
17 namespace dns {
18 
45 class RRCollator : boost::noncopyable {
46 public:
54  typedef std::function<void(const RRsetPtr& rrset)> AddRRsetCallback;
55 
63  RRCollator(const AddRRsetCallback& callback);
64 
76  ~RRCollator();
77 
91  void flush();
92 
113 
114 private:
115  class Impl;
116  Impl* impl_;
117 };
118 
119 } // namespace dns
120 } // namespace isc
121 #endif // RRCOLLATOR_H
122 
123 // Local Variables:
124 // mode: c++
125 // End:
std::function< void(const RRsetPtr &rrset)> AddRRsetCallback
Callback functor type for RRCollator.
Definition: rrcollator.h:54
A converter from a stream of RRs to a stream of collated RRsets.
Definition: rrcollator.h:45
RRCollator(const AddRRsetCallback &callback)
Constructor.
Definition: rrcollator.cc:82
~RRCollator()
Destructor.
Definition: rrcollator.cc:86
AddRRCallback getCallback()
Return MasterLoader compatible callback.
Definition: rrcollator.cc:91
Defines the logger used by the top-level component of kea-dhcp-ddns.
void flush()
Call the callback on the remaining RRset, if any.
Definition: rrcollator.cc:97
std::function< void(const Name &name, const RRClass &rrclass, const RRType &rrtype, const RRTTL &rrttl, const rdata::RdataPtr &rdata)> AddRRCallback
Type of callback to add a RR.