| 1 | < | /* | 
| 1 | > | /* | 
| 2 |  | * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | 
| 3 |  | * | 
| 4 |  | * The University of Notre Dame grants you ("Licensee") a | 
| 44 |  |  | 
| 45 |  | namespace oopse { | 
| 46 |  |  | 
| 47 | < | bool replaceWithWildCard(std::vector<std::vector<std::string>::iterator>& cont, | 
| 48 | < | std::vector<std::string>& sequence, std::vector<std::string>& result, const std::string& wildCard) { | 
| 47 | > | bool replaceWithWildCard(std::vector<std::vector<std::string>::iterator>& cont, | 
| 48 | > | std::vector<std::string>& sequence, std::vector<std::string>& result, const std::string& wildCard) { | 
| 49 |  | if (cont.size() > sequence.size()) { | 
| 50 | < | std::cerr << "the size of iterator container is greater than the size of sequence"; | 
| 50 | > | std::cerr << "the size of iterator container is greater than the size of sequence"; | 
| 51 |  | } | 
| 52 |  |  | 
| 53 |  | bool hasMoreCombination = next_combination(cont, sequence.begin(), sequence.end()); | 
| 54 |  | if (hasMoreCombination) { | 
| 55 | < | result.clear(); | 
| 56 | < | result.insert(result.begin(), sequence.size(), wildCard); | 
| 57 | < | std::vector<std::vector<std::string>::iterator>::iterator i; | 
| 58 | < | for ( i = cont.begin(); i != cont.end(); i++){ | 
| 59 | < | result[*i - sequence.begin()] = **i; | 
| 60 | < | } | 
| 55 | > | result.clear(); | 
| 56 | > | result.insert(result.begin(), sequence.size(), wildCard); | 
| 57 | > | std::vector<std::vector<std::string>::iterator>::iterator i; | 
| 58 | > | for ( i = cont.begin(); i != cont.end(); i++){ | 
| 59 | > | result[*i - sequence.begin()] = **i; | 
| 60 | > | } | 
| 61 |  | } | 
| 62 |  |  | 
| 63 | < | return hasMoreCombination; | 
| 63 | > | return hasMoreCombination; | 
| 64 |  |  | 
| 65 | < | }//end replaceWildCard | 
| 65 | > | }//end replaceWildCard | 
| 66 |  |  | 
| 67 |  | } |