X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/15ace044d0d9e82ef744e22cf84168771e669678..986d39a220570cc275f7eb248f70380fef3826b3:/options.cpp diff --git a/options.cpp b/options.cpp index 96542f6..78612a1 100644 --- a/options.cpp +++ b/options.cpp @@ -11,6 +11,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(main); #include "deployment.h" #include "process.h" #include "loba_besteffort.h" +#include "loba_bulk.h" #include "loba_fairstrategy.h" #include "loba_makhoul.h" #include "loba_makhoul2.h" @@ -33,6 +34,7 @@ namespace opt { std::string program_name; int help_requested = 0; bool version_requested = false; + int option_x = 0; // hidden option, for debugging purpose // Simulation parameters int log_rate = 1; @@ -78,6 +80,8 @@ namespace opt { { NOL_INSERT("besteffort", "balance with best effort strategy", loba_besteffort); + NOL_INSERT("bulk", "describe your algorithm here...", + loba_bulk); NOL_INSERT("fairstrategy", "balance with fair strategy", loba_fairstrategy); NOL_INSERT("makhoul", "balance with Makhoul's PhD algorithm", @@ -210,11 +214,11 @@ bool opt::parse_args(int* argc, char* argv[]) opt::program_name.erase(0, 1 + opt::program_name.find_last_of('/')); #define PARSE_ARG(x) result = opt_helper::parse_arg(c, optarg, (x)) && result - + int c; opterr = 0; while ((c = getopt(*argc, argv, - "a:bc:C:d:D:ehi:I:l:L:m:M:N:r:Rs:S:t:T:vV")) != -1) { + "a:bc:C:d:D:ehi:I:l:L:m:M:N:r:Rs:S:t:T:vVx:")) != -1) { switch (c) { case 'a': opt::loba_algo = optarg; @@ -306,6 +310,10 @@ bool opt::parse_args(int* argc, char* argv[]) case 'V': opt::version_requested = true; break; + case 'x': + PARSE_ARG(opt::option_x); + XBT_WARN("option_x set to %d", opt::option_x); + break; case '?': XBT_ERROR("invalid option -- '%c'", optopt); result = false;