Changeset 2057


Ignore:
Timestamp:
Sep 11, 2009, 2:11:19 AM (14 years ago)
Author:
Peter
Message:

refs #521. Deprecate class OptionInFile? and OptionOutFile?. Replaced OptinOutFile? with base class OptionFile? in commandline_test

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/commandline_test.cc

    r2049 r2057  
    2727#include "yat/utility/OptionArg.h"
    2828#include "yat/utility/OptionFile.h"
    29 #include "yat/utility/OptionOutFile.h"
    3029#include "yat/utility/OptionHelp.h"
    3130#include "yat/utility/OptionSwitch.h"
     
    5251int main(int argc, char* argv[])
    5352
    54 
    5553  yat::test::Suite suite(argc, argv);
    5654
     
    525523bool test_file2(yat::test::Suite& suite)
    526524{
    527   suite.err() << "Testing OptionOutFile... ";
     525  suite.err() << "Testing OptionFile in write-protected directory... ";
    528526
    529527  if (yat::test::run_as_root()) {
     
    559557  bool ok=true;
    560558  CommandLine cmd;
    561   OptionOutFile out(cmd, "o,out", "output to file");
     559  OptionFile out(cmd, "o,out", "output to file", false, false, "w");
    562560  OptionSwitch help(cmd, "h,help", "display this help and exit");
    563561
  • trunk/yat/utility/OptionInFile.h

    r1797 r2057  
    2323*/
    2424
     25#include "deprecate.h"
    2526#include "OptionFile.h"
    2627
     
    3536  /**
    3637     \brief Class for file related options
     38
     39     \deprecated Provided for backward compatibility with the 0.5
     40     API. Use OptionFile and StreamRedirect instead (see CommandLine
     41     for example code).
    3742   */
    3843  class OptionInFile : public OptionFile
     
    6671    std::ifstream* is_;
    6772   
    68   };
     73  } YAT_DEPRECATE;
    6974
    7075}}} // of namespace utility, yat, and theplu
  • trunk/yat/utility/OptionOutFile.h

    r1805 r2057  
    2424*/
    2525
     26#include "deprecate.h"
    2627#include "OptionFile.h"
    2728
     
    3637  /**
    3738     \brief Class for file related options
     39
     40     \deprecated Provided for backward compatibility with the 0.5
     41     API. Use OptionFile and StreamRedirect instead (see CommandLine
     42     for example code).
    3843   */
    3944  class OptionOutFile : public OptionFile
     
    5156    */
    5257    OptionOutFile(CommandLine& cmd, std::string name, std::string desc,
    53                bool required=false);
     58               bool required=false) YAT_DEPRECATE;
    5459
    5560    /**
Note: See TracChangeset for help on using the changeset viewer.