21#include <boost/scoped_ptr.hpp>
34namespace ph = std::placeholders;
47 rrset->getName().compare(*origin);
51 <<
"/" << rrset->getClass() <<
": " << rrset->getName());
62template <
typename InputType>
64loadHelper(InputType input,
const Name& origin,
67 RRCollator rr_collator(std::bind(callbackWrapper, ph::_1, callback,
71 rr_collator.getCallback());
85 if ((filename == NULL) || (*filename ==
'\0')) {
89 loadHelper<const char*>(filename, origin, zone_class, callback);
96 loadHelper<istream&>(input, origin, zone_class, callback);
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
An exception that is thrown if an error occurs while loading a master zone data.
static MasterLoaderCallbacks getNullCallbacks()
Return a callbacks instance with null callbacks.
Error while loading by MasterLoader without specifying the MANY_ERRORS option.
A class able to load DNS master files.
This is a supplemental class used only as a return value of Name::compare() and LabelSequence::compar...
NameRelation getRelation() const
Returns the NameRelation of the comparison result.
The Name class encapsulates DNS names.
The RRClass class encapsulates DNS resource record classes.
A converter from a stream of RRs to a stream of collated RRsets.
static const RRType & SOA()
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
void masterLoad(const char *const filename, const Name &origin, const RRClass &zone_class, MasterLoadCallback callback)
Master zone file loader from a file.
boost::shared_ptr< AbstractRRset > RRsetPtr
A pointer-like type pointing to an RRset object.
std::function< void(RRsetPtr)> MasterLoadCallback
The type of the callback parameter of masterLoad().
Defines the logger used by the top-level component of kea-lfc.