Changeset 118 for trunk/lib/Parser.h


Ignore:
Timestamp:
Jul 3, 2006, 9:44:49 AM (15 years ago)
Author:
Peter Johansson
Message:

fixes #46 #45 #26 #40

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Parser.h

    r114 r118  
    2626
    2727#include <fstream>
     28#include <string>
    2829#include <vector>
    2930
     
    5455    /// @brief Constructor
    5556    ///
    56     explicit Parser(std::istream&);
     57    explicit Parser(const std::string&);
    5758
    5859    ///
     
    6768    Parser(const Parser& other);
    6869
     70    void cc_mode(std::istream&);
     71
    6972    std::vector<line_type> type_;
    7073
     
    7275
    7376  ///
     77  /// @return true if @a c is [a-z], [A-Z] or numerical.
     78  ///
     79  struct AlphaNum : public std::unary_function<char,bool>
     80  {
     81    inline bool operator()(const char c) const
     82    {
     83      return isalnum(c);
     84    }
     85  };
     86
     87  ///
    7488  /// Functor for white space identification
    7589  ///
    76   /// @return true if @a c is '\t', ' ' or '\n'.
     90  /// @see isspace
     91  ///
     92  /// @return true if @a c is '\t', '\n', '\v', '\f' or ' '.
    7793  ///
    7894  struct WhiteSpace : public std::unary_function<char,bool>
Note: See TracChangeset for help on using the changeset viewer.