12 #include <boost/optional.hpp> 25 class AbstractMessageRenderer;
63 explicit RRTTL(uint32_t ttlval) : ttlval_(ttlval) {}
84 explicit RRTTL(
const std::string& ttlstr);
125 static RRTTL* createFromText(
const std::string& ttlstr);
133 const std::string toText()
const;
171 uint32_t getValue()
const {
return (ttlval_); }
187 bool equals(
const RRTTL& other)
const 193 {
return (ttlval_ == other.ttlval_); }
196 {
return (ttlval_ == other.ttlval_); }
203 {
return (ttlval_ != other.ttlval_); }
206 {
return (ttlval_ != other.ttlval_); }
215 {
return (ttlval_ <= other.ttlval_); }
219 {
return (ttlval_ <= other.ttlval_); }
229 {
return (ttlval_ >= other.ttlval_); }
233 {
return (ttlval_ >= other.ttlval_); }
243 {
return (ttlval_ < other.ttlval_); }
247 {
return (ttlval_ < other.ttlval_); }
257 {
return (ttlval_ > other.ttlval_); }
261 {
return (ttlval_ > other.ttlval_); }
268 static const RRTTL& MAX_TTL() {
275 static const RRTTL max_ttl(0x7fffffff);
bool operator!=(const RRTTL &other) const
Same as nequals().
bool operator>=(const RRTTL &other) const
Same as geq()
Base class for all sorts of text parse errors.
bool geq(const RRTTL &other) const
Greater-than or equal comparison for RRTTL against other.
std::ostream & operator<<(std::ostream &os, const CSVRow &row)
Overrides standard output stream operator for CSVRow object.
bool leq(const RRTTL &other) const
Less-than or equal comparison for RRTTL against other.
bool operator<=(const RRTTL &other) const
Same as leq()
bool operator<(const RRTTL &other) const
Same as lthan()
The AbstractMessageRenderer class is an abstract base class that provides common interfaces for rende...
bool operator==(const RRTTL &other) const
Same as equals().
The RRTTL class encapsulates TTLs used in DNS resource records.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
Defines the logger used by the top-level component of kea-lfc.
bool operator>(const RRTTL &other) const
Same as gthan()
bool lthan(const RRTTL &other) const
Less-than comparison for RRTTL against other.
bool nequals(const RRTTL &other) const
Return true iff two RRTTLs are not equal.
bool gthan(const RRTTL &other) const
Greater-than comparison for RRTTL against other.
InvalidRRTTL(const char *file, size_t line, const char *what)
A standard DNS module exception that is thrown if an RRTTL object is being constructed from an unreco...
IncompleteRRTTL(const char *file, size_t line, const char *what)
A standard DNS module exception that is thrown if an RRTTL object is being constructed from a incompl...