Changeset 981 for trunk/yat


Ignore:
Timestamp:
Oct 22, 2007, 6:18:40 AM (14 years ago)
Author:
Peter
Message:

adding convenient class for help option

Location:
trunk/yat/utility
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/CommandLine.cc

    r979 r981  
    169169
    170170
    171   std::ostream& operator<<(std::ostream& os, CommandLine& cmd)
     171  std::ostream& operator<<(std::ostream& os, const CommandLine& cmd)
    172172  {
    173173    ColumnStream cs2(os, 2);
  • trunk/yat/utility/CommandLine.h

    r966 r981  
    133133
    134134  private:
    135     friend std::ostream& operator<<(std::ostream& os, CommandLine& cl);
     135    friend std::ostream& operator<<(std::ostream& os, const CommandLine& cl);
    136136    void add_private(std::string, Option&);
    137137    bool is_long_option(std::string str) const;
     
    148148     \brief CommandLine output operator
    149149  */
    150   std::ostream& operator<<(std::ostream&, CommandLine&);
     150  std::ostream& operator<<(std::ostream&, const CommandLine&);
    151151
    152152}}} // end of namespace utility, yat, and theplu
  • trunk/yat/utility/Makefile.am

    r975 r981  
    2727libutility_la_SOURCES = \
    2828  Alignment.cc ColumnStream.cc CommandLine.cc FileUtil.cc kNNI.cc \
    29   matrix.cc NNI.cc Option.cc OptionFile.cc OptionSwitch.cc \
     29  matrix.cc NNI.cc Option.cc OptionFile.cc OptionHelp.cc OptionSwitch.cc \
    3030  PCA.cc stl_utility.cc SVD.cc TypeInfo.cc utility.cc vector.cc WeNNI.cc
    3131
     
    3636  Exception.h FileUtil.h Iterator.h iterator_traits.h \
    3737  IteratorWeighted.h kNNI.h matrix.h NNI.h \
    38   Option.h OptionArg.h OptionFile.h OptionSwitch.h \
     38  Option.h OptionArg.h OptionFile.h OptionHelp.h OptionSwitch.h \
    3939  PCA.h stl_utility.h SVD.h TypeInfo.h utility.h vector.h WeNNI.h \
    4040  yat_assert.h
  • trunk/yat/utility/OptionSwitch.cc

    r965 r981  
    4242                              std::vector<std::string>::iterator last)
    4343  {   
     44    do_parse2(first, last);
     45  }
     46
     47
     48  void OptionSwitch::do_parse2(std::vector<std::string>::iterator first,
     49                               std::vector<std::string>::iterator last)
     50  {   
    4451  }
    4552
  • trunk/yat/utility/OptionSwitch.h

    r965 r981  
    6565
    6666    /**
     67       called inside do_parse and allows inherited classes to add
     68       stuff to do_parse.
     69     */
     70    virtual void do_parse2(std::vector<std::string>::iterator,
     71                           std::vector<std::string>::iterator);
     72
     73    /**
    6774     */
    6875    std::string print2(void) const;
Note: See TracChangeset for help on using the changeset viewer.