Biorithm  1.1
 All Classes Functions Variables Typedefs Friends
command-line.h
00001 /**************************************************************************
00002  * Copyright (c) 2004-2011 T. M. Murali                                   *
00003  *                                                                        *
00004  * This file is part of Biorithm.                                         *
00005  *                                                                        *
00006  * Biorithm is free software: you can redistribute it and/or modify       *
00007  * it under the terms of the GNU General Public License as published by   *
00008  * the Free Software Foundation, either version 3 of the License, or      *
00009  * (at your option) any later version.                                    *
00010  *                                                                        *
00011  * Biorithm is distributed in the hope that it will be useful,            *
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00014  * GNU General Public License for more details.                           *
00015  *                                                                        *
00016  * You should have received a copy of the GNU General Public License      *
00017  * along with Biorithm.  If not, see <http://www.gnu.org/licenses/>.      *
00018  *                                                                        *
00019  **************************************************************************/
00020 
00027 #ifndef _COMMAND_LINE_H
00028 #define _COMMAND_LINE_H
00029 
00040 class GenericOptions
00041 {
00042 private:
00043   gengetopt_args_info _options;
00044 
00045 public:
00046 
00047   virtual void set(int argc, char **argv)
00048     {
00049       // build command line.
00050       string commandLine;
00051       for (int i = 0; i < argc; i++)
00052         {
00053           commandLine += argv[i];
00054           commandLine += " ";
00055         }
00057       // begin building parameter set
00058       
00059       // parse command line using gengetopt function.
00060       if (0 != cmdline_parser(argc, argv, &_options))
00061         exit(1);
00062     }
00063 
00064 };
00065 
00066 
00067 #endif // _COMMAND_LINE_H 
 All Classes Functions Variables Typedefs Friends