class LogFileOption : OptionHandler

Option handler for log file names.

This option handler interprets the next argument (if it does not begin with a dash) as a file name and sets the according file as log output stream.



Public Members:
    LogFileOption ( StreamingObserver& observer, const string& id, bool autoEnable = true, bool consuming = true ) ;
    Creates a log file option handler instance.
    The log file (the argument behind the argument equal to id) is associated to the given observer. If autoEnable is true, the observer will also be enabled as well. It is strongly recommended that the option flag is consumed because the file argument will be consumed anyway.

    virtual ~LogFileOption () ;
    The destructor.
    Does nothing special.

    virtual ArgVector::iterator fireOption ( StreamingObserver& inst, const string& id, ArgVector& args, ArgVector::iterator rest ) ;
    Handles a log file option.
    The argument behind the option flag is interpreted as file name. (If it does not begin with a dash!) It is tried to create a file with this name in the current environment (working directory). If the no file name is present, a LogFileNameMissing exception is thrown. If the file cannot be opened, a CannotOpenLog exception is thrown by setLog of StreamingObserver.




The Scrunitizer C++ Unit Test Framework
by Bernd Linowski

[Scrunitizer]  [Overview]  [Cookbook]  [Download]  [Index]  [Linosphere]

Page generated: 1 Nov 2000
(C) by Bernd Linowski
scrunitizer@linosphere.de