Changeset 516 for trunk/lib/utility.h


Ignore:
Timestamp:
Dec 9, 2007, 8:58:54 AM (14 years ago)
Author:
Peter Johansson
Message:

adding filename translations in Configuration class. Before checking what type parsing to use, filename is translated according to rules set in config file. Default rule (as before) is to remove trailing .in from filenames. To solve the parsing I added a simple regexp function - see utility.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility.h

    r514 r516  
    150150  ///
    151151  std::string pwd(void);
     152
     153  /**
     154     \return true if first range match second range
     155
     156     Second range may contain wildcards (such as '*' and '?'), in
     157     which case vector \a vec is filled with the corresponding strings
     158     in first range. The algorithm is greedy, i.e., wildcard * is will
     159     consume as many charcters as possible.
     160
     161     \note \a vec is supposed to be empty
     162   */
     163  bool regexp(std::string::const_iterator first1,
     164              std::string::const_iterator end1,
     165              std::string::const_iterator first2,
     166              std::string::const_iterator end2,
     167              std::vector<std::string>& vec);
    152168
    153169  /**
Note: See TracChangeset for help on using the changeset viewer.