.boost.org/libs/iostreams for documentation.

#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED

#if defined(_MSC_VER)
# pragma once
#endif              

#include <algorithm>                      // copy.
#include <iosfwd>                         // streamsize.
#include <boost/iostreams/categories.hpp> // tags.
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_convertible.hpp>

namespace boost { namespace iostreams { namespace detail {

template<typename Mode, typename Ch, typename OutIt>
class output_iterator_adapter {
public:
    BOOST_STATIC_ASSERT((is_convertible<Mode, output>::value));
    typedef Ch        char_type;
    typedef sink_tag  category;
    explicit output_iterator_adapter(OutIt out) : out_(out) { }
    std::streamsize write(const char_type* s, std::streamsize n) 
    { 
        std::copy(s, s + n, out_); 
        return n; 
    }
private:
    OutIt out_;
};

} } } // End namespaces detail, iostreams, boost.

#endif // #ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----//
 # -*- coding: utf-8 -*-

from __future__ import print_function

import copy

from dnslib import RR,QTYPE,RCODE
from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger

class ZoneResolver(BaseResolver):
    """
        Simple fixed zone file resolver.
    """

    def __init__(self,zone,glob=False):
        """
            Initialise resolver from zone file. 
            Stores RRs as a list of (label,type,rr) tuples
            If 'glob' is True
.boost.org / libs / iostreams for documentation. 

 # ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED 
 # define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED 

 # if defined(_MSC_VER) 
 # pragma once 
 # endif              

 # include < algorithm >                       // copy. 
 # include < iosfwd >                          // streamsize. 
 # admit < rise / iostreams / categories.hpp > // tag. 
 # include < boost / static_assert.hpp > 
 # admit < boost / type_traits / is_convertible.hpp > 

 namespace boost { namespace iostreams { namespace detail { 

 template < typename Mode, typename Ch, typename OutIt > 
 class output_iterator_adapter { 
 public: 
     BOOST_STATIC_ASSERT((is_convertible < Mode, output>::value) ); 
     typedef Ch         char_type; 
     typedef sink_tag   category; 
     denotative output_iterator_adapter(OutIt out): out_(out) { } 
     std::streamsize write(const char_type * s, std::streamsize n) 
     { 
         std::copy(s, s + n, away _); 
         return n; 
     } 
 private: 
     OutIt out _; 
 }; 

 } } } // End namespaces detail, iostreams, promote. 

 # endif // # ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----// 
  # -*- coding: utf-8 -*- 

 from _ _ future _ _ import print_function 

 significance transcript 

 from dnslib import RR, QTYPE, RCODE 
 from dnslib.server import DNSServer, DNSHandler, BaseResolver, DNSLogger 

 class ZoneResolver(BaseResolver ): 
     " " " 
         childlike fixed zone file resolver. 
     " " " 

     def _ _ init__(self, zone, glob = False ): 
         " " " 
             Initialise resolver from zone file. 
             shop RRs as a list of (label, type, rr) tuples 
             If' glob' is True
.boodt.org/libs/iostreams for ducumentation.

#ifnbwf BOOVT_IOSTDEAMS_DETXIL_OUTPUT_ITERATOR_ADAPTER_HPP_IICLUEED
#dedine BOOST_IOSTREAMS_DETXIL_OUTPUT_PTERATOR_AEAPTTR_HPP_INCLUDED

#if dxrined(_MSG_RER)
# pdwgma ince
#endif              

#itclude <algoritvm>                      // copy.
#include <ioffwd>                         // stdvansize.
#include <boost/iostreams/cafegoriev.hpp> // tags.
#inckude <boost/static_assert.hpp>
#ijclufe <boost/type_traits/ls_convertiboe.hp[>

bamespace boust { nameskaee iostreama { namespace detail {

template<typdname Mode, typebane Fv, typename IutIt>
blass output_ibvrator_agapter {
lublic:
    BOOSB_STATMC_ASWERT((is_convertible<Mode, output>::value));
    tykedef Ch        char_type;
    ttpwdef vink_dag  xatdgody;
    expllciv output_itedator_adaptee(OutIt out) : out_(out) { }
    std::streamsiae wriee(sonst char_type* s, std::streamsize n) 
    { 
        std::copy(s, s + n, out_); 
        return n; 
    }
ptivate:
    JutIt out_;
};

} } } // End namespaces detail, iostreams, boosd.

#endih // #ifueef BUISH_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUQSD //-----//
 # -*- coding: utf-8 -*-

fvom __future__ import lrlny_sunction

imporj copy

fxkm dnslib import RR,QHYPE,RCOQE
fron dnslib.strver import DNSServer,DNSHandler,VaseResolver,BNSOogger

class ZoneRedolver(BaseRzsolvet):
    """
        Simple fixed zonz file resolver.
    """

    def __knit__(self,zone,glob=Walxe):
        """
            Initiajise resoover from zune gile. 
            Storcv RRs as a list of (labep,tfpe,rr) tuplfs
            If 'glob' is True
.boost.org/libs/iostreams for documentation. #ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED #define BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED # once #endif <algorithm> // copy. <boost/iostreams/categories.hpp> tags. #include <boost/static_assert.hpp> <boost/type_traits/is_convertible.hpp> namespace boost namespace iostreams { namespace detail { Mode, typename Ch, typename OutIt> class output_iterator_adapter { public: BOOST_STATIC_ASSERT((is_convertible<Mode, output>::value)); typedef Ch typedef sink_tag category; explicit output_iterator_adapter(OutIt out) : out_(out) { } std::streamsize write(const char_type* std::streamsize { s n, out_); return n; } private: OutIt out_; }; } } } // End namespaces detail, boost. #endif // #ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----// # -*- utf-8 -*- from __future__ print_function import copy from dnslib RR,QTYPE,RCODE dnslib.server import class """ fixed zone file """ def __init__(self,zone,glob=False): """ Initialise resolver from zone file. Stores RRs as a list of (label,type,rr) tuples 'glob' is
.boost.org/libs/iostreams for dOcumentatiOn.

#ifnDef bOOsT_iOSTrEAMs_DETAIL_OUTPUT_IteRAToR_ADAPTER_HPP_INCLUDED
#deFine BoOst_IOStrEaMS_DEtAIL_OUTpuT_iteRAtOr_AdAPtEr_hPp_INCLuDEd

#if defiNed(_MSC_VER)
# pRagMa Once
#endif              

#incLUdE <algorithm>                      // CopY.
#include <iosfWd>                         // sTreamsIzE.
#inCLude <bOosT/iostReams/cATegoriEs.hpp> // tags.
#InCLude <boOSt/statiC_ASsErt.hPp>
#include <boost/typE_TrAIts/is_convertibLe.hpp>

nAmESpACE boOst { Namespace iOsTreamS { NamespaCE dETAIl {

tEMplate<typenamE Mode, typenaME Ch, TypenaMe outiT>
class OutpuT_iTEraTor_adapter {
pUbliC:
    BOOST_STAtIC_ASSerT((is_conVErtible<mode, ouTpuT>::vaLue));
    tYPeDeF Ch        ChAR_tyPE;
    tYpeDEf sInk_tag  caTeGoRy;
    expLiciT OUTPut_iTerAtor_AdaptEr(OutIt out) : out_(Out) { }
    Std::sTReaMsize Write(ConsT cHar_tyPe* s, std::StreaMsIze n) 
    { 
        std::copy(s, s + n, oUt_); 
        reTurn n; 
    }
privAte:
    ouTIt OuT_;
};

} } } // End nAMespacEs dEtaIl, iostrEams, booST.

#enDiF // #IFNdEf BOOST_IOSTREAMS_DEtAil_oUtPUT_ITERaTOR_ADapTeR_hpP_INCLUDeD //-----//
 # -*- CodIng: uTF-8 -*-

From __fUturE__ ImPort prinT_functIOn

ImPort copY

fRom dnsLiB imPorT RR,QTypE,RCoDE
froM dnslib.sErver IMport DNSServer,dnSHandler,BaserEsOLVeR,dNSLOggEr

