00001 /* --------------------------------------------------------------------------- 00002 Phission : 00003 Realtime Vision Processing System 00004 00005 Copyright (C) 2003-2006 Philip D.S. Thoren (pthoren@cs.uml.edu) 00006 University of Massachusetts at Lowell, 00007 Laboratory for Artificial Intelligence and Robotics 00008 00009 This file is part of Phission. 00010 00011 Phission is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU Lesser General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 Phission is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU Lesser General Public License for more details. 00020 00021 You should have received a copy of the GNU Lesser General Public License 00022 along with Phission; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 00025 ---------------------------------------------------------------------------*/ 00026 00027 /* ----------------------------------------------------------------------- */ 00040 #ifndef _PHARGTABLE_H 00041 #define _PHARGTABLE_H 00042 00043 #include <phStandard.h> 00044 #include <phObject.h> 00045 00052 /*--------------------------------------------------------------------------*/ 00053 /* These are for the argument list - to make modifications easier */ 00063 #define phARG_CHAR 0 00064 00069 #define phARG_INT 1 00070 00075 #define phARG_UINT 2 00076 00081 #define phARG_LONG 3 00082 00087 #define phARG_ULONG 4 00088 00096 #define phARG_BOOL 5 00097 00133 #define phARG_FUNC 6 00134 00139 #define phARG_INT32 7 00140 00145 #define phARG_UINT32 8 00146 00151 #define phARG_INT16 9 00152 00157 #define phARG_UINT16 10 00158 00163 #define phARG_INT8 11 00164 00169 #define phARG_UINT8 12 00170 00175 #define phARG_FLOAT 13 00176 00181 #define phARG_DOUBLE 14 00182 00184 #define phARG_MAX 14 00185 #define phARG_MIN 0 00186 00187 /*--------------------------------------------------------------------------*/ 00192 typedef void (*ph_argtable_funcptr)( void ); 00193 typedef struct argument_table_t argument_table_struct; 00194 00195 /*---------------------------------------------------------------------------*/ 00225 PHAPI(class) phArgTable : public phObject 00226 { 00227 private: 00228 argument_table_struct *m_table; 00229 public: 00230 phArgTable(); 00231 ~phArgTable(); 00232 00238 int parse( int argc, char *argv[] ); 00268 int add( const char *switch_string, 00269 void *pointer, 00270 int type ); 00271 }; 00272 /* \addtogroup CommandLineParsing Command Line Argument Parsing */ 00274 00275 #endif /* PHARGTABLE_H */
Copyright (C) 2002 - 2007 |
Philip D.S. Thoren ( pthoren@users.sourceforge.net ) University Of Massachusetts at Lowell Robotics Lab |