ColPack
Utilities/command_line_parameter_processor.cpp
Go to the documentation of this file.
00001 /************************************************************************************
00002     Copyright (C) 2005-2008 Assefaw H. Gebremedhin, Arijit Tarafdar, Duc Nguyen,
00003     Alex Pothen
00004 
00005     This file is part of ColPack.
00006 
00007     ColPack is free software: you can redistribute it and/or modify
00008     it under the terms of the GNU Lesser General Public License as published
00009     by the Free Software Foundation, either version 3 of the License, or
00010     (at your option) any later version.
00011 
00012     ColPack is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public License
00018     along with ColPack.  If not, see <http://www.gnu.org/licenses/>.
00019 ************************************************************************************/
00020 
00021 #include "command_line_parameter_processor.h"
00022 
00023 void createArgs(int argc, const char* argv[], vector<string>& arg) {
00024         for(int i=0;i<argc;i++) arg.push_back(argv[i]);
00025 }
00026 
00027 int findArg(string argument, vector<string>& arg) {
00028         for (unsigned int i=0; i<arg.size(); i++)
00029         {
00030                 if (arg[i]==argument) return i;
00031         }
00032         return -1;
00033 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines