Changeset 2046


Ignore:
Timestamp:
Sep 2, 2009, 11:42:32 PM (11 years ago)
Author:
Peter
Message:

improved docs on some options classes (fixes #517, and removed some includes not needed.

Location:
trunk/yat/utility
Files:
7 edited

Legend:

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

    r1874 r2046  
    3333#include <functional>
    3434#include <fstream>
    35 #include <iostream>
     35#include <ostream>
    3636#include <sstream>
    3737#include <stdexcept>
  • trunk/yat/utility/CommandLine.h

    r1954 r2046  
    2626#include <cctype>
    2727#include <map>
    28 #include <iostream>
     28#include <iosfwd>
    2929#include <sstream>
    3030#include <stdexcept>
     
    130130       \brief parse the commandline
    131131
     132       First the commandline is parsed to detect which options are
     133       present, then each Option parses the its relevant part of
     134       commandline (Option::parse()), and finally each Option is
     135       validated (Option::validate()).
     136
    132137       throw cmd_error if an error is detected.
    133138    */
  • trunk/yat/utility/Option.h

    r1797 r2046  
    66/*
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2009 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2324*/
    2425
    25 #include <iostream>
    2626#include <string>
    2727#include <vector>
     
    104104       \brief Validate the Option
    105105
    106        This function is called after commandline is parsed.
     106       This function is called by CommandLine::parse() after all
     107       options have been detected and parsed (see Option::parse()).
    107108     */
    108109    void validate(void);
  • trunk/yat/utility/OptionArg.h

    r1797 r2046  
    4545     "--support-gnu=value", POSIX-like "--support-posix value", as
    4646     well as shorter "-s value". The argument of an parameter is
    47      retrived by the value() function
     47     retrived by the value() function. The type \c T should be either
     48     a string or a type supported by function convert().
    4849   */
    4950  template<typename T>
  • trunk/yat/utility/OptionFile.h

    r1797 r2046  
    66/*
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2009 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3435  /**
    3536     \brief Class for file related options
     37
     38     This class could be used for an option with argument when the
     39     argument is a file. The class adds some convenience on top of
     40     OptionArg<std::string> by utilizing the FileUtil class. Besides
     41     setting the name and description of the option and whether the
     42     option must appear in the command line, you can declare whether
     43     the file must exist and whether it must fulfill certain file
     44     permissions. If any of these requirements are not met, an
     45     exception will be thrown during the validation phase in
     46     CommandLine::parse.
     47
     48     \see FileUtil
    3649   */
    3750  class OptionFile : public OptionArg<std::string>
     
    4760       \param required If true option must be found in commandline or
    4861       exception is thrown in validation
    49        \param exist if true File must exist
     62       \param exist if true File must exist, see FileUtil::exists()
    5063       \param bits used to check permission on file, see
    51        FileUtil
     64       FileUtil::permissions()
    5265    */
    5366    OptionFile(CommandLine& cmd, std::string name, std::string desc,
  • trunk/yat/utility/OptionHelp.cc

    r1797 r2046  
    2323#include "CommandLine.h"
    2424
    25 #include <sstream>
     25#include <iostream>
    2626#include <string>
    2727
  • trunk/yat/utility/OptionInFile.cc

    r1797 r2046  
    2424#include <cassert>
    2525#include <fstream>
     26#include <iostream>
    2627#include <string>
    2728
Note: See TracChangeset for help on using the changeset viewer.