SUMO - Simulation of Urban MObility
OptionsParser.h
Go to the documentation of this file.
00001 /****************************************************************************/
00009 // Parses command line arguments
00010 /****************************************************************************/
00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors
00013 /****************************************************************************/
00014 //
00015 //   This file is part of SUMO.
00016 //   SUMO is free software: you can redistribute it and/or modify
00017 //   it under the terms of the GNU General Public License as published by
00018 //   the Free Software Foundation, either version 3 of the License, or
00019 //   (at your option) any later version.
00020 //
00021 /****************************************************************************/
00022 #ifndef OptionsParser_h
00023 #define OptionsParser_h
00024 
00025 
00026 // ===========================================================================
00027 // included modules
00028 // ===========================================================================
00029 #ifdef _MSC_VER
00030 #include <windows_config.h>
00031 #else
00032 #include <config.h>
00033 #endif
00034 
00035 
00036 // ===========================================================================
00037 // class declarations
00038 // ===========================================================================
00039 class OptionsCont;
00040 
00041 
00042 // ===========================================================================
00043 // class definitions
00044 // ===========================================================================
00056 class OptionsParser {
00057 public:
00066     static bool parse(int argc, char** argv);
00067 
00068 private:
00077     static int check(const char* arg1, const char* arg2, bool& ok);
00078 
00079 
00087     static bool checkParameter(const char* arg1);
00088 
00089 
00097     static bool isAbbreviation(const char* arg1);
00098 
00099 
00105     static std::string convert(const char* arg);
00106 
00107 
00113     static std::string convert(char abbr);
00114 
00115 
00125     static bool processNonBooleanSingleSwitch(OptionsCont& oc, const char* arg);
00126 
00127 
00128 };
00129 
00130 
00131 #endif
00132 
00133 /****************************************************************************/
00134 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines