return (FindResult(my_result, node->getData()));
}
+ZoneData*
+ZoneTable::setZoneData(const Name& name, ZoneData* data)
+{
+ ZoneTableNode* node(NULL);
+
+ ZoneTableTree::Result result(zones_->find(name, &node));
+
+ if ((result != ZoneTableTree::EXACTMATCH) &&
+ (result != ZoneTableTree::PARTIALMATCH)) {
+ return (NULL);
+ }
+
+ return (node->setData(data));
+}
+
} // end of namespace memory
} // end of namespace datasrc
} // end of namespace isc
/// \return A \c FindResult object enclosing the search result (see above).
FindResult findZone(const isc::dns::Name& name) const;
+ /// Override the ZoneData for a node (zone) in the zone tree.
+ ///
+ /// \throw none
+ ///
+ /// \param name A domain name for which the zone data is set.
+ /// \param data The new zone data to set.
+ /// \return A \c ZoneData object containing the old data if the zone
+ /// was found, or \c NULL otherwise.
+ ZoneData* setZoneData(const isc::dns::Name& name, ZoneData* data);
+
private:
boost::interprocess::offset_ptr<ZoneTableTree> zones_;
};