Kea  2.3.5-git
isc::dns::ZoneCheckerCallbacks Class Reference

Set of callbacks used in zone checks. More...

#include <zone_checker.h>

Public Types

typedef std::function< void(const std::string &reason)> IssueCallback
 Functor type of the callback on some issue (error or warning). More...
 

Public Member Functions

 ZoneCheckerCallbacks (const IssueCallback &error_callback, const IssueCallback &warn_callback)
 Constructor. More...
 
void error (const std::string &reason) const
 Call the callback for a critical error. More...
 
void warn (const std::string &reason) const
 Call the callback for a non critical issue. More...
 

Detailed Description

Set of callbacks used in zone checks.

Objects of this class are expected to be passed to checkZone().

Definition at line 21 of file zone_checker.h.

Member Typedef Documentation

◆ IssueCallback

typedef std::function<void(const std::string& reason)> isc::dns::ZoneCheckerCallbacks::IssueCallback

Functor type of the callback on some issue (error or warning).

Its parameter indicates the reason for the corresponding issue.

Definition at line 26 of file zone_checker.h.

Constructor & Destructor Documentation

◆ ZoneCheckerCallbacks()

isc::dns::ZoneCheckerCallbacks::ZoneCheckerCallbacks ( const IssueCallback error_callback,
const IssueCallback warn_callback 
)
inline

Constructor.

Either or both of the callbacks can be empty, in which case the corresponding callback will be effectively no-operation. This can be used, for example, when the caller of checkZone() is only interested in the final result. Note that a NULL pointer will be implicitly converted to an empty functor object, so passing NULL suffices.

Exceptions
none
Parameters
error_callbackCallback functor to be called on critical errors.
warn_callbackCallback functor to be called on non critical issues.

Definition at line 42 of file zone_checker.h.

Member Function Documentation

◆ error()

void isc::dns::ZoneCheckerCallbacks::error ( const std::string &  reason) const
inline

Call the callback for a critical error.

This method itself is exception free, but propagates any exception thrown from the callback.

Parameters
reasonTextual representation of the reason for the error.

Definition at line 53 of file zone_checker.h.

◆ warn()

void isc::dns::ZoneCheckerCallbacks::warn ( const std::string &  reason) const
inline

Call the callback for a non critical issue.

This method itself is exception free, but propagates any exception thrown from the callback.

Parameters
reasonTextual representation of the reason for the issue.

Definition at line 65 of file zone_checker.h.

References isc::dns::checkZone().

Referenced by isc::dns::checkZone().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: