Slice Tools
  • Home
  • SourceForge Page


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


  • SourceForge.net Logo
     

    Foundation Class Reference

    #include <Foundation.hh>

    List of all members.


    Detailed Description

    Wrapper Class to ease use of Options, Configuration Files, and Logging.
    Examples:

    example-configfile.cc, example-logging.cc, example-minimal.cc, example-minimal.out, example-options.cc, and example-options.out.


    Public Member Functions

     Foundation (std::string version, std::string helptext, std::string dependencies, int argc, char **argv)
     Constructor: Initializes options.

     ~Foundation ()
     Deletes logger, config file, and options handlers.

    void handleStandardOptions ()
     Handles standard options appropriately.

    void printHelpText ()
    std::string getVersion ()
     Gets version string.

    std::string getHelpText ()
     Gets Help Text.

    OptionsgetOptions ()
     Gets Command Line Option pointer.

    ConfigFilegetConfig ()
     Gets Configuration File pointer.

    LoggergetLogger ()
     Gets the main log manager.

    LogCategory log ()
     Gets the default log for ease of use.

    void disableOptionHelp ()
     Disables printing help on each option.


    Constructor & Destructor Documentation

    Foundation::Foundation std::string  version,
    std::string  helptext,
    std::string  dependencies,
    int  argc,
    char **  argv
     

    Constructor: Initializes options.

    Initializes Options, ConfigFile, and Logger based on command line options. Used for automatic incorporation of standard options.

    Parameters:
    version Version information for program if --version or -V is given
    helptext Short help text to display if --help of -h is given
    dependencies Dependency information for --depend
    argc Standard argument count
    argv Standard array of strings for argument values

    Foundation::~Foundation  ) 
     

    Deletes logger, config file, and options handlers.


    Member Function Documentation

    void Foundation::disableOptionHelp  ) 
     

    Disables printing help on each option.

    ConfigFile * Foundation::getConfig  ) 
     

    Gets Configuration File pointer.

    Examples:
    example-configfile.cc.

    std::string Foundation::getHelpText  ) 
     

    Gets Help Text.

    Logger * Foundation::getLogger  ) 
     

    Gets the main log manager.

    Exceptions:
    Exception If a log manager was not created, which means handleStandardOptions was never called
    Examples:
    example-logging.cc.

    Options * Foundation::getOptions  ) 
     

    Gets Command Line Option pointer.

    Examples:
    example-options.cc.

    std::string Foundation::getVersion  ) 
     

    Gets version string.

    void Foundation::handleStandardOptions  ) 
     

    Handles standard options appropriately.

    Examples:
    example-configfile.cc, example-logging.cc, example-minimal.cc, and example-options.cc.

    LogCategory Foundation::log  ) 
     

    Gets the default log for ease of use.

    Examples:
    example-logging.cc.

    void Foundation::printHelpText  ) 
     


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