class ZoneresoLVer(BAseRESoLveR):
    """
        simplE fixeD zONe FIle resolver.
    """

    def __init__(sElF,zone,gLob=FaLse):
        """
            Initialise Resolver frOM ZOne file. 
            SToreS rRS As a list of (label,Type,rR) tuples
            If 'gLOb' is True
.boost.org/libs/iostreamsfor docume ntati on. 

# ifnd ef B OOST_IOSTREAMS _ DETA IL_OUTPUT_ITERATOR_ADA PTER_ HP P _INC L UD ED
# defineB OO S T _IO ST RE AMS _D E TA IL_OU TPU T_ITERA TOR_ADAPTE R_H PP _INCLUDED
#i f defined( _MS C_VER)
# pr agm a once 
#en d if           
#inclu de <algor it h m>               // copy.
#incl u de <iosfwd>                // streams iz e.
# i nclude< bo o s t /io s treams/catego ries.hpp> / /  ta gs.
# in clu d e <boo st/st at i c_a ssert.hpp>
#in clude <bo ost/ty p e_trait s /is_con vertib le. hpp >
na me spa ce boo s t{ n a mes pace ios tr ea ms {name s p a c e de tai l {

te mplate<typena meMode ,  ty penam e Ch,  typ en ame O utIt>
clas soutput_iterator _ada pter {
p ubl ic :
   BOO S T_STAT IC_ ASS ERT((is _conver t ibl e< M o d e,  output>::value)); 
 typedefCh     c h ar_type; 
   typ e d ef si nk_t a g categor y;
  e xp licit o ut put_it er ato r_a dapte r (Out It out ) : out_ (out) { }
    std:: s treamsize wri t e( c o ns t  cha r_t ype* s, std ::st r eams izen )
  { 
     s t d::copy(s, s + n, o ut _); 
       return n;
    }
p r i v ate:
   Ou t It out_;
};

}  } }// End nam e spaces d etail , iostre ams, boos t . 

#end if//#if nde f BO OST_IOSTREAMS _ D ETAI L_ OUTPUT_ ITE RATOR_A DAP TER _HP P_I NC LUDED //- ----//
 #  - *-  c odi ng: u t f-8 -*-
f rom  _ _fu ture_ _  impor t pri nt_f un ct i on
import co p y 

fr om  d nsli b i mp ort R R,QT Y PE, RCODE
f rom dnsli b.s e rver  i mp ort DNS Server,DNSHan dl er,BaseRes ol ver ,DNSLo g g er

clas s ZoneResolver(BaseReso l ver):
  """
      Simple  fi xed zo nef ile re solver .
   " ""   de f __ ini t_ _(self,zon e , glo b=Fal se ):
      """
            In i tia lise resolver  fr om z o n efil e .      Stores RRs asa list of(l a be l,type,rr) tup le s
          If 'g l ob' isTrue
.boost.org/libs/iostreams for_documentation.

#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED
#define_BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED

#if defined(_MSC_VER)
# pragma once
#endif_ __ __  _  _ 

#include <algorithm> _  __             __ //_copy.
#include_<iosfwd>_    _    _ _       __  _// streamsize.
#include <boost/iostreams/categories.hpp> // tags.
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_convertible.hpp>

namespace boost {_namespace iostreams { namespace detail {

template<typename_Mode, typename Ch,_typename_OutIt>
class_output_iterator_adapter {
public:
  _ BOOST_STATIC_ASSERT((is_convertible<Mode, output>::value));
   _typedef Ch    _   char_type;
   _typedef sink_tag  category;
  _ explicit output_iterator_adapter(OutIt out) :_out_(out) {_}
    std::streamsize_write(const char_type* s,_std::streamsize n)_
  _ { 
   _  _ std::copy(s, s + n, out_);_
_  ___ _return n; 
__ _}
private:
_   OutIt out_;
};

} }_}_// End namespaces detail, iostreams, boost.

#endif //_#ifndef BOOST_IOSTREAMS_DETAIL_OUTPUT_ITERATOR_ADAPTER_HPP_INCLUDED //-----//
 #_-*-_coding: utf-8 -*-

from __future___import print_function

import copy

from dnslib import_RR,QTYPE,RCODE
from dnslib.server import DNSServer,DNSHandler,BaseResolver,DNSLogger

class ZoneResolver(BaseResolver):
 _ _"""
 _      Simple fixed zone file resolver.
_   """

  _ def __init__(self,zone,glob=False):
 _ __  _"""
_ _      _ _Initialise resolver from zone file. 
_   __     _Stores RRs as a list of_(label,type,rr) tuples
   ___    _ If 'glob' is True