TF++, Miscellaneous classes and modules in C++:

◆ CmdlineArgument()

tfxx::cmdline::helper::CmdlineArgument::CmdlineArgument ( const std::string &  arg,
const Tkeylist keys 
)

Definition at line 59 of file xcmdline.cc.

References Misoption, Moption, and Mvalue.

61  {
62  Mvalue=arg;
63  Misoption=false;
64  helper::Tkeylist::const_iterator i=keys.begin();
65  // std::cout << Mvalue << std::endl;
66  while ((i!=keys.end()) && (!Misoption))
67  {
68  // std::cout << *i << " " << Mvalue.find(*i) << std::endl;
69  if (Mvalue.find(*i) == 0)
70  {
71  Misoption=true;
72  Moption.first = i->substr(0, i->size()-1);
73  Moption.second= Mvalue.substr(Moption.first.size()+1);
74  }
75  ++i;
76  }
77  } // CmdlineArgument constructor