Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template special_values_parser

boost::date_time::special_values_parser — Class for special_value parsing.

Synopsis

// In header: <boost/date_time/special_values_parser.hpp>

template<typename date_type, typename charT> 
class special_values_parser {
public:
  // types
  typedef charT >                ;      
  typedef charT >          ;
  typedef charT >         ;  
  typedef                   ;    
  typedef string_parse_tree< charT >                ;  
  typedef   ;    
  typedef charT > > ;  
  typedef charT                                     ;        

  // construct/copy/destruct
  ();
  (const , const , 
                        const , const , 
                        const );
  (typename , 
                        typename );

  // public member functions
  void (const , const , 
                  const , const , 
                  const );
  bool (, , ) ;

  // public static functions
  bool (const );

  // public data members
  static const  nadt_string;
  static const  neg_inf_string;
  static const  pos_inf_string;
  static const  min_date_time_string;
  static const  max_date_time_string;
};

Description

TODO: add doc-comments for which elements can be changed Parses input stream for strings representing special_values. Special values parsed are:

  • not_a_date_time

  • neg_infin

  • pod_infin

  • min_date_time

  • max_date_time

special_values_parser public construct/copy/destruct

  1. ();
    Creates a special_values_parser with the default set of "sv_strings".
  2. (const  nadt_str, 
                          const  neg_inf_str, 
                          const  pos_inf_str, 
                          const  min_dt_str, 
                          const  max_dt_str);
    Creates a special_values_parser using a user defined set of element strings.
  3. (typename  beg, 
                          typename  end);

special_values_parser public member functions

  1. void (const  nadt_str, const  neg_inf_str, 
                    const  pos_inf_str, 
                    const  min_dt_str, 
                    const  max_dt_str);
    Replace special value strings.
  2. bool ( sitr,  str_end, 
                mr) ;

    Given an input iterator, attempt to match it to a known special value

    Parameters:

    mr

    the match result: mr.current_match is set to the corresponding special_value or -1

    sitr

    the start iterator

    str_end

    the end iterator

    Returns:

    whether something matched

special_values_parser public static functions

  1. bool (const  str);

    The parser is expensive to create, and not thread-safe so it cannot be static therefore given a string, determine if it is likely to be a special value. A negative response is a definite no, whereas a positive is only likely and match() should be called and return value checked.

    Parameters:

    str

    the string to check

    Returns:

    false if it is definitely not a special value


PrevUpHomeNext