src/ds++/XGetopt.cc
XGetopt::csmap XGetopt::store_longopts(csmap const &longopts_) {
  Require(longopts_.size() > 0);
  csmap retValue;
  for (auto const &it : longopts_) {
    char const key = it.first;
    std::string const value = it.second;
    if (value[value.size() - 1] == ':')
      retValue[key] = value.substr(0, value.size() - 1);
    else
      retValue[key] = value;
  }
  Ensure(retValue.size() == longopts_.size());
  return retValue;
}
//------------------------------------------------------------------------------------------------//
/*!
 * \brief Convert a map<char,string> into easy-to-parse vectors and strip
 *        colons.
 * \param[in] longopts_ A map<char,string> data structure that contains all supported options that
 *            are to be registered. Each entry pair represents one option that is registered, a
 *            short option that is used with a single dash (-h) and a long option that is used with
 *            a double dash (--help). Strings followed by a colon represent options that require
 *            additional information to be read from the command line.
 *
 * \return A vector of chars that represent all support options.
 *
 * If the string value ends in a colon, ':', strip it from the map.  This data has already been
 * processed to indicate that an argument following the option is expected.
 */
\brief Convert a map into easy-to-parse vectors and strip
colons.
\param[in] longopts_ A map data structure that contains all supported options that
are to be registered. Each entry pair represents one option that is registered, a
short option that is used with a single dash (-h) and a long option that is used with
a double dash (--help). Strings followed by a colon represent options that require
additional information to be read from the command line.

\return A vector of chars that represent all support options.

If the string value ends in a colon, ':', strip it from the map.  This data has already been
processed to indicate that an argument following the option is expected.
\ brief Convert a map into easy - to - parse vectors and strip colons . \ param [ in ] longopts_ A map data structure that contains all supported options that are to be registered . Each entry pair represents one option that is registered a short option that is used with a single dash ( - h ) and a long option that is used with a double dash ( -- help ) . Strings followed by a colon represent options that require additional information to be read from the command line . \ return A vector of chars that represent all support options . If the string value ends in a colon ' : ' strip it from the map . This data has already been processed to indicate that an argument following the option is expected .
XGetopt::csmap XGetopt::store_longopts(csmap const &longopts_) {
  Require(longopts_.size() > 0);
  csmap retValue;
  for (auto const &it : longopts_) {
    char const key = it.first;
    std::string const value = it.second;
    if (value[value.size() - 1] == ':')
      retValue[key] = value.substr(0, value.size() - 1);
    else
      retValue[key] = value;
  }
  Ensure(retValue.size() == longopts_.size());
  return retValue;
}
XGetopt :: csmap XGetopt :: store_longopts ( csmap const & longopts_ ) { Require ( longopts_ . size ( ) > 0 ) ; csmap retValue ; for ( auto const & it : longopts_ ) { char const key = it . first ; std :: string const value = it . second ; if ( value [ value . size ( ) - 1 ] == ' ' ) retValue [ key ] = value . substr ( 0 , value . size ( ) - 1 ) ; else retValue [ key ] = value ; } Ensure ( retValue . size ( ) == longopts_ . size ( ) ) ; return retValue ; }
\brief Convert a map<char,string> into easy-to-parse vectors and strip
        colons.
\ brief Convert a map<char string > into easy - to - parse vectors and strip colons .