Changeset 1318 for trunk


Ignore:
Timestamp:
Nov 27, 2010, 4:54:48 PM (10 years ago)
Author:
Peter Johansson
Message:

latest yat

Location:
trunk/yat
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/CommandLine.cc

    r1240 r1318  
    1 // $Id: CommandLine.cc 2347 2010-10-24 00:52:25Z peter $
     1// $Id: CommandLine.cc 2351 2010-11-24 15:33:39Z peter $
    22
    33/*
     
    204204
    205205
    206   std::vector<std::string> CommandLine::split(std::string str, char del) const
    207   {
    208     std::vector<std::string> vec;
    209     std::stringstream ss(str);
    210     while (std::getline(ss, str, del)){
    211       vec.push_back(str);
    212     }
    213     return vec;
    214   }
    215 
    216206  std::string CommandLine::try_help(void) const
    217207  {
  • trunk/yat/CommandLine.h

    r1118 r1318  
    22#define _theplu_yat_utility_commandline_
    33
    4 //$Id: CommandLine.h 2288 2010-06-28 02:05:31Z peter $
     4//$Id: CommandLine.h 2351 2010-11-24 15:33:39Z peter $
    55
    66/*
     
    190190    bool is_long_option(std::string str) const;
    191191    bool is_short_option(std::string str) const;
    192     std::vector<std::string> split(std::string str, char del) const;
    193192
    194193    std::string description_;
  • trunk/yat/OptionArg.h

    r1039 r1318  
    22#define _theplu_yat_utility_option_arg_
    33
    4 // $Id: OptionArg.h 2210 2010-03-05 22:59:01Z peter $
     4// $Id: OptionArg.h 2352 2010-11-27 00:09:14Z peter $
    55
    66/*
     
    147147      catch (runtime_error& e) {
    148148        std::stringstream sstr(rhs);
    149         sstr << ": invalid argument";
     149        sstr << "invalid argument";
     150        sstr << "`" << rhs << "' for `";
     151        if (!long_name().empty())
     152          sstr << "--" << long_name();
     153        else
     154          sstr << "-" << short_name();
     155        sstr << "'";
    150156        throw cmd_error(sstr.str());
    151157      }
Note: See TracChangeset for help on using the changeset viewer.