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/Configuration.h

    r515 r516  
    9696
    9797    void clear(void);
    98 
     98    const std::pair<std::string,std::string>* dictionary(std::string lhs) const;
    9999    bool equal_false(const std::string&) const;
    100100    bool equal_true(const std::string&) const;
    101     std::string trans_end_code(std::string) const;
    102     std::string trans_beg_code(std::string) const;
    103101    void set_default(void);
     102    /**
     103       Translate string \a str using dictionary \a dict
     104
     105       \note \a str must be equal to d.first, or behavior is unspecified.
     106
     107       \throw if a '$' character is not followed by a positive integer
     108       that is not larger than number of wildcards in dictionary \a d.
     109     */
     110    std::string translate(const std::string& str,
     111                          const std::pair<std::string, std::string>& d) const;
    104112   
    105113    static Configuration* instance_;
     
    123131  std::ostream& operator<<(std::ostream&, const Configuration&);
    124132
     133  /**
     134     If first character is '\n' replace it with "<NEWLINE>"
     135   */
     136  std::string trans_end_code(std::string);
     137
     138  /**
     139     If last character is '\n' replace it with "<NEWLINE>"
     140   */
     141  std::string trans_beg_code(std::string);
     142
    125143}} // end of namespace svndigest and namespace theplu
    126144
Note: See TracChangeset for help on using the changeset viewer.