30 #include "boost/algorithm/string.hpp"
34 for(
int i=1; i<argc; i++) {
35 std::string
arg = argv[i];
36 std::string
name, value;
38 arguments_.insert(std::pair<std::string, std::string>(
name, value));
43 std::string &value, std::string
arg) {
45 size_t pos =
arg.find(
"=");
48 value =
arg.substr(pos + 1);
56 char** args =
new char*[2 * size];
61 for (; it !=
end; ++ it) {
62 const std::string &key = it->first;
63 char* argname =
new char[key.length() + 1];
64 strcpy(argname, key.c_str());
67 const std::string &value = it->second;
68 char* argvalue =
new char[value.length() + 1];
69 strcpy(argvalue, value.c_str());
70 args[i ++] = argvalue;
PartBunchBase< T, Dim >::ConstIterator end(PartBunchBase< T, Dim > const &bunch)
void split(std::string &name, std::string &value, std::string arg)
helper to split string
T arg(const std::string name)
std::map< std::string, std::string > arguments_
container for storing command line options
void addArguments(int argc, char **argv)
parse user arguments
char ** getArguments() const