/****************************************************************************** * * file: CmdLine.h * * Copyright (c) 2003, Michael E. Smoot . * All rights reverved. * * See the file COPYING in the top directory of this distribution for * more information. * * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * *****************************************************************************/ #ifndef __CMDLINE_HH__ #define __CMDLINE_HH__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; namespace TCLAP { class CmdLine { protected: list _argList; string _progName; string _message; string _version; int _maxLength; int _numRequired; char _delimiter; public: CmdLine(const string& message, const char delimiter = ' ', const string& version = "none" ); void add( Arg& a ); void usage( int exitVal = 0 ); void version( int exitVal = 0 ); void parse(int argc, char** argv); }; } // These have to be included _after_ CmdLine is declared, because // they rely on CmdLine existing. Don't know why I can't forward // declare CmdLine... this works. #include "HelpVisitor.h" #include "VersionVisitor.h" #include "IgnoreRestVisitor.h" #endif