Definition in file OptionsCont.cpp.
#include <config.h>
#include <map>
#include <string>
#include <exception>
#include <algorithm>
#include <vector>
#include <iostream>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include "Option.h"
#include "OptionsCont.h"
#include <utils/common/UtilExceptions.h>
#include <utils/common/FileHelpers.h>
#include <utils/common/MsgHandler.h>
#include <utils/common/StringTokenizer.h>
#include <utils/common/StringUtils.h>
#include <sstream>
Go to the source code of this file.
Functions | |
| std::ostream & | operator<< (std::ostream &os, const OptionsCont &oc) |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const OptionsCont & | oc | |||
| ) |
Generates the output used when current option values shall be printed.
| [in] | os | The stream to write into |
| [in] | oc | The options to print |
Definition at line 245 of file OptionsCont.cpp.
References OptionsCont::getSynonymes(), and OptionsCont::myValues.
00245 { 00246 std::vector<std::string> done; 00247 os << "Options set:" << std::endl; 00248 for (OptionsCont::KnownContType::const_iterator i=oc.myValues.begin(); 00249 i!=oc.myValues.end(); i++) { 00250 std::vector<std::string>::iterator j = find(done.begin(), done.end(), (*i).first); 00251 if (j==done.end()) { 00252 std::vector<std::string> synonymes = oc.getSynonymes((*i).first); 00253 if (synonymes.size()!=0) { 00254 os << (*i).first << " ("; 00255 for (j=synonymes.begin(); j!=synonymes.end(); j++) { 00256 if (j!=synonymes.begin()) { 00257 os << ", "; 00258 } 00259 os << (*j); 00260 } 00261 os << ")"; 00262 } else { 00263 os << (*i).first; 00264 } 00265 if ((*i).second->isSet()) { 00266 os << ": " << (*i).second->getValueString() << std::endl; 00267 } else { 00268 os << ": <INVALID>" << std::endl; 00269 } 00270 done.push_back((*i).first); 00271 copy(synonymes.begin(), synonymes.end(), back_inserter(done)); 00272 } 00273 } 00274 return os; 00275 }
1.5.6