Kea 2.2.0
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
16namespace isc {
17namespace dns {
18
45class RRCollator : boost::noncopyable {
46public:
54 typedef std::function<void(const RRsetPtr& rrset)> AddRRsetCallback;
55
63 RRCollator(const AddRRsetCallback& callback);
64
77
91 void flush();
92
113
114private:
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:
A converter from a stream of RRs to a stream of collated RRsets.
Definition: rrcollator.h:45
~RRCollator()
Destructor.
Definition: rrcollator.cc:86
AddRRCallback getCallback()
Return MasterLoader compatible callback.
Definition: rrcollator.cc:91
void flush()
Call the callback on the remaining RRset, if any.
Definition: rrcollator.cc:97
std::function< void(const RRsetPtr &rrset)> AddRRsetCallback
Callback functor type for RRCollator.
Definition: rrcollator.h:54
RRCollator(const AddRRsetCallback &callback)
Constructor.
Definition: rrcollator.cc:82
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
Definition: rrset.h:47
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.
Defines the logger used by the top-level component of kea-lfc.