24 #include <boost/optional.hpp>
42 class AbstractMessageRenderer;
104 explicit RRClass(uint16_t classcode) : classcode_(classcode) {}
135 explicit RRClass(
const std::string& class_str);
192 const std::string
toText()
const;
233 uint16_t
getCode()
const {
return (classcode_); }
254 {
return (classcode_ == other.classcode_); }
265 {
return (classcode_ != other.classcode_); }
285 {
return (classcode_ < other.classcode_); }
300 inline const RRClass&
ostream & operator<<(std::ostream &os, const EDNS &edns)
Insert the EDNS as a string into stream.
Base class for all sorts of text parse errors.
static const RRClass & CH()
static const RRClass & IN()
A standard DNS module exception that is thrown if an RRClass object is being constructed from a incom...
static const RRClass & HS()
uint16_t getCode() const
Returns the RR class code as a 16-bit unsigned integer.
static RRClass * createFromText(const std::string &class_str)
A separate factory of RRClass from text.
The RRClass class encapsulates DNS resource record classes.
bool operator==(const RRClass &other) const
Same as equals().
A standard DNS module exception that is thrown if an RRClass object is being constructed from an unre...
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
const std::string toText() const
Convert the RRClass to a string.
IncompleteRRClass(const char *file, size_t line, const char *what)
void toWire(AbstractMessageRenderer &renderer) const
Render the RRClass in the wire format.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static const RRClass & ANY()
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Defines the logger used by the top-level component of kea-dhcp-ddns.
InvalidRRClass(const char *file, size_t line, const char *what)
bool equals(const RRClass &other) const
Return true iff two RRClasses are equal.
static const RRClass & NONE()
RRClass(uint16_t classcode)
Constructor from an integer class code.
bool nequals(const RRClass &other) const
Return true iff two RRClasses are not equal.
bool operator!=(const RRClass &other) const
Same as nequals().
bool operator<(const RRClass &other) const
Less-than comparison for RRClass against other.