Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template cnvbase

boost::cnv::cnvbase

Synopsis

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

template<typename > 
struct cnvbase {
  // types
  typedef cnvbase                this_type;  
  typedef int                    int_type;   
  typedef unsigned int           uint_type;  
  typedef long int               lint_type;  
  typedef unsigned long int      ulint_type; 
  typedef short int              sint_type;  
  typedef unsigned short int     usint_type; 
  typedef long long int          llint_type; 
  typedef unsigned long long int ullint_type;
  typedef float                  flt_type;   
  typedef double                 dbl_type;   
  typedef long double            ldbl_type;  

  // construct/copy/destruct
  cnvbase();

  // public member functions
  template<typename type_in, typename type_out> 
    void operator()(type_in const &, boost::optional< type_out > &) const;
   BOOST_CNV_TO_STRING(int_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(uint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(lint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(llint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(ulint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(ullint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(sint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(usint_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(flt_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(dbl_type, optional< string_type > &) const;
   BOOST_CNV_TO_STRING(ldbl_type, optional< string_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< int_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< uint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< lint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< llint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< ulint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< ullint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< sint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< usint_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< flt_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< dbl_type > &) const;
   BOOST_CNV_STRING_TO(string_type const &, optional< ldbl_type > &) const;
   BOOST_CNV_PARAM(base, base::type);
   BOOST_CNV_PARAM(adjust, adjust::type);
   BOOST_CNV_PARAM(precision, int);
   BOOST_CNV_PARAM(precision, int);
   BOOST_CNV_PARAM(uppercase, bool);
   BOOST_CNV_PARAM(skipws, bool);
   BOOST_CNV_PARAM(width, int);
   BOOST_CNV_PARAM(fill, char);

  // protected member functions
  template<typename string_type, typename out_type> 
    void str_to_(string_type const &, optional< out_type > &) const;
  template<typename in_type, typename string_type> 
    void to_str_(in_type, optional< string_type > &) const;
  derived_type const & dncast() const;
  derived_type & dncast();
};

Description

cnvbase public construct/copy/destruct

  1. cnvbase();

cnvbase public member functions

  1. template<typename type_in, typename type_out> 
      void operator()(type_in const & in, boost::optional< type_out > & out) const;
  2.  BOOST_CNV_TO_STRING(int_type v, optional< string_type > & r) const;
  3.  BOOST_CNV_TO_STRING(uint_type v, optional< string_type > & r) const;
  4.  BOOST_CNV_TO_STRING(lint_type v, optional< string_type > & r) const;
  5.  BOOST_CNV_TO_STRING(llint_type v, optional< string_type > & r) const;
  6.  BOOST_CNV_TO_STRING(ulint_type v, optional< string_type > & r) const;
  7.  BOOST_CNV_TO_STRING(ullint_type v, optional< string_type > & r) const;
  8.  BOOST_CNV_TO_STRING(sint_type v, optional< string_type > & r) const;
  9.  BOOST_CNV_TO_STRING(usint_type v, optional< string_type > & r) const;
  10.  BOOST_CNV_TO_STRING(flt_type v, optional< string_type > & r) const;
  11.  BOOST_CNV_TO_STRING(dbl_type v, optional< string_type > & r) const;
  12.  BOOST_CNV_TO_STRING(ldbl_type v, optional< string_type > & r) const;
  13.  BOOST_CNV_STRING_TO(string_type const & s, optional< int_type > & r) const;
  14.  BOOST_CNV_STRING_TO(string_type const & s, optional< uint_type > & r) const;
  15.  BOOST_CNV_STRING_TO(string_type const & s, optional< lint_type > & r) const;
  16.  BOOST_CNV_STRING_TO(string_type const & s, optional< llint_type > & r) const;
  17.  BOOST_CNV_STRING_TO(string_type const & s, optional< ulint_type > & r) const;
  18.  BOOST_CNV_STRING_TO(string_type const & s, optional< ullint_type > & r) const;
  19.  BOOST_CNV_STRING_TO(string_type const & s, optional< sint_type > & r) const;
  20.  BOOST_CNV_STRING_TO(string_type const & s, optional< usint_type > & r) const;
  21.  BOOST_CNV_STRING_TO(string_type const & s, optional< flt_type > & r) const;
  22.  BOOST_CNV_STRING_TO(string_type const & s, optional< dbl_type > & r) const;
  23.  BOOST_CNV_STRING_TO(string_type const & s, optional< ldbl_type > & r) const;
  24.  BOOST_CNV_PARAM(base, base::type const);
  25.  BOOST_CNV_PARAM(adjust, adjust::type const);
  26.  BOOST_CNV_PARAM(precision, int const);
  27.  BOOST_CNV_PARAM(precision, int);
  28.  BOOST_CNV_PARAM(uppercase, bool const);
  29.  BOOST_CNV_PARAM(skipws, bool const);
  30.  BOOST_CNV_PARAM(width, int const);
  31.  BOOST_CNV_PARAM(fill, char const);

cnvbase protected member functions

  1. template<typename string_type, typename out_type> 
      void str_to_(string_type const & str, optional< out_type > & result_out) const;
  2. template<typename in_type, typename string_type> 
      void to_str_(in_type value_in, optional< string_type > & result_out) const;
  3. derived_type const & dncast() const;
  4. derived_type & dncast();

PrevUpHomeNext