ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/utils/Utility.cpp
Revision: 1824
Committed: Thu Dec 2 03:12:25 2004 UTC (19 years, 9 months ago) by tim
File size: 922 byte(s)
Log Message:
replace misuse of using namespace std in header files

File Contents

# User Rev Content
1 tim 1823
2     #include "utils/Utility.hpp"
3    
4     namespace oopse {
5    
6     bool replaceWithWildCard(std::vector<std::vector<std::string>::iterator>& cont,
7     std::vector<std::string>& sequence, std::vector<std::string>& result,
8 tim 1824 const std::string& wildCard) {
9 tim 1823 if (cont.size() > sequence.size()) {
10     std::cerr << "the size of iterator container is greater than the size of sequence";
11     }
12    
13     bool hasMoreCombination = next_combination(cont, sequence.begin(), sequence.end());
14     if (hasMoreCombination) {
15     result.clear();
16     result.insert(result.begin(), sequence.size(), wildCard);
17     std::vector<std::vector<std::string>::iterator>::iterator i;
18     for ( i = cont.begin(); i != cont.end(); i++){
19     result[*i - sequence.begin()] = **i;
20     }
21     }
22    
23     return hasMoreCombination;
24    
25     }//end replaceWildCard
26    
27     }

Properties

Name Value
svn:executable *