16 #include <boost/bind.hpp>
24 RRsetCollection::loaderCallback(
const std::string&,
size_t,
const std::string&)
31 const CollectionKey key(rrset->getClass(), rrset->getType(),
33 CollectionMap::const_iterator it = rrsets_.find(key);
34 if (it != rrsets_.end()) {
36 "RRset for " << rrset->getName() <<
"/" << rrset->getClass()
37 <<
" with type " << rrset->getType() <<
" already exists");
40 rrsets_.insert(std::pair<CollectionKey, RRsetPtr>(key, rrset));
45 RRsetCollection::constructHelper(T source,
const isc::dns::Name& origin,
50 (boost::bind(&RRsetCollection::loaderCallback,
this, _1, _2, _3),
51 boost::bind(&RRsetCollection::loaderCallback,
this, _1, _2, _3));
53 collator.getCallback(),
62 constructHelper(filename, origin, rrclass);
68 constructHelper<std::istream&>(input_stream, origin, rrclass);
74 const CollectionKey key(rrclass, rrtype, name);
75 CollectionMap::iterator it = rrsets_.find(key);
76 if (it != rrsets_.end()) {
84 const RRType& rrtype)
const
86 const CollectionKey key(rrclass, rrtype, name);
87 CollectionMap::const_iterator it = rrsets_.find(key);
88 if (it != rrsets_.end()) {
98 const CollectionKey key(rrclass, rrtype, name);
100 CollectionMap::iterator it = rrsets_.find(key);
101 if (it == rrsets_.end()) {
111 CollectionMap::iterator it = rrsets_.begin();
117 CollectionMap::iterator it = rrsets_.end();