But the benefit of this change is questionable.
#include "zone_writer_local.h"
#include "zone_data.h"
-#include "zone_table_segment.h"
+#include "zone_table_segment_local.h"
#include <memory>
namespace datasrc {
namespace memory {
-ZoneWriterLocal::ZoneWriterLocal(ZoneTableSegment* segment,
+ZoneWriterLocal::ZoneWriterLocal(ZoneTableSegmentLocal* segment,
const LoadAction& load_action,
const dns::Name& origin,
const dns::RRClass& rrclass) :
namespace memory {
class ZoneData;
-class ZoneTableSegment;
+class ZoneTableSegmentLocal;
/// \brief Writer implementation which loads data locally.
///
/// \param load_action The callback used to load data.
/// \param install_action The callback used to install the loaded zone.
/// \param rrclass The class of the zone.
- ZoneWriterLocal(ZoneTableSegment* segment, const LoadAction& load_action,
- const dns::Name& name, const dns::RRClass& rrclass);
+ ZoneWriterLocal(ZoneTableSegmentLocal* segment,
+ const LoadAction& load_action, const dns::Name& name,
+ const dns::RRClass& rrclass);
/// \brief Destructor
~ZoneWriterLocal();
/// the old zone replaced by install().
virtual void cleanup();
private:
- ZoneTableSegment* segment_;
+ ZoneTableSegmentLocal* segment_;
LoadAction load_action_;
dns::Name origin_;
dns::RRClass rrclass_;
// PERFORMANCE OF THIS SOFTWARE.
#include <datasrc/memory/zone_writer_local.h>
-#include <datasrc/memory/zone_table_segment.h>
+#include <datasrc/memory/zone_table_segment_local.h>
#include <datasrc/memory/zone_data.h>
#include <cc/data.h>
// (which is currently ignored)
segment_(ZoneTableSegment::create(isc::data::NullElement())),
writer_(new
- ZoneWriterLocal(segment_.get(),
- bind(&ZoneWriterLocalTest::loadAction, this,
- _1),
- Name("example.org"), RRClass::IN())),
+ ZoneWriterLocal(dynamic_cast<ZoneTableSegmentLocal*>(segment_.
+ get()),
+ bind(&ZoneWriterLocalTest::loadAction, this, _1),
+ Name("example.org"), RRClass::IN())),
load_called_(false),
load_throw_(false),
load_null_(false)