Ignore:
Timestamp:
Dec 9, 2007, 3:38:34 AM (14 years ago)
Author:
Peter Johansson
Message:

adding dictionary variable in Configuration. Reading and usage of the variable needs to be implemented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r514 r515  
    5656   
    5757    if (iter==string2codons_.end())
    58       string2codons_.push_back(std::make_pair(key, codons(1,p)));
     58      string2codons_.push_back(std::make_pair(key, VectorPair(1,p)));
    5959    else
    6060      iter->second.push_back(p);
     
    293293    add_codon("*.bat", "\nREM", "\n");
    294294    add_codon("*.bat", "\nrem", "\n");
     295
     296    dictionary_ = VectorPair(1, std::make_pair("*.in", "$1"));
    295297  }
    296298
     
    348350      os << "trac-root = " << conf.trac_root() << "\n";
    349351
     352    if (!conf.dictionary_.empty()) {
     353      os << "\n"
     354         << "### Section for setting dictionary for file names.\n"
     355         << "### Prior looking for file name pattern in section [codon],\n"
     356         << "### the file name may be translated according to the rules \n"
     357         << "### in this section. In default setting there is, for example,\n"
     358         << "### a rule to translate `<FILENAME>.in' to `<FILENAME>'.\n"
     359         << "### The format of the entries is:\n"
     360         << "###    file-name-pattern = new-name\n"
     361         << "### Left hand side may contain wildcards (such as '*' and '?').\n"
     362         << "### Right hand side may contain \"$i\", which will be replaced \n"
     363         << "### with the ith wild card in lhs string.\n"
     364         << "[file-name-dictionary]\n";
     365      for (size_t i=0; i<conf.dictionary_.size(); ++i)
     366        os << conf.dictionary_[i].first << " = "
     367           << conf.dictionary_[i].second << "\n";
     368    }
    350369    if (!conf.string2codons_.empty()) {
    351370      os << "\n"
Note: See TracChangeset for help on using the changeset viewer.