Slice Tools
  • Home
  • SourceForge Page


  • libFoundation
  • Home
  • Class Hierarchy
  • Class List
  • Class Members
  • Examples


  • SourceForge.net Logo
     

    IntOptionResult Class Reference

    #include <OptionResult.hh>

    Inheritance diagram for IntOptionResult:

    OptionResult List of all members.

    Detailed Description

    Class for managing results of Integers.


    Public Member Functions

     IntOptionResult (const std::string &optionHelp, int *result)
     Constructor sets defaults for integer class, and constructs base class.

     ~IntOptionResult ()
     Empty deconstructor.

    void writeDefault ()
     If a result pointer is set, prints out its value.

    void setVal (const std::string &name, const std::string &val)
     Converts a string value into an integer value, and writes it to the result.


    Constructor & Destructor Documentation

    IntOptionResult::IntOptionResult const std::string &  optionHelp,
    int *  result
     

    Constructor sets defaults for integer class, and constructs base class.

    IntOptionResult::~IntOptionResult  ) 
     

    Empty deconstructor.


    Member Function Documentation

    void IntOptionResult::setVal const std::string &  name,
    const std::string &  val
    [virtual]
     

    Converts a string value into an integer value, and writes it to the result.

    Increments the counter for the result being set, verifies value, saves it as the raw value, and writes the integer form to the result pointer if it was set.

    Exceptions:
    InvalidOptionError If non-numeric data is in value
    See also:
    validateArgumentCount

    Implements OptionResult.

    void IntOptionResult::writeDefault  )  [virtual]
     

    If a result pointer is set, prints out its value.

    Note: This is identical in the concrete classes, because the base class has no concept of a result pointer

    Implements OptionResult.


    The documentation for this class was generated from the following files: