$treeview $search $mathjax
|
Palabos
Version 1.1
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /* This file is part of the Palabos library. 00002 * 00003 * Copyright (C) 2011 FlowKit Sarl 00004 * Avenue de Chailly 23 00005 * 1012 Lausanne, Switzerland 00006 * E-mail contact: contact@flowkit.com 00007 * 00008 * The most recent release of Palabos can be downloaded at 00009 * <http://www.palabos.org/> 00010 * 00011 * The library Palabos is free software: you can redistribute it and/or 00012 * modify it under the terms of the GNU Affero General Public License as 00013 * published by the Free Software Foundation, either version 3 of the 00014 * License, or (at your option) any later version. 00015 * 00016 * The library 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 Affero General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Affero General Public License 00022 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00023 */ 00024 00028 #ifndef PLB_INIT_H 00029 #define PLB_INIT_H 00030 00031 #include "core/globalDefs.h" 00032 #include "parallelism/mpiManager.h" 00033 #include "io/parallelIO.h" 00034 #include <vector> 00035 #include <string> 00036 00037 namespace plb { 00038 00039 void plbInit(int *argc, char ***argv, bool verbous=false); 00040 void plbInit(); 00041 00042 namespace global { 00043 00044 class MainArgv { 00045 public: 00046 MainArgv(std::string argument_, int whichArg_); 00047 operator std::string() const; 00048 template<typename T> void read(T& variable); 00049 template<typename T> bool readNoThrow(T& variable); 00050 private: 00051 std::string argument; 00052 int whichArg; 00053 }; 00054 00055 class MainArgs { 00056 public: 00057 int argc() const; 00058 MainArgv argv(int whichArg) const; 00059 void setArgs(int argcValue, char*** argvPointer); 00060 void setArgs(std::vector<std::string> arguments_); 00061 private: 00062 MainArgs(); 00063 private: 00064 std::vector<std::string> arguments; 00065 00066 friend MainArgs& mainArguments(); 00067 }; 00068 00069 00070 MainArgs& mainArguments(); 00071 int argc(); 00072 MainArgv argv(int whichArg); 00073 00074 } // namespace global 00075 00076 } // namespace plb 00077 00078 #endif // PLB_INIT_H
1.6.3
1.6.3