7 #ifndef RRSET_COLLECTION_BASE_H
8 #define RRSET_COLLECTION_BASE_H 1
13 #include <boost/shared_ptr.hpp>
103 typedef boost::shared_ptr<Iter>
IterPtr;
149 virtual IterPtr
getEnd() = 0;
156 class Iterator : std::iterator<std::forward_iterator_tag,
157 const isc::dns::AbstractRRset>
165 return (iter_->getValue());
169 iter_ = iter_->getNext();
180 return (iter_->equals(*other.iter_));
184 return (!iter_->equals(*other.iter_));
209 #endif // RRSET_COLLECTION_BASE_H
The Name class encapsulates DNS names.
Iterator end()
Returns an iterator pointing past the end of the collection.
virtual ~RRsetCollectionBase()
Destructor.
virtual IterPtr getNext()=0
Returns an IterPtr wrapping an Iter pointing to the next AbstractRRset in sequence in the collection...
virtual isc::dns::ConstRRsetPtr find(const isc::dns::Name &name, const isc::dns::RRClass &rrclass, const isc::dns::RRType &rrtype) const =0
Find a matching RRset in the collection.
Iterator begin()
Returns an iterator pointing to the beginning of the collection.
boost::shared_ptr< Iter > IterPtr
Wraps Iter with a reference count.
virtual IterPtr getBeginning()=0
Returns an IterPtr wrapping an Iter pointing to the beginning of the collection.
A helper iterator interface for RRsetCollectionBase.
virtual IterPtr getEnd()=0
Returns an IterPtr wrapping an Iter pointing past the end of the collection.
The RRClass class encapsulates DNS resource record classes.
boost::shared_ptr< RRsetCollectionBase > RRsetCollectionPtr
virtual bool equals(Iter &other)=0
Check if another iterator is equal to this one.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Error during RRsetCollectionBase find() operation.
Defines the logger used by the top-level component of kea-dhcp-ddns.
The AbstractRRset class is an abstract base class that models a DNS RRset.
A forward std::iterator for RRsetCollectionBase.
virtual const isc::dns::AbstractRRset & getValue()=0
Returns the AbstractRRset currently pointed to by the iterator.
The RRType class encapsulates DNS resource record types.
bool operator==(const Iterator &other) const
boost::shared_ptr< const AbstractRRset > ConstRRsetPtr
A pointer-like type pointing to an (immutable) RRset object.
RRsetCollectionError(const char *file, size_t line, const char *what)
bool operator!=(const Iterator &other) const
Generic class to represent a set of RRsets.