ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/utils/Utility.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/utils/Utility.cpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 1 | Line 1
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
# Line 44 | Line 44 | bool replaceWithWildCard(std::vector<std::vector<std::
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines