}
ZoneTable*
-ZoneTable::create(util::MemorySegment& mem_sgmt, RRClass zone_class) {
+ZoneTable::create(util::MemorySegment& mem_sgmt, const RRClass& zone_class) {
SegmentObjectHolder<ZoneTableTree, ZoneDataDeleterType> holder(
mem_sgmt, ZoneTableTree::create(mem_sgmt),
boost::bind(deleteZoneData, &mem_sgmt, _1, zone_class));
/// This constructor internally involves resource allocation, and if
/// it fails, a corresponding standard exception will be thrown.
/// It never throws an exception otherwise.
- ZoneTable(dns::RRClass rrclass, ZoneTableTree* zones) :
+ ZoneTable(const dns::RRClass& rrclass, ZoneTableTree* zones) :
rrclass_(rrclass),
zones_(zones)
{}
/// \param zone_class The RR class of the zone. It must be the RR class
/// that is supposed to be associated to the zone table.
static ZoneTable* create(util::MemorySegment& mem_sgmt,
- dns::RRClass zone_class);
+ const dns::RRClass& zone_class);
/// \brief Destruct and deallocate \c ZoneTable
///
FindResult findZone(const isc::dns::Name& name) const;
private:
- dns::RRClass rrclass_;
+ const dns::RRClass rrclass_;
boost::interprocess::offset_ptr<ZoneTableTree> zones_;
};
}
namespace memory {
ZoneTableSegment*
-ZoneTableSegment::create(const isc::data::Element&, RRClass rrclass) {
+ZoneTableSegment::create(const isc::data::Element&, const RRClass& rrclass) {
/// FIXME: For now, we always return ZoneTableSegmentLocal. This
/// should be updated eventually to parse the passed Element
/// argument and construct a corresponding ZoneTableSegment
/// is returned.
/// \return Returns a ZoneTableSegment object
static ZoneTableSegment* create(const isc::data::Element& config,
- isc::dns::RRClass rrclass);
+ const isc::dns::RRClass& rrclass);
/// \brief Destroy a ZoneTableSegment
///