PrevUpHomeNext

Struct template converter_codecvt

boost::converter_codecvt

Synopsis

// In header: <boost/iterator/converter_codecvt.hpp>

template<typename InternT, typename B1, typename P1, typename B2, typename P2> 
struct converter_codecvt {
  // types
  typedef InternT         intern_type;
  typedef P1::output_type extern_type;
  typedef std::mbstate_t  state_type; 

  // member classes/structs/unions

  struct state_t {
    intern_type pending_data;
    size_t pending_size;
  };

  // construct/copy/destruct
  converter_codecvt(const B1 & = B1(), const P1 & = P1(), const B2 & = B2(), 
                    const P2 & = P2(), std::size_t = 0);

  // public member functions
   BOOST_CONCEPT_ASSERT((BoundaryCheckerConcept< B1 >));
   BOOST_CONCEPT_ASSERT((ConverterConcept< P1 >));
   BOOST_CONCEPT_ASSERT((BoundaryCheckerConcept< B2 >));
   BOOST_CONCEPT_ASSERT((ConverterConcept< P2 >));
   BOOST_CONCEPT_ASSERT((Convertible< InternT, typename P1::input_type >));
   BOOST_CONCEPT_ASSERT((Convertible< typename P2::output_type, InternT >));

  // protected member functions
  std::codecvt_base::result 
  do_in(state_type &, const extern_type *, const extern_type *, 
        const extern_type *&, intern_type *, intern_type *, intern_type *&) const;
  std::codecvt_base::result 
  do_out(state_type &, const intern_type *, const intern_type *, 
         const intern_type *&, extern_type *, extern_type *, extern_type *&) const;
  bool do_always_noconv() const;
  std::codecvt_base::result 
  do_unshift(state_type &, extern_type *, extern_type *, extern_type *&) const;
  int do_encoding() const;
  int do_length(state_type &, const extern_type *, const extern_type *, 
                std::size_t) const;
  int do_max_length() const;
};

Description

Builds a codecvt facet from two Converters and two BoundaryCheckers. When writing to a file, P1 is applied for segments of data on which B1 is true at the beginning and at the end. When reading a file, P2 is applied for segments of data on which B2 is true at the beginning and at the end.

converter_codecvt public construct/copy/destruct

  1. converter_codecvt(const B1 & b1_ = B1(), const P1 & p1_ = P1(), 
                      const B2 & b2_ = B2(), const P2 & p2_ = P2(), 
                      std::size_t refs = 0);

converter_codecvt public member functions

  1.  BOOST_CONCEPT_ASSERT((BoundaryCheckerConcept< B1 >));
  2.  BOOST_CONCEPT_ASSERT((ConverterConcept< P1 >));
  3.  BOOST_CONCEPT_ASSERT((BoundaryCheckerConcept< B2 >));
  4.  BOOST_CONCEPT_ASSERT((ConverterConcept< P2 >));
  5.  BOOST_CONCEPT_ASSERT((Convertible< InternT, typename P1::input_type >));
  6.  BOOST_CONCEPT_ASSERT((Convertible< typename P2::output_type, InternT >));

converter_codecvt protected member functions

  1. std::codecvt_base::result 
    do_in(state_type & state, const extern_type * from, 
          const extern_type * from_end, const extern_type *& from_next, 
          intern_type * to, intern_type * to_end, intern_type *& to_next) const;
  2. std::codecvt_base::result 
    do_out(state_type & state, const intern_type * from, 
           const intern_type * from_end, const intern_type *& from_next, 
           extern_type * to, extern_type * to_end, extern_type *& to_next) const;
  3. bool do_always_noconv() const;
  4. std::codecvt_base::result 
    do_unshift(state_type & state, extern_type * to, extern_type * to_end, 
               extern_type *& to_next) const;
  5. int do_encoding() const;
  6. int do_length(state_type &, const extern_type * from, 
                  const extern_type * from_end, std::size_t max_limit) const;
  7. int do_max_length() const;

PrevUpHomeNext