22 #ifndef MED_Utilities_HeaderFile 23 #define MED_Utilities_HeaderFile 42 static std::string GetPrefix();
52 assert (in_file.good());
53 assert (!ds_name.empty());
55 std::string olds, news;
58 in_file >> olds >> news;
63 while( ((olds !=
"-1") || (news ==
"-1") ) && !in_file.eof() ){
82 inline double D_to_e(std::string& number)
88 const int position = number.find(
"D",6);
89 if(position != std::string::npos){
90 number.replace(position, 1,
"e");
92 return std::atof (number.c_str());
102 std::ifstream in_stream(theFileName.c_str());
105 std::string olds, news;
106 while (!in_stream.eof()){
108 std::getline(in_stream, news,
'\n');
110 return (olds ==
" -1");
118 #define MESSAGE(msg) std::cout<<__FILE__<<"["<<__LINE__<<"]::"<<msg<<endl; 120 #define BEGMSG(msg) std::cout<<UNV::PrefixPrinter::GetPrefix()<<msg 122 #define ADDMSG(msg) std::cout<<msg 129 #define EXCEPTION(TYPE, MSG) {\ 130 std::ostringstream aStream;\ 131 aStream<<__FILE__<<"["<<__LINE__<<"]::"<<MSG;\ 132 throw TYPE(aStream.str());\ double D_to_e(std::string &number)
Method for converting exponential notation from "D" to "e", for example 3.141592654D+00 –> 3...
bool check_file(const std::string theFileName)
bool beginning_of_dataset(std::istream &in_file, const std::string &ds_name)
#define MESHDRIVERUNV_EXPORT