Async 1.8.0
|
A CRTP class for adding some type dependent functions. More...
#include <AsyncDnsResourceRecord.h>
Public Types | |
using | List = std::vector<std::unique_ptr<Derived>> |
The type for a list of resource records. | |
![]() | |
enum class | Type { ANY , A , PTR , CNAME , SRV , A , PTR , CNAME , SRV } |
The record type. More... | |
enum class | Class { IN , IN } |
The record class. More... | |
enum class | Type { ANY , A , PTR , CNAME , SRV , A , PTR , CNAME , SRV } |
enum class | Class { IN , IN } |
using | Name = std::string |
using | Ttl = uint32_t |
using | List = std::vector<std::unique_ptr<DnsResourceRecord>> |
The type for a list of resource records. | |
Public Member Functions | |
DnsResourceRecordCRTP (const Name &name, Ttl ttl) | |
Constructor. | |
virtual DnsResourceRecord * | clone (void) const |
Clone this class. | |
virtual bool | operator== (const DnsResourceRecord &other) const |
Equality comparison operator. | |
virtual bool | operator== (const Derived &other) const =0 |
virtual const Type | type (void) const override |
The type of record. | |
![]() | |
DnsResourceRecord (const Name &name, Ttl ttl) | |
Constructor. | |
virtual | ~DnsResourceRecord (void) |
Destructor. | |
Class | classId (void) const |
The DNS class for the record. | |
const char * | classStr (void) const |
The DNS class for the record as a string. | |
const std::string & | typeStr (void) const |
The type of record as a string. | |
virtual std::string | toString (void) const |
The string representation of this record. | |
void | setName (const Name &name) |
Set the name for this record. | |
const Name & | name (void) const |
The name of this record. | |
void | setTtl (Ttl ttl) |
Set the TTL for this record. | |
Ttl | ttl (void) const |
The TTL for this record. | |
DnsResourceRecord (const std::string &name, uint32_t ttl) | |
Default constructor. | |
DnsResourceRecord (const DnsResourceRecord &)=delete | |
Disallow copy construction. | |
DnsResourceRecord & | operator= (const DnsResourceRecord &)=delete |
Disallow copy assignment. | |
virtual | ~DnsResourceRecord (void) |
Destructor. | |
Class | classId (void) const |
A_brief_member_function_description. | |
const char * | classStr (void) const |
const std::string & | typeStr (void) const |
virtual std::string | toString (void) const |
void | setName (const std::string &name) |
const std::string & | name (void) const |
void | setTtl (uint32_t ttl) |
uint32_t | ttl (void) const |
Additional Inherited Members | |
![]() | |
static const Type | staticType (void) |
The type for this specific class. | |
static const std::string & | typeToString (Type type) |
The type for this specific class represented as a string. | |
static const std::string & | typeToString (Type type) |
![]() | |
static constexpr Ttl | MAX_TTL = 0x7fffffff |
The maximum allowed value for a TTL. | |
A CRTP class for adding some type dependent functions.
All specific resource record classes inherit from this class to add some record type specific functions and types to each specific resource record class.
Definition at line 280 of file AsyncDnsResourceRecord.h.
using Async::DnsResourceRecordCRTP< Derived >::List = std::vector<std::unique_ptr<Derived>> |
The type for a list of resource records.
Definition at line 286 of file AsyncDnsResourceRecord.h.
|
inline |
Constructor.
name | The name of this record |
ttl | The time-to-live, in seconds, for this record |
Definition at line 293 of file AsyncDnsResourceRecord.h.
|
inlinevirtual |
Clone this class.
Implements Async::DnsResourceRecord.
Definition at line 300 of file AsyncDnsResourceRecord.h.
|
pure virtual |
|
inlinevirtual |
Equality comparison operator.
other | The other resource record to comapare to |
NOTE: The TTL is not used in the comparison.
Reimplemented from Async::DnsResourceRecord.
Definition at line 312 of file AsyncDnsResourceRecord.h.
|
inlineoverridevirtual |
The type of record.
Implements Async::DnsResourceRecord.
Reimplemented in Async::DnsResourceRecordA, Async::DnsResourceRecordCNAME, Async::DnsResourceRecordPTR, and Async::DnsResourceRecordSRV.
Definition at line 325 of file AsyncDnsResourceRecord.h.