| Home | Libraries | People | FAQ | More

## Struct template basic_stream

boost::cnv::basic_stream

## Synopsis

    // In header: <boost/convert/stream.hpp>

    template<typename Char>
    struct basic_stream {
      // types
      typedef Char                                  char_type;
      typedef boost::cnv::basic_stream< char_type > this_type;
      typedef std::basic_stringstream< char_type >  stream_type;
      typedef std::basic_istream< char_type >       istream_type;
      typedef std::basic_streambuf< char_type >     buffer_type;
      typedef std::basic_string< char_type >        stdstr_type;
      typedef std::ios_base &(*)(std::ios_base &)   manipulator_type;

      // member classes/structs/unions

      struct ibuffer_type : public buffer_type {

        // public member functions
        ibuffer_type(char_type const *, std::size_t);
      };

      struct obuffer_type : public buffer_type {
      };

      // public member functions
      basic_stream();
      basic_stream(this_type &&);
      basic_stream(this_type const &) = delete;
      this_type & operator=(this_type const &) = delete;
       BOOST_CNV_STRING_ENABLE(type const &, optional< string_type > &) const;
       BOOST_CNV_STRING_ENABLE(string_type const &, optional< type > &) const;
      template<typename type>
        void operator()(char_type const *, optional< type > &) const;
      template<typename type>
        void operator()(stdstr_type const &, optional< type > &) const;
      template<typename manipulator>
        boost::disable_if< boost::parameter::is_argument_pack< manipulator >, this_type & >::type
        operator()(manipulator);
      this_type & operator()(manipulator_type);
      this_type & operator()(std::locale const &);
      template<typename argument_pack>
        std::enable_if< boost::parameter::is_argument_pack< argument_pack >::value, this_type & >::type
        operator()(argument_pack const &);
      template<typename string_type, typename in_type>
        void to_str(in_type const &, boost::optional< string_type > &) const;
      template<typename string_type, typename out_type>
        void str_to(boost::cnv::range< string_type >,
                    boost::optional< out_type > &) const;

      // private member functions
      template<typename argument_pack, typename keyword_tag>
        void set_(argument_pack const &, keyword_tag, mpl::false_);
       BOOST_CNV_PARAM_SET(locale);
       BOOST_CNV_PARAM_SET(precision);
       BOOST_CNV_PARAM_SET(width);
       BOOST_CNV_PARAM_SET(fill);
       BOOST_CNV_PARAM_SET(uppercase);
       BOOST_CNV_PARAM_SET(skipws);
       BOOST_CNV_PARAM_SET(adjust);
       BOOST_CNV_PARAM_SET(base);
       BOOST_CNV_PARAM_SET(notation);
      template<typename string_type, typename out_type>
        void str_to(cnv::range< string_type >, optional< out_type > &) const;
      template<typename string_type, typename in_type>
        void to_str(in_type const &, optional< string_type > &) const;
    };

## Description

### `basic_stream` public member functions

1.     basic_stream();

2.     basic_stream(this_type && other);

3.     basic_stream(this_type const &) = delete;

4.     this_type & operator=(this_type const &) = delete;

5.      BOOST_CNV_STRING_ENABLE(type const & v, optional< string_type > & s) const;

6.      BOOST_CNV_STRING_ENABLE(string_type const & s, optional< type > & r) const;

7.     template<typename type>
         void operator()(char_type const * s, optional< type > & r) const;

8.     template<typename type>
         void operator()(stdstr_type const & s, optional< type > & r) const;

9.     template<typename manipulator>
         boost::disable_if< boost::parameter::is_argument_pack< manipulator >, this_type & >::type
         operator()(manipulator m);

10.     this_type & operator()(manipulator_type m);

11.     this_type & operator()(std::locale const & l);

12.     template<typename argument_pack>
          std::enable_if< boost::parameter::is_argument_pack< argument_pack >::value, this_type & >::type
          operator()(argument_pack const & arg);

13.     template<typename string_type, typename in_type>
          void to_str(in_type const & value_in,
                      boost::optional< string_type > & string_out) const;

14.     template<typename string_type, typename out_type>
          void str_to(boost::cnv::range< string_type > string_in,
                      boost::optional< out_type > & result_out) const;

### `basic_stream` private member functions

1.     template<typename argument_pack, typename keyword_tag>
         void set_(argument_pack const &, keyword_tag, mpl::false_);

2.      BOOST_CNV_PARAM_SET(locale);

3.      BOOST_CNV_PARAM_SET(precision);

4.      BOOST_CNV_PARAM_SET(width);

5.      BOOST_CNV_PARAM_SET(fill);

6.      BOOST_CNV_PARAM_SET(uppercase);

7.      BOOST_CNV_PARAM_SET(skipws);

8.      BOOST_CNV_PARAM_SET(adjust);

9.      BOOST_CNV_PARAM_SET(base);

10.      BOOST_CNV_PARAM_SET(notation);

11.     template<typename string_type, typename out_type>
          void str_to(cnv::range< string_type >, optional< out_type > &) const;

12.     template<typename string_type, typename in_type>
          void to_str(in_type const &, optional< string_type > &) const;