tclap: CmdLineInterface.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# CmdLineInterface.h

Go to the documentation of this file.

    00001
    00002 /******************************************************************************
    00003  *
    00004  *  file:  CmdLineInterface.h
    00005  *
    00006  *  Copyright (c) 2003, Michael E. Smoot .
    00007  *  Copyright (c) 2004, Michael E. Smoot, Daniel Aarno.
    00008  *  All rights reverved.
    00009  *
    00010  *  See the file COPYING in the top directory of this distribution for
    00011  *  more information.
    00012  *
    00013  *  THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
    00014  *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00015  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    00016  *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00017  *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00018  *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00019  *  DEALINGS IN THE SOFTWARE.
    00020  *
    00021  *****************************************************************************/
    00022
    00023 #ifndef TCLAP_COMMANDLINE_INTERFACE_H
    00024 #define TCLAP_COMMANDLINE_INTERFACE_H
    00025
    00026 #include <string>
    00027 #include <vector>
    00028 #include <list>
    00029 #include <iostream>
    00030 #include <algorithm>
    00031
    00032
    00033 namespace TCLAP {
    00034
    00035 class Arg;
    00036 class CmdLineOutput;
    00037 class XorHandler;
    00038
    00043 class CmdLineInterface
    00044 {
    00045     public:
    00046
    00050         virtual ~CmdLineInterface() {}
    00051
    00056         virtual void add( Arg& a )=0;
    00057
    00062         virtual void add( Arg* a )=0;
    00063
    00071         virtual void xorAdd( Arg& a, Arg& b )=0;
    00072
    00078         virtual void xorAdd( std::vector<Arg*>& xors )=0;
    00079
    00085         virtual void parse(int argc, const char * const * argv)=0;
    00086
    00092         void parse(std::vector<std::string>& args);
    00093
    00097         virtual CmdLineOutput* getOutput()=0;
    00098
    00102         virtual void setOutput(CmdLineOutput* co)=0;
    00103
    00107         virtual std::string& getVersion()=0;
    00108
    00112         virtual std::string& getProgramName()=0;
    00113
    00117         virtual std::list<Arg*>& getArgList()=0;
    00118
    00122         virtual XorHandler& getXorHandler()=0;
    00123
    00127         virtual char getDelimiter()=0;
    00128
    00132         virtual std::string& getMessage()=0;
    00133
    00138         virtual bool hasHelpAndVersion()=0;
    00139
    00144         virtual void reset()=0;
    00145 };
    00146
    00147 } //namespace
    00148
    00149
    00150 #endif