1#ifndef DUNE_FEM_ASCIIPARSER_HH
2#define DUNE_FEM_ASCIIPARSER_HH
18 static inline bool readParameter( std::istream& file,
19 const std::string keyword,
24 bool readData =
false;
31 if((keyHelp[0] ==
'%') || (keyHelp[0] ==
'#'))
34 std::getline(file,tmp);
39 int pos = keyHelp.find_first_of(
':');
40 int pos1 = keyHelp.find_first_of(
' ');
52 std::string key (keyHelp,0,keyHelp.size() - pos);
67 static const int MAXTAB = 30;
68 int length = MAXTAB - keyword.size();
69 std::cout <<
"Reading " << keyword;
70 for(
int i=0; i<length; i++) std::cout <<
".";
71 std::cout <<
" " << data << std::endl;
77 std::cerr <<
"WARNING: couldn't read " << keyword << std::endl;
87 static inline bool readParameter(
const std::string filename,
88 const std::string keyword,
93 std::ifstream file (filename.c_str());
97 std::cerr <<
"WARNING: couldn't open file '" << filename <<
"' in " << __FILE__<<
" line: " << __LINE__ << std::endl;
100 const bool result = readParameter( file, keyword, data, verbose, warn );
Dune namespace.
Definition: alignedallocator.hh:13