27 RRClass::RRClass(
const std::string& class_str) {
29 if (!RRParamRegistry::getRegistry().textToClassCode(class_str, classcode)) {
31 "Unrecognized RR class string: " + class_str);
33 classcode_ = classcode;
44 RRClass::toText()
const {
45 return (RRParamRegistry::getRegistry().codeToClassText(classcode_));
59 RRClass::createFromText(
const string& class_str) {
61 if (RRParamRegistry::getRegistry().textToClassCode(class_str,
63 return (
new RRClass(class_code));
A standard DNS module exception that is thrown if an RRClass object is being constructed from a incom...
The RRClass class encapsulates DNS resource record classes.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the internal buffer in network byte order...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
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.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Defines the logger used by the top-level component of kea-dhcp-ddns.
ostream & operator<<(ostream &os, const RRClass &rrclass)
Insert the RRClass as a string into stream.
void writeUint16(uint16_t data)
Write an unsigned 16-bit integer in host byte order into the buffer in network byte order...