Kea: isc::dns::rdata::ch::A Class Reference

| Kea 3.2.0-git

isc::dns::rdata::ch::A Class Reference

`#include <rdataclass.h>`

Inheritance diagram for isc::dns::rdata::ch::A:
[legend]

## Public Member Functions
| A (const A &other)
| A (const std::string &type_str)
| A (isc::util::InputBuffer &buffer, size_t rdata_len)
| A (MasterLexer &lexer, const Name *name, MasterLoader::Options options, MasterLoaderCallbacks &callbacks)
virtual int | compare (const Rdata &other) const
| Compare two instances of `Rdata`.
virtual std::string | toText () const
| Convert an `Rdata` to a string.
virtual void | toWire (AbstractMessageRenderer &renderer) const
| Render the `Rdata` in the wire format into a `MessageRenderer` object.
virtual void | toWire (isc::util::OutputBuffer &buffer) const
| Render the `Rdata` in the wire format into a buffer.
Public Member Functions inherited from isc::dns::rdata::Rdata
virtual uint16_t | getLength () const
| Get the wire format length of an Rdata.
virtual | ~Rdata ()
| The destructor.

## Additional Inherited Members
| Rdata ()
| The default constructor.

## Detailed Description

Definition at line 167 of file rdataclass.h.

## Constructor & Destructor Documentation

## ◆ A() [1/4]

isc::dns::rdata::ch::A::A | ( | const std::string & | type_str | ) |
| explicit

Referenced by A().

## ◆ A() [2/4]

isc::dns::rdata::ch::A::A | ( | isc::util::InputBuffer & | buffer,
|  | size_t | rdata_len )

## ◆ A() [3/4]

isc::dns::rdata::ch::A::A | ( | const A & | other | ) |

References A().

Here is the call graph for this function:

## ◆ A() [4/4]

isc::dns::rdata::ch::A::A | ( | MasterLexer & | lexer,
|  | const Name * | name,
|  | MasterLoader::Options | options,
|  | MasterLoaderCallbacks & | callbacks )

## Member Function Documentation

## ◆ compare()

virtual int isc::dns::rdata::ch::A::compare | ( | const Rdata & | other | ) | const
| virtual

Compare two instances of `Rdata`.

This method compares `this` and the `other` Rdata objects in terms of the DNSSEC sorting order as defined in RFC4034, and returns the result as an integer.

This is a pure virtual method without the definition; the actual comparison logic is specific to each derived concrete class and should be explicitly defined in the derived class.

Specific implementations of this method must confirm that `this` and the `other` are objects of the same concrete derived class of `Rdata`. This is normally done by `dynamic_cast` in the implementation. It also means if the assumption isn't met an exception of class `std::bad_cast` will be thrown.

Here is an implementation choice: instead of relying on `dynamic_cast`, we could first convert the data into wire-format and compare the pair as opaque data. This would be more polymorphic, but might involve significant overhead, especially for a large size of RDATA.

Parameters

  other | the right-hand operand to compare against.

Returns
  < 0 if `this` would be sorted before `other`.
  0 if `this` is identical to `other` in terms of sorting order.
  > 0 if `this` would be sorted after `other`.

Implements isc::dns::rdata::Rdata.

References isc::dns::rdata::Rdata::Rdata().

Here is the call graph for this function:

## ◆ toText()

virtual std::string isc::dns::rdata::ch::A::toText | ( |  | ) | const
| virtual

Convert an `Rdata` to a string.

This method returns a `std::string` object representing the `Rdata`.

This is a pure virtual method without the definition; the actual representation is specific to each derived concrete class and should be explicitly defined in the derived class.

Returns
  A string representation of `Rdata`.

Implements isc::dns::rdata::Rdata.

## ◆ toWire() [1/2]

virtual void isc::dns::rdata::ch::A::toWire | ( | AbstractMessageRenderer & | renderer | ) | const
| virtual

Render the `Rdata` in the wire format into a `MessageRenderer` object.

This is a pure virtual method without the definition; the actual conversion is specific to each derived concrete class and should be explicitly defined in the derived class.

Parameters

  renderer | DNS message rendering context that encapsulates the output buffer in which the `Rdata` is to be stored.

Implements isc::dns::rdata::Rdata.

## ◆ toWire() [2/2]

virtual void isc::dns::rdata::ch::A::toWire | ( | isc::util::OutputBuffer & | buff | ) | const
| virtual

Render the `Rdata` in the wire format into a buffer.

This is a pure virtual method without the definition; the actual conversion is specific to each derived concrete class and should be explicitly defined in the derived class.

Parameters

  buff | An output buffer to store the wire data.

Implements isc::dns::rdata::Rdata.

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

- rdataclass.h