Ignore:
Timestamp:
Dec 22, 2006, 9:42:39 AM (17 years ago)
Author:
Jari Häkkinen
Message:

Addresses #170.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Option.h

    r687 r715  
    5656    Option(char short_name, std::string long_name,
    5757           argument_type arg, std::string desc);
    58            
    5958
    6059    ///
    6160    /// @return argument type for option
    6261    ///
    63     inline const argument_type& arg_type(void) const { return arg_type_; }
     62    argument_type arg_type(void) const;
    6463   
     64    ///
     65    /// @return long name
     66    ///
     67    std::string long_name(void) const;
     68
    6569    ///
    6670    /// @return long name unless long name is empty in which case the
    6771    /// short one character name is returned.
    6872    ///
    69     inline std::string name(void) const
    70     { return !long_name_.empty() ? long_name_ : std::string(&short_name_) ; }
     73    std::string name(void) const;
    7174
    7275    ///
    73     /// @return short name
     76    /// @brief Get or set the present status.
    7477    ///
    75     inline char short_name(void) const { return short_name_; }
    76 
     78    /// @return true if option has been detected in parsing
    7779    ///
    78     /// @return long name
    79     ///
    80     inline const std::string& long_name(void) const { return long_name_; }
     80    bool& present(void);
    8181
    8282    ///
     
    8888
    8989    ///
    90     /// @return true if option has been detected in parsing
     90    /// @return short name
    9191    ///
    92     inline bool& present(void) { return present_; }
     92    char short_name(void) const;
    9393
    9494    ///
    9595    /// @return argument value
    9696    ///
    97     inline std::string& value(void) { return value_; }
     97    std::string value(void);
    9898
    9999
Note: See TracChangeset for help on using the changeset viewer.