template class Options<typename C>

A set of options for a configurable class C.

This template creates a option set class for options handlers that use member functions of class C to process configuration options.



Public Members:
    Options () ;
    Constructor
    An empty option set is created.

    virtual ~Options () ;
    Destroys the option set
    All contained option handlers are deleted as well.

    void apply (C& inst, ArgVector& args) ;
    Try to apply options to the given instance.
    For each element in args that matches a contained option, the according option handler is invoked with the given instance.

    Options& add (OptionHandler<C>* opt) ;
    Add an option handler to the option set.
    The option handler is added without further checks.

    Options& remove (OptionHandler<C>* opt) ;
    Remove an option handler.
    If the given option handler is member of the option set, it is removed. Otherwise nothing is done.

    Options& clear () ;
    Clears the option set.
    After invoking this function, the option set is empty.




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