[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[oMetah-devel] ometah/interface ometah.cpp
From: |
Jean-Philippe Aumasson |
Subject: |
[oMetah-devel] ometah/interface ometah.cpp |
Date: |
Tue, 07 Jun 2005 11:34:01 -0400 |
CVSROOT: /cvsroot/ometah
Module name: ometah
Branch:
Changes by: Jean-Philippe Aumasson <address@hidden> 05/06/07 15:34:01
Modified files:
interface : ometah.cpp
Log message:
* get usage strings from itsSets, for problem and metaheuristics
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/interface/ometah.cpp.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
Patches:
Index: ometah/interface/ometah.cpp
diff -u ometah/interface/ometah.cpp:1.33 ometah/interface/ometah.cpp:1.34
--- ometah/interface/ometah.cpp:1.33 Tue Jun 7 12:22:47 2005
+++ ometah/interface/ometah.cpp Tue Jun 7 15:34:01 2005
@@ -1,5 +1,5 @@
/***************************************************************************
- * $Id: ometah.cpp,v 1.33 2005/06/07 12:22:47 nojhan Exp $
+ * $Id: ometah.cpp,v 1.34 2005/06/07 15:34:01 jpa Exp $
* Copyright : Université Paris 12 Val-de-Marne
* (61 avenue du Général de Gaulle, 94010, Créteil, France)
* Author : Johann Dréo <address@hidden>
@@ -117,14 +117,39 @@
VERBOSE = 0;
+ /*
+ * Make the usage strings
+ */
+
+ vector<string> vec = setProblem.getKeyList();
+ vector<string>::iterator it;
+ it = vec.begin();
+ stringstream problemUsage;
+ problemUsage << "problem ( ";
+ while ( it < vec.end() ) {
+ problemUsage << (*it) << ", ";
+ it++;
+ }
+ problemUsage << " )";
+
+ vec = setMetaheuristic.getKeyList();
+ it = vec.begin();
+ stringstream metahUsage;
+ metahUsage << "metaheuristic ( ";
+ while (it < vec.end() ) {
+ metahUsage << (*it) << ", ";
+ it++;
+ }
+ metahUsage << " )";
+
try {
// arguments definitions (only here !!)
argumentParser.defArg("-p", "--problem",
- "problem ( Rosenbrock | ... )",
+ (problemUsage.str()).c_str(),
true, "string", "Rosenbrock");
argumentParser.defArg("-m", "--metah",
- "metaheuristic ( CEDA | ... ) ",
+ (metahUsage.str()).c_str(),
true, "string", "CEDA");
argumentParser.defArg("-C", "--com-client",
"communication client mode ( Embedded | ...)" ,