zone_table_segment_local.cc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #include <datasrc/memory/zone_table_segment_local.h>
  15. #include "zone_writer_local.h"
  16. using namespace isc::util;
  17. namespace isc {
  18. namespace datasrc {
  19. namespace memory {
  20. // After more methods' definitions are added here, it would be a good
  21. // idea to move getHeader() and getMemorySegment() definitions to the
  22. // header file.
  23. ZoneTableHeader&
  24. ZoneTableSegmentLocal::getHeader() {
  25. return (header_);
  26. }
  27. const ZoneTableHeader&
  28. ZoneTableSegmentLocal::getHeader() const {
  29. return (header_);
  30. }
  31. MemorySegment&
  32. ZoneTableSegmentLocal::getMemorySegment() {
  33. return (mem_sgmt_);
  34. }
  35. ZoneWriter*
  36. ZoneTableSegmentLocal::getZoneWriter(const LoadAction& load_action,
  37. const dns::Name& name,
  38. const dns::RRClass& rrclass)
  39. {
  40. return (new ZoneWriterLocal(this, load_action, name, rrclass));
  41. }
  42. } // namespace memory
  43. } // namespace datasrc
  44. } // namespace isc